[DE] Disable add text to TOF button
This commit is contained in:
parent
2fe8fb6cfa
commit
115d33659b
|
@ -140,7 +140,9 @@ define([
|
||||||
in_header = false,
|
in_header = false,
|
||||||
in_equation = false,
|
in_equation = false,
|
||||||
in_image = false,
|
in_image = false,
|
||||||
|
in_image_inline = false,
|
||||||
in_table = false,
|
in_table = false,
|
||||||
|
in_para = false,
|
||||||
frame_pr = null,
|
frame_pr = null,
|
||||||
object_type;
|
object_type;
|
||||||
|
|
||||||
|
@ -151,11 +153,13 @@ define([
|
||||||
if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
|
if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||||
paragraph_locked = pr.get_Locked();
|
paragraph_locked = pr.get_Locked();
|
||||||
frame_pr = pr;
|
frame_pr = pr;
|
||||||
|
in_para = true;
|
||||||
} else if (type === Asc.c_oAscTypeSelectElement.Header) {
|
} else if (type === Asc.c_oAscTypeSelectElement.Header) {
|
||||||
header_locked = pr.get_Locked();
|
header_locked = pr.get_Locked();
|
||||||
in_header = true;
|
in_header = true;
|
||||||
} else if (type === Asc.c_oAscTypeSelectElement.Image) {
|
} else if (type === Asc.c_oAscTypeSelectElement.Image) {
|
||||||
in_image = true;
|
in_image = true;
|
||||||
|
in_image_inline = (pr.get_WrappingStyle() === Asc.c_oAscWrapStyle2.Inline);
|
||||||
object_type = type;
|
object_type = type;
|
||||||
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
|
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||||
in_equation = true;
|
in_equation = true;
|
||||||
|
@ -193,6 +197,7 @@ define([
|
||||||
this.lockToolbar(Common.enumLock.cantUpdateTOF, !this.api.asc_CanUpdateTablesOfFigures(), {array: [this.view.btnTableFiguresUpdate]});
|
this.lockToolbar(Common.enumLock.cantUpdateTOF, !this.api.asc_CanUpdateTablesOfFigures(), {array: [this.view.btnTableFiguresUpdate]});
|
||||||
this.lockToolbar(Common.enumLock.inFootnote, this.api.asc_IsCursorInFootnote() || this.api.asc_IsCursorInEndnote(), {array: [this.view.btnAddText]});
|
this.lockToolbar(Common.enumLock.inFootnote, this.api.asc_IsCursorInFootnote() || this.api.asc_IsCursorInEndnote(), {array: [this.view.btnAddText]});
|
||||||
this.lockToolbar(Common.enumLock.inHeader, in_header, {array: [this.view.btnAddText]});
|
this.lockToolbar(Common.enumLock.inHeader, in_header, {array: [this.view.btnAddText]});
|
||||||
|
this.lockToolbar(Common.enumLock.cantAddTextTOF, in_image && !in_image_inline && !in_para, {array: [this.view.btnAddText]});
|
||||||
|
|
||||||
this.dlgCrossRefDialog && this.dlgCrossRefDialog.isVisible() && this.dlgCrossRefDialog.setLocked(this.view.btnCrossRef.isDisabled());
|
this.dlgCrossRefDialog && this.dlgCrossRefDialog.isVisible() && this.dlgCrossRefDialog.setLocked(this.view.btnCrossRef.isDisabled());
|
||||||
},
|
},
|
||||||
|
|
|
@ -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 btn-update',
|
iconCls: 'toolbar__icon btn-update',
|
||||||
lock: [ _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],
|
||||||
caption: this.capBtnAddText,
|
caption: this.capBtnAddText,
|
||||||
menu: new Common.UI.Menu({
|
menu: new Common.UI.Menu({
|
||||||
items: []
|
items: []
|
||||||
|
|
|
@ -109,6 +109,7 @@ define([
|
||||||
cantAddPageNum: 'cant-add-page-num',
|
cantAddPageNum: 'cant-add-page-num',
|
||||||
cantPageBreak: 'cant-page-break',
|
cantPageBreak: 'cant-page-break',
|
||||||
cantUpdateTOF: 'cant-update-tof',
|
cantUpdateTOF: 'cant-update-tof',
|
||||||
|
cantAddTextTOF: 'cant-addtext-tof',
|
||||||
cantGroup: 'cant-group',
|
cantGroup: 'cant-group',
|
||||||
cantWrap: 'cant-wrap',
|
cantWrap: 'cant-wrap',
|
||||||
cantArrange: 'cant-arrange',
|
cantArrange: 'cant-arrange',
|
||||||
|
|
Loading…
Reference in a new issue