Add locale enclish text
This commit is contained in:
parent
02d46c30d2
commit
e0cca7ad01
|
@ -36,7 +36,6 @@ DE.ApplicationController = new(function(){
|
||||||
config = {},
|
config = {},
|
||||||
docConfig = {},
|
docConfig = {},
|
||||||
permissions = {},
|
permissions = {},
|
||||||
maxPages = 0,
|
|
||||||
created = false,
|
created = false,
|
||||||
appOptions = {},
|
appOptions = {},
|
||||||
_submitFail, $submitedTooltip,
|
_submitFail, $submitedTooltip,
|
||||||
|
@ -97,10 +96,12 @@ DE.ApplicationController = new(function(){
|
||||||
docInfo.put_Permissions(_permissions);
|
docInfo.put_Permissions(_permissions);
|
||||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||||
|
|
||||||
var enable = !config.customization || (config.customization.macros!==false);
|
docInfo.asc_putIsEnabledMacroses(false);
|
||||||
|
docInfo.asc_putIsEnabledPlugins(false);
|
||||||
|
/* var enable = !config.customization || (config.customization.macros!==false);
|
||||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||||
enable = !config.customization || (config.customization.plugins!==false);
|
enable = !config.customization || (config.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
docInfo.asc_putIsEnabledPlugins(!!enable);*/
|
||||||
|
|
||||||
|
|
||||||
var type = /^(?:(pdf|djvu|xps))$/.exec(docConfig.fileType);
|
var type = /^(?:(pdf|djvu|xps))$/.exec(docConfig.fileType);
|
||||||
|
@ -110,7 +111,7 @@ DE.ApplicationController = new(function(){
|
||||||
|
|
||||||
if (api) {
|
if (api) {
|
||||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
//api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||||
api.asc_setDocInfo(docInfo);
|
api.asc_setDocInfo(docInfo);
|
||||||
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
||||||
api.asc_enableKeyEvents(true);
|
api.asc_enableKeyEvents(true);
|
||||||
|
@ -135,9 +136,11 @@ DE.ApplicationController = new(function(){
|
||||||
if ( permissions.print!==false )
|
if ( permissions.print!==false )
|
||||||
api.asc_Print(new Asc.asc_CDownloadOptions(null, false));
|
api.asc_Print(new Asc.asc_CDownloadOptions(null, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url, api);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDownloadUrl(url, fileType) {
|
function onDownloadUrl(url, fileType) {
|
||||||
Common.Gateway.downloadAs(url, fileType);
|
Common.Gateway.downloadAs(url, fileType);
|
||||||
}
|
}
|
||||||
|
@ -153,17 +156,13 @@ DE.ApplicationController = new(function(){
|
||||||
var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2);
|
var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2);
|
||||||
(zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100));
|
(zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||||
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
||||||
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
||||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
//api.asc_registerCallback('asc_onPrint', onPrint);
|
||||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Common.Gateway.on('processmouse', onProcessMouse);
|
Common.Gateway.on('processmouse', onProcessMouse);
|
||||||
Common.Gateway.on('downloadas', onDownloadAs);
|
Common.Gateway.on('downloadas', onDownloadAs);
|
||||||
Common.Gateway.on('requestclose', onRequestClose);
|
Common.Gateway.on('requestclose', onRequestClose);
|
||||||
|
@ -179,17 +178,14 @@ DE.ApplicationController = new(function(){
|
||||||
|
|
||||||
var licType = params.asc_getLicenseType();
|
var licType = params.asc_getLicenseType();
|
||||||
appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit);
|
||||||
//appOptions.canFillForms = appOptions.canLicense && (permissions.fillForms===true) && (config.mode !== 'view');
|
appOptions.canFillForms = appOptions.canLicense && (permissions.fillForms===true) && (config.mode !== 'view');
|
||||||
appOptions.canSubmitForms = appOptions.canLicense && (typeof (config.customization) == 'object') && !!config.customization.submitForm;
|
appOptions.canSubmitForms = appOptions.canLicense && (typeof (config.customization) == 'object') && !!config.customization.submitForm;
|
||||||
|
|
||||||
//api.asc_setViewMode(!appOptions.canFillForms);
|
//api.asc_setViewMode(!appOptions.canFillForms);
|
||||||
//api.asc_setViewMode(false);
|
|
||||||
/*if (appOptions.canFillForms) {*/
|
|
||||||
|
|
||||||
//api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms);
|
//api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms);
|
||||||
//api.asc_SetFastCollaborative(true);
|
api.asc_SetFastCollaborative(true);
|
||||||
api.asc_setAutoSaveGap(1);
|
api.asc_setAutoSaveGap(1);
|
||||||
/*}*/
|
|
||||||
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
||||||
|
|
||||||
api.asc_LoadDocument();
|
api.asc_LoadDocument();
|
||||||
|
@ -203,12 +199,13 @@ DE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function onError(id, level, errData) {
|
function onError(id, level, errData) {
|
||||||
if (id == Asc.c_oAscError.ID.LoadingScriptError) {
|
if (id == Asc.c_oAscError.ID.LoadingScriptError) {
|
||||||
$('#id-critical-error-title').text(me.criticalErrorTitle);
|
/*$('#id-critical-error-title').text(me.criticalErrorTitle);
|
||||||
$('#id-critical-error-message').text(me.scriptLoadError);
|
$('#id-critical-error-message').text(me.scriptLoadError);
|
||||||
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
$('#id-critical-error-dialog').css('z-index', 20002).modal('show');
|
$('#id-critical-error-dialog').css('z-index', 20002).modal('show');*/
|
||||||
|
console.error(me.criticalErrorTitle,me.scriptLoadError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,8 +254,8 @@ DE.ApplicationController = new(function(){
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.Submit:
|
case Asc.c_oAscError.ID.Submit:
|
||||||
message = me.errorSubmit;
|
message = me.errorSubmit;
|
||||||
_submitFail = true;
|
/*_submitFail = true;
|
||||||
$submitedTooltip && $submitedTooltip.hide();
|
$submitedTooltip && $submitedTooltip.hide();*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscError.ID.EditingError:
|
case Asc.c_oAscError.ID.EditingError:
|
||||||
|
@ -284,24 +281,24 @@ DE.ApplicationController = new(function(){
|
||||||
// report only critical errors
|
// report only critical errors
|
||||||
//Common.Gateway.reportError(id, message);
|
//Common.Gateway.reportError(id, message);
|
||||||
console.error(id,message);
|
console.error(id,message);
|
||||||
$('#id-critical-error-title').text(me.criticalErrorTitle);
|
/*$('#id-critical-error-title').text(me.criticalErrorTitle);
|
||||||
$('#id-critical-error-message').html(message);
|
$('#id-critical-error-message').html(message);
|
||||||
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//Common.Gateway.reportWarning(id, message);
|
//Common.Gateway.reportWarning(id, message);
|
||||||
console.warn(id, message);
|
console.warn(id, message);
|
||||||
|
|
||||||
$('#id-critical-error-title').text(me.notcriticalErrorTitle);
|
/*$('#id-critical-error-title').text(me.notcriticalErrorTitle);
|
||||||
$('#id-critical-error-message').html(message);
|
$('#id-critical-error-message').html(message);
|
||||||
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
$('#id-critical-error-close').text(me.txtClose).off().on('click', function(){
|
||||||
$('#id-critical-error-dialog').modal('hide');
|
$('#id-critical-error-dialog').modal('hide');
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#id-critical-error-dialog').modal('show');
|
//$('#id-critical-error-dialog').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onExternalMessage(error) {
|
function onExternalMessage(error) {
|
||||||
|
|
|
@ -1 +1,25 @@
|
||||||
{}
|
{
|
||||||
|
"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."
|
||||||
|
}
|
|
@ -35,27 +35,17 @@ PE.ApplicationController = new(function(){
|
||||||
api,
|
api,
|
||||||
config = {},
|
config = {},
|
||||||
docConfig = {},
|
docConfig = {},
|
||||||
embedConfig = {},
|
|
||||||
permissions = {},
|
permissions = {},
|
||||||
maxPages = 0,
|
created = false;
|
||||||
created = false,
|
|
||||||
currentPage = 0,
|
|
||||||
ttOffset = [0, -10],
|
|
||||||
labelDocName;
|
|
||||||
|
|
||||||
var LoadingDocument = -256;
|
var LoadingDocument = -256;
|
||||||
|
|
||||||
// Initialize analytics
|
|
||||||
// -------------------------
|
|
||||||
|
|
||||||
// Common.Analytics.initialize('UA-12442749-13', 'Embedded Presentation Editor');
|
|
||||||
|
|
||||||
|
|
||||||
// Check browser
|
// Check browser
|
||||||
// -------------------------
|
// -------------------------
|
||||||
|
|
||||||
if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){
|
if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){
|
||||||
Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
//Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
||||||
|
console.error(this.unsupportedBrowserErrorText);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,12 +58,6 @@ PE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function loadConfig(data) {
|
function loadConfig(data) {
|
||||||
config = $.extend(config, data.config);
|
config = $.extend(config, data.config);
|
||||||
embedConfig = $.extend(embedConfig, data.config.embedded);
|
|
||||||
|
|
||||||
//common.controller.modals.init(embedConfig);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback &&
|
config.canBackToFolder = (config.canBackToFolder!==false) && config.customization && config.customization.goback &&
|
||||||
(config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose);
|
(config.customization.goback.url || config.customization.goback.requestClose && config.canRequestClose);
|
||||||
}
|
}
|
||||||
|
@ -111,28 +95,23 @@ PE.ApplicationController = new(function(){
|
||||||
docInfo.put_Permissions(_permissions);
|
docInfo.put_Permissions(_permissions);
|
||||||
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
docInfo.put_EncryptedInfo(config.encryptionKeys);
|
||||||
|
|
||||||
var enable = !config.customization || (config.customization.macros!==false);
|
docInfo.asc_putIsEnabledMacroses(false);
|
||||||
|
docInfo.asc_putIsEnabledPlugins(false);
|
||||||
|
/* var enable = !config.customization || (config.customization.macros!==false);
|
||||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||||
enable = !config.customization || (config.customization.plugins!==false);
|
enable = !config.customization || (config.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
docInfo.asc_putIsEnabledPlugins(!!enable);*/
|
||||||
|
|
||||||
if (api) {
|
if (api) {
|
||||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
//api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||||
api.asc_setDocInfo(docInfo);
|
api.asc_setDocInfo(docInfo);
|
||||||
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
api.asc_getEditorPermissions(config.licenseUrl, config.customerId);
|
||||||
api.asc_enableKeyEvents(true);
|
api.asc_enableKeyEvents(true);
|
||||||
|
|
||||||
//Common.Analytics.trackEvent('Load', 'Start');
|
|
||||||
}
|
|
||||||
|
|
||||||
embedConfig.docTitle = docConfig.title;
|
|
||||||
//labelDocName = $('#title-doc-name');
|
|
||||||
//labelDocName.text(embedConfig.docTitle || '')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function onLongActionBegin(type, id) {
|
function onLongActionBegin(type, id) {
|
||||||
var text = '';
|
var text = '';
|
||||||
|
@ -184,11 +163,8 @@ PE.ApplicationController = new(function(){
|
||||||
hidePreloader();
|
hidePreloader();
|
||||||
onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
//api.asc_registerCallback('asc_onPrint', onPrint);
|
||||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||||
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
||||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||||
|
@ -201,12 +177,6 @@ PE.ApplicationController = new(function(){
|
||||||
Common.Gateway.on('downloadas', onDownloadAs);
|
Common.Gateway.on('downloadas', onDownloadAs);
|
||||||
Common.Gateway.on('requestclose', onRequestClose);
|
Common.Gateway.on('requestclose', onRequestClose);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#editor_sdk').on('click', function(e) {
|
$('#editor_sdk').on('click', function(e) {
|
||||||
if ( e.target.localName == 'canvas' ) {
|
if ( e.target.localName == 'canvas' ) {
|
||||||
e.currentTarget.focus();
|
e.currentTarget.focus();
|
||||||
|
@ -216,8 +186,6 @@ PE.ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEditorPermissions(params) {
|
function onEditorPermissions(params) {
|
||||||
|
|
||||||
|
|
||||||
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
|
||||||
api.asc_setViewMode(false);
|
api.asc_setViewMode(false);
|
||||||
|
|
||||||
|
@ -230,21 +198,21 @@ PE.ApplicationController = new(function(){
|
||||||
me.loadMask && me.loadMask.setTitle(me.textLoadingDocument + ': ' + common.utils.fixedDigits(Math.min(Math.round(proc*100), 100), 3, " ") + '%');
|
me.loadMask && me.loadMask.setTitle(me.textLoadingDocument + ': ' + common.utils.fixedDigits(Math.min(Math.round(proc*100), 100), 3, " ") + '%');
|
||||||
}
|
}
|
||||||
|
|
||||||
var isplaymode;
|
/* var isplaymode;
|
||||||
function onPlayStart(e) {
|
function onPlayStart(e) {
|
||||||
/*if ( !isplaymode ) {
|
if ( !isplaymode ) {
|
||||||
$('#box-preview').show();
|
$('#box-preview').show();
|
||||||
api.StartDemonstration('id-preview', currentPage);
|
api.StartDemonstration('id-preview', currentPage);
|
||||||
} else {
|
} else {
|
||||||
isplaymode == 'play' ?
|
isplaymode == 'play' ?
|
||||||
api.DemonstrationPause() : api.DemonstrationPlay();
|
api.DemonstrationPause() : api.DemonstrationPlay();
|
||||||
}*/
|
|
||||||
|
|
||||||
/*isplaymode != 'play' ? ($('#btn-play button').addClass('pause'), isplaymode = 'play') :
|
|
||||||
($('#btn-play button').removeClass('pause'), isplaymode = 'pause');*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*function onPlayStop() {
|
isplaymode != 'play' ? ($('#btn-play button').addClass('pause'), isplaymode = 'play') :
|
||||||
|
($('#btn-play button').removeClass('pause'), isplaymode = 'pause');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPlayStop() {
|
||||||
isplaymode = undefined;
|
isplaymode = undefined;
|
||||||
$('#page-number').val(currentPage + 1);
|
$('#page-number').val(currentPage + 1);
|
||||||
//$('#btn-play button').removeClass('pause');
|
//$('#btn-play button').removeClass('pause');
|
||||||
|
@ -459,7 +427,6 @@ PE.ApplicationController = new(function(){
|
||||||
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.',
|
||||||
errorUserDrop: 'The file cannot be accessed right now.',
|
errorUserDrop: 'The file cannot be accessed right now.',
|
||||||
unsupportedBrowserErrorText: 'Your browser is not supported.',
|
unsupportedBrowserErrorText: 'Your browser is not supported.',
|
||||||
textOf: 'of',
|
|
||||||
downloadTextText: 'Downloading presentation...',
|
downloadTextText: 'Downloading presentation...',
|
||||||
waitText: 'Please, wait...',
|
waitText: 'Please, wait...',
|
||||||
textLoadingDocument: 'Loading presentation',
|
textLoadingDocument: 'Loading presentation',
|
||||||
|
|
|
@ -1 +1,24 @@
|
||||||
{}
|
{
|
||||||
|
"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."
|
||||||
|
}
|
|
@ -42,8 +42,7 @@ SSE.ApplicationController = new(function(){
|
||||||
iframePrint = null;
|
iframePrint = null;
|
||||||
var $ttEl,
|
var $ttEl,
|
||||||
$tooltip,
|
$tooltip,
|
||||||
ttOffset = [6, -15],
|
ttOffset = [6, -15];
|
||||||
labelDocName;
|
|
||||||
|
|
||||||
var LoadingDocument = -256;
|
var LoadingDocument = -256;
|
||||||
|
|
||||||
|
@ -58,6 +57,7 @@ SSE.ApplicationController = new(function(){
|
||||||
|
|
||||||
if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){
|
if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){
|
||||||
Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
||||||
|
console.error( this.unsupportedBrowserErrorText);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,10 +124,12 @@ SSE.ApplicationController = new(function(){
|
||||||
docInfo.put_Lang(config.lang);
|
docInfo.put_Lang(config.lang);
|
||||||
docInfo.put_Mode(config.mode);
|
docInfo.put_Mode(config.mode);
|
||||||
|
|
||||||
var enable = !config.customization || (config.customization.macros!==false);
|
docInfo.asc_putIsEnabledMacroses(false);
|
||||||
|
docInfo.asc_putIsEnabledPlugins(false);
|
||||||
|
/*var enable = !config.customization || (config.customization.macros!==false);
|
||||||
docInfo.asc_putIsEnabledMacroses(!!enable);
|
docInfo.asc_putIsEnabledMacroses(!!enable);
|
||||||
enable = !config.customization || (config.customization.plugins!==false);
|
enable = !config.customization || (config.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
docInfo.asc_putIsEnabledPlugins(!!enable);*/
|
||||||
|
|
||||||
if (api) {
|
if (api) {
|
||||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||||
|
@ -189,7 +191,7 @@ SSE.ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
//common.utils.dialogPrint(url, api);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
@ -203,7 +205,7 @@ SSE.ApplicationController = new(function(){
|
||||||
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
||||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||||
//api.asc_registerCallback('asc_onPrint', onPrint);
|
//api.asc_registerCallback('asc_onPrint', onPrint);
|
||||||
//api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||||
|
|
||||||
Common.Gateway.on('processmouse', onProcessMouse);
|
Common.Gateway.on('processmouse', onProcessMouse);
|
||||||
|
@ -435,7 +437,8 @@ SSE.ApplicationController = new(function(){
|
||||||
|
|
||||||
function onDownloadAs() {
|
function onDownloadAs() {
|
||||||
if ( permissions.download === false) {
|
if ( permissions.download === false) {
|
||||||
Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
//Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||||
|
console.error(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true));
|
||||||
|
|
|
@ -1 +1,25 @@
|
||||||
{}
|
{
|
||||||
|
"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."
|
||||||
|
}
|
|
@ -70,28 +70,18 @@ common.controller.CellEditor = new(function(){
|
||||||
api.isCEditorFocused = true;
|
api.isCEditorFocused = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function events() {
|
|
||||||
editor.$el.find('#ce-cell-name').on( 'keyup', onCellName);
|
|
||||||
editor.$el.find('textarea#ce-cell-content').on( 'keyup', onKeyupCellEditor);
|
|
||||||
editor.$el.find('textarea#ce-cell-content').on('blur', onBlurCellEditor);
|
|
||||||
}
|
|
||||||
|
|
||||||
function createController() {
|
|
||||||
me = this;
|
|
||||||
if (created)
|
|
||||||
return me;
|
|
||||||
|
|
||||||
created = true;
|
|
||||||
onLaunch();
|
|
||||||
return me;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onLayoutResize(o, r) {
|
function onLayoutResize(o, r) {
|
||||||
if (r == 'cell:edit') {
|
if (r == 'cell:edit') {
|
||||||
o && common.localStorage.setBool('sse-celleditor-expand', false);
|
o && common.localStorage.setBool('sse-celleditor-expand', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function events() {
|
||||||
|
editor.$el.find('#ce-cell-name').on( 'keyup', onCellName);
|
||||||
|
editor.$el.find('textarea#ce-cell-content').on( 'keyup', onKeyupCellEditor);
|
||||||
|
editor.$el.find('textarea#ce-cell-content').on('blur', onBlurCellEditor);
|
||||||
|
}
|
||||||
|
|
||||||
function onLaunch(){
|
function onLaunch(){
|
||||||
common.view.CellEditor.create();
|
common.view.CellEditor.create();
|
||||||
editor = common.view.CellEditor;
|
editor = common.view.CellEditor;
|
||||||
|
@ -108,6 +98,15 @@ common.controller.CellEditor = new(function(){
|
||||||
this.namedrange_locked = false;
|
this.namedrange_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createController() {
|
||||||
|
me = this;
|
||||||
|
if (created) return me;
|
||||||
|
|
||||||
|
created = true;
|
||||||
|
onLaunch();
|
||||||
|
return me;
|
||||||
|
}
|
||||||
|
|
||||||
function onApiCellSelection(info){
|
function onApiCellSelection(info){
|
||||||
editor.cell.updateInfo(info);
|
editor.cell.updateInfo(info);
|
||||||
}
|
}
|
||||||
|
@ -131,16 +130,6 @@ common.controller.CellEditor = new(function(){
|
||||||
this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
|
this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onInputKeyDown(e) {
|
|
||||||
/*if (common.ui.Keys.UP === e.keyCode || common.ui.Keys.DOWN === e.keyCode ||
|
|
||||||
common.ui.Keys.TAB === e.keyCode || common.ui.Keys.RETURN === e.keyCode || common.ui.Keys.ESC === e.keyCode ||
|
|
||||||
common.ui.Keys.LEFT === e.keyCode || common.ui.Keys.RIGHT === e.keyCode) {
|
|
||||||
var menu = $('#menu-formula-selection'); // for formula menu
|
|
||||||
if (menu.hasClass('open'))
|
|
||||||
menu.find('.dropdown-menu').trigger('keydown', e);
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
function onApiDisconnect() {
|
function onApiDisconnect() {
|
||||||
mode.isEdit = false;
|
mode.isEdit = false;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +142,6 @@ common.controller.CellEditor = new(function(){
|
||||||
api.asc_registerCallback('asc_onEditCell', onApiEditCell);
|
api.asc_registerCallback('asc_onEditCell', onApiEditCell);
|
||||||
api.asc_registerCallback('asc_onCoAuthoringDisconnect', onApiDisconnect);
|
api.asc_registerCallback('asc_onCoAuthoringDisconnect', onApiDisconnect);
|
||||||
api.asc_registerCallback('asc_onLockDefNameManager', onLockDefNameManager);
|
api.asc_registerCallback('asc_onLockDefNameManager', onLockDefNameManager);
|
||||||
api.asc_registerCallback('asc_onInputKeyDown', onInputKeyDown);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onApiSelectionChanged(info) {
|
function onApiSelectionChanged(info) {
|
||||||
|
|
|
@ -52,15 +52,17 @@ common.view.CellEditor = new(function (){
|
||||||
txt.scrollLeft = txt.scrollWidth;
|
txt.scrollLeft = txt.scrollWidth;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCellInfo(info) {
|
function updateCellInfo(info) {
|
||||||
if (info) {
|
if (info) {
|
||||||
me.$cellname.val(typeof(info)=='string' ? info : info.asc_getName());
|
me.$cellname.val(typeof(info)=='string' ? info : info.asc_getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cellNameDisabled(disabled){
|
function cellNameDisabled(disabled){
|
||||||
(disabled) ? me.$cellname.attr('disabled', 'disabled') : me.$cellname.removeAttr('disabled');
|
(disabled) ? me.$cellname.attr('disabled', 'disabled') : me.$cellname.removeAttr('disabled');
|
||||||
//this.btnNamedRanges.setDisabled(disabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
create: createView,
|
create: createView,
|
||||||
cell: {
|
cell: {
|
||||||
|
|
Loading…
Reference in a new issue