|
@@ -30,6 +30,12 @@ App.ServiceConfigView = Em.View.extend({
|
|
|
*/
|
|
|
filter: '',
|
|
|
|
|
|
+ /**
|
|
|
+ * Determines that active tab is set during view initialize.
|
|
|
+ * @type {boolean}
|
|
|
+ */
|
|
|
+ initalActiveTabIsSet: false,
|
|
|
+
|
|
|
/**
|
|
|
* Bound from parent view in the template
|
|
|
* @type {object[]}
|
|
@@ -180,10 +186,21 @@ App.ServiceConfigView = Em.View.extend({
|
|
|
advancedTab.set('isRendered', false);
|
|
|
}
|
|
|
this.processTabs(tabs);
|
|
|
- this.pickActiveTab(tabs);
|
|
|
return tabs;
|
|
|
}.property('controller.selectedServiceNameTrigger'),
|
|
|
|
|
|
+ /**
|
|
|
+ * Set active tab when view attached and configs are linked to tabs.
|
|
|
+ */
|
|
|
+ initialActiveTabObserver: function() {
|
|
|
+ var tabs = this.get('tabs').filterProperty('isAdvanced', false);
|
|
|
+ if (tabs.everyProperty('isConfigsPrepared', true) && !this.get('initalActiveTabIsSet')) {
|
|
|
+ this.get('tabs').setEach('isActive', false);
|
|
|
+ this.pickActiveTab(this.get('tabs'));
|
|
|
+ this.set('tabsWereSet', true);
|
|
|
+ }
|
|
|
+ }.observes('tabs.@each.isConfigsPrepared'),
|
|
|
+
|
|
|
/**
|
|
|
* Pick the first non hidden tab and make it active when there is no active tab
|
|
|
* @method pickActiveTab
|