From 7b000e386dba4611be9af0e736a0a7ef7f3c5894 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 13 Aug 2021 15:57:28 +0300 Subject: [PATCH] [SSE mobile] Fix Bug 51947 --- apps/spreadsheeteditor/mobile/locale/en.json | 1 + .../mobile/src/controller/Statusbar.jsx | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 59583c74d..b4771b33e 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -263,6 +263,7 @@ "Statusbar": { "notcriticalErrorTitle": "Warning", "textCancel": "Cancel", + "textOk": "Ok", "textDelete": "Delete", "textDuplicate": "Duplicate", "textErrNameExists": "Worksheet with this name already exists.", diff --git a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx index cb71e6993..d0f131594 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx @@ -199,15 +199,20 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => if (sheets.sheets.length == 1 || visibleSheets.length == 1) { f7.dialog.alert(_t.textErrorLastSheet, _t.notcriticalErrorTitle); } else { - f7.dialog.confirm( - _t.textWarnDeleteSheet, - _t.notcriticalErrorTitle, - () => { - if (!api.asc_deleteWorksheet()) { - f7.dialog.alert(_t.textErrorRemoveSheet, _t.notcriticalErrorTitle); - } - } - ); + f7.dialog.create({ + title: _t.notcriticalErrorTitle, + text: _t.textWarnDeleteSheet, + buttons: [ + {text: _t.textCancel}, + { + text: _t.textOk, + onClick: () => { + if (!api.asc_deleteWorksheet()) { + f7.dialog.alert(_t.textErrorRemoveSheet, _t.notcriticalErrorTitle); + } + } + }] + }).open(); } };