From 9d8f31415799c508ffc19412027b1393e4fa9838 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 7 May 2020 19:42:27 +0300 Subject: [PATCH] [SSE] Add hotkey Shift+F3 for function insert --- .../main/app/controller/Toolbar.js | 10 ++++++++++ apps/spreadsheeteditor/main/app/view/FormulaTab.js | 13 ++++++++----- apps/spreadsheeteditor/main/app/view/Toolbar.js | 8 +++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 737263986..79f37df04 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1525,6 +1525,16 @@ define([ me.onCustomNumberFormat(); } + return false; + }, + 'shift+f3': function(e) { + if (me.editMode && !me.toolbar.btnInsertFormula.isDisabled()) { + var controller = me.getApplication().getController('FormulaDialog'); + if (controller) { + controller.showDialog(); + } + } + return false; } } diff --git a/apps/spreadsheeteditor/main/app/view/FormulaTab.js b/apps/spreadsheeteditor/main/app/view/FormulaTab.js index 11ba21cb2..0bab20d47 100644 --- a/apps/spreadsheeteditor/main/app/view/FormulaTab.js +++ b/apps/spreadsheeteditor/main/app/view/FormulaTab.js @@ -190,7 +190,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-autosum', caption: this.txtAutosum, - hint: [this.txtAutosumTip + Common.Utils.String.platformKey('Alt+='), this.txtFormulaTip], + hint: [this.txtAutosumTip + Common.Utils.String.platformKey('Alt+='), this.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3')], split: true, disabled: true, lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth], @@ -204,7 +204,8 @@ define([ {caption: '--'}, { caption: me.txtAdditional, - value: 'more' + value: 'more', + hint: me.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3') } ] }) @@ -217,7 +218,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-ins-formula', caption: this.txtFormula, - hint: this.txtFormulaTip, + hint: this.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3'), disabled: true, lock: [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRangeEdit, _set.lostConnect, _set.coAuth] }); @@ -394,7 +395,8 @@ define([ { caption: '--' }, { caption: me.txtAdditional, - value: 'more' + value: 'more', + hint: me.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3') } ] })); @@ -456,7 +458,8 @@ define([ { caption: '--' }, { caption: me.txtAdditional, - value: 'more' + value: 'more', + hint: me.txtFormulaTip + Common.Utils.String.platformKey('Shift+F3') } ] }) diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 7599f0a9c..5ab9e750b 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -221,7 +221,8 @@ define([ {caption: '--'}, { caption: me.txtAdditional, - value: 'more' + value: 'more', + hint: me.txtFormula + Common.Utils.String.platformKey('Shift+F3') } ] }) @@ -888,7 +889,8 @@ define([ {caption: '--'}, { caption: me.txtAdditional, - value: 'more' + value: 'more', + hint: me.txtFormula + Common.Utils.String.platformKey('Shift+F3') } ] }) @@ -1665,7 +1667,7 @@ define([ _updateHint(this.btnCurrencyStyle, this.tipDigStyleAccounting); _updateHint(this.btnDecDecimal, this.tipDecDecimal); _updateHint(this.btnIncDecimal, this.tipIncDecimal); - _updateHint(this.btnInsertFormula, [this.txtAutosumTip + Common.Utils.String.platformKey('Alt+='), this.txtFormula]); + _updateHint(this.btnInsertFormula, [this.txtAutosumTip + Common.Utils.String.platformKey('Alt+='), this.txtFormula + Common.Utils.String.platformKey('Shift+F3')]); _updateHint(this.btnNamedRange, this.txtNamedRange); _updateHint(this.btnClearStyle, this.tipClearStyle); _updateHint(this.btnCopyStyle, this.tipCopyStyle);