[DE] Lock controls when document is protected (read only mode)

This commit is contained in:
Julia Radzhabova 2022-09-23 15:13:58 +03:00
parent ca9b1bcf22
commit b898aee927
17 changed files with 292 additions and 141 deletions

View file

@ -111,6 +111,7 @@ define([
Common.NotificationCenter.on('collaboration:sharing', this.changeAccessRights.bind(this)); Common.NotificationCenter.on('collaboration:sharing', this.changeAccessRights.bind(this));
Common.NotificationCenter.on('collaboration:sharingdeny', this.onLostEditRights.bind(this)); Common.NotificationCenter.on('collaboration:sharingdeny', this.onLostEditRights.bind(this));
Common.NotificationCenter.on('protect:wslock', _.bind(this.onChangeProtectSheet, this)); Common.NotificationCenter.on('protect:wslock', _.bind(this.onChangeProtectSheet, this));
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
this.userCollection.on('reset', _.bind(this.onUpdateUsers, this)); this.userCollection.on('reset', _.bind(this.onUpdateUsers, this));
this.userCollection.on('add', _.bind(this.onUpdateUsers, this)); this.userCollection.on('add', _.bind(this.onUpdateUsers, this));
@ -890,6 +891,7 @@ define([
}); });
} }
me.onChangeProtectSheet(); me.onChangeProtectSheet();
me.onChangeProtectDocument();
if (me.view) { if (me.view) {
me.lockToolbar(Common.enumLock.hideComments, !Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true), {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]}); me.lockToolbar(Common.enumLock.hideComments, !Common.localStorage.getBool(me.view.appPrefix + "settings-livecomment", true), {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]});
me.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]}); me.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [me.view.btnCommentRemove, me.view.btnCommentResolve]});
@ -1011,6 +1013,20 @@ define([
this.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [this.view.btnCommentRemove, this.view.btnCommentResolve]}); this.lockToolbar(Common.enumLock['Objects'], !!this._state.wsProps['Objects'], {array: [this.view.btnCommentRemove, this.view.btnCommentResolve]});
}, },
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.lockToolbar(Common.enumLock.docLockView, props.docLock && (props.lockMode===Asc.c_oAscProtection.View));
this.lockToolbar(Common.enumLock.docLockForms, props.docLock && (props.lockMode===Asc.c_oAscProtection.Forms));
this.lockToolbar(Common.enumLock.docLockReview, props.docLock && (props.lockMode===Asc.c_oAscProtection.Review));
this.lockToolbar(Common.enumLock.docLockComments, props.docLock && (props.lockMode===Asc.c_oAscProtection.Comments));
}
},
textInserted: '<b>Inserted:</b>', textInserted: '<b>Inserted:</b>',
textDeleted: '<b>Deleted:</b>', textDeleted: '<b>Deleted:</b>',
textParaInserted: '<b>Paragraph Inserted</b> ', textParaInserted: '<b>Paragraph Inserted</b> ',

View file

@ -259,7 +259,7 @@ define([
caption: this.txtAccept, caption: this.txtAccept,
split: !this.appConfig.canUseReviewPermissions, split: !this.appConfig.canUseReviewPermissions,
iconCls: 'toolbar__icon btn-review-save', iconCls: 'toolbar__icon btn-review-save',
lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -271,7 +271,7 @@ define([
caption: this.txtReject, caption: this.txtReject,
split: !this.appConfig.canUseReviewPermissions, split: !this.appConfig.canUseReviewPermissions,
iconCls: 'toolbar__icon btn-review-deny', iconCls: 'toolbar__icon btn-review-deny',
lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.reviewChangelock, _set.isReviewOnly, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -284,7 +284,7 @@ define([
caption: this.txtCompare, caption: this.txtCompare,
split: true, split: true,
iconCls: 'toolbar__icon btn-compare', iconCls: 'toolbar__icon btn-compare',
lock: [_set.hasCoeditingUsers, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.hasCoeditingUsers, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -294,7 +294,7 @@ define([
this.btnTurnOn = new Common.UI.Button({ this.btnTurnOn = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-review', iconCls: 'toolbar__icon btn-ic-review',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
caption: this.txtTurnon, caption: this.txtTurnon,
split: !this.appConfig.isReviewOnly, split: !this.appConfig.isReviewOnly,
enableToggle: true, enableToggle: true,
@ -309,7 +309,7 @@ define([
this.btnPrev = new Common.UI.Button({ this.btnPrev = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-review-prev', iconCls: 'toolbar__icon btn-review-prev',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
caption: this.txtPrev, caption: this.txtPrev,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -320,7 +320,7 @@ define([
this.btnNext = new Common.UI.Button({ this.btnNext = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-review-next', iconCls: 'toolbar__icon btn-review-next',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect], lock: [_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.docLockView],
caption: this.txtNext, caption: this.txtNext,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -336,7 +336,7 @@ define([
this.btnReviewView = new Common.UI.Button({ this.btnReviewView = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-reviewview', iconCls: 'toolbar__icon btn-ic-reviewview',
lock: [_set.viewFormMode, _set.lostConnect], lock: [_set.viewFormMode, _set.lostConnect, _set.docLockView],
caption: this.txtView, caption: this.txtView,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
@ -404,7 +404,7 @@ define([
this.btnCoAuthMode = new Common.UI.Button({ this.btnCoAuthMode = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-ic-coedit', iconCls: 'toolbar__icon btn-ic-coedit',
lock: [_set.viewFormMode, _set.lostConnect], lock: [_set.viewFormMode, _set.lostConnect, _set.docLockView],
caption: this.txtCoAuthMode, caption: this.txtCoAuthMode,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -450,7 +450,7 @@ define([
caption: this.txtCommentRemove, caption: this.txtCommentRemove,
split: true, split: true,
iconCls: 'toolbar__icon btn-rem-comment', iconCls: 'toolbar__icon btn-rem-comment',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect], lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -461,7 +461,7 @@ define([
caption: this.txtCommentResolve, caption: this.txtCommentResolve,
split: true, split: true,
iconCls: 'toolbar__icon btn-resolve-all', iconCls: 'toolbar__icon btn-resolve-all',
lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect], lock: [_set.previewReviewMode, _set.viewFormMode, _set.hideComments, _set['Objects'], _set.lostConnect, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'
@ -731,7 +731,7 @@ define([
var button = new Common.UI.Button({ var button = new Common.UI.Button({
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-ic-review', iconCls : 'toolbar__icon btn-ic-review',
lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.lostConnect], lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.lostConnect, Common.enumLock.docLockView],
hintAnchor : 'top', hintAnchor : 'top',
hint : this.tipReview, hint : this.tipReview,
split : !this.appConfig.isReviewOnly, split : !this.appConfig.isReviewOnly,
@ -778,7 +778,7 @@ define([
button = new Common.UI.Button({ button = new Common.UI.Button({
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-docspell', iconCls: 'toolbar__icon btn-ic-docspell',
lock: [Common.enumLock.viewMode, Common.enumLock.viewFormMode, Common.enumLock.previewReviewMode], lock: [Common.enumLock.viewMode, Common.enumLock.viewFormMode, Common.enumLock.previewReviewMode, Common.enumLock.docLockView],
hintAnchor : 'top', hintAnchor : 'top',
hint: this.tipSetSpelling, hint: this.tipSetSpelling,
enableToggle: true, enableToggle: true,
@ -794,7 +794,7 @@ define([
button = new Common.UI.Button({ button = new Common.UI.Button({
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-ic-doclang', iconCls: 'toolbar__icon btn-ic-doclang',
lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.noSpellcheckLangs, Common.enumLock.lostConnect], lock: [Common.enumLock.viewMode, Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.noSpellcheckLangs, Common.enumLock.lostConnect, Common.enumLock.docLockView],
hintAnchor : 'top', hintAnchor : 'top',
hint: this.tipSetDocLang, hint: this.tipSetDocLang,
dataHint: '0', dataHint: '0',

View file

@ -46,6 +46,13 @@ define([
], function () { ], function () {
'use strict'; 'use strict';
Asc.c_oAscProtection = {
View: 1,
Forms: 2,
Review: 3,
Comments: 4
};
if (!Common.enumLock) if (!Common.enumLock)
Common.enumLock = {}; Common.enumLock = {};
@ -121,9 +128,12 @@ define([
btn = result; btn = result;
if (result == 'ok') { if (result == 'ok') {
// var props = me.api.asc_getProtectedDocument(); // var props = me.api.asc_getProtectedDocument();
// props.asc_setLockMode(props); // props.asc_setType(props);
// props.asc_setLockPwd(value); // props.asc_setLockPwd(value);
// me.api.asc_setProtectedDocument(props); // me.api.asc_setProtectedDocument(props);
me.view.btnProtectDoc.toggle(true, true); // test
me.onChangeProtectDocument(); // test
} }
Common.NotificationCenter.trigger('edit:complete'); Common.NotificationCenter.trigger('edit:complete');
} }
@ -136,8 +146,10 @@ define([
} else { } else {
var me = this, var me = this,
btn, btn,
props = me.api.asc_getProtectedDocument(); // props = me.api.asc_getProtectedDocument();
if (props.asc_isPassword()) { props = undefined; // test
// if (props.asc_isPassword()) {
if (props && props.asc_isPassword()) {
var win = new Common.Views.OpenDialog({ var win = new Common.Views.OpenDialog({
title: me.view.txtWBUnlockTitle, title: me.view.txtWBUnlockTitle,
closable: true, closable: true,
@ -161,8 +173,10 @@ define([
win.show(); win.show();
} else { } else {
props.asc_setLockPwd(); me.view.btnProtectDoc.toggle(false, true); // test
me.api.asc_setProtectedDocument(props); me.onChangeProtectDocument(); // test
// props.asc_setLockPwd();
// me.api.asc_setProtectedDocument(props);
} }
} }
}, },
@ -179,24 +193,37 @@ define([
}, },
onChangeProtectDocument: function() { onChangeProtectDocument: function() {
// this.view && this.view.btnProtectDoc.toggle(this.api.asc_isProtectedDocument(), true); // var isProtected = this.api.asc_isProtectedDocument();
var isProtected = this.view.btnProtectDoc.isActive(); // test
this.view && this.view.btnProtectDoc.toggle(isProtected, true);
var props = this.getDocProps(true);
Common.NotificationCenter.trigger('protect:doclock', props);
}, },
getDocProps: function(update) { getDocProps: function(update) {
if (!this.appConfig || !this.appConfig.isEdit && !this.appConfig.isRestrictedEdit) return; if (!this.appConfig || !this.appConfig.isEdit && !this.appConfig.isRestrictedEdit) return;
if (update || !this._state.protection) { if (update || !this._state.docProtection) {
var docProtected = !!this.api.asc_isProtectedDocument(), // var docProtected = !!this.api.asc_isProtectedDocument(),
// type;
//
// if (docProtected) {
// var props = this.api.asc_getProtectedDocument();
// type = props.asc_getType();
// }
// test //////
var docProtected = this.view.btnProtectDoc.isActive(),
type; type;
if (docProtected) { if (docProtected) {
var props = this.api.asc_getProtectedDocument(); type = Asc.c_oAscProtection.View;
type = props.asc_getLockMode();
} }
this._state.protection = {docLock: docProtected, lockMode: type}; /////////////
this._state.docProtection = {docLock: docProtected, lockMode: type};
} }
return this._state.protection; return this._state.docProtection;
} }
}, DE.Controllers.DocProtection || {})); }, DE.Controllers.DocProtection || {}));

View file

@ -226,7 +226,7 @@ define([
this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this)); this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this)); this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
} }
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
this.documentHolder.setApi(this.api); this.documentHolder.setApi(this.api);
} }
@ -585,7 +585,9 @@ define([
showObjectMenu: function(event, docElement, eOpts){ showObjectMenu: function(event, docElement, eOpts){
var me = this; var me = this;
if (me.api){ if (me.api){
var obj = (me.mode.isEdit && !me._isDisabled) ? me.fillMenuProps(me.api.getSelectedElements()) : me.fillViewMenuProps(me.api.getSelectedElements()); var lockMode = this.documentHolder.docProtection ? this.documentHolder.docProtection.lockMode : undefined;
var obj = (me.mode.isEdit && !(me._isDisabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments || lockMode===Asc.c_oAscProtection.Forms)) ?
me.fillMenuProps(me.api.getSelectedElements()) : me.fillViewMenuProps(me.api.getSelectedElements());
if (obj) me.showPopupMenu(obj.menu_to_show, obj.menu_props, event, docElement, eOpts); if (obj) me.showPopupMenu(obj.menu_to_show, obj.menu_props, event, docElement, eOpts);
} }
}, },
@ -612,7 +614,9 @@ define([
var me = this, var me = this,
currentMenu = me.documentHolder.currentMenu; currentMenu = me.documentHolder.currentMenu;
if (currentMenu && currentMenu.isVisible() && currentMenu !== me.documentHolder.hdrMenu){ if (currentMenu && currentMenu.isVisible() && currentMenu !== me.documentHolder.hdrMenu){
var obj = (me.mode.isEdit && !me._isDisabled) ? me.fillMenuProps(selectedElements) : me.fillViewMenuProps(selectedElements); var lockMode = me.documentHolder.docProtection ? me.documentHolder.docProtection.lockMode : undefined;
var obj = (me.mode.isEdit && !(me._isDisabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments || lockMode===Asc.c_oAscProtection.Forms)) ?
me.fillMenuProps(selectedElements) : me.fillViewMenuProps(selectedElements);
if (obj) { if (obj) {
if (obj.menu_to_show===currentMenu) { if (obj.menu_to_show===currentMenu) {
currentMenu.options.initMenu(obj.menu_props); currentMenu.options.initMenu(obj.menu_props);
@ -1180,7 +1184,8 @@ define([
}, },
onDoubleClickOnChart: function(chart) { onDoubleClickOnChart: function(chart) {
if (this.mode.isEdit && !this._isDisabled) { var lockMode = this.documentHolder.docProtection ? this.documentHolder.docProtection.lockMode : undefined;
if (this.mode.isEdit && !(this._isDisabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments || lockMode===Asc.c_oAscProtection.Forms)) {
var diagramEditor = this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').getView('Common.Views.ExternalDiagramEditor'); var diagramEditor = this.getApplication().getController('Common.Controllers.ExternalDiagramEditor').getView('Common.Views.ExternalDiagramEditor');
if (diagramEditor && chart) { if (diagramEditor && chart) {
diagramEditor.setEditMode(true); diagramEditor.setEditMode(true);
@ -1191,7 +1196,8 @@ define([
}, },
onDoubleClickOnTableOleObject: function(chart) { onDoubleClickOnTableOleObject: function(chart) {
if (this.mode.isEdit && !this._isDisabled) { var lockMode = this.documentHolder.docProtection ? this.documentHolder.docProtection.lockMode : undefined;
if (this.mode.isEdit && !(this._isDisabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments || lockMode===Asc.c_oAscProtection.Forms)) {
var oleEditor = this.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor'); var oleEditor = this.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor');
if (oleEditor && chart) { if (oleEditor && chart) {
oleEditor.setEditMode(true); oleEditor.setEditMode(true);
@ -1895,7 +1901,8 @@ define([
this.api.asc_ViewCertificate(datavalue); //certificate id this.api.asc_ViewCertificate(datavalue); //certificate id
break; break;
case 2: case 2:
Common.NotificationCenter.trigger('protect:signature', 'visible', this._isDisabled, datavalue);//guid, can edit settings for requested signature var lockMode = this.documentHolder.docProtection ? this.documentHolder.docProtection.lockMode : undefined;
Common.NotificationCenter.trigger('protect:signature', 'visible', this._isDisabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments || lockMode===Asc.c_oAscProtection.Forms, datavalue);//guid, can edit settings for requested signature
break; break;
case 3: case 3:
var me = this; var me = this;
@ -2310,6 +2317,16 @@ define([
editComplete: function() { editComplete: function() {
this.documentHolder && this.documentHolder.fireEvent('editcomplete', this.documentHolder); this.documentHolder && this.documentHolder.fireEvent('editcomplete', this.documentHolder);
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this.documentHolder && (this.documentHolder.docProtection = props);
}
} }
}); });
}); });

View file

@ -76,6 +76,7 @@ define([
// this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this)); // this.api.asc_registerCallback('asc_onShowContentControlsActions',_.bind(this.onShowContentControlsActions, this));
// this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this)); // this.api.asc_registerCallback('asc_onHideContentControlsActions',_.bind(this.onHideContentControlsActions, this));
} }
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
return this; return this;
}, },
@ -430,6 +431,21 @@ define([
if (tab !== 'forms') { if (tab !== 'forms') {
this.tipSaveForm && this.tipSaveForm.close(); this.tipSaveForm && this.tipSaveForm.close();
} }
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
var arr = this.view.getButtons();
Common.Utils.lockControls(Common.enumLock.docLockView, props.docLock && (props.lockMode===Asc.c_oAscProtection.View)), {array: arr};
Common.Utils.lockControls(Common.enumLock.docLockForms, props.docLock && (props.lockMode===Asc.c_oAscProtection.Forms), {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockReview, props.docLock && (props.lockMode===Asc.c_oAscProtection.Review), {array: arr});
Common.Utils.lockControls(Common.enumLock.docLockComments, props.docLock && (props.lockMode===Asc.c_oAscProtection.Comments), {array: arr});
}
} }
}, DE.Controllers.FormsTab || {})); }, DE.Controllers.FormsTab || {}));

View file

@ -108,6 +108,7 @@ define([
this.api.asc_registerCallback('asc_onAscReplaceCurrentTOF',_.bind(this.onAscReplaceCurrentTOF, this)); this.api.asc_registerCallback('asc_onAscReplaceCurrentTOF',_.bind(this.onAscReplaceCurrentTOF, this));
this.api.asc_registerCallback('asc_onAscTOFUpdate',_.bind(this.onAscTOFUpdate, this)); this.api.asc_registerCallback('asc_onAscTOFUpdate',_.bind(this.onAscTOFUpdate, this));
} }
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
return this; return this;
}, },
@ -570,6 +571,20 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
} }
})).show(); })).show();
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.lockToolbar(Common.enumLock.docLockView, props.docLock && (props.lockMode===Asc.c_oAscProtection.View));
this.lockToolbar(Common.enumLock.docLockForms, props.docLock && (props.lockMode===Asc.c_oAscProtection.Forms));
this.lockToolbar(Common.enumLock.docLockReview, props.docLock && (props.lockMode===Asc.c_oAscProtection.Review));
this.lockToolbar(Common.enumLock.docLockComments, props.docLock && (props.lockMode===Asc.c_oAscProtection.Comments));
}
} }
}, DE.Controllers.Links || {})); }, DE.Controllers.Links || {}));

View file

@ -57,7 +57,7 @@ define([
onLaunch: function (view) { onLaunch: function (view) {
this.toolbar = view; this.toolbar = view;
this.editMode = true; this.editMode = true;
this._state = {};
return this; return this;
}, },
@ -98,7 +98,7 @@ define([
this.api.asc_registerCallback('asc_onImgWrapStyleChanged', this.onApiWrappingStyleChanged.bind(this)); this.api.asc_registerCallback('asc_onImgWrapStyleChanged', this.onApiWrappingStyleChanged.bind(this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', this.onApiCoAuthoringDisconnect.bind(this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', this.onApiCoAuthoringDisconnect.bind(this));
this.api.asc_registerCallback('asc_onFocusObject', this.onApiFocusObject.bind(this)); this.api.asc_registerCallback('asc_onFocusObject', this.onApiFocusObject.bind(this));
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
return this; return this;
}, },
@ -255,6 +255,20 @@ define([
this.api.ImgApply(props); this.api.ImgApply(props);
this.toolbar.fireEvent('editcomplete', this.toolbar); this.toolbar.fireEvent('editcomplete', this.toolbar);
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.toolbar.lockToolbar(Common.enumLock.docLockView, props.docLock && (props.lockMode===Asc.c_oAscProtection.View));
this.toolbar.lockToolbar(Common.enumLock.docLockForms, props.docLock && (props.lockMode===Asc.c_oAscProtection.Forms));
this.toolbar.lockToolbar(Common.enumLock.docLockReview, props.docLock && (props.lockMode===Asc.c_oAscProtection.Review));
this.toolbar.lockToolbar(Common.enumLock.docLockComments, props.docLock && (props.lockMode===Asc.c_oAscProtection.Comments));
}
} }
} }
})()); })());

View file

@ -54,7 +54,7 @@ define([
initialize: function() { initialize: function() {
this.editMode = true; this.editMode = true;
this._initSettings = true; this._initSettings = true;
this._state = {};
this.addListeners({ this.addListeners({
'RightMenu': { 'RightMenu': {
'rightmenuclick': this.onRightMenuClick 'rightmenuclick': this.onRightMenuClick
@ -89,6 +89,7 @@ define([
setApi: function(api) { setApi: function(api) {
this.api = api; this.api = api;
this.api.asc_registerCallback('asc_onUpdateSignatures', _.bind(this.onApiUpdateSignatures, this)); this.api.asc_registerCallback('asc_onUpdateSignatures', _.bind(this.onApiUpdateSignatures, this));
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
}, },
@ -156,7 +157,10 @@ define([
this._settings[Common.Utils.documentSettingsType.Signature].locked = false; this._settings[Common.Utils.documentSettingsType.Signature].locked = false;
var isChart = false, var isChart = false,
isSmartArtInternal = false; isSmartArtInternal = false,
lockMode = this._state.docProtection ? this._state.docProtection.lockMode : undefined;
lockMode = (lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Forms || lockMode===Asc.c_oAscProtection.Comments);
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null, var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
control_lock = false; control_lock = false;
for (i=0; i<SelectedObjects.length; i++) for (i=0; i<SelectedObjects.length; i++)
@ -185,7 +189,7 @@ define([
if (value.get_ShapeProperties().asc_getTextArtProperties()) { if (value.get_ShapeProperties().asc_getTextArtProperties()) {
this._settings[Common.Utils.documentSettingsType.TextArt].props = value; this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0; this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0;
this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked() || content_locked; this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked() || content_locked || lockMode;
} }
} }
control_lock = control_lock || value.get_Locked(); control_lock = control_lock || value.get_Locked();
@ -197,11 +201,11 @@ define([
} }
this._settings[settingsType].props = value; this._settings[settingsType].props = value;
this._settings[settingsType].hidden = 0; this._settings[settingsType].hidden = 0;
this._settings[settingsType].locked = value.get_Locked() || content_locked; this._settings[settingsType].locked = value.get_Locked() || content_locked || lockMode;
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked(); this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked() || lockMode;
if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked
this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked(); this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked() || lockMode;
} }
if (control_props && control_props.get_FormPr() && this.rightmenu.formSettings) { if (control_props && control_props.get_FormPr() && this.rightmenu.formSettings) {
@ -210,7 +214,7 @@ define([
spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None) { spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None) {
settingsType = Common.Utils.documentSettingsType.Form; settingsType = Common.Utils.documentSettingsType.Form;
this._settings[settingsType].props = control_props; this._settings[settingsType].props = control_props;
this._settings[settingsType].locked = control_lock; this._settings[settingsType].locked = control_lock || lockMode;
this._settings[settingsType].hidden = 0; this._settings[settingsType].hidden = 0;
if (control_props.get_FormPr().get_Fixed()) if (control_props.get_FormPr().get_Fixed())
this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 1; this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 1;
@ -466,6 +470,19 @@ define([
case Asc.c_oAscTypeSelectElement.Header: case Asc.c_oAscTypeSelectElement.Header:
return Common.Utils.documentSettingsType.Header; return Common.Utils.documentSettingsType.Header;
} }
},
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
}
var selectedElements = this.api.getSelectedElements();
if (selectedElements.length > 0)
this.onFocusObject(selectedElements);
} }
}); });
}); });

View file

@ -122,7 +122,7 @@ define([
me.statusbar.$el.find('.hide-select-tools').removeClass('hide-select-tools'); me.statusbar.$el.find('.hide-select-tools').removeClass('hide-select-tools');
} }
}); });
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me)); Common.NotificationCenter.on('app:ready', me.onAppReady.bind(me));
}, },
@ -358,6 +358,14 @@ define([
} }
}, },
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
props && this.statusbar.onChangeProtectDocument(props);
},
zoomText : 'Zoom {0}%', zoomText : 'Zoom {0}%',
textHasChanges : 'New changes have been tracked', textHasChanges : 'New changes have been tracked',
textTrackChanges: 'The document is opened with the Track Changes mode enabled', textTrackChanges: 'The document is opened with the Track Changes mode enabled',

View file

@ -430,6 +430,7 @@ define([
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
} }
Common.NotificationCenter.on('protect:doclock', _.bind(this.onChangeProtectDocument, this));
}, },
onChangeCompactView: function(view, compact) { onChangeCompactView: function(view, compact) {
@ -3263,7 +3264,7 @@ define([
this.btnsComment = Common.Utils.injectButtons(this.toolbar.$el.find('.slot-comment'), 'tlbtn-addcomment-', 'toolbar__icon btn-menu-comments', this.toolbar.capBtnComment, this.btnsComment = Common.Utils.injectButtons(this.toolbar.$el.find('.slot-comment'), 'tlbtn-addcomment-', 'toolbar__icon btn-menu-comments', this.toolbar.capBtnComment,
[ Common.enumLock.paragraphLock, Common.enumLock.headerLock, Common.enumLock.richEditLock, Common.enumLock.plainEditLock, Common.enumLock.richDelLock, Common.enumLock.plainDelLock, [ Common.enumLock.paragraphLock, Common.enumLock.headerLock, Common.enumLock.richEditLock, Common.enumLock.plainEditLock, Common.enumLock.richDelLock, Common.enumLock.plainDelLock,
Common.enumLock.cantAddQuotedComment, Common.enumLock.imageLock, Common.enumLock.inSpecificForm, Common.enumLock.inImage, Common.enumLock.lostConnect, Common.enumLock.disableOnStart, Common.enumLock.cantAddQuotedComment, Common.enumLock.imageLock, Common.enumLock.inSpecificForm, Common.enumLock.inImage, Common.enumLock.lostConnect, Common.enumLock.disableOnStart,
Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode ], Common.enumLock.previewReviewMode, Common.enumLock.viewFormMode, Common.enumLock.docLockView ],
undefined, undefined, undefined, '1', 'bottom'); undefined, undefined, undefined, '1', 'bottom');
if ( this.btnsComment.length ) { if ( this.btnsComment.length ) {
var _comments = DE.getController('Common.Controllers.Comments').getView(); var _comments = DE.getController('Common.Controllers.Comments').getView();
@ -3331,6 +3332,20 @@ define([
})).show(); })).show();
}, },
onChangeProtectDocument: function(props) {
if (!props) {
var docprotect = this.getApplication().getController('DocProtection');
props = docprotect ? docprotect.getDocProps() : null;
}
if (props) {
this._state.docProtection = props;
this.toolbar.lockToolbar(Common.enumLock.docLockView, props.docLock && (props.lockMode===Asc.c_oAscProtection.View));
this.toolbar.lockToolbar(Common.enumLock.docLockForms, props.docLock && (props.lockMode===Asc.c_oAscProtection.Forms));
this.toolbar.lockToolbar(Common.enumLock.docLockReview, props.docLock && (props.lockMode===Asc.c_oAscProtection.Review));
this.toolbar.lockToolbar(Common.enumLock.docLockComments, props.docLock && (props.lockMode===Asc.c_oAscProtection.Comments));
}
},
textEmptyImgUrl : 'You need to specify image URL.', textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning', textWarning : 'Warning',
textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 300', textFontSizeErr : 'The entered value is incorrect.<br>Please enter a numeric value between 1 and 300',

View file

@ -79,7 +79,7 @@ define([
iconCls: 'toolbar__icon protect-workbook', iconCls: 'toolbar__icon protect-workbook',
enableToggle: true, enableToggle: true,
caption: this.txtProtectDoc, caption: this.txtProtectDoc,
lock : [_set.lostConnect, _set.coAuth], lock : [_set.lostConnect, _set.coAuth, _set.previewReviewMode, _set.viewFormMode],
dataHint : '1', dataHint : '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
dataHintOffset: 'small' dataHintOffset: 'small'

View file

@ -152,6 +152,7 @@ define([
signGuid = (value.imgProps && value.imgProps.value && me.mode.isSignatureSupport) ? value.imgProps.value.asc_getSignatureId() : undefined, signGuid = (value.imgProps && value.imgProps.value && me.mode.isSignatureSupport) ? value.imgProps.value.asc_getSignatureId() : undefined,
signProps = (signGuid) ? me.api.asc_getSignatureSetup(signGuid) : null, signProps = (signGuid) ? me.api.asc_getSignatureSetup(signGuid) : null,
isInSign = !!signProps && me._canProtect, isInSign = !!signProps && me._canProtect,
lockMode = me.docProtection ? me.docProtection.lockMode : undefined,
control_lock = (value.paraProps) ? (!value.paraProps.value.can_DeleteBlockContentControl() || !value.paraProps.value.can_EditBlockContentControl() || control_lock = (value.paraProps) ? (!value.paraProps.value.can_DeleteBlockContentControl() || !value.paraProps.value.can_EditBlockContentControl() ||
!value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false, !value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false,
canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled && !control_lock, canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled && !control_lock,
@ -169,7 +170,7 @@ define([
} }
me.menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); me.menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled);
me.menuViewUndo.setDisabled(!me.api.asc_getCanUndo()); me.menuViewUndo.setDisabled(!me.api.asc_getCanUndo() || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Forms);
me.menuViewCopySeparator.setVisible(isInSign); me.menuViewCopySeparator.setVisible(isInSign);
var isRequested = (signProps) ? signProps.asc_getRequested() : false; var isRequested = (signProps) ? signProps.asc_getRequested() : false;
@ -187,15 +188,15 @@ define([
} }
me.menuViewAddComment.setVisible(canComment); me.menuViewAddComment.setVisible(canComment);
me.menuViewAddComment.setDisabled(value.paraProps && value.paraProps.locked === true); me.menuViewAddComment.setDisabled(value.paraProps && value.paraProps.locked === true || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Forms);
var disabled = value.paraProps && value.paraProps.locked === true; var disabled = value.paraProps && value.paraProps.locked === true;
var cancopy = me.api && me.api.can_CopyCut(); var cancopy = me.api && me.api.can_CopyCut();
me.menuViewCopy.setDisabled(!cancopy); me.menuViewCopy.setDisabled(!cancopy);
me.menuViewCut.setVisible(me._fillFormMode && canEditControl); me.menuViewCut.setVisible(me._fillFormMode && canEditControl);
me.menuViewCut.setDisabled(disabled || !cancopy); me.menuViewCut.setDisabled(disabled || !cancopy || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments);
me.menuViewPaste.setVisible(me._fillFormMode && canEditControl); me.menuViewPaste.setVisible(me._fillFormMode && canEditControl);
me.menuViewPaste.setDisabled(disabled); me.menuViewPaste.setDisabled(disabled || lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Comments);
me.menuViewPrint.setVisible(me.mode.canPrint && !me._fillFormMode); me.menuViewPrint.setVisible(me.mode.canPrint && !me._fillFormMode);
me.menuViewPrint.setDisabled(!cancopy); me.menuViewPrint.setDisabled(!cancopy);

View file

@ -169,7 +169,7 @@ define([
this.btnTextField = new Common.UI.Button({ this.btnTextField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-text-field', iconCls: 'toolbar__icon btn-text-field',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnText, caption: this.capBtnText,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -180,7 +180,7 @@ define([
this.btnComboBox = new Common.UI.Button({ this.btnComboBox = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-combo-box', iconCls: 'toolbar__icon btn-combo-box',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnComboBox, caption: this.capBtnComboBox,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -191,7 +191,7 @@ define([
this.btnDropDown = new Common.UI.Button({ this.btnDropDown = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-dropdown', iconCls: 'toolbar__icon btn-dropdown',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnDropDown, caption: this.capBtnDropDown,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -202,7 +202,7 @@ define([
this.btnCheckBox = new Common.UI.Button({ this.btnCheckBox = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-checkbox', iconCls: 'toolbar__icon btn-checkbox',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnCheckBox, caption: this.capBtnCheckBox,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -213,7 +213,7 @@ define([
this.btnRadioBox = new Common.UI.Button({ this.btnRadioBox = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-radio-button', iconCls: 'toolbar__icon btn-radio-button',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnRadioBox, caption: this.capBtnRadioBox,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -224,7 +224,7 @@ define([
this.btnImageField = new Common.UI.Button({ this.btnImageField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertimage', iconCls: 'toolbar__icon btn-insertimage',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.complexForm, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.complexForm, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnImage, caption: this.capBtnImage,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -235,7 +235,7 @@ define([
this.btnEmailField = new Common.UI.Button({ this.btnEmailField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-email', iconCls: 'toolbar__icon btn-email',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnEmail, caption: this.capBtnEmail,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -246,7 +246,7 @@ define([
this.btnPhoneField = new Common.UI.Button({ this.btnPhoneField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-phone', iconCls: 'toolbar__icon btn-phone',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnPhone, caption: this.capBtnPhone,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -257,7 +257,7 @@ define([
this.btnComplexField = new Common.UI.Button({ this.btnComplexField = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon complex-field', iconCls: 'toolbar__icon complex-field',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.complexForm, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.contentLock, _set.complexForm, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnComplex, caption: this.capBtnComplex,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -268,7 +268,7 @@ define([
this.btnViewForm = new Common.UI.Button({ this.btnViewForm = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-sheet-view', iconCls: 'toolbar__icon btn-sheet-view',
lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnView, caption: this.capBtnView,
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
@ -280,7 +280,7 @@ define([
this.btnClearFields = new Common.UI.Button({ this.btnClearFields = new Common.UI.Button({
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-clearstyle', iconCls : 'toolbar__icon btn-clearstyle',
lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption : this.textClearFields, caption : this.textClearFields,
dataHint : '1', dataHint : '1',
dataHintDirection: 'left', dataHintDirection: 'left',
@ -291,7 +291,7 @@ define([
this.btnHighlight = new Common.UI.ButtonColored({ this.btnHighlight = new Common.UI.ButtonColored({
cls : 'btn-toolbar', cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-highlight', iconCls : 'toolbar__icon btn-highlight',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption : this.textHighlight, caption : this.textHighlight,
menu : true, menu : true,
additionalItems: [ this.mnuNoFormsColor = new Common.UI.MenuItem({ additionalItems: [ this.mnuNoFormsColor = new Common.UI.MenuItem({
@ -316,7 +316,7 @@ define([
this.btnPrevForm = new Common.UI.Button({ this.btnPrevForm = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon previous-field', iconCls: 'toolbar__icon previous-field',
lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnPrev, caption: this.capBtnPrev,
// disabled: this.appConfig.isEdit && this.appConfig.canFeatureContentControl && this.appConfig.canFeatureForms, // disable only for edit mode // disabled: this.appConfig.isEdit && this.appConfig.canFeatureContentControl && this.appConfig.canFeatureForms, // disable only for edit mode
dataHint: '1', dataHint: '1',
@ -328,7 +328,7 @@ define([
this.btnNextForm = new Common.UI.Button({ this.btnNextForm = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon next-field', iconCls: 'toolbar__icon next-field',
lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnNext, caption: this.capBtnNext,
// disabled: this.appConfig.isEdit && this.appConfig.canFeatureContentControl && this.appConfig.canFeatureForms, // disable only for edit mode, // disabled: this.appConfig.isEdit && this.appConfig.canFeatureContentControl && this.appConfig.canFeatureForms, // disable only for edit mode,
dataHint: '1', dataHint: '1',

View file

@ -169,13 +169,13 @@ define([
$host = me.toolbar.$el; $host = me.toolbar.$el;
this.btnsContents = Common.Utils.injectButtons($host.find('.btn-slot.btn-contents'), '', 'toolbar__icon btn-contents', me.capBtnInsContents, this.btnsContents = Common.Utils.injectButtons($host.find('.btn-slot.btn-contents'), '', 'toolbar__icon btn-contents', me.capBtnInsContents,
[_set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], [_set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
true, true, undefined, '1', 'bottom', 'small'); true, true, undefined, '1', 'bottom', 'small');
this.btnsNotes = Common.Utils.injectButtons($host.find('.btn-slot.slot-notes'), '', 'toolbar__icon btn-notes', me.capBtnInsFootnote, this.btnsNotes = Common.Utils.injectButtons($host.find('.btn-slot.slot-notes'), '', 'toolbar__icon btn-notes', me.capBtnInsFootnote,
[_set.paragraphLock, _set.inEquation, _set.inImage, _set.inHeader, _set.controlPlain, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], [_set.paragraphLock, _set.inEquation, _set.inImage, _set.inHeader, _set.controlPlain, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
true, true, undefined, '1', 'bottom', 'small'); true, true, undefined, '1', 'bottom', 'small');
this.btnsHyperlink = Common.Utils.injectButtons($host.find('.btn-slot.slot-inshyperlink'), '', 'toolbar__icon btn-inserthyperlink', me.capBtnInsLink, this.btnsHyperlink = Common.Utils.injectButtons($host.find('.btn-slot.slot-inshyperlink'), '', 'toolbar__icon btn-inserthyperlink', me.capBtnInsLink,
[_set.paragraphLock, _set.headerLock, _set.hyperlinkLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], [_set.paragraphLock, _set.headerLock, _set.hyperlinkLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
undefined, undefined, undefined, '1', 'bottom', 'small'); undefined, undefined, undefined, '1', 'bottom', 'small');
Array.prototype.push.apply(this.paragraphControls, this.btnsContents.concat(this.btnsNotes, this.btnsHyperlink)); Array.prototype.push.apply(this.paragraphControls, this.btnsContents.concat(this.btnsNotes, this.btnsHyperlink));
@ -183,7 +183,7 @@ define([
parentEl: $host.find('#slot-btn-contents-update'), parentEl: $host.find('#slot-btn-contents-update'),
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-update', iconCls: 'toolbar__icon btn-update',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnContentsUpdate, caption: this.capBtnContentsUpdate,
split: true, split: true,
menu: true, menu: true,
@ -197,7 +197,7 @@ define([
parentEl: $host.find('#slot-btn-add-text'), parentEl: $host.find('#slot-btn-add-text'),
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon add-text', iconCls: 'toolbar__icon add-text',
lock: [ _set.cantAddTextTOF, _set.inHeader, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.cantAddTextTOF, _set.inHeader, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnAddText, caption: this.capBtnAddText,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
items: [] items: []
@ -212,7 +212,7 @@ define([
parentEl: $host.find('#slot-btn-bookmarks'), parentEl: $host.find('#slot-btn-bookmarks'),
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-bookmarks', iconCls: 'toolbar__icon btn-bookmarks',
lock: [_set.paragraphLock, _set.inHeader, _set.headerLock, _set.controlPlain, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.inHeader, _set.headerLock, _set.controlPlain, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnBookmarks, caption: this.capBtnBookmarks,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -224,7 +224,7 @@ define([
parentEl: $host.find('#slot-btn-caption'), parentEl: $host.find('#slot-btn-caption'),
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-caption', iconCls: 'toolbar__icon btn-caption',
lock: [_set.inHeader, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.inHeader, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnCaption, caption: this.capBtnCaption,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -236,7 +236,7 @@ define([
parentEl: $host.find('#slot-btn-crossref'), parentEl: $host.find('#slot-btn-crossref'),
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-cross-reference', iconCls: 'toolbar__icon btn-cross-reference',
lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.richEditLock, _set.plainEditLock, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.controlPlain, _set.richEditLock, _set.plainEditLock, _set.contentLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnCrossRef, caption: this.capBtnCrossRef,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -248,7 +248,7 @@ define([
parentEl: $host.find('#slot-btn-tof'), parentEl: $host.find('#slot-btn-tof'),
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-contents', iconCls: 'toolbar__icon btn-contents',
lock: [_set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnTOF, caption: this.capBtnTOF,
dataHint: '1', dataHint: '1',
dataHintDirection: 'left', dataHintDirection: 'left',
@ -260,7 +260,7 @@ define([
parentEl: $host.find('#slot-btn-tof-update'), parentEl: $host.find('#slot-btn-tof-update'),
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-update', iconCls: 'toolbar__icon btn-update',
lock: [_set.paragraphLock, _set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.cantUpdateTOF, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.inHeader, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.cantUpdateTOF, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: this.capBtnContentsUpdate, caption: this.capBtnContentsUpdate,
dataHint: '1', dataHint: '1',
dataHintDirection: 'left', dataHintDirection: 'left',

View file

@ -43,12 +43,6 @@ define([
], function () { ], function () {
'use strict'; 'use strict';
Asc.c_oAscProtection = {
View: 1,
Forms: 2,
Review: 3,
Comments: 4
};
DE.Views.ProtectDialog = Common.UI.Window.extend(_.extend({ DE.Views.ProtectDialog = Common.UI.Window.extend(_.extend({
initialize : function (options) { initialize : function (options) {

View file

@ -176,7 +176,8 @@ define([
_.extend(this, options); _.extend(this, options);
this.pages = new DE.Models.Pages({current:1, count:1}); this.pages = new DE.Models.Pages({current:1, count:1});
this.pages.on('change', _.bind(_updatePagesCaption,this)); this.pages.on('change', _.bind(_updatePagesCaption,this));
this.state = {}; this._state = {};
this._isDisabled = false;
var me = this; var me = this;
this.$layout = $(this.template({ this.$layout = $(this.template({
@ -399,8 +400,18 @@ define([
}, },
SetDisabled: function(disable) { SetDisabled: function(disable) {
this.btnLanguage.setDisabled(disable || this.langMenu.items.length<1); this._isDisabled = disable;
this.btnTurnReview && this.btnTurnReview.setDisabled(disable); var lockMode = this._state.docProtection ? this._state.docProtection.lockMode : undefined;
lockMode = (lockMode===Asc.c_oAscProtection.View || lockMode===Asc.c_oAscProtection.Forms || lockMode===Asc.c_oAscProtection.Comments);
this.btnLanguage.setDisabled(disable || this.langMenu.items.length<1 || lockMode);
this.btnTurnReview && this.btnTurnReview.setDisabled(disable || lockMode);
},
onChangeProtectDocument: function(props) {
if (props) {
this._state.docProtection = props;
this.SetDisabled(this._isDisabled);
}
}, },
onApiCoAuthoringDisconnect: function() { onApiCoAuthoringDisconnect: function() {

View file

@ -201,7 +201,7 @@ define([
id: 'id-toolbar-btn-save', id: 'id-toolbar-btn-save',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon no-mask ' + this.btnSaveCls, iconCls: 'toolbar__icon no-mask ' + this.btnSaveCls,
lock: [_set.lostConnect, _set.disableOnStart], lock: [_set.lostConnect, _set.disableOnStart, _set.docLockView],
signals: ['disabled'], signals: ['disabled'],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top', dataHintDirection: 'top',
@ -214,7 +214,7 @@ define([
id: 'id-toolbar-btn-undo', id: 'id-toolbar-btn-undo',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-undo', iconCls: 'toolbar__icon btn-undo',
lock: [_set.undoLock, _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [_set.undoLock, _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
signals: ['disabled'], signals: ['disabled'],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -226,7 +226,7 @@ define([
id: 'id-toolbar-btn-redo', id: 'id-toolbar-btn-redo',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-redo', iconCls: 'toolbar__icon btn-redo',
lock: [_set.redoLock, _set.previewReviewMode, _set.lostConnect, _set.disableOnStart], lock: [_set.redoLock, _set.previewReviewMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
signals: ['disabled'], signals: ['disabled'],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -238,7 +238,7 @@ define([
id: 'id-toolbar-btn-copy', id: 'id-toolbar-btn-copy',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-copy', iconCls: 'toolbar__icon btn-copy',
lock: [_set.copyLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.copyLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top', dataHintDirection: 'top',
dataHintTitle: 'C' dataHintTitle: 'C'
@ -249,7 +249,7 @@ define([
id: 'id-toolbar-btn-paste', id: 'id-toolbar-btn-paste',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-paste', iconCls: 'toolbar__icon btn-paste',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top', dataHintDirection: 'top',
dataHintTitle: 'V' dataHintTitle: 'V'
@ -260,7 +260,7 @@ define([
id: 'id-toolbar-btn-cut', id: 'id-toolbar-btn-cut',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-cut', iconCls: 'toolbar__icon btn-cut',
lock: [_set.copyLock, _set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.imageLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.copyLock, _set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.imageLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top', dataHintDirection: 'top',
dataHintTitle: 'X' dataHintTitle: 'X'
@ -281,7 +281,7 @@ define([
id: 'id-toolbar-btn-incfont', id: 'id-toolbar-btn-incfont',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-incfont', iconCls: 'toolbar__icon btn-incfont',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top' dataHintDirection: 'top'
}); });
@ -291,7 +291,7 @@ define([
id: 'id-toolbar-btn-decfont', id: 'id-toolbar-btn-decfont',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-decfont', iconCls: 'toolbar__icon btn-decfont',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top' dataHintDirection: 'top'
}); });
@ -301,7 +301,7 @@ define([
id: 'id-toolbar-btn-bold', id: 'id-toolbar-btn-bold',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-bold', iconCls: 'toolbar__icon btn-bold',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom' dataHintDirection: 'bottom'
@ -312,7 +312,7 @@ define([
id: 'id-toolbar-btn-italic', id: 'id-toolbar-btn-italic',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-italic', iconCls: 'toolbar__icon btn-italic',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom' dataHintDirection: 'bottom'
@ -323,7 +323,7 @@ define([
id: 'id-toolbar-btn-underline', id: 'id-toolbar-btn-underline',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-underline', iconCls: 'toolbar__icon btn-underline',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom' dataHintDirection: 'bottom'
@ -334,7 +334,7 @@ define([
id: 'id-toolbar-btn-strikeout', id: 'id-toolbar-btn-strikeout',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-strikeout', iconCls: 'toolbar__icon btn-strikeout',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom' dataHintDirection: 'bottom'
@ -345,7 +345,7 @@ define([
id: 'id-toolbar-btn-superscript', id: 'id-toolbar-btn-superscript',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-superscript', iconCls: 'toolbar__icon btn-superscript',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'superscriptGroup', toggleGroup: 'superscriptGroup',
dataHint: '1', dataHint: '1',
@ -357,7 +357,7 @@ define([
id: 'id-toolbar-btn-subscript', id: 'id-toolbar-btn-subscript',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-subscript', iconCls: 'toolbar__icon btn-subscript',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'superscriptGroup', toggleGroup: 'superscriptGroup',
dataHint: '1', dataHint: '1',
@ -370,7 +370,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-highlight', iconCls: 'toolbar__icon btn-highlight',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
allowDepress: true, allowDepress: true,
split: true, split: true,
@ -395,7 +395,7 @@ define([
id: 'id-toolbar-btn-fontcolor', id: 'id-toolbar-btn-fontcolor',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-fontcolor', iconCls: 'toolbar__icon btn-fontcolor',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
split: true, split: true,
menu: true, menu: true,
auto: true, auto: true,
@ -410,7 +410,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-paracolor', iconCls: 'toolbar__icon btn-paracolor',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
split: true, split: true,
transparent: true, transparent: true,
menu: true, menu: true,
@ -425,7 +425,7 @@ define([
id: 'id-toolbar-btn-case', id: 'id-toolbar-btn-case',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-change-case', iconCls: 'toolbar__icon btn-change-case',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
items: [ items: [
{caption: this.mniSentenceCase, value: Asc.c_oAscChangeTextCaseType.SentenceCase}, {caption: this.mniSentenceCase, value: Asc.c_oAscChangeTextCaseType.SentenceCase},
@ -444,7 +444,7 @@ define([
id: 'id-toolbar-btn-align-left', id: 'id-toolbar-btn-align-left',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-left', iconCls: 'toolbar__icon btn-align-left',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'alignGroup', toggleGroup: 'alignGroup',
dataHint: '1', dataHint: '1',
@ -456,7 +456,7 @@ define([
id: 'id-toolbar-btn-align-center', id: 'id-toolbar-btn-align-center',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-center', iconCls: 'toolbar__icon btn-align-center',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'alignGroup', toggleGroup: 'alignGroup',
dataHint: '1', dataHint: '1',
@ -468,7 +468,7 @@ define([
id: 'id-toolbar-btn-align-right', id: 'id-toolbar-btn-align-right',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-right', iconCls: 'toolbar__icon btn-align-right',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'alignGroup', toggleGroup: 'alignGroup',
dataHint: '1', dataHint: '1',
@ -480,7 +480,7 @@ define([
id: 'id-toolbar-btn-align-just', id: 'id-toolbar-btn-align-just',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-just', iconCls: 'toolbar__icon btn-align-just',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'alignGroup', toggleGroup: 'alignGroup',
dataHint: '1', dataHint: '1',
@ -492,7 +492,7 @@ define([
id: 'id-toolbar-btn-decoffset', id: 'id-toolbar-btn-decoffset',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-decoffset', iconCls: 'toolbar__icon btn-decoffset',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top' dataHintDirection: 'top'
}); });
@ -502,7 +502,7 @@ define([
id: 'id-toolbar-btn-incoffset', id: 'id-toolbar-btn-incoffset',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-incoffset', iconCls: 'toolbar__icon btn-incoffset',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top' dataHintDirection: 'top'
}); });
@ -512,7 +512,7 @@ define([
id: 'id-toolbar-btn-linespace', id: 'id-toolbar-btn-linespace',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-linespace', iconCls: 'toolbar__icon btn-linespace',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
style: 'min-width: 60px;', style: 'min-width: 60px;',
items: [ items: [
@ -534,7 +534,7 @@ define([
id: 'id-toolbar-btn-hidenchars', id: 'id-toolbar-btn-hidenchars',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-paragraph', iconCls: 'toolbar__icon btn-paragraph',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
split: true, split: true,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
@ -555,7 +555,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-setmarkers', iconCls: 'toolbar__icon btn-setmarkers',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'markersGroup', toggleGroup: 'markersGroup',
split: true, split: true,
@ -572,7 +572,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-numbering', iconCls: 'toolbar__icon btn-numbering',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
toggleGroup: 'markersGroup', toggleGroup: 'markersGroup',
split: true, split: true,
@ -589,7 +589,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-multilevels', iconCls: 'toolbar__icon btn-multilevels',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
menu: true, menu: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'top', dataHintDirection: 'top',
@ -622,7 +622,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-inserttable', iconCls: 'toolbar__icon btn-inserttable',
lock: [_set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.cantAddTable, _set.previewReviewMode, lock: [_set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.cantAddTable, _set.previewReviewMode,
_set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsTable, caption: me.capBtnInsTable,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
items: [ items: [
@ -645,7 +645,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertimage', iconCls: 'toolbar__icon btn-insertimage',
lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock, _set.cantAddImagePara, lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock, _set.cantAddImagePara,
_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsImage, caption: me.capBtnInsImage,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
items: [ items: [
@ -666,7 +666,7 @@ define([
caption: me.capBtnInsChart, caption: me.capBtnInsChart,
iconCls: 'toolbar__icon btn-insertchart', iconCls: 'toolbar__icon btn-insertchart',
lock: [ _set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock, lock: [ _set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock,
_set.chartLock, _set.cantAddChart, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.chartLock, _set.cantAddChart, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
menu: true, menu: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -679,7 +679,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-text', iconCls: 'toolbar__icon btn-text',
lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.contentLock, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.contentLock, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsTextbox, caption: me.capBtnInsTextbox,
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
@ -693,7 +693,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-textart', iconCls: 'toolbar__icon btn-textart',
lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock, _set.inFootnote, _set.cantAddImagePara, lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.contentLock, _set.inFootnote, _set.cantAddImagePara,
_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsTextart, caption: me.capBtnInsTextart,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'menu-shapes', cls: 'menu-shapes',
@ -711,7 +711,7 @@ define([
id: 'id-toolbar-btn-editheader', id: 'id-toolbar-btn-editheader',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-editheader', iconCls: 'toolbar__icon btn-editheader',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.inEquation, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.viewFormMode, _set.inEquation, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsHeader, caption: me.capBtnInsHeader,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -745,7 +745,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-datetime', iconCls: 'toolbar__icon btn-datetime',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.noParagraphSelected, _set.previewReviewMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.noParagraphSelected, _set.previewReviewMode,
_set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnDateTime, caption: me.capBtnDateTime,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -758,7 +758,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-blankpage', iconCls: 'toolbar__icon btn-blankpage',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.richDelLock, _set.plainDelLock, _set.inHeader, _set.inFootnote, _set.inControl, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.richDelLock, _set.plainDelLock, _set.inHeader, _set.inFootnote, _set.inControl,
_set.cantPageBreak, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.cantPageBreak, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnBlankPage, caption: me.capBtnBlankPage,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -771,7 +771,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertshape', iconCls: 'toolbar__icon btn-insertshape',
lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.contentLock, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.inEquation, _set.controlPlain, _set.contentLock, _set.inFootnote, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsShape, caption: me.capBtnInsShape,
enableToggle: true, enableToggle: true,
menu: new Common.UI.Menu({cls: 'menu-shapes menu-insert-shape'}), menu: new Common.UI.Menu({cls: 'menu-shapes menu-insert-shape'}),
@ -786,7 +786,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-insertequation', iconCls: 'toolbar__icon btn-insertequation',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.cantAddEquation, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.controlPlain, _set.richDelLock, _set.plainDelLock, _set.cantAddEquation,
_set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsEquation, caption: me.capBtnInsEquation,
split: true, split: true,
menu: new Common.UI.Menu({cls: 'menu-shapes'}), menu: new Common.UI.Menu({cls: 'menu-shapes'}),
@ -801,7 +801,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-symbol', iconCls: 'toolbar__icon btn-symbol',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.noParagraphSelected, _set.previewReviewMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.richDelLock, _set.plainDelLock, _set.noParagraphSelected, _set.previewReviewMode,
_set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsSymbol, caption: me.capBtnInsSymbol,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
@ -814,7 +814,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-dropcap', iconCls: 'toolbar__icon btn-dropcap',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.controlPlain, _set.dropcapLock, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inEquation, _set.controlPlain, _set.dropcapLock, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsDropcap, caption: me.capBtnInsDropcap,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar shifted-right', cls: 'ppm-toolbar shifted-right',
@ -858,7 +858,7 @@ define([
id: 'tlbtn-controls', id: 'tlbtn-controls',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-controls', iconCls: 'toolbar__icon btn-controls',
lock: [_set.paragraphLock, _set.headerLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnInsControls, caption: me.capBtnInsControls,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar shifted-right', cls: 'ppm-toolbar shifted-right',
@ -944,7 +944,7 @@ define([
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-columns', iconCls: 'toolbar__icon btn-columns',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.controlPlain, _set.inImage, _set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.controlPlain, _set.inImage, _set.docPropsLock, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnColumns, caption: me.capBtnColumns,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar shifted-right', cls: 'ppm-toolbar shifted-right',
@ -1003,7 +1003,7 @@ define([
id: 'tlbtn-pageorient', id: 'tlbtn-pageorient',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-pageorient', iconCls: 'toolbar__icon btn-pageorient',
lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnPageOrient, caption: me.capBtnPageOrient,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
@ -1045,7 +1045,7 @@ define([
id: 'tlbtn-pagemargins', id: 'tlbtn-pagemargins',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-pagemargins', iconCls: 'toolbar__icon btn-pagemargins',
lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnMargins, caption: me.capBtnMargins,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
items: [ items: [
@ -1108,7 +1108,7 @@ define([
id: 'tlbtn-pagesize', id: 'tlbtn-pagesize',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-pagesize', iconCls: 'toolbar__icon btn-pagesize',
lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.docPropsLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnPageSize, caption: me.capBtnPageSize,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
restoreHeight: true, restoreHeight: true,
@ -1232,7 +1232,7 @@ define([
id: 'tlbtn-line-numbers', id: 'tlbtn-line-numbers',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-line-numbering', iconCls: 'toolbar__icon btn-line-numbering',
lock: [_set.docPropsLock, _set.inImagePara, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.docPropsLock, _set.inImagePara, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnLineNumbers, caption: me.capBtnLineNumbers,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
@ -1285,7 +1285,7 @@ define([
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-clearstyle', iconCls: 'toolbar__icon btn-clearstyle',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode,
_set.lostConnect, _set.disableOnStart], _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'top' dataHintDirection: 'top'
}); });
@ -1295,7 +1295,7 @@ define([
id: 'id-toolbar-btn-copystyle', id: 'id-toolbar-btn-copystyle',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-copystyle', iconCls: 'toolbar__icon btn-copystyle',
lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [ _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
enableToggle: true, enableToggle: true,
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom' dataHintDirection: 'bottom'
@ -1306,7 +1306,7 @@ define([
id: 'id-toolbar-btn-colorschemas', id: 'id-toolbar-btn-colorschemas',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-colorschemas', iconCls: 'toolbar__icon btn-colorschemas',
lock: [_set.docSchemaLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.docSchemaLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'shifted-left', cls: 'shifted-left',
items: [], items: [],
@ -1322,7 +1322,7 @@ define([
id: 'id-toolbar-btn-mailrecepients', id: 'id-toolbar-btn-mailrecepients',
cls: 'btn-toolbar', cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-mailmerge', iconCls: 'toolbar__icon btn-mailmerge',
lock: [_set.mmergeLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.mmergeLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
dataHint: '1', dataHint: '1',
dataHintDirection: 'bottom', dataHintDirection: 'bottom',
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
@ -1338,7 +1338,7 @@ define([
me.btnImgAlign = new Common.UI.Button({ me.btnImgAlign = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-img-align', iconCls: 'toolbar__icon btn-img-align',
lock: [_set.imageLock, _set.contentLock, _set.inImageInline, _set.noObjectSelected, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.imageLock, _set.contentLock, _set.inImageInline, _set.noObjectSelected, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capImgAlign, caption: me.capImgAlign,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -1349,7 +1349,7 @@ define([
me.btnImgGroup = new Common.UI.Button({ me.btnImgGroup = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-img-group', iconCls: 'toolbar__icon btn-img-group',
lock: [_set.imageLock, _set.contentLock, _set.inImageInline, _set.noObjectSelected, _set.cantGroup, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.imageLock, _set.contentLock, _set.inImageInline, _set.noObjectSelected, _set.cantGroup, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capImgGroup, caption: me.capImgGroup,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -1359,7 +1359,7 @@ define([
me.btnImgForward = new Common.UI.Button({ me.btnImgForward = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-img-frwd', iconCls: 'toolbar__icon btn-img-frwd',
lock: [_set.cantArrange, _set.lostConnect, _set.contentLock, _set.noObjectSelected, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart], lock: [_set.cantArrange, _set.lostConnect, _set.contentLock, _set.noObjectSelected, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart, _set.docLockView],
caption: me.capImgForward, caption: me.capImgForward,
split: true, split: true,
menu: true, menu: true,
@ -1370,7 +1370,7 @@ define([
me.btnImgBackward = new Common.UI.Button({ me.btnImgBackward = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-img-bkwd', iconCls: 'toolbar__icon btn-img-bkwd',
lock: [_set.cantArrange, _set.lostConnect, _set.contentLock, _set.noObjectSelected, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart], lock: [_set.cantArrange, _set.lostConnect, _set.contentLock, _set.noObjectSelected, _set.inSmartartInternal, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart, _set.docLockView],
caption: me.capImgBackward, caption: me.capImgBackward,
split: true, split: true,
menu: true, menu: true,
@ -1381,7 +1381,7 @@ define([
me.btnImgWrapping = new Common.UI.Button({ me.btnImgWrapping = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-img-wrap', iconCls: 'toolbar__icon btn-img-wrap',
lock: [_set.cantWrap, _set.imageLock, _set.contentLock, _set.noObjectSelected, _set.lostConnect, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart], lock: [_set.cantWrap, _set.imageLock, _set.contentLock, _set.noObjectSelected, _set.lostConnect, _set.previewReviewMode, _set.viewFormMode, _set.disableOnStart, _set.docLockView],
caption: me.capImgWrapping, caption: me.capImgWrapping,
menu: true, menu: true,
dataHint: '1', dataHint: '1',
@ -1392,7 +1392,7 @@ define([
me.btnWatermark = new Common.UI.Button({ me.btnWatermark = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-watermark', iconCls: 'toolbar__icon btn-watermark',
lock: [_set.headerLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.headerLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
caption: me.capBtnWatermark, caption: me.capBtnWatermark,
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
cls: 'ppm-toolbar', cls: 'ppm-toolbar',
@ -1431,7 +1431,7 @@ define([
this.cmbFontSize = new Common.UI.ComboBox({ this.cmbFontSize = new Common.UI.ComboBox({
cls: 'input-group-nr', cls: 'input-group-nr',
menuStyle: 'min-width: 55px;', menuStyle: 'min-width: 55px;',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
hint: this.tipFontSize, hint: this.tipFontSize,
data: [ data: [
{value: 8, displayValue: "8"}, {value: 8, displayValue: "8"},
@ -1461,7 +1461,7 @@ define([
cls: 'input-group-nr', cls: 'input-group-nr',
menuCls: 'scrollable-menu', menuCls: 'scrollable-menu',
menuStyle: 'min-width: 325px;', menuStyle: 'min-width: 325px;',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart], lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.previewReviewMode, _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
hint: this.tipFontName, hint: this.tipFontName,
store: new Common.Collections.Fonts(), store: new Common.Collections.Fonts(),
dataHint: '1', dataHint: '1',
@ -1480,7 +1480,7 @@ define([
this.listStyles = new Common.UI.ComboDataView({ this.listStyles = new Common.UI.ComboDataView({
cls: 'combo-styles', cls: 'combo-styles',
lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode, lock: [_set.paragraphLock, _set.headerLock, _set.richEditLock, _set.plainEditLock, _set.inChart, _set.inSmartart, _set.inSmartartInternal, _set.previewReviewMode,
_set.viewFormMode, _set.lostConnect, _set.disableOnStart], _set.viewFormMode, _set.lostConnect, _set.disableOnStart, _set.docLockView],
itemWidth: itemWidth, itemWidth: itemWidth,
itemHeight: itemHeight, itemHeight: itemHeight,
style: 'min-width:150px;', style: 'min-width:150px;',
@ -1738,7 +1738,7 @@ define([
this.btnsPageBreak = Common.Utils.injectButtons($host.find('.btn-slot.btn-pagebreak'), '', 'toolbar__icon btn-pagebreak', this.capBtnInsPagebreak, this.btnsPageBreak = Common.Utils.injectButtons($host.find('.btn-slot.btn-pagebreak'), '', 'toolbar__icon btn-pagebreak', this.capBtnInsPagebreak,
[Common.enumLock.paragraphLock, Common.enumLock.headerLock, Common.enumLock.richEditLock, Common.enumLock.plainEditLock, Common.enumLock.inEquation, Common.enumLock.richDelLock, [Common.enumLock.paragraphLock, Common.enumLock.headerLock, Common.enumLock.richEditLock, Common.enumLock.plainEditLock, Common.enumLock.inEquation, Common.enumLock.richDelLock,
Common.enumLock.plainDelLock, Common.enumLock.inHeader, Common.enumLock.inFootnote, Common.enumLock.inControl, Common.enumLock.cantPageBreak, Common.enumLock.previewReviewMode, Common.enumLock.plainDelLock, Common.enumLock.inHeader, Common.enumLock.inFootnote, Common.enumLock.inControl, Common.enumLock.cantPageBreak, Common.enumLock.previewReviewMode,
Common.enumLock.viewFormMode, Common.enumLock.lostConnect, Common.enumLock.disableOnStart], Common.enumLock.viewFormMode, Common.enumLock.lostConnect, Common.enumLock.disableOnStart, Common.enumLock.docLockView],
true, true, undefined, '1', 'bottom', 'small'); true, true, undefined, '1', 'bottom', 'small');
Array.prototype.push.apply(this.paragraphControls, this.btnsPageBreak); Array.prototype.push.apply(this.paragraphControls, this.btnsPageBreak);
Array.prototype.push.apply(this.lockControls, this.btnsPageBreak); Array.prototype.push.apply(this.lockControls, this.btnsPageBreak);