commit
6c600791da
|
@ -1225,7 +1225,7 @@ 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.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
||||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||||
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
||||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||||
|
@ -1286,6 +1286,8 @@ define([
|
||||||
|
|
||||||
if (this.permissions.changeHistory !== undefined)
|
if (this.permissions.changeHistory !== undefined)
|
||||||
console.warn("Obsolete: The changeHistory parameter of the document permission section is deprecated. Please use onRequestRestore event instead.");
|
console.warn("Obsolete: The changeHistory parameter of the document permission section is deprecated. Please use onRequestRestore event instead.");
|
||||||
|
if (this.permissions.rename !== undefined)
|
||||||
|
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||||
},
|
},
|
||||||
|
|
||||||
applyModeCommonElements: function() {
|
applyModeCommonElements: function() {
|
||||||
|
|
|
@ -949,7 +949,7 @@ define([
|
||||||
this.appOptions.canViewComments = this.appOptions.canComments || !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
this.appOptions.canViewComments = this.appOptions.canComments || !((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.canPrint = (this.permissions.print !== false);
|
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||||
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
||||||
|
@ -981,6 +981,9 @@ define([
|
||||||
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit);
|
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit);
|
||||||
(this.appOptions.isRestrictedEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
|
(this.appOptions.isRestrictedEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
|
||||||
this.api.asc_LoadDocument();
|
this.api.asc_LoadDocument();
|
||||||
|
|
||||||
|
if (this.permissions.rename !== undefined)
|
||||||
|
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||||
},
|
},
|
||||||
|
|
||||||
applyModeCommonElements: function() {
|
applyModeCommonElements: function() {
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ define([
|
||||||
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||||
this.appOptions.canViewComments = this.appOptions.canComments || !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
this.appOptions.canViewComments = this.appOptions.canComments || !((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.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||||
this.appOptions.trialMode = params.asc_getLicenseMode();
|
this.appOptions.trialMode = params.asc_getLicenseMode();
|
||||||
this.appOptions.canModifyFilter = (this.permissions.modifyFilter!==false);
|
this.appOptions.canModifyFilter = (this.permissions.modifyFilter!==false);
|
||||||
this.appOptions.canBranding = params.asc_getCustomization();
|
this.appOptions.canBranding = params.asc_getCustomization();
|
||||||
|
@ -1019,6 +1019,8 @@ define([
|
||||||
this.headerView.setBranding(this.editorConfig.customization);
|
this.headerView.setBranding(this.editorConfig.customization);
|
||||||
|
|
||||||
this.appOptions.canRename && this.headerView.setCanRename(true);
|
this.appOptions.canRename && this.headerView.setCanRename(true);
|
||||||
|
if (this.permissions.rename !== undefined)
|
||||||
|
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||||
} else
|
} else
|
||||||
this.appOptions.canModifyFilter = true;
|
this.appOptions.canModifyFilter = true;
|
||||||
|
|
||||||
|
|
|
@ -1694,12 +1694,6 @@ define([
|
||||||
_setDefaults: function() {
|
_setDefaults: function() {
|
||||||
this.initialFilterType = this.configTo.asc_getFilterObj().asc_getType();
|
this.initialFilterType = this.configTo.asc_getFilterObj().asc_getType();
|
||||||
var menuPanel = this.$window.find('.menu-panel');
|
var menuPanel = this.$window.find('.menu-panel');
|
||||||
this.menuPanelWidth = menuPanel.innerWidth();
|
|
||||||
var width = this.getWidth();
|
|
||||||
if (Common.Utils.InternalSettings.get('sse-settings-size-filter-window')) {
|
|
||||||
width = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[0] + this.menuPanelWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
var pivotObj = this.configTo.asc_getPivotObj(),
|
var pivotObj = this.configTo.asc_getPivotObj(),
|
||||||
isPivot = !!pivotObj,
|
isPivot = !!pivotObj,
|
||||||
isValueFilter = false;
|
isValueFilter = false;
|
||||||
|
@ -1709,18 +1703,11 @@ define([
|
||||||
this.miSortOptions.setVisible(isPivot);
|
this.miSortOptions.setVisible(isPivot);
|
||||||
|
|
||||||
if (isPivot) {
|
if (isPivot) {
|
||||||
if (pivotObj.asc_getIsPageFilter()) {
|
|
||||||
this.setResizable(true, [this.initConfig.minwidth - this.menuPanelWidth, this.initConfig.minheight]);
|
|
||||||
menuPanel.addClass('hidden');
|
|
||||||
width -= this.menuPanelWidth;
|
|
||||||
this.menuPanelWidth = 0;
|
|
||||||
}
|
|
||||||
this.miReapplySeparator.setVisible(false);
|
this.miReapplySeparator.setVisible(false);
|
||||||
this.miReapply.setVisible(false);
|
this.miReapply.setVisible(false);
|
||||||
|
|
||||||
isValueFilter = (pivotObj.asc_getDataFieldIndexFilter()!==0);
|
isValueFilter = (pivotObj.asc_getDataFieldIndexFilter()!==0);
|
||||||
}
|
}
|
||||||
this.setSize(width, this.getHeight());
|
|
||||||
|
|
||||||
var filterObj = this.configTo.asc_getFilterObj(),
|
var filterObj = this.configTo.asc_getFilterObj(),
|
||||||
isCustomFilter = (this.initialFilterType === Asc.c_oAscAutoFilterTypes.CustomFilters),
|
isCustomFilter = (this.initialFilterType === Asc.c_oAscAutoFilterTypes.CustomFilters),
|
||||||
|
@ -1833,6 +1820,23 @@ define([
|
||||||
this.miClear.setDisabled(this.initialFilterType === Asc.c_oAscAutoFilterTypes.None);
|
this.miClear.setDisabled(this.initialFilterType === Asc.c_oAscAutoFilterTypes.None);
|
||||||
this.miReapply.setDisabled(this.initialFilterType === Asc.c_oAscAutoFilterTypes.None);
|
this.miReapply.setDisabled(this.initialFilterType === Asc.c_oAscAutoFilterTypes.None);
|
||||||
this.btnOk.setDisabled(this.initialFilterType !== Asc.c_oAscAutoFilterTypes.Filters && this.initialFilterType !== Asc.c_oAscAutoFilterTypes.None);
|
this.btnOk.setDisabled(this.initialFilterType !== Asc.c_oAscAutoFilterTypes.Filters && this.initialFilterType !== Asc.c_oAscAutoFilterTypes.None);
|
||||||
|
|
||||||
|
this.menuPanelWidth = menuPanel.innerWidth();
|
||||||
|
var width = this.getWidth();
|
||||||
|
if (width-this.menuPanelWidth<260) {
|
||||||
|
width = Math.ceil(this.menuPanelWidth + 260);
|
||||||
|
this.setResizable(true, [width, this.initConfig.minheight]);
|
||||||
|
}
|
||||||
|
if (Common.Utils.InternalSettings.get('sse-settings-size-filter-window')) {
|
||||||
|
width = Common.Utils.InternalSettings.get('sse-settings-size-filter-window')[0] + this.menuPanelWidth;
|
||||||
|
}
|
||||||
|
if (isPivot && pivotObj.asc_getIsPageFilter()) {
|
||||||
|
this.setResizable(true, [this.initConfig.minwidth - this.menuPanelWidth, this.initConfig.minheight]);
|
||||||
|
menuPanel.addClass('hidden');
|
||||||
|
width -= this.menuPanelWidth;
|
||||||
|
this.menuPanelWidth = 0;
|
||||||
|
}
|
||||||
|
this.setSize(width, this.getHeight());
|
||||||
},
|
},
|
||||||
|
|
||||||
setupDataCells: function() {
|
setupDataCells: function() {
|
||||||
|
|
Loading…
Reference in a new issue