Commit 4655b91e authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/v4.1.8'

parents cd86b759 2b4ebdef
...@@ -108,7 +108,8 @@ ...@@ -108,7 +108,8 @@
comments: false, comments: false,
leftMenu: true, leftMenu: true,
rightMenu: true, rightMenu: true,
toolbar: true toolbar: true,
header: true
}, },
plugins: { plugins: {
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}', autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',
......
...@@ -61,10 +61,14 @@ define([ ...@@ -61,10 +61,14 @@ define([
var mapCustomizationElements = { var mapCustomizationElements = {
about: 'button#left-btn-about', about: 'button#left-btn-about',
feedback: 'button#left-btn-support', 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', toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu', leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu' rightMenu: '#viewport #right-menu',
header: '#viewport #header'
}; };
Common.localStorage.setId('text'); Common.localStorage.setId('text');
...@@ -965,12 +969,14 @@ define([ ...@@ -965,12 +969,14 @@ define([
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
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) if (this.appOptions.canBranding)
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization); this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true); params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements(); this.applyModeCommonElements();
this.applyModeEditorElements(); this.applyModeEditorElements();
...@@ -1403,6 +1409,8 @@ define([ ...@@ -1403,6 +1409,8 @@ define([
if (!this.appOptions.isDesktopApp) if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true; this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt)
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
} }
Common.NotificationCenter.trigger('layout:changed', 'main'); Common.NotificationCenter.trigger('layout:changed', 'main');
......
...@@ -1195,7 +1195,7 @@ define([ ...@@ -1195,7 +1195,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.mnuitemHideTitleBar.hide();
this.btnMarkers.setMenu( this.btnMarkers.setMenu(
......
...@@ -59,10 +59,14 @@ define([ ...@@ -59,10 +59,14 @@ define([
var mapCustomizationElements = { var mapCustomizationElements = {
about: 'button#left-btn-about', about: 'button#left-btn-about',
feedback: 'button#left-btn-support', 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', toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu', leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu' rightMenu: '#viewport #right-menu',
header: '#viewport #header'
}; };
Common.localStorage.setId('presentation'); Common.localStorage.setId('presentation');
...@@ -744,12 +748,14 @@ define([ ...@@ -744,12 +748,14 @@ define([
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
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) if (this.appOptions.canBranding)
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization); this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true); params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements(); this.applyModeCommonElements();
this.applyModeEditorElements(); this.applyModeEditorElements();
...@@ -1170,6 +1176,8 @@ define([ ...@@ -1170,6 +1176,8 @@ define([
if (!this.appOptions.isDesktopApp) if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true; this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt)
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
} }
Common.NotificationCenter.trigger('layout:changed', 'main'); Common.NotificationCenter.trigger('layout:changed', 'main');
......
...@@ -1282,10 +1282,10 @@ define([ ...@@ -1282,10 +1282,10 @@ define([
} }
} }
if (mode.isDesktopApp) { if (mode.isDesktopApp)
$('.toolbar-group-native').hide(); $('.toolbar-group-native').hide();
if (mode.isDesktopApp || mode.canBrandingExt && mode.customization && mode.customization.header===false)
this.mnuitemHideTitleBar.hide(); this.mnuitemHideTitleBar.hide();
}
this.lockToolbar(PE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); this.lockToolbar(PE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
}, },
......
...@@ -65,10 +65,14 @@ define([ ...@@ -65,10 +65,14 @@ define([
var mapCustomizationElements = { var mapCustomizationElements = {
about: 'button#left-btn-about', about: 'button#left-btn-about',
feedback: 'button#left-btn-support', 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', toolbar: '#viewport #toolbar',
leftMenu: '#viewport #left-menu', leftMenu: '#viewport #left-menu, #viewport #id-toolbar-full-placeholder-btn-settings, #viewport #id-toolbar-short-placeholder-btn-settings',
rightMenu: '#viewport #right-menu' rightMenu: '#viewport #right-menu',
header: '#viewport #header'
}; };
Common.localStorage.setId('table'); Common.localStorage.setId('table');
...@@ -761,10 +765,12 @@ define([ ...@@ -761,10 +765,12 @@ define([
this.appOptions.canComments = this.appOptions.canLicense && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); this.appOptions.canComments = this.appOptions.canLicense && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false); this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
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) if (this.appOptions.canBranding)
this.headerView.setBranding(this.editorConfig.customization); this.headerView.setBranding(this.editorConfig.customization);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
params.asc_getTrial() && this.headerView.setDeveloperMode(true); params.asc_getTrial() && this.headerView.setDeveloperMode(true);
} }
...@@ -1297,6 +1303,8 @@ define([ ...@@ -1297,6 +1303,8 @@ define([
if (!this.appOptions.isDesktopApp) if (!this.appOptions.isDesktopApp)
this.appOptions.customization.about = true; this.appOptions.customization.about = true;
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); 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}); this.stackLongActions.pop({id: InitApplication, type: Asc.c_oAscAsyncActionType.BlockInteraction});
......
...@@ -1650,10 +1650,10 @@ define([ ...@@ -1650,10 +1650,10 @@ define([
} }
} }
if (mode.isDesktopApp) { if (mode.isDesktopApp)
$('.toolbar-group-native').hide(); $('.toolbar-group-native').hide();
if (mode.isDesktopApp || mode.canBrandingExt && mode.customization && mode.customization.header===false)
this.mnuitemHideTitleBar.hide(); this.mnuitemHideTitleBar.hide();
}
this.lockToolbar(SSE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); 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