You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/01 13:41:03 UTC

[04/29] git commit: AMBARI-7073 Incorrect behavior of adding Dashboard's widgets. (Max Shepel via atkach)

AMBARI-7073 Incorrect behavior of adding Dashboard's widgets. (Max Shepel via atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 60c0d169b9b868266f911efb05677a2ba84314c5
Parents: 4a61ae3
Author: atkach <at...@hortonworks.com>
Authored: Fri Aug 29 13:06:09 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Fri Aug 29 13:11:40 2014 +0300

----------------------------------------------------------------------
 .../app/templates/main/dashboard/plus_button_filter.hbs |  2 +-
 ambari-web/app/views/main/dashboard/widgets.js          | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/60c0d169/ambari-web/app/templates/main/dashboard/plus_button_filter.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/dashboard/plus_button_filter.hbs b/ambari-web/app/templates/main/dashboard/plus_button_filter.hbs
index 0037f38..dac9c22 100644
--- a/ambari-web/app/templates/main/dashboard/plus_button_filter.hbs
+++ b/ambari-web/app/templates/main/dashboard/plus_button_filter.hbs
@@ -23,7 +23,7 @@
         {{#each widget in view.hiddenWidgets}}
           <li>
             <label class="checkbox">
-              {{view Ember.Checkbox checkedBinding="widget.checked"}} {{unbound widget.displayName}}
+              {{view view.widgetCheckbox checkedBinding="widget.checked"}} {{unbound widget.displayName}}
             </label>
           </li>
         {{/each}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/60c0d169/ambari-web/app/views/main/dashboard/widgets.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets.js b/ambari-web/app/views/main/dashboard/widgets.js
index a604800..01c229c 100644
--- a/ambari-web/app/views/main/dashboard/widgets.js
+++ b/ambari-web/app/views/main/dashboard/widgets.js
@@ -203,11 +203,13 @@ App.MainDashboardWidgetsView = Em.View.extend(App.UserPref, App.LocalStorage, {
       hiddenWidgetsBinding: 'parentView.hiddenWidgets',
       visibleWidgetsBinding: 'parentView.visibleWidgets',
       valueBinding: '',
-      didInsertElement: function() {
-        $(".add-widgets-dropdown-list").click(function( event ) {
-          event.stopPropagation();
-        });
-      },
+      widgetCheckbox: Em.Checkbox.extend({
+        didInsertElement: function() {
+          $('.checkbox').click(function(event) {
+            event.stopPropagation();
+          });
+        }
+      }),
       closeFilter:function () {
       },
       applyFilter:function() {