You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/08/12 19:32:24 UTC
ambari git commit: AMBARI-12737. Add Service Wizard. After page
refresh all left-menu items are available for a while (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 77b301688 -> 049bfa8a6
AMBARI-12737. Add Service Wizard. After page refresh all left-menu items are available for a while (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/049bfa8a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/049bfa8a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/049bfa8a
Branch: refs/heads/trunk
Commit: 049bfa8a649a79753b95aa4742f87a20a31988de
Parents: 77b3016
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Aug 12 20:32:01 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Aug 12 20:32:19 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/wizard.js | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/049bfa8a/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index b5eaccf..c41d73e 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -56,12 +56,38 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
this.setIsStepDisabled();
},
+ connectOutlet:function(name, context) {
+ if (name !== 'loading') this.set('isStepDisabled.isLocked', false);
+ return this._super.apply(this,arguments);
+ },
+
/**
* Set <code>isStepDisabled</code> with list of available steps (basing on <code>totalSteps</code>)
* @method setIsStepDisabled
*/
setIsStepDisabled: function () {
- this.set('isStepDisabled', []);
+ this.set('isStepDisabled', Ember.ArrayProxy.create({
+ content:[],
+ isLocked:true,
+ objectAtContent: function(idx) {
+ var obj = this.get('content').objectAt(idx);
+ if (obj && !obj.hasOwnProperty('isLocked')) {
+ obj.reopen({
+ isLocked:true,
+ get:function (key) {
+ return (key === 'value' && this.get('isLocked')) || this._super.apply(this,arguments);
+ },
+ notifyValues:function () {
+ this.notifyPropertyChange('value');
+ }.observes('isLocked')
+ });
+ }
+ return obj;
+ },
+ toggleLock:function () {
+ this.setEach('isLocked',this.get('isLocked'));
+ }.observes('isLocked')
+ }));
this.get('isStepDisabled').pushObject(Em.Object.create({
step: 1,
value: false