ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-11945 Configs: checkbox in dependent configs does not work. (ababiichuk)
Date Tue, 16 Jun 2015 13:10:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d13f7098b -> 7b031f9e0


AMBARI-11945 Configs: checkbox in dependent configs does not work. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 7b031f9e0d7cfdba34ae317920d52fe21c28c8e4
Parents: d13f709
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Tue Jun 16 14:25:53 2015 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Jun 16 16:05:34 2015 +0300

----------------------------------------------------------------------
 .../modal_popups/dependent_configs_list_popup.js    | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b031f9e/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js b/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js
index f552abf..3795841 100644
--- a/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js
+++ b/ambari-web/app/views/common/modal_popups/dependent_configs_list_popup.js
@@ -37,15 +37,21 @@ App.showDependentConfigsPopup = function (configs, primary, secondary)
{
 
       toggleAll: Em.Checkbox.extend({
         didInsertElement: function () {
-          this.set('checked', !this.get('parentView.parentView.configs').someProperty('saveRecommended',
false));
+          this.updateCheckbox();
         },
         click: function () {
-          this.get('parentView.parentView.configs').setEach('saveRecommended', this.get('checked'));
+          Em.run.next(this, 'updateSaveRecommended');
         },
-        updateCheckbox: function () {
-          console.log('should update its status');
+        updateCheckboxObserver: function () {
+          Em.run.once(this, 'updateCheckbox');
+        }.observes('parentView.parentView.configs.@each.saveRecommended'),
+
+        updateCheckbox: function() {
           this.set('checked', !this.get('parentView.parentView.configs').someProperty('saveRecommended',
false));
-        }.observes('parentView.parentView.configs.@each.saveRecommended')
+        },
+        updateSaveRecommended: function() {
+          this.get('parentView.parentView.configs').setEach('saveRecommended', this.get('checked'));
+        }
       })
     }),
     onPrimary: function () {


Mime
View raw message