Fix opening embedded with jwt

This commit is contained in:
Julia Radzhabova
2024-07-25 22:32:12 +03:00
parent 48bc4fe38e
commit 2780e42e1a
6 changed files with 19 additions and 4 deletions

View File

@ -89,7 +89,6 @@ DE.ApplicationController = new(function(){
ttOffset[1] = 40;
}
config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
@ -832,6 +831,10 @@ DE.ApplicationController = new(function(){
message = me.errorTokenExpire;
break;
case Asc.c_oAscError.ID.VKeyEncrypt:
message= me.errorToken;
break;
case Asc.c_oAscError.ID.ConvertationOpenFormat:
if (errData === 'pdf')
message = me.errorInconsistentExtPdf.replace('%1', docConfig.fileType || '');
@ -1086,6 +1089,7 @@ DE.ApplicationController = new(function(){
warnLicenseBefore: 'License not active. Please contact your administrator.',
warnLicenseExp: 'Your license has expired. Please update your license and refresh the page.',
textConvertFormDownload: 'Download file as a fillable PDF form to be able to fill it out.',
textDownloadPdf: 'Download pdf'
textDownloadPdf: 'Download pdf',
errorToken: 'The document security token is not correctly formed.<br>Please contact your Document Server administrator.'
}
})();

View File

@ -26,6 +26,7 @@
"DE.ApplicationController.errorInconsistentExtXlsx": "An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.",
"DE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
"DE.ApplicationController.errorSubmit": "Submit failed.",
"DE.ApplicationController.errorToken": "The document security token is not correctly formed.<br>Please contact your Document Server administrator.",
"DE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
"DE.ApplicationController.errorUpdateVersionOnDisconnect": "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.errorUserDrop": "The file cannot be accessed right now.",

View File

@ -86,7 +86,6 @@ PE.ApplicationController = new(function(){
$('#box-preview').addClass('top');
}
config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
@ -664,6 +663,10 @@ PE.ApplicationController = new(function(){
message = me.errorTokenExpire;
break;
case Asc.c_oAscError.ID.VKeyEncrypt:
message= me.errorToken;
break;
case Asc.c_oAscError.ID.ConvertationOpenFormat:
if (errData === 'pdf')
message = me.errorInconsistentExtPdf.replace('%1', docConfig.fileType || '');
@ -874,5 +877,6 @@ PE.ApplicationController = new(function(){
warnLicenseBefore: 'License not active. Please contact your administrator.',
warnLicenseExp: 'Your license has expired. Please update your license and refresh the page.',
errorEditingDownloadas: 'An error occurred during the work with the document.<br>Use the \'Download as...\' option to save the file backup copy to your computer hard drive.',
errorToken: 'The document security token is not correctly formed.<br>Please contact your Document Server administrator.'
}
})();

View File

@ -25,6 +25,7 @@
"PE.ApplicationController.errorInconsistentExtPptx": "An error has occurred while opening the file.<br>The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.",
"PE.ApplicationController.errorInconsistentExtXlsx": "An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.",
"PE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
"PE.ApplicationController.errorToken": "The document security token is not correctly formed.<br>Please contact your Document Server administrator.",
"PE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
"PE.ApplicationController.errorUpdateVersionOnDisconnect": "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.errorUserDrop": "The file cannot be accessed right now.",

View File

@ -86,7 +86,6 @@ SSE.ApplicationController = new(function(){
$('.viewer').addClass('top');
}
config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
@ -670,6 +669,10 @@ SSE.ApplicationController = new(function(){
message = me.errorTokenExpire;
break;
case Asc.c_oAscError.ID.VKeyEncrypt:
message= me.errorToken;
break;
case Asc.c_oAscError.ID.ConvertationOpenFormat:
if (errData === 'pdf')
message = me.errorInconsistentExtPdf.replace('%1', docConfig.fileType || '');
@ -918,5 +921,6 @@ SSE.ApplicationController = new(function(){
warnLicenseBefore: 'License not active. Please contact your administrator.',
warnLicenseExp: 'Your license has expired. Please update your license and refresh the page.',
errorEditingDownloadas: 'An error occurred during the work with the document.<br>Use the \'Download as...\' option to save the file backup copy to your computer hard drive.',
errorToken: 'The document security token is not correctly formed.<br>Please contact your Document Server administrator.'
}
})();

View File

@ -25,6 +25,7 @@
"SSE.ApplicationController.errorInconsistentExtPptx": "An error has occurred while opening the file.<br>The file content corresponds to presentations (e.g. pptx), but the file has the inconsistent extension: %1.",
"SSE.ApplicationController.errorInconsistentExtXlsx": "An error has occurred while opening the file.<br>The file content corresponds to spreadsheets (e.g. xlsx), but the file has the inconsistent extension: %1.",
"SSE.ApplicationController.errorLoadingFont": "Fonts are not loaded.<br>Please contact your Document Server administrator.",
"SSE.ApplicationController.errorToken": "The document security token is not correctly formed.<br>Please contact your Document Server administrator.",
"SSE.ApplicationController.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
"SSE.ApplicationController.errorUpdateVersionOnDisconnect": "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.errorUserDrop": "The file cannot be accessed right now.",