[DE] Add methods to disable mail merge and version history (use in desktop app)
This commit is contained in:
parent
aac0467d03
commit
f65057491c
|
@ -2124,6 +2124,17 @@ define([
|
|||
this.beforeShowDummyComment = true;
|
||||
},
|
||||
|
||||
DisableMailMerge: function() {
|
||||
this.appOptions.mergeFolderUrl = "";
|
||||
var toolbarController = this.getApplication().getController('Toolbar');
|
||||
toolbarController && toolbarController.DisableMailMerge();
|
||||
},
|
||||
|
||||
DisableVersionHistory: function() {
|
||||
this.editorConfig.canUseHistory = false;
|
||||
this.appOptions.canUseHistory = false;
|
||||
},
|
||||
|
||||
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
|
||||
criticalErrorTitle: 'Error',
|
||||
notcriticalErrorTitle: 'Warning',
|
||||
|
|
|
@ -2615,7 +2615,7 @@ define([
|
|||
this.toolbar.btnRedo.setDisabled(this._state.can_redo!==true);
|
||||
this.toolbar.btnCopy.setDisabled(this._state.can_copycut!==true);
|
||||
this.toolbar.btnPrint.setDisabled(!this.toolbar.mode.canPrint);
|
||||
if (this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients)
|
||||
if (!this._state.mmdisable && (this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients))
|
||||
this.toolbar.btnMailRecepients.setDisabled(false);
|
||||
this._state.activated = true;
|
||||
|
||||
|
@ -2623,6 +2623,11 @@ define([
|
|||
this.onApiPageSize(props.get_W(), props.get_H());
|
||||
},
|
||||
|
||||
DisableMailMerge: function() {
|
||||
this._state.mmdisable = true;
|
||||
this.toolbar && this.toolbar.btnMailRecepients && this.toolbar.btnMailRecepients.setDisabled(true);
|
||||
},
|
||||
|
||||
updateThemeColors: function() {
|
||||
var updateColors = function(picker, defaultColorIndex) {
|
||||
if (picker) {
|
||||
|
|
Loading…
Reference in a new issue