ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject ambari git commit: AMBARI-15943. Tooltips for overrides sometimes does not disappear (onechiporenko)
Date Tue, 19 Apr 2016 07:08:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 83452cbdc -> 91122e4fc


AMBARI-15943. Tooltips for overrides sometimes does not disappear (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91122e4f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91122e4f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91122e4f

Branch: refs/heads/trunk
Commit: 91122e4fc0522762b64048a96a8ad82e646fdd46
Parents: 83452cb
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Mon Apr 18 17:47:59 2016 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Tue Apr 19 10:08:25 2016 +0300

----------------------------------------------------------------------
 .../app/views/common/configs/overriddenProperty_view.js       | 7 ++++++-
 .../views/common/configs/service_configs_by_category_view.js  | 5 ++++-
 .../app/views/common/configs/widgets/config_widget_view.js    | 4 ++++
 .../views/common/configs/widgets/slider_config_widget_view.js | 1 +
 ambari-web/app/views/common/controls_view.js                  | 5 +----
 5 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/91122e4f/ambari-web/app/views/common/configs/overriddenProperty_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/overriddenProperty_view.js b/ambari-web/app/views/common/configs/overriddenProperty_view.js
index 97b2fdc..bade7bc 100644
--- a/ambari-web/app/views/common/configs/overriddenProperty_view.js
+++ b/ambari-web/app/views/common/configs/overriddenProperty_view.js
@@ -19,5 +19,10 @@
 var App = require('app');
 
 App.ServiceConfigView.SCPOverriddenPropertyView = Ember.View.extend({
-  templateName: require('templates/common/configs/overriddenProperty')
+  templateName: require('templates/common/configs/overriddenProperty'),
+
+  willDestroyElement: function () {
+    this.$('[data-toggle=tooltip]').tooltip('destroy');
+  }
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/91122e4f/ambari-web/app/views/common/configs/service_configs_by_category_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/service_configs_by_category_view.js b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 171b922..bdd0530 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -19,7 +19,6 @@
 var App = require('app');
 
 var validator = require('utils/validator');
-var stringUtils = require('utils/string_utils');
 require('utils/configs/modification_handlers/modification_handler');
 
 App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverridable, {
@@ -325,6 +324,10 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
     });
   },
 
+  willDestroyElement: function () {
+    $('[data-toggle=tooltip]').tooltip('destroy');
+  },
+
   /**
    * @returns {string}
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/91122e4f/ambari-web/app/views/common/configs/widgets/config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/config_widget_view.js b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
index 3be9a60..1078386 100644
--- a/ambari-web/app/views/common/configs/widgets/config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/config_widget_view.js
@@ -167,6 +167,7 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
     },
 
     willDestroyElement: function() {
+      $(this.get('element')).tooltip('destroy');
       this.removeObserver('issuedConfig.warnMessage', this, this.errorLevelObserver);
       this.removeObserver('issuedConfig.errorMessage', this, this.errorLevelObserver);
       this.removeObserver('parentView.isPropertyUndefined', this, this.errorLevelObserver);
@@ -354,6 +355,7 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   }.property('controller.selectedConfigGroup.name', 'controller.selectedConfigGroup.isDefault'),
 
   didInsertElement: function () {
+    App.tooltip(this.$('[data-toggle=tooltip]'), {placement: 'top'});
     App.tooltip($(this.get('element')).find('span'));
     var self = this;
     var element = this.$();
@@ -387,6 +389,8 @@ App.ConfigWidgetView = Em.View.extend(App.SupportsDependentConfigs, App.WidgetPo
   },
 
   willDestroyElement: function() {
+    this.$('[data-toggle=tooltip]').tooltip('destroy');
+    $(this.get('element')).find('span').tooltip('destroy');
     if (this.get('config.configConditions')) {
       this.removeObserver('config.value', this, this.configValueObserverForAttributes);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/91122e4f/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
index 7b79814..f3e80a3 100644
--- a/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
+++ b/ambari-web/app/views/common/configs/widgets/slider_config_widget_view.js
@@ -234,6 +234,7 @@ App.SliderConfigWidgetView = App.ConfigWidgetView.extend({
   },
 
   willDestroyElement: function() {
+    this.$('[data-toggle=tooltip]').tooltip('destroy');
     var self = this;
     this.get('changeBoundariesProperties').forEach(function(property) {
       self.removeObserver(property, self, self.changeBoundaries);

http://git-wip-us.apache.org/repos/asf/ambari/blob/91122e4f/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index 1fd8dd4..d0cfdd1 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -44,10 +44,7 @@ App.ServiceConfigPopoverSupport = Ember.Mixin.create({
   popoverPlacement: 'right',
 
   didInsertElement: function () {
-    App.tooltip($('body'), {
-      selector: '[data-toggle=tooltip]',
-      placement: 'top'
-    });
+    App.tooltip(this.$('[data-toggle=tooltip]'), {placement: 'top'});
     // if description for this serviceConfig not exist, then no need to show popover
     if (this.get('isPopoverEnabled') !== 'false' && this.get('serviceConfig.description'))
{
       this.addPopover();


Mime
View raw message