From acbc4f5fd0bd4c8bc52ed39060f4403889a0be5d Mon Sep 17 00:00:00 2001 From: OVSharova Date: Wed, 8 Sep 2021 10:23:10 +0300 Subject: [PATCH] CellEditor --- test/spreadsheeteditor/main/index.html | 30 +- .../main/js/ApplicationController.js | 5 + .../main/js/ApplicationView.js | 44 +- .../main/resources/less/celleditor.less | 5 +- .../main/template/CellEditor.template | 11 - .../common/main/lib/component/Menu.js | 1058 +++++++++++++++ .../common/main/lib/component/MenuItem.js | 394 ++++++ .../common/main/lib/component/Scroller.js | 180 +++ .../common/main/lib/controller/CellEditor.js | 236 ++++ .../main/lib/core/NotificationCenter.js | 9 +- .../common/main/lib/core/application.js | 2 +- .../perfect-scrollbar-patch-bug-23744.patch | 34 + .../perfect-scrollbar-patch-bug-25932.diff | 48 + .../perfect-scrollbar-patch-change-event.diff | 15 + .../mods/perfect-scrollbar-patch-margins.diff | 103 ++ .../perfect-scrollbar-patch-x-margins.diff | 89 ++ .../common/main/lib/mods/perfect-scrollbar.js | 658 ++++++++++ .../common/main/lib/view/CellEditor.js | 86 ++ .../main/resources/less/asc-mixins.less | 397 ++++++ .../common/main/resources/less/buttons.less | 1148 +++++++++++++++++ 20 files changed, 4482 insertions(+), 70 deletions(-) delete mode 100644 test/spreadsheeteditor/main/template/CellEditor.template create mode 100644 test/unit-tests/common/main/lib/component/Menu.js create mode 100644 test/unit-tests/common/main/lib/component/MenuItem.js create mode 100644 test/unit-tests/common/main/lib/component/Scroller.js create mode 100644 test/unit-tests/common/main/lib/controller/CellEditor.js create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar-patch-bug-23744.patch create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar-patch-bug-25932.diff create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar-patch-change-event.diff create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar-patch-margins.diff create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar-patch-x-margins.diff create mode 100644 test/unit-tests/common/main/lib/mods/perfect-scrollbar.js create mode 100644 test/unit-tests/common/main/lib/view/CellEditor.js create mode 100644 test/unit-tests/common/main/resources/less/asc-mixins.less create mode 100644 test/unit-tests/common/main/resources/less/buttons.less diff --git a/test/spreadsheeteditor/main/index.html b/test/spreadsheeteditor/main/index.html index 661c560f0..8743a3b3e 100644 --- a/test/spreadsheeteditor/main/index.html +++ b/test/spreadsheeteditor/main/index.html @@ -8,6 +8,7 @@ + @@ -205,16 +206,18 @@
-
- -
- -
-
- -
-
- +
+
+ +
+
+
+ +
+
+ +
    @@ -263,12 +266,16 @@ + + + + --> + + + diff --git a/test/spreadsheeteditor/main/js/ApplicationController.js b/test/spreadsheeteditor/main/js/ApplicationController.js index e97d8dff3..c28f5fca1 100644 --- a/test/spreadsheeteditor/main/js/ApplicationController.js +++ b/test/spreadsheeteditor/main/js/ApplicationController.js @@ -243,6 +243,11 @@ SSE.ApplicationController = new(function(){ Common.Gateway.on('requestclose', onRequestClose); + if(common.controller.CellEditor ) { + common.controller.CellEditor.create(); + common.controller.CellEditor.setApi(api) + common.controller.CellEditor.setMode(config); + } SSE.ApplicationView.tools.get('#idt-fullscreen') .on('click', function(){ diff --git a/test/spreadsheeteditor/main/js/ApplicationView.js b/test/spreadsheeteditor/main/js/ApplicationView.js index 917609fa5..cd16ae144 100644 --- a/test/spreadsheeteditor/main/js/ApplicationView.js +++ b/test/spreadsheeteditor/main/js/ApplicationView.js @@ -30,45 +30,19 @@ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ + if (SSE === undefined) { var SSE = {}; } SSE.ApplicationView = new(function(){ - var $btnTools - ,$cellname - ,$btnexpand - ,$btnfunc - ,btnNamedRanges; - - - + var $btnTools; // Initialize view function createView(){ - - $cellname = $('#ce-cell-name'); - $btnexpand = $('#ce-btn-expand'); - $btnfunc = $('#ce-func-label'); - $btnfunc.addClass('disabled'); - /*btnNamedRanges = new Common.UI.Button({ - parentEl: $('#ce-cell-name-menu'), - menu : new Common.UI.Menu({ - style : 'min-width: 70px;max-width:400px;', - maxHeight: 250, - items: [ - { caption: this.textManager, value: 'manager' }, - { caption: '--' } - ] - }) - }); - this.btnNamedRanges.setVisible(false); - this.btnNamedRanges.menu.setOffset(-81);*/ - $btnTools = $('#box-tools button'); - $btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true'); $btnTools.parent().append( '