From d80ca330c10737a641e26aba5f95465e0de2b9cd Mon Sep 17 00:00:00 2001 From: OVSharova Date: Mon, 6 Sep 2021 11:55:05 +0300 Subject: [PATCH] changes SE --- test/spreadsheeteditor/main/index.html | 21 +- .../main/js/ApplicationController.js | 9 +- .../main/js/ApplicationView.js | 41 +- .../main/js/CellEditorController.js | 338 ++++++++ .../main/js/CellEditorView.js | 106 +++ .../main/resources/less/celleditor.less | 159 ++++ .../main/template/CellEditor.template | 11 + .../common/main/lib/component/BaseView.js | 117 +++ .../common/main/lib/component/Button.js | 774 +++++++++++++++++ .../main/lib/component/ToggleManager.js | 115 +++ .../main/lib/core/NotificationCenter.js | 78 ++ .../common/main/lib/core/application.js | 565 +++++++++++++ .../common/main/lib/core/keymaster.js | 346 ++++++++ .../resources/less/colors-table-ie-fix.less | 70 ++ .../main/resources/less/colors-table.less | 239 ++++++ .../common/main/resources/less/variables.less | 799 ++++++++++++++++++ 16 files changed, 3784 insertions(+), 4 deletions(-) create mode 100644 test/spreadsheeteditor/main/js/CellEditorController.js create mode 100644 test/spreadsheeteditor/main/js/CellEditorView.js create mode 100644 test/spreadsheeteditor/main/resources/less/celleditor.less create mode 100644 test/spreadsheeteditor/main/template/CellEditor.template create mode 100644 test/unit-tests/common/main/lib/component/BaseView.js create mode 100644 test/unit-tests/common/main/lib/component/Button.js create mode 100644 test/unit-tests/common/main/lib/component/ToggleManager.js create mode 100644 test/unit-tests/common/main/lib/core/NotificationCenter.js create mode 100644 test/unit-tests/common/main/lib/core/application.js create mode 100644 test/unit-tests/common/main/lib/core/keymaster.js create mode 100644 test/unit-tests/common/main/resources/less/colors-table-ie-fix.less create mode 100644 test/unit-tests/common/main/resources/less/colors-table.less create mode 100644 test/unit-tests/common/main/resources/less/variables.less diff --git a/test/spreadsheeteditor/main/index.html b/test/spreadsheeteditor/main/index.html index 2227b02a98..661c560f06 100644 --- a/test/spreadsheeteditor/main/index.html +++ b/test/spreadsheeteditor/main/index.html @@ -10,6 +10,7 @@ + @@ -204,6 +205,17 @@
+
+ +
+ +
+
+ +
+
+ +
@@ -257,6 +269,7 @@ + + + + + +--> + diff --git a/test/spreadsheeteditor/main/js/ApplicationController.js b/test/spreadsheeteditor/main/js/ApplicationController.js index 1b85ab1623..e97d8dff3a 100644 --- a/test/spreadsheeteditor/main/js/ApplicationController.js +++ b/test/spreadsheeteditor/main/js/ApplicationController.js @@ -134,7 +134,7 @@ SSE.ApplicationController = new(function(){ api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); api.asc_setDocInfo(docInfo); api.asc_getEditorPermissions(config.licenseUrl, config.customerId); - api.asc_enableKeyEvents(true); + api.asc_enableKeyEvents(false); // Common.Analytics.trackEvent('Load', 'Start'); } @@ -202,6 +202,7 @@ SSE.ApplicationController = new(function(){ hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + if ( permissions.print === false) $('#idt-print').hide(); @@ -241,6 +242,8 @@ SSE.ApplicationController = new(function(){ Common.Gateway.on('downloadas', onDownloadAs); Common.Gateway.on('requestclose', onRequestClose); + + SSE.ApplicationView.tools.get('#idt-fullscreen') .on('click', function(){ common.utils.openLink(embedConfig.fullscreenUrl); @@ -379,7 +382,7 @@ SSE.ApplicationController = new(function(){ onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); - api.asc_setViewMode(true); + //api.asc_setViewMode(true); api.asc_LoadDocument(); } @@ -427,6 +430,8 @@ SSE.ApplicationController = new(function(){ } me.loadMask && me.loadMask.hide(); + /* if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl) )) + this.onEditComplete(this.loadMask, {restorefocus:true});*/ } } diff --git a/test/spreadsheeteditor/main/js/ApplicationView.js b/test/spreadsheeteditor/main/js/ApplicationView.js index f396aa6888..917609fa59 100644 --- a/test/spreadsheeteditor/main/js/ApplicationView.js +++ b/test/spreadsheeteditor/main/js/ApplicationView.js @@ -36,13 +36,39 @@ if (SSE === undefined) { SSE.ApplicationView = new(function(){ - var $btnTools; + var $btnTools + ,$cellname + ,$btnexpand + ,$btnfunc + ,btnNamedRanges; + + // 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( '