[All] changed default tab option for compact toolbar

This commit is contained in:
Maxim Kadushkin 2018-05-17 13:44:46 +03:00
parent 345e19e135
commit 931011ca42
5 changed files with 7 additions and 6 deletions

View file

@ -135,7 +135,7 @@ define([
return t.length && t.data('tab') == tag; return t.length && t.data('tab') == tag;
}, },
setFolded: function(value, deftab) { setFolded: function(value) {
this.isFolded = value; this.isFolded = value;
var me = this; var me = this;
@ -194,7 +194,8 @@ define([
var tab = active_panel.data('tab'); var tab = active_panel.data('tab');
me.$tabs.find('> a[data-tab=' + tab + ']').parent().toggleClass('active', true); me.$tabs.find('> a[data-tab=' + tab + ']').parent().toggleClass('active', true);
} else { } else {
me.setTab(deftab); tab = me.$tabs.siblings(':not(.x-lone)').first().find('> a[data-tab]').data('tab');
me.setTab(tab);
} }
} }
}, },

View file

@ -364,7 +364,7 @@ define([
}, },
onChangeCompactView: function(view, compact) { onChangeCompactView: function(view, compact) {
this.toolbar.setFolded(compact, this.appOptions.isEdit ? 'home' : 'plugins'); this.toolbar.setFolded(compact);
this.toolbar.fireEvent('view:compact', [this, compact]); this.toolbar.fireEvent('view:compact', [this, compact]);
Common.localStorage.setBool('de-compact-toolbar', compact); Common.localStorage.setBool('de-compact-toolbar', compact);

View file

@ -354,7 +354,7 @@ define([
}, },
onChangeCompactView: function(view, compact) { onChangeCompactView: function(view, compact) {
this.toolbar.setFolded(compact, this.appOptions.isEdit ? 'home' : 'plugins'); this.toolbar.setFolded(compact);
this.toolbar.fireEvent('view:compact', [this.toolbar, compact]); this.toolbar.fireEvent('view:compact', [this.toolbar, compact]);
Common.localStorage.setBool('pe-compact-toolbar', compact); Common.localStorage.setBool('pe-compact-toolbar', compact);

View file

@ -1458,7 +1458,7 @@ define([
}, },
onChangeViewMode: function(item, compact) { onChangeViewMode: function(item, compact) {
this.toolbar.setFolded(compact, this.appOptions.isEdit ? 'home' : 'plugins'); this.toolbar.setFolded(compact);
this.toolbar.fireEvent('view:compact', [this, compact]); this.toolbar.fireEvent('view:compact', [this, compact]);
Common.localStorage.setBool('sse-compact-toolbar', compact); Common.localStorage.setBool('sse-compact-toolbar', compact);

View file

@ -1219,7 +1219,7 @@ define([
compactview = true; compactview = true;
if (!compactview) { if (!compactview) {
me.setFolded(false, 1); me.setFolded(false);
me.setTab('plugins'); me.setTab('plugins');
me.fireEvent('view:compact', [me, compactview]); me.fireEvent('view:compact', [me, compactview]);
Common.NotificationCenter.trigger('layout:changed', 'toolbar'); Common.NotificationCenter.trigger('layout:changed', 'toolbar');