[DE] Fix Bug 44511

This commit is contained in:
Julia Radzhabova 2020-03-25 16:07:23 +03:00
parent 1a88f7698b
commit 4d6f4c3354
3 changed files with 38 additions and 6 deletions

View file

@ -493,7 +493,7 @@ define([
footer.find('.dlg-btn').on('click', onBtnClick); footer.find('.dlg-btn').on('click', onBtnClick);
chDontShow = new Common.UI.CheckBox({ chDontShow = new Common.UI.CheckBox({
el: win.$window.find('.dont-show-checkbox'), el: win.$window.find('.dont-show-checkbox'),
labelText: win.textDontShow labelText: options.textDontShow || win.textDontShow
}); });
autoSize(obj); autoSize(obj);
}, },
@ -506,13 +506,14 @@ define([
}); });
win.show(); win.show();
return win;
}; };
Common.UI.error = function(options) { Common.UI.error = function(options) {
options = options || {}; options = options || {};
!options.title && (options.title = this.Window.prototype.textError); !options.title && (options.title = this.Window.prototype.textError);
Common.UI.alert( return Common.UI.alert(
_.extend(options, { _.extend(options, {
iconCls: 'error' iconCls: 'error'
}) })
@ -523,7 +524,7 @@ define([
options = options || {}; options = options || {};
!options.title && (options.title = this.Window.prototype.textConfirmation); !options.title && (options.title = this.Window.prototype.textConfirmation);
Common.UI.alert( return Common.UI.alert(
_.extend(options, { _.extend(options, {
iconCls: 'confirm' iconCls: 'confirm'
}) })
@ -534,7 +535,7 @@ define([
options = options || {}; options = options || {};
!options.title && (options.title = this.Window.prototype.textInformation); !options.title && (options.title = this.Window.prototype.textInformation);
Common.UI.alert( return Common.UI.alert(
_.extend(options, { _.extend(options, {
iconCls: 'info' iconCls: 'info'
}) })
@ -545,7 +546,7 @@ define([
options = options || {}; options = options || {};
!options.title && (options.title = this.Window.prototype.textWarning); !options.title && (options.title = this.Window.prototype.textWarning);
Common.UI.alert( return Common.UI.alert(
_.extend(options, { _.extend(options, {
iconCls: 'warn' iconCls: 'warn'
}) })

View file

@ -1343,6 +1343,7 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me)); me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me)); me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
me.api.asc_registerCallback('asc_onConvertEquationToMath',_.bind(me.onConvertEquationToMath, me));
/** coauthoring end **/ /** coauthoring end **/
if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) { if (me.stackLongActions.exist({id: ApplyEditRights, type: Asc.c_oAscAsyncActionType['BlockInteraction']})) {
@ -2192,6 +2193,30 @@ define([
this.appOptions.canUseHistory = false; this.appOptions.canUseHistory = false;
}, },
onConvertEquationToMath: function(equation) {
var me = this,
win;
var msg = this.textConvertEquation + '<br><br><a id="id-equation-convert-help" style="cursor: pointer;">' + this.textLearnMore + '</a>';
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');
})
},
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.', 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', criticalErrorTitle: 'Error',
notcriticalErrorTitle: 'Warning', notcriticalErrorTitle: 'Warning',
@ -2538,7 +2563,10 @@ define([
txtChoose: 'Choose an item.', txtChoose: 'Choose an item.',
errorDirectUrl: 'Please verify the link to the document.<br>This link must be a direct link to the file for downloading.', errorDirectUrl: 'Please verify the link to the document.<br>This link must be a direct link to the file for downloading.',
txtStyle_Caption: 'Caption', txtStyle_Caption: 'Caption',
errorCompare: 'The Compare documents feature is not available in the co-editing mode.' errorCompare: 'The Compare documents feature is not available in the co-editing mode.',
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.<br>Do you want to convert this equation?',
textApplyAll: 'Apply to all equations',
textLearnMore: 'Learn More'
} }
})(), DE.Controllers.Main || {})) })(), DE.Controllers.Main || {}))
}); });

View file

@ -721,6 +721,9 @@
"DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicense": "This version of %1 editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.", "DE.Controllers.Main.warnNoLicenseUsers": "This version of %1 editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.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.<br>Do you want to convert this equation?",
"DE.Controllers.Main.textApplyAll": "Apply to all equations",
"DE.Controllers.Main.textLearnMore": "Learn More",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document", "DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked", "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",