Merge branch 'hotfix/v4.1.8' into develop

This commit is contained in:
Julia Radzhabova 2016-11-03 13:27:16 +03:00
commit b936280d78
7 changed files with 43 additions and 20 deletions

View file

@ -110,7 +110,8 @@
compactToolbar: false, compactToolbar: 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}',

View file

@ -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');
@ -996,13 +1000,15 @@ 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';
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header'); 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) if (this.appOptions.canBranding)
headerView.setBranding(this.editorConfig.customization); headerView.setBranding(this.editorConfig.customization);
params.asc_getTrial() && headerView.setDeveloperMode(true); params.asc_getTrial() && headerView.setDeveloperMode(true);
this.appOptions.canRename && headerView.setCanRename(true); this.appOptions.canRename && headerView.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements(); this.applyModeCommonElements();
this.applyModeEditorElements(); this.applyModeEditorElements();
@ -1441,6 +1447,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');

View file

@ -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.mnuitemHideTitleBar.hide();
this.btnMarkers.setMenu( this.btnMarkers.setMenu(

View file

@ -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('presentation'); Common.localStorage.setId('presentation');
@ -761,13 +765,15 @@ 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';
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header'); 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) if (this.appOptions.canBranding)
headerView.setBranding(this.editorConfig.customization); headerView.setBranding(this.editorConfig.customization);
params.asc_getTrial() && headerView.setDeveloperMode(true); params.asc_getTrial() && headerView.setDeveloperMode(true);
this.appOptions.canRename && headerView.setCanRename(true); this.appOptions.canRename && headerView.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
this.applyModeCommonElements(); this.applyModeCommonElements();
this.applyModeEditorElements(); this.applyModeEditorElements();
@ -1194,6 +1200,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');

View file

@ -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.mnuitemHideTitleBar.hide();
this.mnuZoomOut = new Common.UI.Button({ this.mnuZoomOut = new Common.UI.Button({

View file

@ -66,10 +66,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');
@ -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.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.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) 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);
this.appOptions.canRename && this.headerView.setCanRename(true); this.appOptions.canRename && this.headerView.setCanRename(true);
} }
@ -1319,6 +1325,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});

View file

@ -1375,7 +1375,7 @@ define([
this.mnuitemHideFormulaBar.setChecked(!!options.formula); this.mnuitemHideFormulaBar.setChecked(!!options.formula);
this.mnuitemHideHeadings.setChecked(!!options.headings); 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(); this.mnuitemHideTitleBar.hide();
} }
@ -1708,10 +1708,8 @@ define([
} }
} }
if (mode.isDesktopApp) { if (mode.isDesktopApp)
$('.toolbar-group-native').hide(); $('.toolbar-group-native').hide();
this.mnuitemHideTitleBar && this.mnuitemHideTitleBar.hide();
}
this.lockToolbar(SSE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); this.lockToolbar(SSE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
} }