[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_equation = false,
|
||||
in_image = false,
|
||||
in_image_inline = false,
|
||||
in_table = false,
|
||||
in_para = false,
|
||||
frame_pr = null,
|
||||
object_type;
|
||||
|
||||
|
@ -151,11 +153,13 @@ define([
|
|||
if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||
paragraph_locked = pr.get_Locked();
|
||||
frame_pr = pr;
|
||||
in_para = true;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Header) {
|
||||
header_locked = pr.get_Locked();
|
||||
in_header = true;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Image) {
|
||||
in_image = true;
|
||||
in_image_inline = (pr.get_WrappingStyle() === Asc.c_oAscWrapStyle2.Inline);
|
||||
object_type = type;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||
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.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.cantAddTextTOF, in_image && !in_image_inline && !in_para, {array: [this.view.btnAddText]});
|
||||
|
||||
this.dlgCrossRefDialog && this.dlgCrossRefDialog.isVisible() && this.dlgCrossRefDialog.setLocked(this.view.btnCrossRef.isDisabled());
|
||||
},
|
||||
|
|
|
@ -197,7 +197,7 @@ define([
|
|||
parentEl: $host.find('#slot-btn-add-text'),
|
||||
cls: 'btn-toolbar',
|
||||
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,
|
||||
menu: new Common.UI.Menu({
|
||||
items: []
|
||||
|
|
|
@ -109,6 +109,7 @@ define([
|
|||
cantAddPageNum: 'cant-add-page-num',
|
||||
cantPageBreak: 'cant-page-break',
|
||||
cantUpdateTOF: 'cant-update-tof',
|
||||
cantAddTextTOF: 'cant-addtext-tof',
|
||||
cantGroup: 'cant-group',
|
||||
cantWrap: 'cant-wrap',
|
||||
cantArrange: 'cant-arrange',
|
||||
|
|
Loading…
Reference in a new issue