Merge pull request #1322 from ONLYOFFICE/fix/sse-protect
Fix/sse protect
This commit is contained in:
commit
b9c54f5fa6
|
@ -1005,11 +1005,6 @@ define([
|
|||
text = this.applyChangesTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||
title = this.savePreparingText;
|
||||
text = this.savePreparingTitle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
||||
title = this.mailMergeLoadFileText;
|
||||
text = this.mailMergeLoadFileTitle;
|
||||
|
@ -2694,8 +2689,6 @@ define([
|
|||
printTextText: 'Printing document...',
|
||||
uploadImageTitleText: 'Uploading Image',
|
||||
uploadImageTextText: 'Uploading image...',
|
||||
savePreparingText: 'Preparing to save',
|
||||
savePreparingTitle: 'Preparing to save. Please wait...',
|
||||
uploadImageSizeMessage: 'Maximum image size limit exceeded.',
|
||||
uploadImageExtMessage: 'Unknown image format.',
|
||||
uploadImageFileCountMessage: 'No images uploaded.',
|
||||
|
|
|
@ -577,8 +577,8 @@
|
|||
"DE.Controllers.Main.requestEditFailedTitleText": "Access denied",
|
||||
"DE.Controllers.Main.saveErrorText": "An error has occurred while saving the file.",
|
||||
"DE.Controllers.Main.saveErrorTextDesktop": "This file cannot be saved or created.<br>Possible reasons are: <br>1. The file is read-only. <br>2. The file is being edited by other users. <br>3. The disk is full or corrupted.",
|
||||
"DE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"DE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"del_DE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"del_DE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"DE.Controllers.Main.saveTextText": "Saving document...",
|
||||
"DE.Controllers.Main.saveTitleText": "Saving Document",
|
||||
"DE.Controllers.Main.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||
|
|
|
@ -690,11 +690,6 @@ define([
|
|||
text = this.applyChangesTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||
title = this.savePreparingText;
|
||||
text = this.savePreparingTitle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Waiting']:
|
||||
title = this.waitText;
|
||||
text = this.waitText;
|
||||
|
@ -2555,8 +2550,6 @@ define([
|
|||
txtNeedSynchronize: 'You have an updates',
|
||||
applyChangesTitleText: 'Loading Data',
|
||||
applyChangesTextText: 'Loading data...',
|
||||
savePreparingText: 'Preparing to save',
|
||||
savePreparingTitle: 'Preparing to save. Please wait...',
|
||||
loadingDocumentTitleText: 'Loading presentation',
|
||||
loadingDocumentTextText: 'Loading presentation...',
|
||||
warnProcessRightsChange: 'You have been denied the right to edit the file.',
|
||||
|
|
|
@ -446,8 +446,8 @@
|
|||
"PE.Controllers.Main.requestEditFailedTitleText": "Access denied",
|
||||
"PE.Controllers.Main.saveErrorText": "An error has occurred while saving the file.",
|
||||
"PE.Controllers.Main.saveErrorTextDesktop": "This file cannot be saved or created.<br>Possible reasons are: <br>1. The file is read-only. <br>2. The file is being edited by other users. <br>3. The disk is full or corrupted.",
|
||||
"PE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"PE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"del_PE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"del_PE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"PE.Controllers.Main.saveTextText": "Saving presentation...",
|
||||
"PE.Controllers.Main.saveTitleText": "Saving Presentation",
|
||||
"PE.Controllers.Main.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||
|
|
|
@ -754,21 +754,11 @@ define([
|
|||
text = this.uploadImageTextText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction.Recalc:
|
||||
title = this.titleRecalcFormulas;
|
||||
text = this.textRecalcFormulas;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction.SlowOperation:
|
||||
title = this.textPleaseWait;
|
||||
text = this.textPleaseWait;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||
title = this.savePreparingText;
|
||||
text = this.savePreparingTitle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscAsyncAction['Waiting']:
|
||||
title = this.waitText;
|
||||
text = this.waitText;
|
||||
|
@ -2222,7 +2212,12 @@ define([
|
|||
validatePwd: false,
|
||||
handler: function (result, value) {
|
||||
if (me.api && apiCallback) {
|
||||
apiCallback((result == 'ok') ? me.api.asc_checkProtectedRangesPassword(value.drmOptions.asc_getPassword(), data) : false, result !== 'ok');
|
||||
if (result == 'ok') {
|
||||
me.api.asc_checkProtectedRangesPassword(value.drmOptions.asc_getPassword(), data, function(res) {
|
||||
apiCallback(res, false);
|
||||
});
|
||||
} else
|
||||
apiCallback(false, true);
|
||||
}
|
||||
me.onEditComplete(me.application.getController('DocumentHolder').getView('DocumentHolder'));
|
||||
}
|
||||
|
@ -3000,8 +2995,6 @@ define([
|
|||
printTextText: 'Printing document...',
|
||||
uploadImageTitleText: 'Uploading Image',
|
||||
uploadImageTextText: 'Uploading image...',
|
||||
savePreparingText: 'Preparing to save',
|
||||
savePreparingTitle: 'Preparing to save. Please wait...',
|
||||
loadingDocumentTitleText: 'Loading spreadsheet',
|
||||
uploadImageSizeMessage: 'Maximium image size limit exceeded.',
|
||||
uploadImageExtMessage: 'Unknown image format.',
|
||||
|
@ -3016,8 +3009,6 @@ define([
|
|||
warnBrowserZoom: 'Your browser\'s current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.',
|
||||
warnBrowserIE9: 'The application has low capabilities on IE9. Use IE10 or higher',
|
||||
pastInMergeAreaError: 'Cannot change part of a merged cell',
|
||||
titleRecalcFormulas: 'Calculating formulas...',
|
||||
textRecalcFormulas: 'Calculating formulas...',
|
||||
textPleaseWait: 'It\'s working hard. Please wait...',
|
||||
errorWrongBracketsCount: 'Found an error in the formula entered.<br>Wrong cout of brackets.',
|
||||
errorWrongOperator: 'An error in the entered formula. Wrong operator is used.<br>Please correct the error or use the Esc button to cancel the formula editing.',
|
||||
|
|
|
@ -116,6 +116,7 @@ define([
|
|||
},
|
||||
|
||||
onWorkbookClick: function(state) {
|
||||
this.view.btnProtectWB.toggle(!state, true);
|
||||
if (state) {
|
||||
var me = this,
|
||||
btn,
|
||||
|
@ -125,8 +126,7 @@ define([
|
|||
btn = result;
|
||||
if (result == 'ok') {
|
||||
var props = me.api.asc_getProtectedWorkbook();
|
||||
props.asc_setLockStructure(true);
|
||||
value && props.asc_setPassword(value);
|
||||
props.asc_setLockStructure(value);
|
||||
me.api.asc_setProtectedWorkbook(props);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete');
|
||||
|
@ -152,7 +152,7 @@ define([
|
|||
btn = result;
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
props.asc_setLockStructure(false, value);
|
||||
props.asc_setLockStructure(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined);
|
||||
me.api.asc_setProtectedWorkbook(props);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete');
|
||||
|
@ -165,13 +165,14 @@ define([
|
|||
|
||||
win.show();
|
||||
} else {
|
||||
props.asc_setLockStructure(false);
|
||||
props.asc_setLockStructure();
|
||||
me.api.asc_setProtectedWorkbook(props);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onSheetClick: function(state) {
|
||||
this.view.btnProtectSheet.toggle(!state, true);
|
||||
if (state) {
|
||||
var me = this,
|
||||
btn,
|
||||
|
@ -182,8 +183,7 @@ define([
|
|||
handler: function(result, value, props) {
|
||||
btn = result;
|
||||
if (result == 'ok') {
|
||||
props.asc_setSheet(true);
|
||||
value && props.asc_setPassword(value);
|
||||
props.asc_setSheet(value);
|
||||
me.api.asc_setProtectedSheet(props);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete');
|
||||
|
@ -209,7 +209,7 @@ define([
|
|||
btn = result;
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
props.asc_setSheet(false, value);
|
||||
props.asc_setSheet(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined);
|
||||
me.api.asc_setProtectedSheet(props);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete');
|
||||
|
@ -222,7 +222,7 @@ define([
|
|||
|
||||
win.show();
|
||||
} else {
|
||||
props.asc_setSheet(false);
|
||||
props.asc_setSheet();
|
||||
me.api.asc_setProtectedSheet(props);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -740,8 +740,8 @@
|
|||
"SSE.Controllers.Main.requestEditFailedTitleText": "Access denied",
|
||||
"SSE.Controllers.Main.saveErrorText": "An error has occurred while saving the file.",
|
||||
"SSE.Controllers.Main.saveErrorTextDesktop": "This file cannot be saved or created.<br>Possible reasons are: <br>1. The file is read-only. <br>2. The file is being edited by other users. <br>3. The disk is full or corrupted.",
|
||||
"SSE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"SSE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"del_SSE.Controllers.Main.savePreparingText": "Preparing to save",
|
||||
"del_SSE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
|
||||
"SSE.Controllers.Main.saveTextText": "Saving spreadsheet...",
|
||||
"SSE.Controllers.Main.saveTitleText": "Saving Spreadsheet",
|
||||
"SSE.Controllers.Main.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.",
|
||||
|
@ -766,7 +766,7 @@
|
|||
"SSE.Controllers.Main.textNoLicenseTitle": "License limit reached",
|
||||
"SSE.Controllers.Main.textPaidFeature": "Paid feature",
|
||||
"SSE.Controllers.Main.textPleaseWait": "The operation might take more time than expected. Please wait...",
|
||||
"SSE.Controllers.Main.textRecalcFormulas": "Calculating formulas...",
|
||||
"del_SSE.Controllers.Main.textRecalcFormulas": "Calculating formulas...",
|
||||
"SSE.Controllers.Main.textRemember": "Remember my choice for all files",
|
||||
"SSE.Controllers.Main.textRenameError": "User name must not be empty.",
|
||||
"SSE.Controllers.Main.textRenameLabel": "Enter a name to be used for collaboration",
|
||||
|
@ -776,7 +776,7 @@
|
|||
"SSE.Controllers.Main.textTryUndoRedoWarn": "The Undo/Redo functions are disabled for the Fast co-editing mode.",
|
||||
"SSE.Controllers.Main.textYes": "Yes",
|
||||
"SSE.Controllers.Main.titleLicenseExp": "License expired",
|
||||
"SSE.Controllers.Main.titleRecalcFormulas": "Calculating...",
|
||||
"del_SSE.Controllers.Main.titleRecalcFormulas": "Calculating...",
|
||||
"SSE.Controllers.Main.titleServerVersion": "Editor updated",
|
||||
"SSE.Controllers.Main.txtAccent": "Accent",
|
||||
"SSE.Controllers.Main.txtAll": "(All)",
|
||||
|
|
Loading…
Reference in a new issue