[DE] AscCommonWord -> AscCommon for woring with class CContentControl.

This commit is contained in:
Julia Radzhabova 2017-12-14 15:13:40 +03:00
parent 478d874c62
commit 4d213595ca
4 changed files with 20 additions and 20 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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: [

View file

@ -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: '--'},
{