From 60bc2aa98cee59ad76d2a1a645c930ec53cf5427 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Sep 2020 16:35:11 +0300 Subject: [PATCH] [DE] Cross-references refactoring --- .../main/app/view/CrossReferenceDialog.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/view/CrossReferenceDialog.js b/apps/documenteditor/main/app/view/CrossReferenceDialog.js index 1dea0b7a64..151f98cec0 100644 --- a/apps/documenteditor/main/app/view/CrossReferenceDialog.js +++ b/apps/documenteditor/main/app/view/CrossReferenceDialog.js @@ -154,7 +154,8 @@ define([ this.chInsertAs = new Common.UI.CheckBox({ el: $window.find('#id-dlg-cross-insert-as'), - labelText: this.textInsertAs + labelText: this.textInsertAs, + value: true }); this.chBelowAbove = new Common.UI.CheckBox({ @@ -180,7 +181,7 @@ define([ this.refList = new Common.UI.ListView({ el: $window.find('#id-dlg-cross-list'), store: new Common.UI.DataViewStore(), - itemTemplate: _.template('
<%= value %>
') + itemTemplate: _.template('
<%= value %>
') }); this.lblWhich = $window.find('#id-dlg-cross-which'); @@ -326,6 +327,7 @@ define([ } this.cmbReference.setData(arr); this.cmbReference.setValue(arr[0].value); + this.onReferenceSelected(this.cmbReference, this.cmbReference.getSelectedRecord()); this.lblWhich.text(str); this.refreshReferences(type); }, @@ -358,7 +360,7 @@ define([ var count = props.asc_GetCount(); for (var i=0; i4) ? 5 : typeRec.value; + var disable = (type==5 && refType!==Asc.c_oAscDocumentRefenceToType.PageNum) || (type<5) && (refType==Asc.c_oAscDocumentRefenceToType.Text || refType==Asc.c_oAscDocumentRefenceToType.AboveBelow); + this.chBelowAbove.setDisabled(disable); + disable = !(type==0 || type==2) || (refType!==Asc.c_oAscDocumentRefenceToType.ParaNumFullContex); + this.chSeparator.setDisabled(disable); + this.inputSeparator.setDisabled(disable || this.chSeparator.getValue()!=='checked'); }, txtTitle: 'Cross-reference', @@ -405,7 +414,7 @@ define([ textCaption: 'Entire caption', textLabelNum: 'Only label and number', textOnlyCaption: 'Only caption text', - textParagraph: 'Paragraph', + textParagraph: 'Numbered item', textHeading: 'Heading', textBookmark: 'Bookmark', textFootnote: 'Footnote',