diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 6630624d3..5175353b7 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -691,14 +691,14 @@ define([ in_control = this.api.asc_IsContentControl(); var control_props = in_control ? this.api.asc_GetContentControlProperties() : null, - lock_type = (in_control&&control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked, - control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==AscCommon.sdttype_InlineLevel) : false; - (lock_type===undefined) && (lock_type = AscCommon.sdtlock_Unlocked); + lock_type = (in_control&&control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked, + control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==Asc.c_oAscSdtLevelType.Inline) : false; + (lock_type===undefined) && (lock_type = Asc.c_oAscSdtLockType.Unlocked); if (!paragraph_locked && !header_locked) { - toolbar.btnContentControls.menu.items[0].setDisabled(control_plain || lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_ContentLocked); - toolbar.btnContentControls.menu.items[1].setDisabled(control_plain || lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_ContentLocked); - toolbar.btnContentControls.menu.items[3].setDisabled(!in_control || lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked); + toolbar.btnContentControls.menu.items[0].setDisabled(control_plain || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked); + toolbar.btnContentControls.menu.items[1].setDisabled(control_plain || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked); + toolbar.btnContentControls.menu.items[3].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); toolbar.btnContentControls.menu.items[5].setDisabled(!in_control); } diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index b6a4ced56..b15bd8389 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -158,9 +158,9 @@ define([ this.txtTag.setValue(val ? val : ''); val = props.get_Lock(); - (val===undefined) && (val = AscCommon.sdtlock_Unlocked); - this.chLockDelete.setValue(val==AscCommon.sdtlock_SdtContentLocked || val==AscCommon.sdtlock_SdtLocked); - this.chLockEdit.setValue(val==AscCommon.sdtlock_SdtContentLocked || val==AscCommon.sdtlock_ContentLocked); + (val===undefined) && (val = Asc.c_oAscSdtLockType.Unlocked); + this.chLockDelete.setValue(val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.SdtLocked); + this.chLockEdit.setValue(val==Asc.c_oAscSdtLockType.SdtContentLocked || val==Asc.c_oAscSdtLockType.ContentLocked); } }, @@ -172,14 +172,14 @@ define([ props.put_Tag(this.txtTag.getValue()); - var lock = AscCommon.sdtlock_Unlocked; + var lock = Asc.c_oAscSdtLockType.Unlocked; if (this.chLockDelete.getValue()=='checked' && this.chLockEdit.getValue()=='checked') - lock = AscCommon.sdtlock_SdtContentLocked; + lock = Asc.c_oAscSdtLockType.SdtContentLocked; else if (this.chLockDelete.getValue()=='checked') - lock = AscCommon.sdtlock_SdtLocked; + lock = Asc.c_oAscSdtLockType.SdtLocked; else if (this.chLockEdit.getValue()=='checked') - lock = AscCommon.sdtlock_ContentLocked; + lock = Asc.c_oAscSdtLockType.ContentLocked; props.put_Lock(lock); return props; diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 50891e4c3..964456dac 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -2791,8 +2791,8 @@ define([ menuTableControl.setVisible(in_control); if (in_control) { var control_props = me.api.asc_GetContentControlProperties(), - lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked; - menuTableRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked); + lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked; + menuTableRemoveControl.setDisabled(lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); } }, items: [ @@ -3291,8 +3291,8 @@ define([ menuParaControlSeparator.setVisible(in_control); if (in_control) { var control_props = me.api.asc_GetContentControlProperties(), - lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked; - menuParaRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked); + lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked; + menuParaRemoveControl.setDisabled(lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked); } }, items: [ diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index f78f25c2e..7750149ba 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -619,12 +619,12 @@ define([ { caption: this.textPlainControl, iconCls: 'mnu-control-plain', - value: AscCommon.sdttype_InlineLevel + value: Asc.c_oAscSdtLevelType.Inline }, { caption: this.textRichControl, iconCls: 'mnu-control-rich', - value: AscCommon.sdttype_BlockLevel + value: Asc.c_oAscSdtLevelType.Block }, {caption: '--'}, {