diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js
index c50b29815..f08120938 100644
--- a/apps/documenteditor/mobile/app/controller/Main.js
+++ b/apps/documenteditor/mobile/app/controller/Main.js
@@ -649,6 +649,7 @@ define([
me.appOptions.isOffline = me.api.asc_isOffline();
me.appOptions.isReviewOnly = (me.permissions.review === true) && (me.permissions.edit === false);
me.appOptions.canRequestEditRights = me.editorConfig.canRequestEditRights;
+ me.appOptions.canRequestClose = me.editorConfig.canRequestClose;
me.appOptions.canEdit = (me.permissions.edit !== false || me.permissions.review === true) && // can edit or review
(me.editorConfig.canRequestEditRights || me.editorConfig.mode !== 'view') && // if mode=="view" -> canRequestEditRights must be defined
(!me.appOptions.isReviewOnly || me.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true
@@ -1092,25 +1093,33 @@ define([
me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
+ var buttons = [{
+ text: 'OK',
+ bold: true,
+ onClick: function () {
+ var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
+ me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
+
+ if (!me._isDocReady) {
+ me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ }
+ me._state.openDlg = null;
+ }
+ }];
+ if (me.appOptions.canRequestClose)
+ buttons.push({
+ text: me.closeButtonText,
+ onClick: function () {
+ Common.Gateway.requestClose();
+ me._state.openDlg = null;
+ }
+ });
+
me._state.openDlg = uiApp.modal({
title: me.advDRMOptions,
text: me.txtProtected,
afterText: '
',
- buttons: [
- {
- text: 'OK',
- bold: true,
- onClick: function () {
- var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
- me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
-
- if (!me._isDocReady) {
- me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
- }
- me._state.openDlg = null;
- }
- }
- ]
+ buttons: buttons
});
// Vertical align
@@ -1294,7 +1303,8 @@ define([
txtHeader: "Header",
txtFooter: "Footer",
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users. If you need more please consider upgrading your current license or purchasing a commercial one.',
- txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset'
+ txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset',
+ closeButtonText: 'Close File'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json
index 01490ed44..0d675ee08 100644
--- a/apps/documenteditor/mobile/locale/en.json
+++ b/apps/documenteditor/mobile/locale/en.json
@@ -153,6 +153,7 @@
"DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server. If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users. If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "DE.Controllers.Main.closeButtonText": "Close File",
"DE.Controllers.Search.textNoTextFound": "Text not Found",
"DE.Controllers.Search.textReplaceAll": "Replace All",
"DE.Controllers.Settings.notcriticalErrorTitle": "Warning",
diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js
index fd1ac443b..f43f7d1cd 100644
--- a/apps/presentationeditor/mobile/app/controller/Main.js
+++ b/apps/presentationeditor/mobile/app/controller/Main.js
@@ -603,6 +603,7 @@ define([
me.appOptions.isOffline = me.api.asc_isOffline();
me.appOptions.isReviewOnly = (me.permissions.review === true) && (me.permissions.edit === false);
me.appOptions.canRequestEditRights = me.editorConfig.canRequestEditRights;
+ me.appOptions.canRequestClose = me.editorConfig.canRequestClose;
me.appOptions.canEdit = (me.permissions.edit !== false || me.permissions.review === true) && // can edit or review
(me.editorConfig.canRequestEditRights || me.editorConfig.mode !== 'view') && // if mode=="view" -> canRequestEditRights must be defined
(!me.appOptions.isReviewOnly || me.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true
@@ -1035,25 +1036,33 @@ define([
me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
+ var buttons = [{
+ text: 'OK',
+ bold: true,
+ onClick: function () {
+ var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
+ me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
+
+ if (!me._isDocReady) {
+ me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ }
+ me._state.openDlg = null;
+ }
+ }];
+ if (me.appOptions.canRequestClose)
+ buttons.push({
+ text: me.closeButtonText,
+ onClick: function () {
+ Common.Gateway.requestClose();
+ me._state.openDlg = null;
+ }
+ });
+
me._state.openDlg = uiApp.modal({
title: me.advDRMOptions,
text: me.txtProtected,
afterText: '',
- buttons: [
- {
- text: 'OK',
- bold: true,
- onClick: function () {
- var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
- me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
-
- if (!me._isDocReady) {
- me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
- }
- me._state.openDlg = null;
- }
- }
- ]
+ buttons: buttons
});
// Vertical align
@@ -1286,7 +1295,8 @@ define([
txtSlideSubtitle: 'Slide subtitle',
txtSlideTitle: 'Slide title',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users. If you need more please consider upgrading your current license or purchasing a commercial one.',
- txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset'
+ txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset',
+ closeButtonText: 'Close File'
}
})(), PE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json
index 1b455190c..d787522bc 100644
--- a/apps/presentationeditor/mobile/locale/en.json
+++ b/apps/presentationeditor/mobile/locale/en.json
@@ -207,6 +207,7 @@
"PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server. If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users. If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "PE.Controllers.Main.closeButtonText": "Close File",
"PE.Controllers.Search.textNoTextFound": "Text not Found",
"PE.Controllers.Settings.notcriticalErrorTitle": "Warning",
"PE.Controllers.Settings.txtLoading": "Loading...",
diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js
index 2c3769b0b..a1a81924a 100644
--- a/apps/spreadsheeteditor/mobile/app/controller/Main.js
+++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js
@@ -635,6 +635,7 @@ define([
}
me.appOptions.canRequestEditRights = me.editorConfig.canRequestEditRights;
+ me.appOptions.canRequestClose = me.editorConfig.canRequestClose;
me.appOptions.canEdit = me.permissions.edit !== false && // can edit
(me.editorConfig.canRequestEditRights || me.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined
me.appOptions.isEdit = (me.appOptions.canLicense || me.appOptions.isEditDiagram || me.appOptions.isEditMailMerge) && me.permissions.edit !== false && me.editorConfig.mode !== 'view';
@@ -1208,25 +1209,33 @@ define([
me.onLongActionEnd(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
+ var buttons = [{
+ text: 'OK',
+ bold: true,
+ onClick: function () {
+ var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
+ me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
+
+ if (!me._isDocReady) {
+ me.onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument);
+ }
+ me._state.openDlg = null;
+ }
+ }];
+ if (me.appOptions.canRequestClose)
+ buttons.push({
+ text: me.closeButtonText,
+ onClick: function () {
+ Common.Gateway.requestClose();
+ me._state.openDlg = null;
+ }
+ });
+
me._state.openDlg = uiApp.modal({
title: me.advDRMOptions,
text: me.txtProtected,
afterText: '',
- buttons: [
- {
- text: 'OK',
- bold: true,
- onClick: function () {
- var password = $(me._state.openDlg).find('.modal-text-input[name="modal-password"]').val();
- me.api.asc_setAdvancedOptions(type, new Asc.asc_CDRMAdvancedOptions(password));
-
- if (!me._isDocReady) {
- me.onLongActionBegin(Asc.c_oAscAsyncActionType.BlockInteraction, LoadingDocument);
- }
- me._state.openDlg = null;
- }
- }
- ]
+ buttons: buttons
});
// Vertical align
@@ -1469,7 +1478,8 @@ define([
errorOpenWarning: 'The length of one of the formulas in the file exceeded the allowed number of characters and it was removed.',
errorFrmlWrongReferences: 'The function refers to a sheet that does not exist. Please check the data and try again.',
errorCopyMultiselectArea: 'This command cannot be used with multiple selections. Select a single range and try again.',
- errorPrintMaxPagesCount: 'Unfortunately, it’s not possible to print more than 1500 pages at once in the current version of the program. This restriction will be eliminated in upcoming releases.'
+ errorPrintMaxPagesCount: 'Unfortunately, it’s not possible to print more than 1500 pages at once in the current version of the program. This restriction will be eliminated in upcoming releases.',
+ closeButtonText: 'Close File'
}
})(), SSE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json
index c24293dca..ca3ffe206 100644
--- a/apps/spreadsheeteditor/mobile/locale/en.json
+++ b/apps/spreadsheeteditor/mobile/locale/en.json
@@ -261,6 +261,7 @@
"SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server. If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users. If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "SSE.Controllers.Main.closeButtonText": "Close File",
"SSE.Controllers.Search.textNoTextFound": "Text not found",
"SSE.Controllers.Search.textReplaceAll": "Replace All",
"SSE.Controllers.Settings.notcriticalErrorTitle": "Warning",