mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 15:33:23 +08:00
Refactoring
This commit is contained in:
@ -1701,12 +1701,10 @@ define([
|
||||
Common.UI.LayoutManager.init(this.editorConfig.customization ? this.editorConfig.customization.layout : null, this.appOptions.canBrandingExt, this.api);
|
||||
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
|
||||
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true),
|
||||
warn = false;
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true);
|
||||
if (Common.UI.FeaturesManager.canChange('tabStyle', true) && Common.localStorage.itemExists("de-settings-tab-style")) { // get from local storage
|
||||
value = Common.localStorage.getItem("de-settings-tab-style");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'line';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-style", value || 'tab');
|
||||
@ -1714,11 +1712,11 @@ define([
|
||||
if (Common.UI.FeaturesManager.canChange('tabBackground', true) && Common.localStorage.itemExists("de-settings-tab-background")) { // get from local storage
|
||||
value = Common.localStorage.getItem("de-settings-tab-background");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'toolbar';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-background", value || 'header');
|
||||
warn && console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs &&
|
||||
console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCustomization();
|
||||
if (this.appOptions.canBranding)
|
||||
|
||||
@ -1297,12 +1297,10 @@ define([
|
||||
Common.UI.LayoutManager.init(this.editorConfig.customization ? this.editorConfig.customization.layout : null, this.appOptions.canBrandingExt, this.api);
|
||||
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
|
||||
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true),
|
||||
warn = false;
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true);
|
||||
if (Common.UI.FeaturesManager.canChange('tabStyle', true) && Common.localStorage.itemExists("pdfe-settings-tab-style")) { // get from local storage
|
||||
value = Common.localStorage.getItem("pdfe-settings-tab-style");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'line';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-style", value || 'tab');
|
||||
@ -1310,11 +1308,11 @@ define([
|
||||
if (Common.UI.FeaturesManager.canChange('tabBackground', true) && Common.localStorage.itemExists("pdfe-settings-tab-background")) { // get from local storage
|
||||
value = Common.localStorage.getItem("pdfe-settings-tab-background");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'toolbar';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-background", value || 'header');
|
||||
warn && console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs &&
|
||||
console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCustomization();
|
||||
if (this.appOptions.canBranding)
|
||||
|
||||
@ -1325,12 +1325,10 @@ define([
|
||||
Common.UI.LayoutManager.init(this.editorConfig.customization ? this.editorConfig.customization.layout : null, this.appOptions.canBrandingExt, this.api);
|
||||
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
|
||||
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true),
|
||||
warn = false;
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true);
|
||||
if (Common.UI.FeaturesManager.canChange('tabStyle', true) && Common.localStorage.itemExists("pe-settings-tab-style")) { // get from local storage
|
||||
value = Common.localStorage.getItem("pe-settings-tab-style");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'line';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-style", value || 'tab');
|
||||
@ -1338,11 +1336,11 @@ define([
|
||||
if (Common.UI.FeaturesManager.canChange('tabBackground', true) && Common.localStorage.itemExists("pe-settings-tab-background")) { // get from local storage
|
||||
value = Common.localStorage.getItem("pe-settings-tab-background");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'toolbar';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-background", value || 'header');
|
||||
warn && console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs &&
|
||||
console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCustomization();
|
||||
if (this.appOptions.canBranding)
|
||||
|
||||
@ -1391,12 +1391,10 @@ define([
|
||||
Common.UI.LayoutManager.init(this.editorConfig.customization ? this.editorConfig.customization.layout : null, this.appOptions.canBrandingExt, this.api);
|
||||
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
|
||||
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true),
|
||||
warn = false;
|
||||
var value = Common.UI.FeaturesManager.getInitValue('tabStyle', true);
|
||||
if (Common.UI.FeaturesManager.canChange('tabStyle', true) && Common.localStorage.itemExists("sse-settings-tab-style")) { // get from local storage
|
||||
value = Common.localStorage.getItem("sse-settings-tab-style");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'line';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-style", value || 'tab');
|
||||
@ -1404,11 +1402,11 @@ define([
|
||||
if (Common.UI.FeaturesManager.canChange('tabBackground', true) && Common.localStorage.itemExists("sse-settings-tab-background")) { // get from local storage
|
||||
value = Common.localStorage.getItem("sse-settings-tab-background");
|
||||
} else if (value === undefined && this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs) {
|
||||
warn = true;
|
||||
value = 'toolbar';
|
||||
}
|
||||
Common.Utils.InternalSettings.set("settings-tab-background", value || 'header');
|
||||
warn && console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
this.editorConfig.customization && (typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.toolbarNoTabs &&
|
||||
console.log("Obsolete: The 'toolbarNoTabs' parameter of the 'customization' section is deprecated. Please use 'tabStyle' and 'tabBackground' parameters in the 'customization.features' section instead.");
|
||||
|
||||
this.appOptions.canBranding = params.asc_getCustomization();
|
||||
if (this.appOptions.canBranding)
|
||||
|
||||
Reference in New Issue
Block a user