diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js
index 3395df3da..921b52e72 100644
--- a/apps/documenteditor/main/app/controller/LeftMenu.js
+++ b/apps/documenteditor/main/app/controller/LeftMenu.js
@@ -307,6 +307,28 @@ define([
}
}, this)
});
+ } else if (format == Asc.c_oAscFileType.DOCX) {
+ if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") /* && this.api.checkCompatibility()*/) {
+ Common.UI.warning({
+ closable: false,
+ width: 600,
+ title: this.notcriticalErrorTitle,
+ msg: this.txtCompatible,
+ buttons: ['ok', 'cancel'],
+ dontshow: true,
+ callback: _.bind(function(btn, dontshow){
+ if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
+ if (btn == 'ok') {
+ this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
+ menu.hide();
+ }
+ }, this)
+ });
+ } else {
+ var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX);
+ // opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
+ this.api.asc_DownloadAs(opts);
+ }
} else {
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
menu.hide();
@@ -331,6 +353,30 @@ define([
}
}, this)
});
+ } else if (format == Asc.c_oAscFileType.DOCX) {
+ if (!Common.Utils.InternalSettings.get("de-settings-compatible") && !Common.localStorage.getBool("de-hide-save-compatible") /* && this.api.checkCompatibility()*/) {
+ Common.UI.warning({
+ closable: false,
+ width: 600,
+ title: this.notcriticalErrorTitle,
+ msg: this.txtCompatible,
+ buttons: ['ok', 'cancel'],
+ dontshow: true,
+ callback: _.bind(function(btn, dontshow){
+ if (dontshow) Common.localStorage.setItem("de-hide-save-compatible", 1);
+ if (btn == 'ok') {
+ this.isFromFileDownloadAs = ext;
+ this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
+ menu.hide();
+ }
+ }, this)
+ });
+ } else {
+ this.isFromFileDownloadAs = ext;
+ var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, true);
+ // opts.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible"));
+ this.api.asc_DownloadAs(opts);
+ }
} else {
this.isFromFileDownloadAs = ext;
this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format, true));
@@ -822,6 +868,8 @@ define([
leavePageText: 'All unsaved changes in this document will be lost.
Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.',
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.
Are you sure you want to continue?',
warnDownloadAsRTF : 'If you continue saving in this format some of the formatting might be lost.
Are you sure you want to continue?',
- txtUntitled: 'Untitled'
+ txtUntitled: 'Untitled',
+ txtCompatible: 'The document will be saved to the new format. It will allow to use all the editor features, but might affect the document layout.
Use the \'Compatibility\' option of the advanced settings if you want to make the files compatible with older MS Word versions.'
+
}, DE.Controllers.LeftMenu || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 156643c26..ba5ab5465 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -890,6 +890,9 @@ define([
Common.Utils.InternalSettings.set("de-settings-spellcheck", value);
me.api.asc_setSpellCheck(value);
+ value = Common.localStorage.getBool("de-settings-compatible", false);
+ Common.Utils.InternalSettings.set("de-settings-compatible", value);
+
Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines());
function checkWarns() {
@@ -2002,7 +2005,7 @@ define([
},
onTryUndoInFastCollaborative: function() {
- if (!window.localStorage.getBool("de-hide-try-undoredo"))
+ if (!Common.localStorage.getBool("de-hide-try-undoredo"))
Common.UI.info({
width: 500,
msg: this.textTryUndoRedo,
@@ -2012,7 +2015,7 @@ define([
customButtonText: this.textStrict,
dontshow: true,
callback: _.bind(function(btn, dontshow){
- if (dontshow) window.localStorage.setItem("de-hide-try-undoredo", 1);
+ if (dontshow) Common.localStorage.setItem("de-hide-try-undoredo", 1);
if (btn == 'custom') {
Common.localStorage.setItem("de-settings-coauthmode", 0);
Common.Utils.InternalSettings.set("de-settings-coauthmode", false);
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index a32be4c16..fbb208dd0 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -198,6 +198,10 @@ define([
'