diff --git a/apps/documenteditor/main/resources/less/app.less b/apps/documenteditor/main/resources/less/app.less index 54e4f6f2a..04cf4099b 100644 --- a/apps/documenteditor/main/resources/less/app.less +++ b/apps/documenteditor/main/resources/less/app.less @@ -86,7 +86,6 @@ @import "../../../../common/main/resources/less/combobox.less"; @import "../../../../common/main/resources/less/window.less"; @import "../../../../common/main/resources/less/spinner.less"; -@import "../../../../common/main/resources/less/loadmask.less"; @import "../../../../common/main/resources/less/checkbox.less"; @import "../../../../common/main/resources/less/radiobox.less"; @import "../../../../common/main/resources/less/dataview.less"; diff --git a/apps/presentationeditor/main/resources/less/app.less b/apps/presentationeditor/main/resources/less/app.less index 8a80c847c..aa030154a 100644 --- a/apps/presentationeditor/main/resources/less/app.less +++ b/apps/presentationeditor/main/resources/less/app.less @@ -86,7 +86,6 @@ @import "../../../../common/main/resources/less/combobox.less"; @import "../../../../common/main/resources/less/window.less"; @import "../../../../common/main/resources/less/spinner.less"; -@import "../../../../common/main/resources/less/loadmask.less"; @import "../../../../common/main/resources/less/checkbox.less"; @import "../../../../common/main/resources/less/radiobox.less"; @import "../../../../common/main/resources/less/dataview.less"; diff --git a/apps/spreadsheeteditor/main/resources/less/app.less b/apps/spreadsheeteditor/main/resources/less/app.less index 8244ff99a..9d4fc911f 100644 --- a/apps/spreadsheeteditor/main/resources/less/app.less +++ b/apps/spreadsheeteditor/main/resources/less/app.less @@ -86,7 +86,6 @@ @import "../../../../common/main/resources/less/combobox.less"; @import "../../../../common/main/resources/less/window.less"; @import "../../../../common/main/resources/less/spinner.less"; -@import "../../../../common/main/resources/less/loadmask.less"; @import "../../../../common/main/resources/less/checkbox.less"; @import "../../../../common/main/resources/less/radiobox.less"; @import "../../../../common/main/resources/less/dataview.less"; diff --git a/test/common/main/lib/util/utils.js b/test/common/main/lib/util/utils.js index f43316d6f..89ca68344 100644 --- a/test/common/main/lib/util/utils.js +++ b/test/common/main/lib/util/utils.js @@ -37,13 +37,6 @@ common.utils = new(function(){ return { - openLink: function(url) { - if (url) { - var newDocumentPage = window.open(url, '_blank'); - if (newDocumentPage) - newDocumentPage.focus(); - } - }, htmlEncode: function(value) { return $('
').text(value).html(); }, @@ -56,22 +49,6 @@ _user.group && (_user.fullname = (_user.group).toString() + AscCommon.UserInfoParser.getSeparator() + _user.fullname); _user.guest = !_user.name; return _user; - }, - - fixedDigits: function(num, digits, fill) { - (fill===undefined) && (fill = '0'); - var strfill = "", - str = num.toString(); - for (var i=str.length; i div { - display: inline-block; - vertical-align: middle; - } - - /* .asc-loadmask-image { - background-image: ~"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iMTAuMjUiIHN0cm9rZS1kYXNoYXJyYXk9IjE2MCUsIDQwJSIgLz48L3N2Zz4=)"; - height: 28px; - width: 28px; - float: left; - margin-left: 8px; - }*/ - - .asc-loadmask-title { - font-size: 13px; - margin: 0 8px 0 12px; - white-space: pre-wrap; - } -} - -@keyframes rotation { - from { - transform: rotate(0); - } - - to { - transform: rotate(360deg); - } -} - -#loadmask-spinner { - animation-duration: .8s; - animation-name: rotation; - animation-iteration-count: infinite; - animation-timing-function: linear; -} diff --git a/test/documenteditor/main/js/ApplicationController.js b/test/documenteditor/main/js/ApplicationController.js index da590884f..718bbd6d5 100644 --- a/test/documenteditor/main/js/ApplicationController.js +++ b/test/documenteditor/main/js/ApplicationController.js @@ -38,7 +38,6 @@ DE.ApplicationController = new(function(){ permissions = {}, created = false, appOptions = {}, - _submitFail, $submitedTooltip, bodyWidth = 0; var LoadingDocument = -256; @@ -47,7 +46,6 @@ DE.ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - //Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); console.error(this.unsupportedBrowserErrorText); return; } @@ -122,24 +120,15 @@ DE.ApplicationController = new(function(){ function onLongActionBegin(type, id) { if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) { - /*if (!me.loadMask) - me.loadMask = new common.view.LoadMask(); - me.loadMask.show();*/ console.log('Action begin'); } } function onLongActionEnd(type, id){ - //me.loadMask && me.loadMask.hide(); console.log('Action end'); } - function hidePreloader() { - $('#loading-mask').fadeOut('slow'); - } - function onDocumentContentReady() { - //hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2); @@ -147,15 +136,13 @@ DE.ApplicationController = new(function(){ api.asc_registerCallback('asc_onStartAction', onLongActionBegin); api.asc_registerCallback('asc_onEndAction', onLongActionEnd); - api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink); - - Common.Gateway.on('processmouse', onProcessMouse); - Common.Gateway.on('downloadas', onDownloadAs); + //Common.Gateway.on('processmouse', onProcessMouse); + //Common.Gateway.on('downloadas', onDownloadAs); Common.Gateway.on('requestclose', onRequestClose); - var downloadAs = function(format){ + /*var downloadAs = function(format){ api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); - }; + };*/ // TODO: add asc_hasRequiredFields to sdk Common.Gateway.documentReady(); @@ -177,25 +164,12 @@ DE.ApplicationController = new(function(){ api.Resize(); } - function onOpenDocument(progress) { - var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - //me.loadMask && me.loadMask.setTitle(me.textLoadingDocument + ': ' + common.utils.fixedDigits(Math.min(Math.round(proc*100), 100), 3, " ") + '%'); - //console.log('onOpenDocument'); - } - function onError(id, level, errData) { if (id == Asc.c_oAscError.ID.LoadingScriptError) { - /*$('#id-critical-error-title').text(me.criticalErrorTitle); - $('#id-critical-error-message').text(me.scriptLoadError); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - window.location.reload(); - }); - $('#id-critical-error-dialog').css('z-index', 20002).modal('show');*/ console.error(me.criticalErrorTitle,me.scriptLoadError); return; } - //hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); var message; @@ -240,8 +214,6 @@ DE.ApplicationController = new(function(){ case Asc.c_oAscError.ID.Submit: message = me.errorSubmit; - /*_submitFail = true; - $submitedTooltip && $submitedTooltip.hide();*/ break; case Asc.c_oAscError.ID.EditingError: @@ -263,36 +235,16 @@ DE.ApplicationController = new(function(){ } if (level == Asc.c_oAscError.Level.Critical) { - - // report only critical errors - //Common.Gateway.reportError(id, message); console.error(id,message); - /*$('#id-critical-error-title').text(me.criticalErrorTitle); - $('#id-critical-error-message').html(message); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - window.location.reload(); - });*/ } else { - //Common.Gateway.reportWarning(id, message); console.warn(id, message); - /*$('#id-critical-error-title').text(me.notcriticalErrorTitle); - $('#id-critical-error-message').html(message); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - $('#id-critical-error-dialog').modal('hide'); - });*/ } - - //$('#id-critical-error-dialog').modal('show'); } function onExternalMessage(error) { if (error) { - //hidePreloader(); - /*$('#id-error-mask-title').text(me.criticalErrorTitle); - $('#id-error-mask-text').text(error.msg); - $('#id-error-mask').css('display', 'block');*/ console.error(error.msg); } } @@ -324,11 +276,6 @@ DE.ApplicationController = new(function(){ if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, false)); } - function onRunAutostartMacroses() { - if (!config.customization || (config.customization.macros!==false)) - if (api) api.asc_runAutostartMacroses(); - } - function onBeforeUnload () { common.localStorage.save(); } diff --git a/test/presentationeditor/main/js/ApplicationController.js b/test/presentationeditor/main/js/ApplicationController.js index b0194e02e..38bf3bf32 100644 --- a/test/presentationeditor/main/js/ApplicationController.js +++ b/test/presentationeditor/main/js/ApplicationController.js @@ -44,7 +44,6 @@ PE.ApplicationController = new(function(){ // ------------------------- if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ - //Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText); console.error(this.unsupportedBrowserErrorText); return; } @@ -58,8 +57,6 @@ PE.ApplicationController = new(function(){ function loadConfig(data) { config = $.extend(config, data.config); - config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback && - (config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose); } function loadDocument(data) { @@ -95,16 +92,8 @@ PE.ApplicationController = new(function(){ docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(config.encryptionKeys); - docInfo.asc_putIsEnabledMacroses(false); - docInfo.asc_putIsEnabledPlugins(false); - /* var enable = !config.customization || (config.customization.macros!==false); - docInfo.asc_putIsEnabledMacroses(!!enable); - enable = !config.customization || (config.customization.plugins!==false); - docInfo.asc_putIsEnabledPlugins(!!enable);*/ - if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); - //api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); api.asc_setDocInfo(docInfo); api.asc_getEditorPermissions(config.licenseUrl, config.customerId); api.asc_enableKeyEvents(true); @@ -114,50 +103,27 @@ PE.ApplicationController = new(function(){ } function onLongActionBegin(type, id) { - /* var text = ''; - switch (id) - { - case LoadingDocument: - text = me.textLoadingDocument + ' '; - break; - default: - text = me.waitText; - break; - }*/ if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) { - /*if (!me.loadMask) - me.loadMask = new common.view.LoadMask(); - me.loadMask.setTitle(text); - me.loadMask.show();*/ + console.log('Action begin'); } } function onLongActionEnd(){ - //me.loadMask && me.loadMask.hide(); console.log('Action end'); } - function hidePreloader() { - $('#loading-mask').fadeOut('slow'); - } - function onDocumentContentReady() { api.ShowThumbnails(true); - //hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); - api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink); api.asc_registerCallback('asc_onStartAction', onLongActionBegin); api.asc_registerCallback('asc_onEndAction', onLongActionEnd); - // api.asc_registerCallback('asc_onEndDemonstration', onPlayStop); - //.asc_registerCallback('asc_onDemonstrationSlideChanged', onPlaySlideChanged); - - Common.Gateway.on('processmouse', onProcessMouse); - Common.Gateway.on('downloadas', onDownloadAs); + //Common.Gateway.on('processmouse', onProcessMouse); + //Common.Gateway.on('downloadas', onDownloadAs); Common.Gateway.on('requestclose', onRequestClose); $('#editor_sdk').on('click', function(e) { @@ -176,50 +142,12 @@ PE.ApplicationController = new(function(){ api.Resize(); } - function onOpenDocument(progress) { - var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount()); - //me.loadMask && me.loadMask.setTitle(me.textLoadingDocument + ': ' + common.utils.fixedDigits(Math.min(Math.round(proc*100), 100), 3, " ") + '%'); - } - - /* var isplaymode; - function onPlayStart(e) { - if ( !isplaymode ) { - $('#box-preview').show(); - api.StartDemonstration('id-preview', currentPage); - } else { - isplaymode == 'play' ? - api.DemonstrationPause() : api.DemonstrationPlay(); - } - - isplaymode != 'play' ? ($('#btn-play button').addClass('pause'), isplaymode = 'play') : - ($('#btn-play button').removeClass('pause'), isplaymode = 'pause'); - } - - function onPlayStop() { - isplaymode = undefined; - $('#page-number').val(currentPage + 1); - //$('#btn-play button').removeClass('pause'); - $('#box-preview').hide(); - } - - function onPlaySlideChanged(number) { - if ( number++ < maxPages) - $('#page-number').val(number); - }*/ - function onError(id, level, errData) { if (id == Asc.c_oAscError.ID.LoadingScriptError) { - /*$('#id-critical-error-title').text(me.criticalErrorTitle); - $('#id-critical-error-message').text(me.scriptLoadError); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - window.location.reload(); - }); - $('#id-critical-error-dialog').css('z-index', 20002).modal('show');*/ console.error(me.scriptLoadError); return; } - //hidePreloader(); onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); var message; @@ -280,39 +208,16 @@ PE.ApplicationController = new(function(){ // report only critical errors console.error(id,message); - /*Common.Gateway.reportError(id, message); - - $('#id-crical-error-title').text(me.criticalErrorTitle); - $('#id-critical-error-message').html(message); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - window.location.reload(); - });*/ } else { console.warn(id,message); - /*Common.Gateway.reportWarning(id, message); - - $('#id-critical-error-title').text(me.notcriticalErrorTitle); - $('#id-critical-error-message').html(message); - $('#id-critical-error-close').text(me.txtClose).off().on('click', function(){ - $('#id-critical-error-dialog').modal('hide'); - });*/ } - //$('#id-critical-error-dialog').modal('show'); - - //Common.Analytics.trackEvent('Internal Error', id.toString()); } function onExternalMessage(error) { if (error) { - //hidePreloader(); - /*$('#id-error-mask-title').text(me.criticalErrorTitle); - $('#id-error-mask-text').text(error.msg); - $('#id-error-mask').css('display', 'block');*/ console.error(error.msg); - - //Common.Analytics.trackEvent('External Error'); } } @@ -335,18 +240,12 @@ PE.ApplicationController = new(function(){ function onDownloadAs() { if ( permissions.download === false) { - //Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); console.error(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); return; } if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, false)); } - function onRunAutostartMacroses() { - if (!config.customization || (config.customization.macros!==false)) - if (api) api.asc_runAutostartMacroses(); - } - function onBeforeUnload () { common.localStorage.save(); } @@ -383,7 +282,6 @@ PE.ApplicationController = new(function(){ api.asc_registerCallback('asc_onError', onError); api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady); - //api.asc_registerCallback('asc_onOpenDocumentProgress', onOpenDocument); // Initialize api gateway Common.Gateway.on('init', loadConfig); diff --git a/test/spreadsheeteditor/main/index.html b/test/spreadsheeteditor/main/index.html index dc77c9c73..f36a0cf78 100644 --- a/test/spreadsheeteditor/main/index.html +++ b/test/spreadsheeteditor/main/index.html @@ -1,185 +1,167 @@ - - - Documents - - - + + + Documents + + + - + - - - - - - + + + + + + - - + - - + + + + + + +
+
+
+
+ +
+
+
+ +
-
-
+
+
+
    -
    -
    -
    -
    -
    ---> - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - -
    -