Commit b936280d authored by Julia Radzhabova's avatar Julia Radzhabova

Merge branch 'hotfix/v4.1.8' into develop

parents 6804c4a2 2b4ebdef
......@@ -110,7 +110,8 @@
compactToolbar: false,
leftMenu: true,
rightMenu: true,
toolbar: true
toolbar: true,
header: true
},
plugins: {
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',
......
......@@ -61,10 +61,14 @@ define([
var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div',
goback: '#fm-btn-back > a, #header-back > div'
};
var mapCustomizationExtElements = {
toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu',
rightMenu: '#viewport #right-menu'
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu',
header: '#viewport #header'
};
Common.localStorage.setId('text');
......@@ -996,13 +1000,15 @@ define([
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.appOptions.canBranding = (licType!==Asc.c_oLicenseResult.Error) && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding)
headerView.setBranding(this.editorConfig.customization);
params.asc_getTrial() && headerView.setDeveloperMode(true);
this.appOptions.canRename && headerView.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements();
this.applyModeEditorElements();
......@@ -1441,6 +1447,8 @@ define([
if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt)
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
}
Common.NotificationCenter.trigger('layout:changed', 'main');
......
......@@ -1197,7 +1197,7 @@ define([
]
})
);
if (this.mode.isDesktopApp)
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header===false)
this.mnuitemHideTitleBar.hide();
this.btnMarkers.setMenu(
......
......@@ -61,10 +61,14 @@ define([
var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div',
goback: '#fm-btn-back > a, #header-back > div'
};
var mapCustomizationExtElements = {
toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu',
rightMenu: '#viewport #right-menu'
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu',
header: '#viewport #header'
};
Common.localStorage.setId('presentation');
......@@ -761,13 +765,15 @@ define([
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.appOptions.canBranding = (licType!==Asc.c_oLicenseResult.Error) && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding)
headerView.setBranding(this.editorConfig.customization);
params.asc_getTrial() && headerView.setDeveloperMode(true);
this.appOptions.canRename && headerView.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements();
this.applyModeEditorElements();
......@@ -1194,6 +1200,8 @@ define([
if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt)
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
}
Common.NotificationCenter.trigger('layout:changed', 'main');
......
......@@ -1157,7 +1157,7 @@ define([
]
})
);
if (this.mode.isDesktopApp)
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header===false)
this.mnuitemHideTitleBar.hide();
this.mnuZoomOut = new Common.UI.Button({
......
......@@ -66,10 +66,14 @@ define([
var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div',
goback: '#fm-btn-back > a, #header-back > div'
};
var mapCustomizationExtElements = {
toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu',
rightMenu: '#viewport #right-menu'
leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu',
header: '#viewport #header'
};
Common.localStorage.setId('table');
......@@ -773,10 +777,12 @@ define([
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canRename = !!this.permissions.rename;
this.appOptions.canBranding = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.appOptions.canBranding = (licType!==Asc.c_oLicenseResult.Error) && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding)
this.headerView.setBranding(this.editorConfig.customization);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
params.asc_getTrial() && this.headerView.setDeveloperMode(true);
this.appOptions.canRename && this.headerView.setCanRename(true);
}
......@@ -1319,6 +1325,8 @@ define([
if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt)
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
}
this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
......
......@@ -1375,7 +1375,7 @@ define([
this.mnuitemHideFormulaBar.setChecked(!!options.formula);
this.mnuitemHideHeadings.setChecked(!!options.headings);
if (this.mode.isDesktopApp)
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header===false)
this.mnuitemHideTitleBar.hide();
}
......@@ -1708,10 +1708,8 @@ define([
}
}
if (mode.isDesktopApp) {
if (mode.isDesktopApp)
$('.toolbar-group-native').hide();
this.mnuitemHideTitleBar && this.mnuitemHideTitleBar.hide();
}
this.lockToolbar(SSE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment