Updated Branches: refs/heads/trunk 3b292002c -> fc0aad5d8
AMBARI-3921 Hovers stay after manage-config-groups dialog is closed. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc0aad5d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc0aad5d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc0aad5d Branch: refs/heads/trunk Commit: fc0aad5d89b8dec04bec2ca015372b96e17f3ff7 Parents: 3b29200 Author: atkach <[email protected]> Authored: Thu Nov 28 19:45:10 2013 +0200 Committer: atkach <[email protected]> Committed: Thu Nov 28 19:45:10 2013 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step3_controller.js | 4 ++-- ambari-web/app/utils/helper.js | 13 +++++++++++++ ambari-web/app/views/common/configs/services_config.js | 4 ++-- ambari-web/app/views/main/dashboard/service.js | 2 +- ambari-web/app/views/main/dashboard/service/yarn.js | 2 +- ambari-web/app/views/main/dashboard/widget.js | 4 +--- ambari-web/app/views/main/host.js | 2 +- ambari-web/app/views/main/host/details.js | 2 +- ambari-web/app/views/main/host/summary.js | 2 +- ambari-web/app/views/main/service.js | 2 +- ambari-web/app/views/main/service/info/summary.js | 2 +- .../views/main/service/manage_config_groups_view.js | 6 +++--- ambari-web/app/views/main/service/menu.js | 2 +- ambari-web/app/views/wizard/step6_view.js | 4 +--- 14 files changed, 30 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/controllers/wizard/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index ae65e7a..bd58eac 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -1043,8 +1043,8 @@ App.WizardStep3Controller = Em.Controller.extend({ classNames: ['host-check'], didInsertElement: function () { Ember.run.next(this, function () { - this.$("[rel='HostsListTooltip']").tooltip({html: true, placement: "right"}); - this.$('#process .warning-name').tooltip({html: true, placement: "top"}); + App.tooltip(this.$("[rel='HostsListTooltip']"), {html: true, placement: "right"}); + App.tooltip(this.$('#process .warning-name'), {html: true, placement: "top"}); }) }.observes('content'), warningsByHost: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/utils/helper.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js index 22d462e..0f76809 100644 --- a/ambari-web/app/utils/helper.js +++ b/ambari-web/app/utils/helper.js @@ -371,6 +371,19 @@ App.popover = function(self, options) { }); } +/** + * wrapper to bootstrap tooltip + * fix issue when tooltip stuck on view routing + * @param self - DOM element + * @param options + */ +App.tooltip = function(self, options) { + self.tooltip(options); + self.on("remove", function () { + $(this).trigger('mouseleave'); + }); +} + /* * Helper function for bound property helper registration * @params name {String} - name of helper http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/common/configs/services_config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js index ec77071..005977d 100644 --- a/ambari-web/app/views/common/configs/services_config.js +++ b/ambari-web/app/views/common/configs/services_config.js @@ -56,8 +56,8 @@ App.ServiceConfigView = Em.View.extend({ this.set('canEdit', false); } this.$('.service-body').hide(); - $(".restart-required-property").tooltip({html: true}); - $(".icon-lock").tooltip({placement: 'right'}); + App.tooltip($(".restart-required-property"), {html: true}); + App.tooltip($(".icon-lock"), {placement: 'right'}); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/dashboard/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service.js b/ambari-web/app/views/main/dashboard/service.js index 69480c0..9c5354c 100644 --- a/ambari-web/app/views/main/dashboard/service.js +++ b/ambari-web/app/views/main/dashboard/service.js @@ -87,7 +87,7 @@ App.MainDashboardServiceHealthView = Em.View.extend({ didInsertElement: function () { this.updateToolTip(); - $("[rel='HealthTooltip']").tooltip(); + App.tooltip($("[rel='HealthTooltip']")); this.doBlink(); // check for blink availability } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/dashboard/service/yarn.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/yarn.js b/ambari-web/app/views/main/dashboard/service/yarn.js index 26d67fd..f834061 100644 --- a/ambari-web/app/views/main/dashboard/service/yarn.js +++ b/ambari-web/app/views/main/dashboard/service/yarn.js @@ -144,7 +144,7 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({ }.property('service.queuesCount'), didInsertElement: function(){ - $("[rel='queue-tooltip']").tooltip({html: true, placement: "right"}); + App.tooltip($("[rel='queue-tooltip']"), {html: true, placement: "right"}); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/dashboard/widget.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/widget.js b/ambari-web/app/views/main/dashboard/widget.js index 2b3828c..07751a7 100644 --- a/ambari-web/app/views/main/dashboard/widget.js +++ b/ambari-web/app/views/main/dashboard/widget.js @@ -53,9 +53,7 @@ App.DashboardWidgetView = Em.View.extend({ thresh2: null, didInsertElement: function () { - this.$("[rel='ZoomInTooltip']").tooltip({ - placement : 'left' - }); + App.tooltip(this.$("[rel='ZoomInTooltip']"), {placement : 'left'}); }, deleteWidget: function (event) { http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js index e82a088..586e3c3 100644 --- a/ambari-web/app/views/main/host.js +++ b/ambari-web/app/views/main/host.js @@ -81,7 +81,7 @@ App.MainHostView = App.TableView.extend({ content:null, tagName: 'tr', didInsertElement: function(){ - this.$("[rel='HealthTooltip'], [rel='UsageTooltip']").tooltip(); + App.tooltip(this.$("[rel='HealthTooltip'], [rel='UsageTooltip']")); }, toggleComponents: function(event) { http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/details.js b/ambari-web/app/views/main/host/details.js index 4738adc..dde38e1 100644 --- a/ambari-web/app/views/main/host/details.js +++ b/ambari-web/app/views/main/host/details.js @@ -34,6 +34,6 @@ App.MainHostDetailsView = Em.View.extend({ return options; }.property('controller.content'), didInsertElement: function() { - $("[rel='HealthTooltip']").tooltip(); + App.tooltip($("[rel='HealthTooltip']")); } }); http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/host/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js index 96fc740..da5d8b1 100644 --- a/ambari-web/app/views/main/host/summary.js +++ b/ambari-web/app/views/main/host/summary.js @@ -133,7 +133,7 @@ App.MainHostSummaryView = Em.View.extend({ }, addToolTip: function() { if (this.get('addComponentDisabled')) { - $('#add_component').tooltip({title: Em.I18n.t('services.nothingToAdd')}); + App.tooltip($('#add_component'), {title: Em.I18n.t('services.nothingToAdd')}); } }.observes('addComponentDisabled'), sortedComponents: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/service.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service.js b/ambari-web/app/views/main/service.js index a06d091..ae393f4 100644 --- a/ambari-web/app/views/main/service.js +++ b/ambari-web/app/views/main/service.js @@ -25,7 +25,7 @@ App.MainServiceView = Em.View.extend({ }, addToolTip: function() { if (this.get('controller.isAllServicesInstalled')) { - $('.add-service-button a').tooltip({title: Em.I18n.t('services.nothingToAdd')}); + App.tooltip($('.add-service-button a'), {title: Em.I18n.t('services.nothingToAdd')}); } }.observes('controller.isAllServicesInstalled') }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js index e2c4c48..c87c26e 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -26,7 +26,7 @@ App.AlertItemView = Em.View.extend({ }.property('content'), didInsertElement: function () { // Tooltips for alerts need to be enabled. - $("div[rel=tooltip]").tooltip(); + App.tooltip($("div[rel=tooltip]")); $(".tooltip").remove(); } }) http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/service/manage_config_groups_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/manage_config_groups_view.js b/ambari-web/app/views/main/service/manage_config_groups_view.js index 1aa6be0..ae7b747 100644 --- a/ambari-web/app/views/main/service/manage_config_groups_view.js +++ b/ambari-web/app/views/main/service/manage_config_groups_view.js @@ -64,9 +64,9 @@ App.MainServiceManageConfigGroupView = Em.View.extend({ didInsertElement: function () { this.get('controller').loadConfigGroups(this.get('serviceName'), this.get('usedConfigGroupNames')); - $('.properties-link').tooltip(); - $("[rel='button-info']").tooltip(); - $("[rel='button-info-dropdown']").tooltip({placement: 'left'}); + App.tooltip($('.properties-link')); + App.tooltip($("[rel='button-info']")); + App.tooltip($("[rel='button-info-dropdown']"), {placement: 'left'}); }, addButtonTooltip: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/main/service/menu.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/menu.js b/ambari-web/app/views/main/service/menu.js index 4dfa693..fe2b8a4 100644 --- a/ambari-web/app/views/main/service/menu.js +++ b/ambari-web/app/views/main/service/menu.js @@ -33,7 +33,7 @@ App.MainServiceMenuView = Em.CollectionView.extend({ didInsertElement:function () { App.router.location.addObserver('lastSetURL', this, 'renderOnRoute'); this.renderOnRoute(); - $(".restart-required-service").tooltip({html:true, placement:"right"}); + App.tooltip($(".restart-required-service"), {html:true, placement:"right"}); }, activeServiceId:null, http://git-wip-us.apache.org/repos/asf/ambari/blob/fc0aad5d/ambari-web/app/views/wizard/step6_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step6_view.js b/ambari-web/app/views/wizard/step6_view.js index 42f6541..ce958e3 100644 --- a/ambari-web/app/views/wizard/step6_view.js +++ b/ambari-web/app/views/wizard/step6_view.js @@ -35,9 +35,7 @@ App.WizardStep6View = Em.View.extend({ this.set('title', Em.I18n.t('installer.step6.header')); this.setLabel(); } - $('body').tooltip({ - selector: '[rel=tooltip]' - }); + App.tooltip($('body'), {selector: '[rel=tooltip]'}); controller.loadStep(); },
