Refactoring

This commit is contained in:
OVSharova 2021-09-13 20:10:12 +03:00
parent e0cca7ad01
commit d7a95c1513
38 changed files with 57 additions and 383 deletions

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View file

Before

Width:  |  Height:  |  Size: 323 B

After

Width:  |  Height:  |  Size: 323 B

View file

@ -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);
// }
// }
//}
}

View file

@ -1,4 +1,4 @@
@import "./colors-table-ie-fix.less";
@import "colors-table-ie-fix.less";
// Brand colors
// -------------------------

View file

@ -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";

View file

@ -12,7 +12,7 @@
<!-- debug end -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
<![endif]-->
</head>
@ -120,13 +120,12 @@
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="../../common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>

View file

@ -33,10 +33,10 @@
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../common/locale.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>

View file

@ -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();

View file

@ -31,8 +31,7 @@
*
*/
+function ($) {
Common.Locale.apply(function() {
DE.ApplicationView.create();
DE.ApplicationController.create();
});
DE.ApplicationView.create();
DE.ApplicationController.create();
}();

View file

@ -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.<br>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.<br>Please contact your Document Server administrator for details.",
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.<br>Please contact your Document Server administrator."
}

View file

@ -1,2 +1,2 @@
// Common styles
@import "../../../../unit-tests/common/main/resources/less/common.less";
@import "../../../../common/main/resources/less/common.less";

View file

@ -100,7 +100,7 @@
<!--<div id="box-preview">
<div id="id-preview" tabindex="-1"></div>
</div>-->
<div id="editor_sdk" class="viewer top" style="overflow: hidden;" tabindex="-1"></div>
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
<!--<div class="overlay-controls" style="margin-left: -32px">
<ul class="left">
@ -165,11 +165,11 @@
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="../../common/locale.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>

View file

@ -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);

View file

@ -31,8 +31,6 @@
*
*/
(function ($) {
Common.Locale.apply(function() {
PE.ApplicationView.create();
PE.ApplicationController.create();
});
PE.ApplicationView.create();
PE.ApplicationController.create();
})(window.jQuery);

View file

@ -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.<br>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.<br>Please contact your Document Server administrator for details.",
"PE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.<br>Please contact your Document Server administrator."
}

View file

@ -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;*/

View file

@ -152,14 +152,14 @@
</script>
<!--application-->
<script type="text/javascript" src="../../unit-tests/common/locale.js"></script>
<script type="text/javascript" src="../../unit-tests/common/Gateway.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="../../common/locale.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/LocalStorage.js"></script>
<script type="text/javascript" src="../../common/main/lib/util/utils.js"></script>
<script type="text/javascript" src="../../common/main/lib/view/LoadMask.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/view/CellEditor.js"></script>
<script type="text/javascript" src="../../unit-tests/common/main/lib/controller/CellEditor.js"></script>
<script type="text/javascript" src="../../common/main/lib/view/CellEditor.js"></script>
<script type="text/javascript" src="../../common/main/lib/controller/CellEditor.js"></script>
<script type="text/javascript" src="js/ApplicationView.js"></script>
<script type="text/javascript" src="js/ApplicationController.js"></script>
<script type="text/javascript" src="js/application.js"></script>

View file

@ -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))

View file

@ -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.<br>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.<br>Please contact your Document Server administrator for details.",
"SSE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.<br>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.<br>Please contact your Document Server administrator."
}

View file

@ -1,5 +1,5 @@
// Common styles
@import "../../../../unit-tests/common/main/resources/less/common.less";
@import "../../../../common/main/resources/less/common.less";
// Worksheets
// -------------------------

View file

@ -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;

View file

@ -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;
});

View file

@ -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 &amp; Moe', common.utils.String.htmlEncode('Curly, Larry & Moe'));
});
it('Test htmlDecode', function(){
assert.equal('Curly, Larry & Moe', common.utils.String.htmlDecode('Curly, Larry &amp; 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));
});
});
});