From 4d213595ca7f0e9b1d83dc0acdfd3c5d961d6494 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 14 Dec 2017 15:13:40 +0300 Subject: [PATCH] [DE] AscCommonWord -> AscCommon for woring with class CContentControl. --- .../main/app/controller/Toolbar.js | 12 ++++++------ .../main/app/view/ControlSettingsDialog.js | 16 ++++++++-------- .../main/app/view/DocumentHolder.js | 8 ++++---- apps/documenteditor/main/app/view/Toolbar.js | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index d002857b2..6630624d3 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() : AscCommonWord.sdtlock_Unlocked, - control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==AscCommonWord.sdttype_InlineLevel) : false; - (lock_type===undefined) && (lock_type = AscCommonWord.sdtlock_Unlocked); + 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); if (!paragraph_locked && !header_locked) { - toolbar.btnContentControls.menu.items[0].setDisabled(control_plain || lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_ContentLocked); - toolbar.btnContentControls.menu.items[1].setDisabled(control_plain || lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_ContentLocked); - toolbar.btnContentControls.menu.items[3].setDisabled(!in_control || lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked); + 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[5].setDisabled(!in_control); } diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index e4013aa2b..b6a4ced56 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -158,28 +158,28 @@ define([ this.txtTag.setValue(val ? val : ''); val = props.get_Lock(); - (val===undefined) && (val = AscCommonWord.sdtlock_Unlocked); - this.chLockDelete.setValue(val==AscCommonWord.sdtlock_SdtContentLocked || val==AscCommonWord.sdtlock_SdtLocked); - this.chLockEdit.setValue(val==AscCommonWord.sdtlock_SdtContentLocked || val==AscCommonWord.sdtlock_ContentLocked); + (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); } }, getSettings: function () { - var props = new AscCommonWord.CContentControlPr(); + var props = new AscCommon.CContentControlPr(); props.put_Id(this.txtName.getValue()); props.put_Tag(this.txtTag.getValue()); - var lock = AscCommonWord.sdtlock_Unlocked; + var lock = AscCommon.sdtlock_Unlocked; if (this.chLockDelete.getValue()=='checked' && this.chLockEdit.getValue()=='checked') - lock = AscCommonWord.sdtlock_SdtContentLocked; + lock = AscCommon.sdtlock_SdtContentLocked; else if (this.chLockDelete.getValue()=='checked') - lock = AscCommonWord.sdtlock_SdtLocked; + lock = AscCommon.sdtlock_SdtLocked; else if (this.chLockEdit.getValue()=='checked') - lock = AscCommonWord.sdtlock_ContentLocked; + lock = AscCommon.sdtlock_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 7b97f6593..50891e4c3 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() : AscCommonWord.sdtlock_Unlocked; - menuTableRemoveControl.setDisabled(lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked); + lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked; + menuTableRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_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() : AscCommonWord.sdtlock_Unlocked; - menuParaRemoveControl.setDisabled(lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked); + lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked; + menuParaRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked); } }, items: [ diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index c4c1441a4..f78f25c2e 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: AscCommonWord.sdttype_InlineLevel + value: AscCommon.sdttype_InlineLevel }, { caption: this.textRichControl, iconCls: 'mnu-control-rich', - value: AscCommonWord.sdttype_BlockLevel + value: AscCommon.sdttype_BlockLevel }, {caption: '--'}, {