diff --git a/test/unit-tests/common/Gateway.js b/test/common/Gateway.js similarity index 100% rename from test/unit-tests/common/Gateway.js rename to test/common/Gateway.js diff --git a/test/unit-tests/common/index.html b/test/common/index.html similarity index 100% rename from test/unit-tests/common/index.html rename to test/common/index.html diff --git a/test/unit-tests/common/locale.js b/test/common/locale.js similarity index 100% rename from test/unit-tests/common/locale.js rename to test/common/locale.js diff --git a/test/unit-tests/common/main/lib/controller/CellEditor.js b/test/common/main/lib/controller/CellEditor.js similarity index 100% rename from test/unit-tests/common/main/lib/controller/CellEditor.js rename to test/common/main/lib/controller/CellEditor.js diff --git a/test/unit-tests/common/main/lib/util/LocalStorage.js b/test/common/main/lib/util/LocalStorage.js similarity index 100% rename from test/unit-tests/common/main/lib/util/LocalStorage.js rename to test/common/main/lib/util/LocalStorage.js diff --git a/test/unit-tests/common/main/lib/util/utils.js b/test/common/main/lib/util/utils.js similarity index 100% rename from test/unit-tests/common/main/lib/util/utils.js rename to test/common/main/lib/util/utils.js diff --git a/test/unit-tests/common/main/lib/view/CellEditor.js b/test/common/main/lib/view/CellEditor.js similarity index 100% rename from test/unit-tests/common/main/lib/view/CellEditor.js rename to test/common/main/lib/view/CellEditor.js diff --git a/test/unit-tests/common/main/lib/view/LoadMask.js b/test/common/main/lib/view/LoadMask.js similarity index 100% rename from test/unit-tests/common/main/lib/view/LoadMask.js rename to test/common/main/lib/view/LoadMask.js diff --git a/test/unit-tests/common/main/resources/img/icon-menu-sprite.svg b/test/common/main/resources/img/icon-menu-sprite.svg similarity index 100% rename from test/unit-tests/common/main/resources/img/icon-menu-sprite.svg rename to test/common/main/resources/img/icon-menu-sprite.svg diff --git a/test/unit-tests/common/main/resources/img/icon-social-sprite.svg b/test/common/main/resources/img/icon-social-sprite.svg similarity index 100% rename from test/unit-tests/common/main/resources/img/icon-social-sprite.svg rename to test/common/main/resources/img/icon-social-sprite.svg diff --git a/test/unit-tests/common/main/resources/img/logo.svg b/test/common/main/resources/img/logo.svg similarity index 100% rename from test/unit-tests/common/main/resources/img/logo.svg rename to test/common/main/resources/img/logo.svg diff --git a/test/unit-tests/common/main/resources/img/next-field.png b/test/common/main/resources/img/next-field.png similarity index 100% rename from test/unit-tests/common/main/resources/img/next-field.png rename to test/common/main/resources/img/next-field.png diff --git a/test/unit-tests/common/main/resources/img/previous-field.png b/test/common/main/resources/img/previous-field.png similarity index 100% rename from test/unit-tests/common/main/resources/img/previous-field.png rename to test/common/main/resources/img/previous-field.png diff --git a/test/unit-tests/common/main/resources/less/asc-mixins.less b/test/common/main/resources/less/asc-mixins.less similarity index 92% rename from test/unit-tests/common/main/resources/less/asc-mixins.less rename to test/common/main/resources/less/asc-mixins.less index ae626a8f9a..e6e8a3d7b5 100644 --- a/test/unit-tests/common/main/resources/less/asc-mixins.less +++ b/test/common/main/resources/less/asc-mixins.less @@ -12,18 +12,15 @@ background: -moz-linear-gradient(center bottom, @start 0%, @stop 100%); background: -o-linear-gradient(@stop, @start); background: linear-gradient(bottom, @start, @stop); -// filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop, @start)); } .box-shadow(@arguments) { -webkit-box-shadow: @arguments; - //-moz-box-shadow: @arguments; box-shadow: @arguments; } .box-inner-shadow(@arguments) { -webkit-box-shadow: inset @arguments; - //-moz-box-shadow: inset @arguments; box-shadow: inset @arguments; } @@ -127,7 +124,6 @@ background-position: -0*@icon-size -@index*@icon-size; background-position: @normal-h-offset -@index*@icon-size; } -// .@{icon-class} {background-position-y: -@index*@icon-size;} } .button-otherstates-icon(@icon-class, @icon-size) { @@ -153,9 +149,6 @@ } } } - - //&.active svg.icon, - //&:active svg.icon {fill:#fff;} } .button-otherstates-icon2(@icon-class, @icon-size) { @@ -169,7 +162,6 @@ background-position: 0 -@index*@icon-size; background-position: var(--bgX) -@index*@icon-size; } -// .menu-item-icon.@{icon-class} {background-position-y: -@index*@icon-size;} } .menu-otherstates-icon(@menu-class, @icon-size) { @@ -378,20 +370,4 @@ background-size: @img-flags-width auto; } } -} - -//.adaptive-solid-border(@width, @color, @borderside: all) { -// @lb-border: if((@borderside = all), border, e('border-@{borderside}')); -// @lb-border-width: if((@borderside = all), border-width, e('border-@{borderside}-width')); -// -// @{lb-border}: @width solid @color; -// -// @media only screen { -// @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), -// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), -// (min-resolution: 144dpi) and (max-resolution: 191dpi) -// { -// @{lb-border-width}: (@width / 1.5); -// } -// } -//} +} \ No newline at end of file diff --git a/test/unit-tests/common/main/resources/less/buttons.less b/test/common/main/resources/less/buttons.less similarity index 100% rename from test/unit-tests/common/main/resources/less/buttons.less rename to test/common/main/resources/less/buttons.less diff --git a/test/unit-tests/common/main/resources/less/colors-table-ie-fix.less b/test/common/main/resources/less/colors-table-ie-fix.less similarity index 100% rename from test/unit-tests/common/main/resources/less/colors-table-ie-fix.less rename to test/common/main/resources/less/colors-table-ie-fix.less diff --git a/test/unit-tests/common/main/resources/less/colors-table.less b/test/common/main/resources/less/colors-table.less similarity index 99% rename from test/unit-tests/common/main/resources/less/colors-table.less rename to test/common/main/resources/less/colors-table.less index 177ab6b13a..7c0c7e4d44 100644 --- a/test/unit-tests/common/main/resources/less/colors-table.less +++ b/test/common/main/resources/less/colors-table.less @@ -1,4 +1,4 @@ -@import "./colors-table-ie-fix.less"; +@import "colors-table-ie-fix.less"; // Brand colors // ------------------------- diff --git a/test/unit-tests/common/main/resources/less/common.less b/test/common/main/resources/less/common.less similarity index 93% rename from test/unit-tests/common/main/resources/less/common.less rename to test/common/main/resources/less/common.less index 7797bc79a5..64f80cea23 100644 --- a/test/unit-tests/common/main/resources/less/common.less +++ b/test/common/main/resources/less/common.less @@ -1,25 +1,25 @@ // Core variables and mixins -@import "../../../../../../vendor/bootstrap/less/variables.less"; +@import "../../../../../vendor/bootstrap/less/variables.less"; @icon-font-path: "../../../../../../vendor/bootstrap/dist/fonts/"; -@import "../../../../../../vendor/bootstrap/less/mixins.less"; +@import "../../../../../vendor/bootstrap/less/mixins.less"; // Reset -@import "../../../../../../vendor/bootstrap/less/normalize.less"; -@import "../../../../../../vendor/bootstrap/less/print.less"; +@import "../../../../../vendor/bootstrap/less/normalize.less"; +@import "../../../../../vendor/bootstrap/less/print.less"; // Core CSS -@import "../../../../../../vendor/bootstrap/less/scaffolding.less"; -@import "../../../../../../vendor/bootstrap/less/type.less"; +@import "../../../../../vendor/bootstrap/less/scaffolding.less"; +@import "../../../../../vendor/bootstrap/less/type.less"; //@import "code.less"; //@import "grid.less"; //@import "tables.less"; -@import "../../../../../../vendor/bootstrap/less/forms.less"; -@import "../../../../../../vendor/bootstrap/less/buttons.less"; +@import "../../../../../vendor/bootstrap/less/forms.less"; +@import "../../../../../vendor/bootstrap/less/buttons.less"; // Components -@import "../../../../../../vendor/bootstrap/less/component-animations.less"; +@import "../../../../../vendor/bootstrap/less/component-animations.less"; //@import "../../../../../../vendor/bootstrap/less/glyphicons.less"; //@import "dropdowns.less"; //@import "button-groups.less"; @@ -29,28 +29,28 @@ //@import "breadcrumbs.less"; //@import "pagination.less"; //@import "pager.less"; -@import "../../../../../../vendor/bootstrap/less/labels.less"; +@import "../../../../../vendor/bootstrap/less/labels.less"; //@import "badges.less"; //@import "jumbotron.less"; //@import "thumbnails.less"; -@import "../../../../../../vendor/bootstrap/less/alerts.less"; +@import "../../../../../vendor/bootstrap/less/alerts.less"; //@import "progress-bars.less"; //@import "media.less"; //@import "list-group.less"; //@import "panels.less"; //@import "wells.less"; -@import "../../../../../../vendor/bootstrap/less/close.less"; +@import "../../../../../vendor/bootstrap/less/close.less"; // Components w/ JavaScript -@import "../../../../../../vendor/bootstrap/less/modals.less"; -@import "../../../../../../vendor/bootstrap/less/tooltip.less"; +@import "../../../../../vendor/bootstrap/less/modals.less"; +@import "../../../../../vendor/bootstrap/less/tooltip.less"; //@import "../../../../../../vendor/bootstrap/less/popovers.less"; -@import "../../../../../../vendor/bootstrap/less/dropdowns.less"; +@import "../../../../../vendor/bootstrap/less/dropdowns.less"; //@import "carousel.less"; // Utility classes -@import "../../../../../../vendor/bootstrap/less/utilities.less"; -@import "../../../../../../vendor/bootstrap/less/responsive-utilities.less"; +@import "../../../../../vendor/bootstrap/less/utilities.less"; +@import "../../../../../vendor/bootstrap/less/responsive-utilities.less"; @import "loadmask.less"; diff --git a/test/unit-tests/common/main/resources/less/loadmask.less b/test/common/main/resources/less/loadmask.less similarity index 100% rename from test/unit-tests/common/main/resources/less/loadmask.less rename to test/common/main/resources/less/loadmask.less diff --git a/test/unit-tests/common/main/resources/less/variables.less b/test/common/main/resources/less/variables.less similarity index 100% rename from test/unit-tests/common/main/resources/less/variables.less rename to test/common/main/resources/less/variables.less diff --git a/test/documenteditor/main/index.html b/test/documenteditor/main/index.html index 3e6950f0f6..92d49a56a0 100644 --- a/test/documenteditor/main/index.html +++ b/test/documenteditor/main/index.html @@ -12,7 +12,7 @@ @@ -120,13 +120,12 @@ - - + - - + + - + diff --git a/test/documenteditor/main/index1.html b/test/documenteditor/main/index1.html index 6f0c305dff..081a1ca9c5 100644 --- a/test/documenteditor/main/index1.html +++ b/test/documenteditor/main/index1.html @@ -33,10 +33,10 @@ - - - - + + + + diff --git a/test/documenteditor/main/js/ApplicationController.js b/test/documenteditor/main/js/ApplicationController.js index e67f0f34ed..6bf17e21fc 100644 --- a/test/documenteditor/main/js/ApplicationController.js +++ b/test/documenteditor/main/js/ApplicationController.js @@ -132,19 +132,6 @@ DE.ApplicationController = new(function(){ me.loadMask && me.loadMask.hide(); } - function onPrint() { - if ( permissions.print!==false ) - api.asc_Print(new Asc.asc_CDownloadOptions(null, false)); - } - - function onPrintUrl(url) { - common.utils.dialogPrint(url, api); - } - - function onDownloadUrl(url, fileType) { - Common.Gateway.downloadAs(url, fileType); - } - function hidePreloader() { $('#loading-mask').fadeOut('slow'); } @@ -159,9 +146,7 @@ DE.ApplicationController = new(function(){ api.asc_registerCallback('asc_onStartAction', onLongActionBegin); api.asc_registerCallback('asc_onEndAction', onLongActionEnd); api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink); - api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl); - //api.asc_registerCallback('asc_onPrint', onPrint); - api.asc_registerCallback('asc_onPrintUrl', onPrintUrl); + Common.Gateway.on('processmouse', onProcessMouse); Common.Gateway.on('downloadas', onDownloadAs); @@ -181,8 +166,6 @@ DE.ApplicationController = new(function(){ appOptions.canFillForms = appOptions.canLicense && (permissions.fillForms===true) && (config.mode !== 'view'); appOptions.canSubmitForms = appOptions.canLicense && (typeof (config.customization) == 'object') && !!config.customization.submitForm; - //api.asc_setViewMode(!appOptions.canFillForms); - //api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms); api.asc_SetFastCollaborative(true); api.asc_setAutoSaveGap(1); @@ -365,32 +348,6 @@ DE.ApplicationController = new(function(){ }); window.onbeforeunload = onBeforeUnload; - var ismodalshown = false; - $(document.body).on('show.bs.modal', '.modal', - function(e) { - ismodalshown = true; - api.asc_enableKeyEvents(false); - } - ).on('hidden.bs.modal', '.modal', - function(e) { - ismodalshown = false; - api.asc_enableKeyEvents(true); - } - ).on('hidden.bs.dropdown', '.dropdown', - function(e) { - if ( !ismodalshown ) - api.asc_enableKeyEvents(true); - } - ).on('blur', 'input, textarea', - function(e) { - if ( !ismodalshown ) { - if (!/area_id/.test(e.target.id) ) { - api.asc_enableKeyEvents(true); - } - } - } - ); - $('#editor_sdk').on('click', function(e) { if ( e.target.localName == 'canvas' ) { e.currentTarget.focus(); diff --git a/test/documenteditor/main/js/application.js b/test/documenteditor/main/js/application.js index 63d642fb27..f6102359b1 100644 --- a/test/documenteditor/main/js/application.js +++ b/test/documenteditor/main/js/application.js @@ -31,8 +31,7 @@ * */ +function ($) { - Common.Locale.apply(function() { - DE.ApplicationView.create(); - DE.ApplicationController.create(); - }); + DE.ApplicationView.create(); + DE.ApplicationController.create(); + }(); diff --git a/test/documenteditor/main/locale/en.json b/test/documenteditor/main/locale/en.json deleted file mode 100644 index b0642f8629..0000000000 --- a/test/documenteditor/main/locale/en.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "DE.ApplicationController.errorDefaultMessage": "Error code: %1", - "DE.ApplicationController.unknownErrorText": "Unknown error.", - "DE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", - "DE.ApplicationController.convertationErrorText": "Conversion failed.", - "DE.ApplicationController.downloadErrorText": "Download failed.", - "DE.ApplicationController.criticalErrorTitle": "Error", - "DE.ApplicationController.notcriticalErrorTitle": "Warning", - "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "DE.ApplicationController.textOf": "of", - "DE.ApplicationController.downloadTextText": "Downloading spreadsheet...", - "DE.ApplicationController.waitText": "Please, wait...", - "DE.ApplicationController.textLoadingDocument": "Loading spreadsheet", - "DE.ApplicationController.txtClose": "Close", - "DE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.", - "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", - "DE.ApplicationController.textGuest": "Guest", - "DE.ApplicationController.textAnonymous": "Anonymous", - "DE.ApplicationController.errorForceSave": "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - "DE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." -} \ No newline at end of file diff --git a/test/documenteditor/main/resources/less/application.less b/test/documenteditor/main/resources/less/application.less index 07eafc9009..95cba0a92f 100644 --- a/test/documenteditor/main/resources/less/application.less +++ b/test/documenteditor/main/resources/less/application.less @@ -1,2 +1,2 @@ // Common styles -@import "../../../../unit-tests/common/main/resources/less/common.less"; \ No newline at end of file +@import "../../../../common/main/resources/less/common.less"; \ No newline at end of file diff --git a/test/presentationeditor/main/index.html b/test/presentationeditor/main/index.html index 67cb141d79..08b1a34104 100644 --- a/test/presentationeditor/main/index.html +++ b/test/presentationeditor/main/index.html @@ -100,7 +100,7 @@ -
+
- - - - - + + + + + diff --git a/test/presentationeditor/main/js/ApplicationController.js b/test/presentationeditor/main/js/ApplicationController.js index a31dd81659..f181f58b41 100644 --- a/test/presentationeditor/main/js/ApplicationController.js +++ b/test/presentationeditor/main/js/ApplicationController.js @@ -117,9 +117,6 @@ PE.ApplicationController = new(function(){ var text = ''; switch (id) { - case Asc.c_oAscAsyncAction['Print']: - text = me.downloadTextText; - break; case LoadingDocument: text = me.textLoadingDocument + ' '; break; @@ -140,19 +137,6 @@ PE.ApplicationController = new(function(){ me.loadMask && me.loadMask.hide(); } - function onDownloadUrl(url, fileType) { - Common.Gateway.downloadAs(url, fileType); - } - - function onPrint() { - if (permissions.print!==false) - api.asc_Print(new Asc.asc_CDownloadOptions(null, false)); - } - - function onPrintUrl(url) { - common.utils.dialogPrint(url, api); - } - function hidePreloader() { $('#loading-mask').fadeOut('slow'); } @@ -163,9 +147,6 @@ PE.ApplicationController = new(function(){ hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); - api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl); - //api.asc_registerCallback('asc_onPrint', onPrint); - api.asc_registerCallback('asc_onPrintUrl', onPrintUrl); api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink); api.asc_registerCallback('asc_onStartAction', onLongActionBegin); api.asc_registerCallback('asc_onEndAction', onLongActionEnd); diff --git a/test/presentationeditor/main/js/application.js b/test/presentationeditor/main/js/application.js index bbff1ddfed..65e765ec19 100644 --- a/test/presentationeditor/main/js/application.js +++ b/test/presentationeditor/main/js/application.js @@ -31,8 +31,6 @@ * */ (function ($) { - Common.Locale.apply(function() { - PE.ApplicationView.create(); - PE.ApplicationController.create(); - }); + PE.ApplicationView.create(); + PE.ApplicationController.create(); })(window.jQuery); diff --git a/test/presentationeditor/main/locale/en.json b/test/presentationeditor/main/locale/en.json deleted file mode 100644 index 54a51e933d..0000000000 --- a/test/presentationeditor/main/locale/en.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "PE.ApplicationController.errorDefaultMessage": "Error code: %1", - "PE.ApplicationController.unknownErrorText": "Unknown error.", - "PE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", - "PE.ApplicationController.convertationErrorText": "Conversion failed.", - "PE.ApplicationController.downloadErrorText": "Download failed.", - "PE.ApplicationController.criticalErrorTitle": "Error", - "PE.ApplicationController.notcriticalErrorTitle": "Warning", - "PE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "PE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "PE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "PE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "PE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "PE.ApplicationController.downloadTextText": "Downloading presentation...", - "PE.ApplicationController.waitText": "Please, wait...", - "PE.ApplicationController.textLoadingDocument": "Loading presentation", - "PE.ApplicationController.txtClose": "Close", - "PE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.", - "PE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", - "PE.ApplicationController.textGuest": "Guest", - "PE.ApplicationController.textAnonymous": "Anonymous", - "PE.ApplicationController.errorForceSave": "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - "PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." -} \ No newline at end of file diff --git a/test/presentationeditor/main/resources/less/application.less b/test/presentationeditor/main/resources/less/application.less index fce4297dbf..ddb4760a33 100644 --- a/test/presentationeditor/main/resources/less/application.less +++ b/test/presentationeditor/main/resources/less/application.less @@ -1,5 +1,5 @@ // Bootstrap core variables and mixins -@import "../../../../unit-tests/common/main/resources/less/common.less"; +@import "../../../../common/main/resources/less/common.less"; .overlay-controls { /*bottom: 15px;*/ diff --git a/test/spreadsheeteditor/main/index.html b/test/spreadsheeteditor/main/index.html index 139e938274..c1cdc2601d 100644 --- a/test/spreadsheeteditor/main/index.html +++ b/test/spreadsheeteditor/main/index.html @@ -152,14 +152,14 @@ - - - - - + + + + + - - + + diff --git a/test/spreadsheeteditor/main/js/ApplicationController.js b/test/spreadsheeteditor/main/js/ApplicationController.js index f88ed3af24..ca4383c4cd 100644 --- a/test/spreadsheeteditor/main/js/ApplicationController.js +++ b/test/spreadsheeteditor/main/js/ApplicationController.js @@ -35,14 +35,9 @@ SSE.ApplicationController = new(function(){ api, config = {}, docConfig = {}, - embedConfig = {}, permissions = {}, maxPages = 0, - created = false, - iframePrint = null; - var $ttEl, - $tooltip, - ttOffset = [6, -15]; + created = false; var LoadingDocument = -256; @@ -56,7 +51,7 @@ SSE.ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); + //Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); console.error( this.unsupportedBrowserErrorText); return; } @@ -70,21 +65,6 @@ SSE.ApplicationController = new(function(){ function loadConfig(data) { config = $.extend(config, data.config); - embedConfig = $.extend(embedConfig, data.config.embedded); - - //common.controller.modals.init(embedConfig); - - // Docked toolbar - /*if (embedConfig.toolbarDocked === 'bottom') { - $('#toolbar').addClass('bottom'); - $('.viewer').addClass('bottom'); - $('#box-tools').removeClass('dropdown').addClass('dropup'); - ttOffset[1] = -40; - } else { - $('#toolbar').addClass('top'); - $('.viewer').addClass('top'); - }*/ - config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback && (config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose); } @@ -138,10 +118,6 @@ SSE.ApplicationController = new(function(){ api.asc_getEditorPermissions(config.licenseUrl, config.customerId); api.asc_enableKeyEvents(false); } - - embedConfig.docTitle = docConfig.title; - /* labelDocName = $('#title-doc-name'); - labelDocName.text(embedConfig.docTitle || '')*/ } } @@ -181,19 +157,6 @@ SSE.ApplicationController = new(function(){ setActiveWorkSheet(api.asc_getActiveWorksheetIndex()); } - function onDownloadUrl(url, fileType) { - Common.Gateway.downloadAs(url, fileType); - } - - function onPrint() { - if ( permissions.print!==false ) - api.asc_Print(new Asc.asc_CDownloadOptions(null, true)); - } - - function onPrintUrl(url) { - common.utils.dialogPrint(url, api); - } - function hidePreloader() { $('#loading-mask').fadeOut('slow'); } @@ -201,11 +164,7 @@ SSE.ApplicationController = new(function(){ function onDocumentContentReady() { hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); - api.asc_registerCallback('asc_onMouseMove', onApiMouseMove); api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink); - api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl); - //api.asc_registerCallback('asc_onPrint', onPrint); - api.asc_registerCallback('asc_onPrintUrl', onPrintUrl); api.asc_registerCallback('asc_onStartAction', onLongActionBegin); Common.Gateway.on('processmouse', onProcessMouse); @@ -213,33 +172,6 @@ SSE.ApplicationController = new(function(){ Common.Gateway.on('requestclose', onRequestClose); - - var ismodalshown = false; - $(document.body).on('show.bs.modal', '.modal', - function(e) { - ismodalshown = true; - api.asc_enableKeyEvents(false); - } - ).on('hidden.bs.modal', '.modal', - function(e) { - ismodalshown = false; - api.asc_enableKeyEvents(true); - } - ).on('hidden.bs.dropdown', '.dropdown', - function(e) { - if ( !ismodalshown ) - api.asc_enableKeyEvents(true); - } - ).on('blur', 'input, textarea', - function(e) { - if ( !ismodalshown ) { - if (!/area_id/.test(e.target.id) ) { - api.asc_enableKeyEvents(true); - } - } - } - ); - $('#editor_sdk').on('click', function(e) { if ( e.target.localName == 'canvas' ) { e.currentTarget.focus(); @@ -274,9 +206,6 @@ SSE.ApplicationController = new(function(){ var text = ''; switch (id) { - case Asc.c_oAscAsyncAction['Print']: - text = me.downloadTextText; - break; case LoadingDocument: text = me.textLoadingDocument + ' '; break; @@ -444,49 +373,6 @@ SSE.ApplicationController = new(function(){ api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true)); } - function onApiMouseMove(array) { - if ( array.length ) { - var ttdata; - for (var i = array.length; i > 0; i--) { - if (array[i-1].asc_getType() == Asc.c_oAscMouseMoveType.Hyperlink) { - ttdata = array[i - 1]; - break; - } - } - - if ( ttdata ) { - if (!$ttEl) { - $ttEl = $('.hyperlink-tooltip'); - $ttEl.tooltip({'container': 'body', 'trigger': 'manual'}); - $ttEl.on('shown.bs.tooltip', function(e) { - $tooltip = $ttEl.data('bs.tooltip').tip(); - - $tooltip.css({ - left: $ttEl.ttpos[0] + ttOffset[0], - top: $ttEl.ttpos[1] + ttOffset[1] - }); - - $tooltip.find('.tooltip-arrow').css({left: 10}); - }); - } - - if (!$tooltip) { - $ttEl.ttpos = [ttdata.asc_getX(), ttdata.asc_getY()]; - $ttEl.tooltip('show'); - } else { - $tooltip.css({ - left: ttdata.asc_getX() + ttOffset[0], - top: ttdata.asc_getY() + ttOffset[1] - }); - } - } else { - if ( $tooltip ) { - $tooltip.tooltip('hide'); - $tooltip = false; - } - } - } - } function onRunAutostartMacroses() { if (!config.customization || (config.customization.macros!==false)) diff --git a/test/spreadsheeteditor/main/locale/en.json b/test/spreadsheeteditor/main/locale/en.json deleted file mode 100644 index 1158e19de3..0000000000 --- a/test/spreadsheeteditor/main/locale/en.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "SSE.ApplicationController.errorDefaultMessage": "Error code: %1", - "SSE.ApplicationController.unknownErrorText": "Unknown error.", - "SSE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", - "SSE.ApplicationController.convertationErrorText": "Conversion failed.", - "SSE.ApplicationController.downloadErrorText": "Download failed.", - "SSE.ApplicationController.criticalErrorTitle": "Error", - "SSE.ApplicationController.notcriticalErrorTitle": "Warning", - "SSE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", - "SSE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", - "SSE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", - "SSE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", - "SSE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", - "SSE.ApplicationController.textOf": "of", - "SSE.ApplicationController.downloadTextText": "Downloading spreadsheet...", - "SSE.ApplicationController.waitText": "Please, wait...", - "SSE.ApplicationController.textLoadingDocument": "Loading spreadsheet", - "SSE.ApplicationController.txtClose": "Close", - "SSE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.", - "SSE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", - "SSE.ApplicationController.textGuest": "Guest", - "SSE.ApplicationController.textAnonymous": "Anonymous", - "SSE.ApplicationController.errorForceSave": "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", - "SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." - } \ No newline at end of file diff --git a/test/spreadsheeteditor/main/resources/less/application.less b/test/spreadsheeteditor/main/resources/less/application.less index 9152f67898..35840c55e7 100644 --- a/test/spreadsheeteditor/main/resources/less/application.less +++ b/test/spreadsheeteditor/main/resources/less/application.less @@ -1,5 +1,5 @@ // Common styles -@import "../../../../unit-tests/common/main/resources/less/common.less"; +@import "../../../../common/main/resources/less/common.less"; // Worksheets // ------------------------- diff --git a/test/spreadsheeteditor/main/resources/less/celleditor.less b/test/spreadsheeteditor/main/resources/less/celleditor.less index a8b5b3c18b..35da90ec29 100644 --- a/test/spreadsheeteditor/main/resources/less/celleditor.less +++ b/test/spreadsheeteditor/main/resources/less/celleditor.less @@ -1,9 +1,9 @@ // Common styles -@import "../../../../unit-tests/common/main/resources/less/colors-table-ie-fix.less"; -@import "../../../../unit-tests/common/main/resources/less/variables.less"; -@import "../../../../unit-tests/common/main/resources/less/colors-table.less"; -@import "../../../../unit-tests/common/main/resources/less/asc-mixins.less"; -@import "../../../../unit-tests/common/main/resources/less/buttons.less"; +@import "../../../../common/main/resources/less/colors-table-ie-fix.less"; +@import "../../../../common/main/resources/less/variables.less"; +@import "../../../../common/main/resources/less/colors-table.less"; +@import "../../../../common/main/resources/less/asc-mixins.less"; +@import "../../../../common/main/resources/less/buttons.less"; #cell-editing-box { border-bottom: solid @scaled-one-px-value-ie @border-toolbar-ie; border-bottom: solid @scaled-one-px-value @border-toolbar; diff --git a/test/unit-tests/common.js b/test/unit-tests/common.js deleted file mode 100644 index 7261f02bc1..0000000000 --- a/test/unit-tests/common.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * common.js - * - * Created by Alexander Yuzhin on 5/7/14 - * Copyright (c) 2018 Ascensio System SIA. All rights reserved. - * - */ - -// Include and setup all the stuff for testing -define([ - 'chai' -],function(chai) { - window.expect = chai.expect; - window.assert = chai.assert; -}); \ No newline at end of file diff --git a/test/unit-tests/common/main/lib/util/utils1.js b/test/unit-tests/common/main/lib/util/utils1.js deleted file mode 100644 index 1294493a2e..0000000000 --- a/test/unit-tests/common/main/lib/util/utils1.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * utils.js - * - * Unit test - * - * Created by Alexander Yuzhin on 5/7/14 - * Copyright (c) 2018 Ascensio System SIA. All rights reserved. - * - */ - -define([ - '../../../../../../apps/common/main/lib/util/utils.js' -],function() { - describe('common.utils.String', function(){ - it('Test format', function(){ - assert.equal('successively: first, second', common.utils.String.format('successively: {0}, {1}', 'first', 'second')); - assert.equal('revers: second, first', common.utils.String.format('revers: {1}, {0}', 'first', 'second')); - }); - - it('Test htmlEncode', function(){ - assert.equal('Curly, Larry & Moe', common.utils.String.htmlEncode('Curly, Larry & Moe')); - }); - - it('Test htmlDecode', function(){ - assert.equal('Curly, Larry & Moe', common.utils.String.htmlDecode('Curly, Larry & Moe')); - }); - - it('Test ellipsis', function(){ - assert.equal('Truncate a s...', common.utils.String.ellipsis('Truncate a string and add an ellipsis', 15)); - assert.equal('Truncate a string and add...', common.utils.String.ellipsis('Truncate a string and add an ellipsis', 30, true)); - }); - }); -}); \ No newline at end of file