diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index 363e5bf26..0ece3593a 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -1069,6 +1069,7 @@ define([
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
me.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
+ me.api.asc_registerCallback('asc_onConvertEquationToMath', _.bind(me.onConvertEquationToMath, me));
/** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
@@ -1936,6 +1937,30 @@ define([
}
},
+ onConvertEquationToMath: function(equation) {
+ var me = this,
+ win;
+ var msg = this.textConvertEquation + '
' + this.textLearnMore + '';
+ win = Common.UI.warning({
+ width: 500,
+ msg: msg,
+ buttons: ['yes', 'cancel'],
+ primary: 'yes',
+ dontshow: true,
+ textDontShow: this.textApplyAll,
+ callback: _.bind(function(btn, dontshow){
+ if (btn == 'yes') {
+ this.api.asc_ConvertEquationToMath(equation, dontshow);
+ }
+ this.onEditComplete();
+ }, this)
+ });
+ win.$window.find('#id-equation-convert-help').on('click', function (e) {
+ win && win.close();
+ me.getApplication().getController('LeftMenu').getView('LeftMenu').showMenu('file:help', 'UsageInstructions\/InsertEquation.htm#convertequation');
+ })
+ },
+
// Translation
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
@@ -2289,7 +2314,10 @@ define([
errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.',
errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
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.',
textHasMacros: 'The file contains automatic macros.
Do you want to run macros?',
- textRemember: 'Remember my choice'
+ textRemember: 'Remember my choice',
+ textConvertEquation: 'This equation was created with an old version of equation editor which is no longer supported. Converting this equation to Office Math ML format will make it editable.
Do you want to convert this equation?',
+ textApplyAll: 'Apply to all equations',
+ textLearnMore: 'Learn More'
}
})(), PE.Controllers.Main || {}))
});
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 20b959388..847fd0df0 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -637,6 +637,9 @@
"PE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact your administrator to learn more.",
"PE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "PE.Controllers.Main.textConvertEquation": "This equation was created with an old version of the equation editor which is no longer supported. To edit it, convert the equation to the Office Math ML format.
Convert now?",
+ "PE.Controllers.Main.textLearnMore": "Learn More",
+ "PE.Controllers.Main.textApplyAll": "Apply to all equations",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.
The text style will be displayed using one of the system fonts, the saved font will be used when it is available.
Do you want to continue?",
"PE.Controllers.Toolbar.textAccent": "Accents",
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index 7f02a4144..ca581e308 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -1168,6 +1168,7 @@ define([
/** coauthoring begin **/
me.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
me.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(me.onAuthParticipantsChanged, me));
+ me.api.asc_registerCallback('asc_onConvertEquationToMath', _.bind(me.onConvertEquationToMath, me));
/** coauthoring end **/
if (me.appOptions.isEditDiagram)
me.api.asc_registerCallback('asc_onSelectionChanged', _.bind(me.onSelectionChanged, me));
@@ -2251,6 +2252,30 @@ define([
}
},
+ onConvertEquationToMath: function(equation) {
+ var me = this,
+ win;
+ var msg = this.textConvertEquation + '
' + this.textLearnMore + '';
+ win = Common.UI.warning({
+ width: 500,
+ msg: msg,
+ buttons: ['yes', 'cancel'],
+ primary: 'yes',
+ dontshow: true,
+ textDontShow: this.textApplyAll,
+ callback: _.bind(function(btn, dontshow){
+ if (btn == 'yes') {
+ this.api.asc_ConvertEquationToMath(equation, dontshow);
+ }
+ this.onEditComplete();
+ }, this)
+ });
+ win.$window.find('#id-equation-convert-help').on('click', function (e) {
+ win && win.close();
+ me.getApplication().getController('LeftMenu').getView('LeftMenu').showMenu('file:help', 'UsageInstructions\/InsertEquation.htm#convertequation');
+ })
+ },
+
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning',
@@ -2624,7 +2649,10 @@ define([
textRemember: 'Remember my choice',
errorPasteSlicerError: 'Table slicers cannot be copied from one workbook to another.
Try again by selecting the entire table and the slicers.',
errorFrmlMaxLength: 'You cannot add this formula as its length exceeded the allowed number of characters.
Please edit it and try again.',
- errorFrmlMaxReference: 'You cannot enter this formula because it has too many values,
cell references, and/or names.'
+ errorFrmlMaxReference: 'You cannot enter this formula because it has too many values,
cell references, and/or names.',
+ textConvertEquation: 'This equation was created with an old version of equation editor which is no longer supported. Converting this equation to Office Math ML format will make it editable.
Do you want to convert this equation?',
+ textApplyAll: 'Apply to all equations',
+ textLearnMore: 'Learn More'
}
})(), SSE.Controllers.Main || {}))
});
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index eea01955a..981d27e1d 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -832,6 +832,9 @@
"SSE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact your administrator to learn more.",
"SSE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "SSE.Controllers.Main.textConvertEquation": "This equation was created with an old version of the equation editor which is no longer supported. To edit it, convert the equation to the Office Math ML format.
Convert now?",
+ "SSE.Controllers.Main.textLearnMore": "Learn More",
+ "SSE.Controllers.Main.textApplyAll": "Apply to all equations",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textFirstCol": "First column",
"SSE.Controllers.Print.textFirstRow": "First row",