diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 68b5f826d..3b8db6cc7 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -879,23 +879,24 @@ Common.Utils.warningDocumentIsLocked = function (opts) { opts.disablefunc(true); var app = window.DE || window.PE || window.SSE; - var tip = new Common.UI.SynchronizeTip({ - extCls : 'simple', - text : Common.Locale.get("warnFileLocked",{name:"Common.Translation", default:'Document is in use by another application. You can continue editing and save it as a copy.'}), - textLink : Common.Locale.get("txtContinueEditing",{name:app.nameSpace + ".Views.SignatureSettings", default:'Edit anyway'}), - placement : 'document' - }); - tip.on({ - 'dontshowclick': function() { - if ( opts.disablefunc ) opts.disablefunc(false); - app.getController('Main').api.asc_setIsReadOnly(false); - this.close(); - }, - 'closeclick': function() { - this.close(); + + Common.UI.warning({ + msg: Common.Locale.get("warnFileLocked",{name:"Common.Translation", default: "You can't edit this file. Document is in use by another application."}), + buttons: [{ + value: 'view', + caption: Common.Locale.get("warnFileLockedBtnView",{name:"Common.Translation", default: "Open for viewing"}) + }, { + value: 'edit', + caption: Common.Locale.get("warnFileLockedBtnEdit",{name:"Common.Translation", default: "Create a copy"}) + }], + primary: 'view', + callback: function(btn){ + if (btn == 'edit') { + if ( opts.disablefunc ) opts.disablefunc(false); + app.getController('Main').api.asc_setIsReadOnly(false); + } } }); - tip.show(); }; jQuery.fn.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 3afbcc513..afb64e655 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -84,7 +84,9 @@ "Common.define.chartData.textPoint": "XY (Scatter)", "Common.define.chartData.textStock": "Stock", "Common.define.chartData.textSurface": "Surface", - "Common.Translation.warnFileLocked": "The file is being edited in another app. You can continue editing and save it as a copy.", + "Common.Translation.warnFileLocked": "You can't edit this file because it's being edited in another app.", + "Common.Translation.warnFileLockedBtnView": "Open for viewing", + "Common.Translation.warnFileLockedBtnEdit": "Create a copy", "Common.UI.Calendar.textApril": "April", "Common.UI.Calendar.textAugust": "August", "Common.UI.Calendar.textDecember": "December", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 900d3df62..0eebe0e4f 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -84,7 +84,9 @@ "Common.define.chartData.textPoint": "Точечная", "Common.define.chartData.textStock": "Биржевая", "Common.define.chartData.textSurface": "Поверхность", - "Common.Translation.warnFileLocked": "Файл редактируется в другом приложении. Вы можете продолжить редактирование и сохранить его как копию.", + "Common.Translation.warnFileLocked": "Вы не можете редактировать этот файл, потому что он уже редактируется в другом приложении.", + "Common.Translation.warnFileLockedBtnView": "Открыть на просмотр", + "Common.Translation.warnFileLockedBtnEdit": "Создать копию", "Common.UI.Calendar.textApril": "Апрель", "Common.UI.Calendar.textAugust": "Август", "Common.UI.Calendar.textDecember": "Декабрь",