From b5ade7b338b0c92fa2a0e6384a96423cb9325de2 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 22 Apr 2022 20:28:15 +0300 Subject: [PATCH] [DE PE SSE] Fix alt-hints in search panel --- apps/common/main/lib/component/InputField.js | 8 +++- .../main/lib/template/SearchPanel.template | 2 +- apps/common/main/lib/view/SearchPanel.js | 39 +++++++++++++------ .../main/app/template/LeftMenu.template | 2 +- .../main/app/template/LeftMenu.template | 2 +- .../main/app/template/LeftMenu.template | 2 +- 6 files changed, 39 insertions(+), 16 deletions(-) diff --git a/apps/common/main/lib/component/InputField.js b/apps/common/main/lib/component/InputField.js index 28f1d30b6..768d5a00e 100644 --- a/apps/common/main/lib/component/InputField.js +++ b/apps/common/main/lib/component/InputField.js @@ -444,6 +444,9 @@ define([ 'class="form-control <%= cls %>" ', 'placeholder="<%= placeHolder %>" ', 'value="<%= value %>"', + 'data-hint="<%= dataHint %>"', + 'data-hint-offset="<%= dataHintOffset %>"', + 'data-hint-direction="<%= dataHintDirection %>"', '>', '', '
' + @@ -466,7 +469,10 @@ define([ placeHolder : this.placeHolder, spellcheck : this.spellcheck, iconCls : this.options.iconCls, - scope : me + scope : me, + dataHint : this.options.dataHint, + dataHintOffset: this.options.dataHintOffset, + dataHintDirection: this.options.dataHintDirection })); if (parentEl) { diff --git a/apps/common/main/lib/template/SearchPanel.template b/apps/common/main/lib/template/SearchPanel.template index 91fdda334..bdba42b87 100644 --- a/apps/common/main/lib/template/SearchPanel.template +++ b/apps/common/main/lib/template/SearchPanel.template @@ -31,7 +31,7 @@ -
+
<%= scope.textSearchOptions %>
diff --git a/apps/common/main/lib/view/SearchPanel.js b/apps/common/main/lib/view/SearchPanel.js index 9fd890c29..1f1d52163 100644 --- a/apps/common/main/lib/view/SearchPanel.js +++ b/apps/common/main/lib/view/SearchPanel.js @@ -70,7 +70,10 @@ define([ placeHolder: this.textFind, allowBlank: true, validateOnBlur: false, - style: 'width: 100%;' + style: 'width: 100%;', + dataHint: '1', + dataHintDirection: 'left', + dataHintOffset: 'small' }); this.inputText._input.on('input', _.bind(function () { this.fireEvent('search:input', [this.inputText._input.val()]); @@ -83,7 +86,10 @@ define([ placeHolder: this.textReplaceWith, allowBlank: true, validateOnBlur: false, - style: 'width: 100%;' + style: 'width: 100%;', + dataHint: '1', + dataHintDirection: 'left', + dataHintOffset: 'small' }); this.btnBack = new Common.UI.Button({ @@ -155,7 +161,10 @@ define([ parentEl: $('#search-btn-close', this.$el), cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-close', - hint: this.textCloseSearch + hint: this.textCloseSearch, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'medium' }); this.buttonClose.on('click', _.bind(this.onClickClosePanel, this)); @@ -174,7 +183,10 @@ define([ { value: 0, displayValue: this.textSheet }, { value: 1, displayValue: this.textWorkbook }, { value: 2, displayValue: this.textSpecificRange} - ] + ], + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' }).on('selected', function(combo, record) { me.fireEvent('search:options', ['within', record.value]); }); @@ -186,7 +198,10 @@ define([ validateOnChange: true, validateOnBlur: true, style: "width: 219px; margin-top: 8px", - disabled: true + disabled: true, + dataHint: '1', + dataHintDirection: 'left', + dataHintOffset: 'small' }).on('keyup:after', function(input, e) { me.fireEvent('search:options', ['range', input.getValue(), e.keyCode !== Common.UI.Keys.RETURN]); }); @@ -200,10 +215,11 @@ define([ data: [ { value: 0, displayValue: this.textByRows }, { value: 1, displayValue: this.textByColumns } - ] + ], + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' }).on('selected', function(combo, record) { - console.log(record.value); - console.log(!record.value); me.fireEvent('search:options', ['search', !record.value]); }); @@ -216,10 +232,11 @@ define([ data: [ { value: 0, displayValue: this.textFormulas }, { value: 1, displayValue: this.textValues } - ] + ], + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'big' }).on('selected', function(combo, record) { - console.log(record.value); - console.log(!record.value); me.fireEvent('search:options', ['lookIn', !record.value]); }); diff --git a/apps/documenteditor/main/app/template/LeftMenu.template b/apps/documenteditor/main/app/template/LeftMenu.template index fa0abf7c2..342f8f896 100644 --- a/apps/documenteditor/main/app/template/LeftMenu.template +++ b/apps/documenteditor/main/app/template/LeftMenu.template @@ -1,6 +1,6 @@
- + diff --git a/apps/presentationeditor/main/app/template/LeftMenu.template b/apps/presentationeditor/main/app/template/LeftMenu.template index 18cca4c88..8df024b4f 100644 --- a/apps/presentationeditor/main/app/template/LeftMenu.template +++ b/apps/presentationeditor/main/app/template/LeftMenu.template @@ -1,6 +1,6 @@
- + diff --git a/apps/spreadsheeteditor/main/app/template/LeftMenu.template b/apps/spreadsheeteditor/main/app/template/LeftMenu.template index 2b2b9aac0..75a59f43d 100644 --- a/apps/spreadsheeteditor/main/app/template/LeftMenu.template +++ b/apps/spreadsheeteditor/main/app/template/LeftMenu.template @@ -1,6 +1,6 @@
- +