Updated Branches: refs/heads/trunk a0af1dbfe -> 029c91d4d
AMBARI-3782. User settings and background op UI tweaks. (xiwang via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/029c91d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/029c91d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/029c91d4 Branch: refs/heads/trunk Commit: 029c91d4dfff667a23163d7c4925d3ca88b1499e Parents: a0af1db Author: Yusaku Sako <yus...@hortonworks.com> Authored: Tue Nov 19 16:03:05 2013 -0800 Committer: Yusaku Sako <yus...@hortonworks.com> Committed: Tue Nov 19 16:03:05 2013 -0800 ---------------------------------------------------------------------- ambari-web/app/controllers/application.js | 6 ++--- .../global/background_operations_controller.js | 1 + ambari-web/app/messages.js | 2 +- ambari-web/app/templates/application.hbs | 23 ++++++++++---------- ambari-web/app/templates/common/settings.hbs | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/029c91d4/ambari-web/app/controllers/application.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js index 705c29d..ab079b4 100644 --- a/ambari-web/app/controllers/application.js +++ b/ambari-web/app/controllers/application.js @@ -114,10 +114,10 @@ App.ApplicationController = Em.Controller.extend({ header: Em.I18n.t('common.userSettings'), bodyClass: Em.View.extend({ templateName: require('templates/common/settings'), - isShowBgChecked: initValue, + isNotShowBgChecked: !initValue, updateValue: function () { - curValue = this.get('isShowBgChecked'); - }.observes('isShowBgChecked') + curValue = !this.get('isNotShowBgChecked'); + }.observes('isNotShowBgChecked') }), primary: Em.I18n.t('common.save'), onPrimary: function() { http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/029c91d4/ambari-web/app/controllers/global/background_operations_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/global/background_operations_controller.js b/ambari-web/app/controllers/global/background_operations_controller.js index da3370c..e9e14ea 100644 --- a/ambari-web/app/controllers/global/background_operations_controller.js +++ b/ambari-web/app/controllers/global/background_operations_controller.js @@ -233,6 +233,7 @@ App.BackgroundOperationsController = Em.Controller.extend({ $(self.get('popupView.element')).appendTo('#wrapper'); } else { self.set('popupView', App.HostPopup.initPopup("", self, true)); + self.set ('popupView.isNotShowBgChecked', !initValue); } }); } http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/029c91d4/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 3f4af4b..10c27da 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -26,7 +26,7 @@ Em.I18n.translations = { 'app.loadingPlaceholder': 'Loading...', 'app.signout':'Sign out', 'app.settings':'Settings', - 'app.settings.showBgOperations': 'Show background operations dialog when an operation is started', + 'app.settings.notshowBgOperationsPopup': 'Do not show the Background Operations dialog when starting an operation', 'app.settings.notShowBgOperations': 'Do not show this dialog again when starting a background operation', 'apply':'apply', http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/029c91d4/ambari-web/app/templates/application.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs index 0f5611e..ee3c46d 100644 --- a/ambari-web/app/templates/application.hbs +++ b/ambari-web/app/templates/application.hbs @@ -25,18 +25,17 @@ <a class="brand" {{translateAttr href="topnav.logo.href"}} target="_blank" alt="Apache Ambari" title="Apache Ambari">{{t app.name}}</a> {{#if isClusterDataLoaded}} - <a class="brand cluster-name" href="javascript:void(null);" {{bindAttr title="clusterName"}}> - <span {{action "showPopup" target="App.router.backgroundOperationsController"}} >{{clusterDisplayName}} </span> + <a class="brand cluster-name" href="javascript:void(null);" {{bindAttr title="clusterName"}}> + <span {{action "showPopup" target="App.router.backgroundOperationsController"}} >{{clusterDisplayName}} </span> - {{#with App.router.backgroundOperationsController}} - {{#if allOperationsCount}} - <span class="label operations-count" {{action "showPopup" target="App.router.backgroundOperationsController"}}>{{allOperationsCount}}</span> - {{else}} - <span class="label" {{action "showPopup" target="App.router.backgroundOperationsController"}}>{{allOperationsCount}}</span> - {{/if}} - {{/with}} - - </a> + {{#with App.router.backgroundOperationsController}} + {{#if allOperationsCount}} + <span class="label operations-count" {{action "showPopup" target="App.router.backgroundOperationsController"}}>{{allOperationsCount}}</span> + {{else}} + <span class="label" {{action "showPopup" target="App.router.backgroundOperationsController"}}>{{allOperationsCount}}</span> + {{/if}} + {{/with}} + </a> {{/if}} {{#if App.router.loggedIn}} @@ -45,8 +44,8 @@ {{App.router.loginName}} <span class="caret"></span> </button> <ul class="dropdown-menu"> - <li><a href="" {{action logoff}}>{{t app.signout}}</a></li> <li><a href="" {{action showSettingsPopup target="controller"}}>{{t app.settings}}</a></li> + <li><a href="" {{action logoff}}>{{t app.signout}}</a></li> </ul> </div> {{/if}} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/029c91d4/ambari-web/app/templates/common/settings.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/common/settings.hbs b/ambari-web/app/templates/common/settings.hbs index 5f6fcb9..dfbcab0 100644 --- a/ambari-web/app/templates/common/settings.hbs +++ b/ambari-web/app/templates/common/settings.hbs @@ -19,8 +19,8 @@ <div class="admin-user-settings"> <div> <label> - {{view Ember.Checkbox checkedBinding="view.isShowBgChecked" class="checkbox"}} - {{t app.settings.showBgOperations}} + {{view Ember.Checkbox checkedBinding="view.isNotShowBgChecked" class="checkbox"}} + {{t app.settings.notshowBgOperationsPopup}} </label> </div> </div> \ No newline at end of file