Updated Branches: refs/heads/trunk a627a68bb -> a3844f930
AMBARI-4542. Customize Services: Advanced configs show up with wrong caret after adding new property. (xiwang via yusaku) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a3844f93 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a3844f93 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a3844f93 Branch: refs/heads/trunk Commit: a3844f930bdc439b029e49a31fa3d77ed2cec5fe Parents: a627a68 Author: Yusaku Sako <[email protected]> Authored: Thu Feb 6 14:31:59 2014 -0800 Committer: Yusaku Sako <[email protected]> Committed: Thu Feb 6 14:31:59 2014 -0800 ---------------------------------------------------------------------- .../app/templates/common/configs/service_config.hbs | 2 +- ambari-web/app/views/common/configs/services_config.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a3844f93/ambari-web/app/templates/common/configs/service_config.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/configs/service_config.hbs b/ambari-web/app/templates/common/configs/service_config.hbs index ec27d9f..d37f6b8 100644 --- a/ambari-web/app/templates/common/configs/service_config.hbs +++ b/ambari-web/app/templates/common/configs/service_config.hbs @@ -90,7 +90,7 @@ <a class="accordion-toggle">{{category.displayName}}</a> </div> - <div class="accordion-body collapse in"> + <div class="accordion-body collapse in" {{bindAttr style="view.isCategoryBodyVisible"}}> <div class="accordion-inner service-config-section"> <form class="form-horizontal" autocomplete="off"> http://git-wip-us.apache.org/repos/asf/ambari/blob/a3844f93/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 7698307..4fc4a14 100644 --- a/ambari-web/app/views/common/configs/services_config.js +++ b/ambari-web/app/views/common/configs/services_config.js @@ -411,6 +411,16 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({ self.updateReadOnlyFlags(); }); }, + + /** + * Should we show current category accordion-body, based on category.isCollapsed property. + * If added/removed a serverConfigObject, this property got updated. + * Without this property, all serviceConfigs Objects will show up even if some was collapsed before. + */ + isCategoryBodyVisible: function () { + return this.get('category.isCollapsed')? "display: none;" : "display: block;" + }.property('serviceConfigs.length'), + childView: App.ServiceConfigsOverridesView, changeFlag: Ember.Object.create({ val: 1
