[DE] AscCommonWord -> AscCommon for woring with class CContentControl.
This commit is contained in:
parent
478d874c62
commit
4d213595ca
|
@ -691,14 +691,14 @@ define([
|
||||||
|
|
||||||
in_control = this.api.asc_IsContentControl();
|
in_control = this.api.asc_IsContentControl();
|
||||||
var control_props = in_control ? this.api.asc_GetContentControlProperties() : null,
|
var control_props = in_control ? this.api.asc_GetContentControlProperties() : null,
|
||||||
lock_type = (in_control&&control_props) ? control_props.get_Lock() : 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()==AscCommonWord.sdttype_InlineLevel) : false;
|
control_plain = (in_control&&control_props) ? (control_props.get_ContentControlType()==AscCommon.sdttype_InlineLevel) : false;
|
||||||
(lock_type===undefined) && (lock_type = AscCommonWord.sdtlock_Unlocked);
|
(lock_type===undefined) && (lock_type = AscCommon.sdtlock_Unlocked);
|
||||||
|
|
||||||
if (!paragraph_locked && !header_locked) {
|
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[0].setDisabled(control_plain || lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_ContentLocked);
|
||||||
toolbar.btnContentControls.menu.items[1].setDisabled(control_plain || lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.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==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked);
|
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);
|
toolbar.btnContentControls.menu.items[5].setDisabled(!in_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,28 +158,28 @@ define([
|
||||||
this.txtTag.setValue(val ? val : '');
|
this.txtTag.setValue(val ? val : '');
|
||||||
|
|
||||||
val = props.get_Lock();
|
val = props.get_Lock();
|
||||||
(val===undefined) && (val = AscCommonWord.sdtlock_Unlocked);
|
(val===undefined) && (val = AscCommon.sdtlock_Unlocked);
|
||||||
this.chLockDelete.setValue(val==AscCommonWord.sdtlock_SdtContentLocked || val==AscCommonWord.sdtlock_SdtLocked);
|
this.chLockDelete.setValue(val==AscCommon.sdtlock_SdtContentLocked || val==AscCommon.sdtlock_SdtLocked);
|
||||||
this.chLockEdit.setValue(val==AscCommonWord.sdtlock_SdtContentLocked || val==AscCommonWord.sdtlock_ContentLocked);
|
this.chLockEdit.setValue(val==AscCommon.sdtlock_SdtContentLocked || val==AscCommon.sdtlock_ContentLocked);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings: function () {
|
getSettings: function () {
|
||||||
var props = new AscCommonWord.CContentControlPr();
|
var props = new AscCommon.CContentControlPr();
|
||||||
|
|
||||||
|
|
||||||
props.put_Id(this.txtName.getValue());
|
props.put_Id(this.txtName.getValue());
|
||||||
props.put_Tag(this.txtTag.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')
|
if (this.chLockDelete.getValue()=='checked' && this.chLockEdit.getValue()=='checked')
|
||||||
lock = AscCommonWord.sdtlock_SdtContentLocked;
|
lock = AscCommon.sdtlock_SdtContentLocked;
|
||||||
else if (this.chLockDelete.getValue()=='checked')
|
else if (this.chLockDelete.getValue()=='checked')
|
||||||
lock = AscCommonWord.sdtlock_SdtLocked;
|
lock = AscCommon.sdtlock_SdtLocked;
|
||||||
else if (this.chLockEdit.getValue()=='checked')
|
else if (this.chLockEdit.getValue()=='checked')
|
||||||
lock = AscCommonWord.sdtlock_ContentLocked;
|
lock = AscCommon.sdtlock_ContentLocked;
|
||||||
props.put_Lock(lock);
|
props.put_Lock(lock);
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
|
|
|
@ -2791,8 +2791,8 @@ define([
|
||||||
menuTableControl.setVisible(in_control);
|
menuTableControl.setVisible(in_control);
|
||||||
if (in_control) {
|
if (in_control) {
|
||||||
var control_props = me.api.asc_GetContentControlProperties(),
|
var control_props = me.api.asc_GetContentControlProperties(),
|
||||||
lock_type = (control_props) ? control_props.get_Lock() : AscCommonWord.sdtlock_Unlocked;
|
lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked;
|
||||||
menuTableRemoveControl.setDisabled(lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked);
|
menuTableRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
|
@ -3291,8 +3291,8 @@ define([
|
||||||
menuParaControlSeparator.setVisible(in_control);
|
menuParaControlSeparator.setVisible(in_control);
|
||||||
if (in_control) {
|
if (in_control) {
|
||||||
var control_props = me.api.asc_GetContentControlProperties(),
|
var control_props = me.api.asc_GetContentControlProperties(),
|
||||||
lock_type = (control_props) ? control_props.get_Lock() : AscCommonWord.sdtlock_Unlocked;
|
lock_type = (control_props) ? control_props.get_Lock() : AscCommon.sdtlock_Unlocked;
|
||||||
menuParaRemoveControl.setDisabled(lock_type==AscCommonWord.sdtlock_SdtContentLocked || lock_type==AscCommonWord.sdtlock_SdtLocked);
|
menuParaRemoveControl.setDisabled(lock_type==AscCommon.sdtlock_SdtContentLocked || lock_type==AscCommon.sdtlock_SdtLocked);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
|
|
|
@ -619,12 +619,12 @@ define([
|
||||||
{
|
{
|
||||||
caption: this.textPlainControl,
|
caption: this.textPlainControl,
|
||||||
iconCls: 'mnu-control-plain',
|
iconCls: 'mnu-control-plain',
|
||||||
value: AscCommonWord.sdttype_InlineLevel
|
value: AscCommon.sdttype_InlineLevel
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
caption: this.textRichControl,
|
caption: this.textRichControl,
|
||||||
iconCls: 'mnu-control-rich',
|
iconCls: 'mnu-control-rich',
|
||||||
value: AscCommonWord.sdttype_BlockLevel
|
value: AscCommon.sdttype_BlockLevel
|
||||||
},
|
},
|
||||||
{caption: '--'},
|
{caption: '--'},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue