Browse Source

AMBARI-10640. Hover not showing up for checkbox widgets in enhanced configs (Richard Zang via srimanth)

Srimanth Gunturi 10 years ago
parent
commit
4a9e9bd4ad

+ 2 - 3
ambari-web/app/mixins/main/service/configs/widget_popover_support.js

@@ -47,12 +47,11 @@ App.WidgetPopoverSupport = Em.Mixin.create({
   }.property(),
 
   initPopover: function () {
-    // if description for this config not exist, then no need to show popover
-    if (this.get('isPopoverEnabled') !== 'false') {
+    if (this.get('isPopoverEnabled') !== false) {
       App.popover(this.$('.original-widget'), {
         title: Em.I18n.t('installer.controls.serviceConfigPopover.title').format(
           this.get('configLabel'),
-          (this.get('config.configLabel') == this.get('config.name')) ? '' : this.get('config.name')
+          (this.get('configLabel') == this.get('config.name')) ? '' : this.get('config.name')
         ),
         content: this.get('config.description'),
         placement: this.get('popoverPlacement'),

+ 1 - 1
ambari-web/app/templates/common/configs/widgets/checkbox_config_widget.hbs

@@ -15,7 +15,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-<div class="pull-left">
+<div {{bindAttr class=":pull-left view.isOriginalSCP:original-widget"}}>
   <label>
     {{view view.configView class="pull-left"}}
     {{#if view.isOriginalSCP}}

+ 1 - 1
ambari-web/app/templates/common/configs/widgets/list_config_widget.hbs

@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div {{bindAttr class="view.config.isHiddenByFilter:hide :widget-config :list-widget"}}>
+<div {{bindAttr class="view.config.isHiddenByFilter:hide view.isOriginalSCP:original-widget :widget-config :list-widget"}}>
   {{#if view.isOriginalSCP}}
     <p class="widget-config-label">{{view.configLabel}}</p>
   {{/if}}

+ 1 - 0
ambari-web/app/views/common/configs/widgets/checkbox_config_widget_view.js

@@ -29,6 +29,7 @@ App.CheckboxConfigWidgetView = App.ConfigWidgetView.extend({
 
   didInsertElement: function () {
     var self = this;
+    this.initPopover();
     this._super(arguments);
     Em.run.next(function () {
       if (self.$())

+ 1 - 0
ambari-web/app/views/common/configs/widgets/list_config_widget_view.js

@@ -114,6 +114,7 @@ App.ListConfigWidgetView = App.ConfigWidgetView.extend({
   },
 
   didInsertElement: function () {
+    this.initPopover();
     this._super();
     this.addObserver('options.@each.isSelected', this, this.calculateVal);
     this.addObserver('options.@each.isSelected', this, this.checkSelectedItemsCount);