<commit_before>define([
  'jquery',
  'underscore',
  'backbone',
  'bootstrap',
  'views/backup/volumeSetting',
  'text!templates/backup/volumeEmail.html'
], function($, _, Backbone, Bootstrap, VolumeSettingView,
    volumeEmailTemplate) {
  'use strict';
  var VolumeSettingEmailView = VolumeSettingView.extend({
    template: _.template(volumeEmailTemplate),
    name: 'email',
    title: 'Email Address for Alerts',
    icon: 'icon-envelope',
    required: false,
    events: {
      'keyup input': 'triggerChange',
      'change input': 'triggerChange',
      'paste input': 'triggerChange',
      'cut input': 'triggerChange',
      'click .send-test-email': 'setSendTest'
    },
    triggerChange: function() {
      this.trigger('change', this.getValue());
    },
    getSendTest: function() {
      if (this.sendTest) {
        return true;
      }
      return false;
    },
    setSendTest: function(state) {
      var tooltipText;
      if (state !== true && state !== false) {
        state = !this.sendTest;
      }
      if (state) {
        this.sendTest = true;
        tooltipText = 'Test email will be sent after saving';
        this.$('.send-test-email .tooltip-inner').text(tooltipText);
        this.$('.send-test-email').attr('data-original-title', tooltipText);
        this.$('.send-test-email').tooltip('fixTitle');
        this.$('.send-test-email').addClass('icon-white');
      }
      else {
        this.sendTest = false;
        tooltipText = 'Send test email after saving';
        this.$('.send-test-email .tooltip-inner').text(tooltipText);
        this.$('.send-test-email').attr('data-original-title', tooltipText);
        this.$('.send-test-email').tooltip('fixTitle');
        this.$('.send-test-email').removeClass('icon-white');
      }
    }
  });

  return VolumeSettingEmailView;
});<commit_msg>Fix test email tooltip<commit_after>define([
  'jquery',
  'underscore',
  'backbone',
  'bootstrap',
  'views/backup/volumeSetting',
  'text!templates/backup/volumeEmail.html'
], function($, _, Backbone, Bootstrap, VolumeSettingView,
    volumeEmailTemplate) {
  'use strict';
  var VolumeSettingEmailView = VolumeSettingView.extend({
    template: _.template(volumeEmailTemplate),
    name: 'email',
    title: 'Email Address for Alerts',
    icon: 'icon-envelope',
    required: false,
    events: {
      'keyup input': 'triggerChange',
      'change input': 'triggerChange',
      'paste input': 'triggerChange',
      'cut input': 'triggerChange',
      'click .send-test-email': 'setSendTest'
    },
    triggerChange: function() {
      this.trigger('change', this.getValue());
    },
    getSendTest: function() {
      if (this.sendTest) {
        return true;
      }
      return false;
    },
    setSendTest: function(state) {
      var tooltipText;
      if (state !== true && state !== false) {
        state = !this.sendTest;
      }
      if (state) {
        this.sendTest = true;
        tooltipText = 'Test email will be sent after saving';
        this.$('.send-test-email').parent().find('.tooltip-inner').text(
          tooltipText);
        this.$('.send-test-email').attr('data-original-title', tooltipText);
        this.$('.send-test-email').tooltip('fixTitle');
        this.$('.send-test-email').addClass('icon-white');
      }
      else {
        this.sendTest = false;
        tooltipText = 'Send test email after saving';
        this.$('.send-test-email').parent().find('.tooltip-inner').text(
          tooltipText);
        this.$('.send-test-email').attr('data-original-title', tooltipText);
        this.$('.send-test-email').tooltip('fixTitle');
        this.$('.send-test-email').removeClass('icon-white');
      }
    }
  });

  return VolumeSettingEmailView;
});
{'fraction_non_alphanumeric': 0.1686682679476915, 'fraction_numerical': 0.0, 'mean_word_length': 2.755511022044088, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4137993', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1096, 'n_words': 211}