From dd4e924c3a1a6de33e6a8ea014059ed767b7c030 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 22 Oct 2020 21:57:09 +0300 Subject: [PATCH] Fix Bug 47045 --- apps/documenteditor/mobile/app/controller/add/AddImage.js | 7 ++++--- apps/documenteditor/mobile/app/controller/add/AddOther.js | 4 ++-- .../mobile/app/controller/edit/EditHyperlink.js | 5 +++-- .../mobile/app/controller/edit/EditImage.js | 7 ++++--- apps/documenteditor/mobile/locale/en.json | 6 ++++++ .../mobile/app/controller/add/AddImage.js | 7 ++++--- .../mobile/app/controller/add/AddLink.js | 4 ++-- .../mobile/app/controller/edit/EditImage.js | 7 ++++--- .../mobile/app/controller/edit/EditLink.js | 5 +++-- apps/presentationeditor/mobile/locale/en.json | 4 ++++ .../mobile/app/controller/DocumentHolder.js | 5 +++-- apps/spreadsheeteditor/mobile/app/controller/Statusbar.js | 8 ++++---- .../mobile/app/controller/add/AddLink.js | 3 ++- .../mobile/app/controller/add/AddOther.js | 7 ++++--- .../mobile/app/controller/edit/EditHyperlink.js | 7 ++++--- .../mobile/app/controller/edit/EditImage.js | 7 ++++--- apps/spreadsheeteditor/mobile/locale/en.json | 7 +++++++ 17 files changed, 64 insertions(+), 36 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/add/AddImage.js b/apps/documenteditor/mobile/app/controller/add/AddImage.js index 1f86be05c..16ab14528 100644 --- a/apps/documenteditor/mobile/app/controller/add/AddImage.js +++ b/apps/documenteditor/mobile/app/controller/add/AddImage.js @@ -115,16 +115,17 @@ define([ if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) { DE.getController('AddContainer').hideModal(); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } }, textEmptyImgUrl : 'You need to specify image URL.', - txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), DE.Controllers.AddImage || {})) }); diff --git a/apps/documenteditor/mobile/app/controller/add/AddOther.js b/apps/documenteditor/mobile/app/controller/add/AddOther.js index 1eaa9c01d..454ac1826 100644 --- a/apps/documenteditor/mobile/app/controller/add/AddOther.js +++ b/apps/documenteditor/mobile/app/controller/add/AddOther.js @@ -467,8 +467,8 @@ define([ textDeleteDraft: 'Do you really want to delete draft?', textCancel: 'Cancel', //textContinue: 'Continue', - textDelete: 'Delete' - + textDelete: 'Delete', + notcriticalErrorTitle: 'Warning' } })(), DE.Controllers.AddOther || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js b/apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js index 1e1c33abf..29f6fe866 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditHyperlink.js @@ -114,7 +114,7 @@ define([ isEmail = (urltype == 2); if (urltype < 1) { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); return; } @@ -172,7 +172,8 @@ define([ }, textEmptyImgUrl: 'You need to specify image URL.', - txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' }; })(), DE.Controllers.EditHyperlink || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/edit/EditImage.js b/apps/documenteditor/mobile/app/controller/edit/EditImage.js index 70f6bcb61..956e45eb6 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditImage.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditImage.js @@ -318,10 +318,10 @@ define([ me.api.ImgApply(image); }); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } }, @@ -400,7 +400,8 @@ define([ }, textEmptyImgUrl: 'You need to specify image URL.', - txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), DE.Controllers.EditImage || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 84fad9a31..af07cc8e7 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -106,6 +106,7 @@ "DE.Controllers.AddContainer.textTable": "Table", "DE.Controllers.AddImage.textEmptyImgUrl": "You need to specify image URL.", "DE.Controllers.AddImage.txtNotUrl": "This field should be a URL in the 'http://www.example.com' format", + "DE.Controllers.AddImage.notcriticalErrorTitle": "Warning", "DE.Controllers.AddOther.textBelowText": "Below Text", "DE.Controllers.AddOther.textBottomOfPage": "Bottom Of Page", "DE.Controllers.AddOther.textCancel": "Cancel", @@ -113,6 +114,7 @@ "DE.Controllers.AddOther.textDelete": "Delete", "DE.Controllers.AddOther.textDeleteDraft": "Do you really want to delete the draft?", "DE.Controllers.AddOther.txtNotUrl": "This field should be a URL in the 'http://www.example.com' format", + "DE.Controllers.AddOther.notcriticalErrorTitle": "Warning", "DE.Controllers.AddTable.textCancel": "Cancel", "DE.Controllers.AddTable.textColumns": "Columns", "DE.Controllers.AddTable.textRows": "Rows", @@ -150,8 +152,12 @@ "DE.Controllers.EditContainer.textShape": "Shape", "DE.Controllers.EditContainer.textTable": "Table", "DE.Controllers.EditContainer.textText": "Text", + "DE.Controllers.EditHyperlink.textEmptyImgUrl": "You need to specify image URL.", + "DE.Controllers.EditHyperlink.txtNotUrl": "This field should be a URL in the 'http://www.example.com' format", + "DE.Controllers.EditHyperlink.notcriticalErrorTitle": "Warning", "DE.Controllers.EditImage.textEmptyImgUrl": "You need to specify image URL.", "DE.Controllers.EditImage.txtNotUrl": "This field should be a URL in the 'http://www.example.com' format", + "DE.Controllers.EditImage.notcriticalErrorTitle": "Warning", "DE.Controllers.EditText.textAuto": "Auto", "DE.Controllers.EditText.textFonts": "Fonts", "DE.Controllers.EditText.textPt": "pt", diff --git a/apps/presentationeditor/mobile/app/controller/add/AddImage.js b/apps/presentationeditor/mobile/app/controller/add/AddImage.js index 5bb96618d..d95a8859a 100644 --- a/apps/presentationeditor/mobile/app/controller/add/AddImage.js +++ b/apps/presentationeditor/mobile/app/controller/add/AddImage.js @@ -112,16 +112,17 @@ define([ if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) { PE.getController('AddContainer').hideModal(); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } }, textEmptyImgUrl : 'You need to specify image URL.', - txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), PE.Controllers.AddImage || {})) }); diff --git a/apps/presentationeditor/mobile/app/controller/add/AddLink.js b/apps/presentationeditor/mobile/app/controller/add/AddLink.js index c5c9855c2..ee2a12938 100644 --- a/apps/presentationeditor/mobile/app/controller/add/AddLink.js +++ b/apps/presentationeditor/mobile/app/controller/add/AddLink.js @@ -209,8 +209,8 @@ define([ textLast: 'Last Slide', textSlide: 'Slide', textExternalLink: 'External Link', - textInternalLink: 'Slide in this Presentation' - + textInternalLink: 'Slide in this Presentation', + notcriticalErrorTitle: 'Warning' } })(), PE.Controllers.AddLink || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditImage.js b/apps/presentationeditor/mobile/app/controller/edit/EditImage.js index 99202a8d9..ae1fc78e7 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditImage.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditImage.js @@ -155,10 +155,10 @@ define([ me.api.ImgApply(image); }); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } }, @@ -244,7 +244,8 @@ define([ }, textEmptyImgUrl: 'You need to specify image URL.', - txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), PE.Controllers.EditImage || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/app/controller/edit/EditLink.js b/apps/presentationeditor/mobile/app/controller/edit/EditLink.js index 876aa3313..f7ae8c769 100644 --- a/apps/presentationeditor/mobile/app/controller/edit/EditLink.js +++ b/apps/presentationeditor/mobile/app/controller/edit/EditLink.js @@ -229,7 +229,7 @@ define([ urltype = me.api.asc_getUrlType($.trim(url)), isEmail = (urltype == 2); if (urltype < 1) { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); return; } @@ -352,7 +352,8 @@ define([ textLast: 'Last Slide', textSlide: 'Slide', textExternalLink: 'External Link', - textInternalLink: 'Slide in this Presentation' + textInternalLink: 'Slide in this Presentation', + notcriticalErrorTitle: 'Warning' }; })(), PE.Controllers.EditLink || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index f239c7d81..4b6deaaef 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -34,6 +34,7 @@ "PE.Controllers.AddContainer.textTable": "Table", "PE.Controllers.AddImage.textEmptyImgUrl": "You need to specify image URL.", "PE.Controllers.AddImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "PE.Controllers.AddImage.notcriticalErrorTitle": "Warning", "PE.Controllers.AddLink.textDefault": "Selected text", "PE.Controllers.AddLink.textExternalLink": "External Link", "PE.Controllers.AddLink.textFirst": "First Slide", @@ -43,6 +44,7 @@ "PE.Controllers.AddLink.textPrev": "Previous Slide", "PE.Controllers.AddLink.textSlide": "Slide", "PE.Controllers.AddLink.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "PE.Controllers.AddLink.notcriticalErrorTitle": "Warning", "PE.Controllers.AddOther.textCancel": "Cancel", "PE.Controllers.AddOther.textContinue": "Continue", "PE.Controllers.AddOther.textDelete": "Delete", @@ -76,6 +78,7 @@ "PE.Controllers.EditContainer.textText": "Text", "PE.Controllers.EditImage.textEmptyImgUrl": "You need to specify image URL.", "PE.Controllers.EditImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "PE.Controllers.EditImage.notcriticalErrorTitle": "Warning", "PE.Controllers.EditLink.textDefault": "Selected text", "PE.Controllers.EditLink.textExternalLink": "External Link", "PE.Controllers.EditLink.textFirst": "First Slide", @@ -85,6 +88,7 @@ "PE.Controllers.EditLink.textPrev": "Previous Slide", "PE.Controllers.EditLink.textSlide": "Slide", "PE.Controllers.EditLink.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "PE.Controllers.EditLink.notcriticalErrorTitle": "Warning", "PE.Controllers.EditSlide.textSec": "s", "PE.Controllers.EditText.textAuto": "Auto", "PE.Controllers.EditText.textFonts": "Fonts", diff --git a/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js index 08e8a05d0..b112cdb5e 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js @@ -207,7 +207,7 @@ define([ case 'merge': if (me.api.asc_mergeCellsDataLost(Asc.c_oAscMergeOptions.Merge)) { _.defer(function () { - uiApp.confirm(me.warnMergeLostData, undefined, function(){ + uiApp.confirm(me.warnMergeLostData, me.notcriticalErrorTitle, function(){ me.api.asc_mergeCells(Asc.c_oAscMergeOptions.Merge); }); }); @@ -521,7 +521,8 @@ define([ menuAddComment: 'Add Comment', textCopyCutPasteActions: 'Copy, Cut and Paste Actions', errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only.', - textDoNotShowAgain: 'Don\'t show again' + textDoNotShowAgain: 'Don\'t show again', + notcriticalErrorTitle: 'Warning' } })(), SSE.Controllers.DocumentHolder || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js index 4510819db..42aeff452 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Statusbar.js @@ -254,12 +254,12 @@ define([ var me = this; if (me.sheets.length == 1) { - uiApp.alert(me.errorLastSheet); + uiApp.alert(me.errorLastSheet, me.notcriticalErrorTitle); } else { - uiApp.confirm(me.warnDeleteSheet, undefined, _.buffered(function() { + uiApp.confirm(me.warnDeleteSheet, me.notcriticalErrorTitle, _.buffered(function() { if ( !me.api.asc_deleteWorksheet() ) { _.defer(function(){ - uiApp.alert(me.errorRemoveSheet); + uiApp.alert(me.errorRemoveSheet, me.notcriticalErrorTitle); }); } }, 300)); @@ -269,7 +269,7 @@ define([ hideWorksheet: function(hide, index) { if ( hide ) { this.sheets.length == 1 ? - uiApp.alert(this.errorLastSheet) : + uiApp.alert(this.errorLastSheet, this.notcriticalErrorTitle) : this.api['asc_hideWorksheet']([index]); } else { this.api['asc_showWorksheet'](index); diff --git a/apps/spreadsheeteditor/mobile/app/controller/add/AddLink.js b/apps/spreadsheeteditor/mobile/app/controller/add/AddLink.js index d210ca980..de4821e92 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/add/AddLink.js +++ b/apps/spreadsheeteditor/mobile/app/controller/add/AddLink.js @@ -175,7 +175,8 @@ define([ }, textInvalidRange : 'ERROR! Invalid cells range', - txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), SSE.Controllers.AddLink || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js b/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js index 869ebaed6..983455c93 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js +++ b/apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js @@ -174,10 +174,10 @@ define([ if ((/((^https?)|(^ftp)):\/\/.+/i.test(url))) { SSE.getController('AddContainer').hideModal(); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } else { SSE.getController('AddContainer').hideModal(); @@ -202,7 +202,8 @@ define([ textDeleteDraft: 'Do you really want to delete draft?', textCancel: 'Cancel', //textContinue: 'Continue', - textDelete: 'Delete' + textDelete: 'Delete', + notcriticalErrorTitle: 'Warning' } })(), SSE.Controllers.AddOther || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js index faa67a222..341ddf978 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditHyperlink.js @@ -200,7 +200,7 @@ define([ isValidRange = /^[A-Z]+[1-9]\d*$/.test(range); if (!isValidRange) { - uiApp.alert(me.textInvalidRange); + uiApp.alert(me.textInvalidRange, me.notcriticalErrorTitle); return; } @@ -214,7 +214,7 @@ define([ var urlType = me.api.asc_getUrlType($.trim(url)); if (urlType < 1) { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); return; } @@ -253,7 +253,8 @@ define([ textDefault: 'Selected range', textInvalidRange: 'Invalid cells range', textEmptyImgUrl: 'You need to specify image URL.', - txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), SSE.Controllers.EditHyperlink || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js index d19a2dc25..c36b19538 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditImage.js @@ -191,10 +191,10 @@ define([ me.api.asc_setGraphicObjectProps(image); }); } else { - uiApp.alert(me.txtNotUrl); + uiApp.alert(me.txtNotUrl, me.notcriticalErrorTitle); } } else { - uiApp.alert(me.textEmptyImgUrl); + uiApp.alert(me.textEmptyImgUrl, me.notcriticalErrorTitle); } } }, @@ -262,7 +262,8 @@ define([ }, textEmptyImgUrl: 'You need to specify image URL.', - txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"' + txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"', + notcriticalErrorTitle: 'Warning' } })(), SSE.Controllers.EditImage || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index a34890180..81d5b9dac 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -37,12 +37,14 @@ "SSE.Controllers.AddContainer.textShape": "Shape", "SSE.Controllers.AddLink.textInvalidRange": "ERROR! Invalid cells range", "SSE.Controllers.AddLink.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "SSE.Controllers.AddLink.notcriticalErrorTitle": "Warning", "SSE.Controllers.AddOther.textCancel": "Cancel", "SSE.Controllers.AddOther.textContinue": "Continue", "SSE.Controllers.AddOther.textDelete": "Delete", "SSE.Controllers.AddOther.textDeleteDraft": "Do you really want to delete the draft?", "SSE.Controllers.AddOther.textEmptyImgUrl": "You need to specify image URL.", "SSE.Controllers.AddOther.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "SSE.Controllers.AddOther.notcriticalErrorTitle": "Warning", "SSE.Controllers.DocumentHolder.errorCopyCutPaste": "Copy, cut and paste actions using the context menu will be performed within the current file only.", "SSE.Controllers.DocumentHolder.menuAddComment": "Add Comment", "SSE.Controllers.DocumentHolder.menuAddLink": "Add Link", @@ -67,6 +69,7 @@ "SSE.Controllers.DocumentHolder.textCopyCutPasteActions": "Copy, Cut and Paste Actions", "SSE.Controllers.DocumentHolder.textDoNotShowAgain": "Do not show again", "SSE.Controllers.DocumentHolder.warnMergeLostData": "Operation can destroy data in the selected cells.
Continue?", + "SSE.Controllers.DocumentHolder.notcriticalErrorTitle": "Warning", "SSE.Controllers.EditCell.textAuto": "Auto", "SSE.Controllers.EditCell.textFonts": "Fonts", "SSE.Controllers.EditCell.textPt": "pt", @@ -126,6 +129,10 @@ "SSE.Controllers.EditHyperlink.textInternalLink": "Internal Data Range", "SSE.Controllers.EditHyperlink.textInvalidRange": "Invalid cells range", "SSE.Controllers.EditHyperlink.txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"", + "SSE.Controllers.EditHyperlink.notcriticalErrorTitle": "Warning", + "SSE.Controllers.EditImage.textEmptyImgUrl": "You need to specify image URL.", + "SSE.Controllers.EditImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'", + "SSE.Controllers.EditImage.notcriticalErrorTitle": "Warning", "SSE.Controllers.FilterOptions.textEmptyItem": "{Blanks}", "SSE.Controllers.FilterOptions.textErrorMsg": "You must choose at least one value", "SSE.Controllers.FilterOptions.textErrorTitle": "Warning",