From 4764897b87b2ccbf684c477dc10618ee9f707348 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Wed, 13 Nov 2024 16:40:14 +0300 Subject: [PATCH 01/12] [desktop] refactoring --- .../app/controller/ApplicationController.js | 89 ------------------- 1 file changed, 89 deletions(-) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index e9f8719289..cc97315cd7 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -2126,93 +2126,4 @@ define([ savingText: 'Saving' }, DE.Controllers.ApplicationController)); - -/* var Desktop = function () { - var features = { - version: '{{PRODUCT_VERSION}}', - // eventloading: true, - uitype: 'fillform', - uithemes: true - }; - var api, nativevars; - - var native = window.desktop || window.AscDesktopEditor; - !!native && native.execCommand('webapps:features', JSON.stringify(features)); - - if ( !!native ) { - $('#header-logo, .brand-logo').hide(); - - nativevars = window.RendererProcessVariable; - - window.on_native_message = function (cmd, param) { - if (/theme:changed/.test(cmd)) { - if ( Common.UI.Themes && !!Common.UI.Themes.setTheme ) - Common.UI.Themes.setTheme(param); - } else - if (/window:features/.test(cmd)) { - var obj = JSON.parse(param); - if ( obj.singlewindow !== undefined ) { - native.features.singlewindow = obj.singlewindow; - $("#title-doc-name")[obj.singlewindow ? 'hide' : 'show'](); - } - } - }; - - if ( !!window.native_message_cmd ) { - for ( var c in window.native_message_cmd ) { - window.on_native_message(c, window.native_message_cmd[c]); - } - } - - Common.NotificationCenter.on({ - 'uitheme:changed' : function (name) { - if (Common.localStorage.getBool('ui-theme-use-system', false)) { - native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'})); - } else { - const theme = Common.UI.Themes.get(name); - if ( theme ) - native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type})); - } - }, - }); - - Common.Gateway.on('opendocument', function () { - api = DE.getController('ApplicationController').api; - - $("#title-doc-name")[native.features.singlewindow ? 'hide' : 'show'](); - - var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp'; - Common.UI.Themes.setAvailable(!is_win_xp); - }); - } - - return { - isActive: function () { - return !!native; - }, - isOffline: function () { - return api && api.asc_isOffline(); - }, - process: function (opts) { - if ( !!native && !!api ) { - if ( opts == 'goback' ) { - var config = DE.getController('ApplicationController').editorConfig; - native.execCommand('go:folder', - api.asc_isOffline() ? 'offline' : config.customization.goback.url); - return true; - } - } - - return false; - }, - systemThemeType: function () { - return nativevars.theme && !!nativevars.theme.system ? nativevars.theme.system : - window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; - }, - } - }; - */ - // DE.Controllers.Desktop = new Desktop(); - // Common.Controllers = Common.Controllers || {}; - // Common.Controllers.Desktop = DE.Controllers.Desktop; }); From 5c7098336ac9a7f4ef99ed0eb8c72946ac75162e Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Wed, 13 Nov 2024 16:40:37 +0300 Subject: [PATCH 02/12] [desktop] for bug 71088 --- .../forms/app/controller/ApplicationController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index cc97315cd7..17f6bb50f0 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -694,6 +694,8 @@ define([ return; } me.api.asc_SendForm(); + Common.Controllers.Desktop.process('goback'); + Common.Controllers.Desktop.requestClose(); }); me.view.btnDownload.on('click', function(){ if (me.appOptions.canDownload) { From 9b8499e8d9189954774546dbd2e003b88ec1c06a Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Thu, 21 Nov 2024 21:17:07 +0300 Subject: [PATCH 03/12] [DE mobile] fix bug 71031 --- apps/documenteditor/mobile/locale/en.json | 1 + .../mobile/src/controller/Toolbar.jsx | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index dc3fdf3997..f062089e42 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -804,6 +804,7 @@ }, "Toolbar": { "btnSend": "Send", + "warnEmptyRequiredField": "Fill all required fields to send form.", "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", "dlgLeaveTitleText": "You leave the application", "leaveButtonText": "Leave this Page", diff --git a/apps/documenteditor/mobile/src/controller/Toolbar.jsx b/apps/documenteditor/mobile/src/controller/Toolbar.jsx index 1a82bb8ca5..096ab7f84e 100644 --- a/apps/documenteditor/mobile/src/controller/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/controller/Toolbar.jsx @@ -377,7 +377,20 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto const submitForm = () => { const api = Common.EditorApi.get(); - api.asc_SendForm(); + if (!api.asc_IsAllRequiredFormsFilled()) { + f7.dialog.create({ + title : '', + text : t('Toolbar.warnEmptyRequiredField'), + buttons : [ + { + text: t('Toolbar.textOk'), + onClick: () => api.asc_MoveToFillingForm(true, true, true) + } + ] + }).open(); + } else { + api.asc_SendForm(); + } } return ( From a83fc539678dd56bdce482efd26dd300b8c7449f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 22 Nov 2024 14:53:14 +0300 Subject: [PATCH 04/12] Update translation --- apps/documenteditor/mobile/locale/ar.json | 3 +- apps/documenteditor/mobile/locale/az.json | 1 + apps/documenteditor/mobile/locale/be.json | 1 + apps/documenteditor/mobile/locale/bg.json | 3 +- apps/documenteditor/mobile/locale/ca.json | 1 + apps/documenteditor/mobile/locale/cs.json | 1 + apps/documenteditor/mobile/locale/da.json | 27 ++++++++--------- apps/documenteditor/mobile/locale/de.json | 3 +- apps/documenteditor/mobile/locale/el.json | 3 +- apps/documenteditor/mobile/locale/en.json | 4 +-- apps/documenteditor/mobile/locale/es.json | 3 +- apps/documenteditor/mobile/locale/eu.json | 1 + apps/documenteditor/mobile/locale/fi.json | 29 ++++++++++--------- apps/documenteditor/mobile/locale/fr.json | 3 +- apps/documenteditor/mobile/locale/gl.json | 1 + apps/documenteditor/mobile/locale/he.json | 3 +- apps/documenteditor/mobile/locale/hu.json | 1 + apps/documenteditor/mobile/locale/hy.json | 1 + apps/documenteditor/mobile/locale/id.json | 1 + apps/documenteditor/mobile/locale/it.json | 3 +- apps/documenteditor/mobile/locale/ja.json | 3 +- apps/documenteditor/mobile/locale/ko.json | 1 + apps/documenteditor/mobile/locale/lo.json | 1 + apps/documenteditor/mobile/locale/lv.json | 1 + apps/documenteditor/mobile/locale/ms.json | 1 + apps/documenteditor/mobile/locale/nl.json | 1 + apps/documenteditor/mobile/locale/pl.json | 1 + apps/documenteditor/mobile/locale/pt-pt.json | 1 + apps/documenteditor/mobile/locale/pt.json | 3 +- apps/documenteditor/mobile/locale/ro.json | 3 +- apps/documenteditor/mobile/locale/ru.json | 3 +- apps/documenteditor/mobile/locale/si.json | 3 +- apps/documenteditor/mobile/locale/sk.json | 1 + apps/documenteditor/mobile/locale/sl.json | 27 ++++++++--------- .../documenteditor/mobile/locale/sr-cyrl.json | 1 + apps/documenteditor/mobile/locale/sr.json | 3 +- apps/documenteditor/mobile/locale/sv.json | 27 ++++++++--------- apps/documenteditor/mobile/locale/tr.json | 1 + apps/documenteditor/mobile/locale/uk.json | 1 + apps/documenteditor/mobile/locale/vi.json | 3 +- apps/documenteditor/mobile/locale/zh-tw.json | 1 + apps/documenteditor/mobile/locale/zh.json | 3 +- 42 files changed, 112 insertions(+), 71 deletions(-) diff --git a/apps/documenteditor/mobile/locale/ar.json b/apps/documenteditor/mobile/locale/ar.json index 726d624d85..05fcd41f69 100644 --- a/apps/documenteditor/mobile/locale/ar.json +++ b/apps/documenteditor/mobile/locale/ar.json @@ -813,6 +813,7 @@ "textOk": "موافق", "textRenameFile": "إعادة تسمية الملف", "textSwitchedMobileView": "تم التبديل إلى عرض المحمول", - "textSwitchedStandardView": "تم التبديل إلى العرض القياسي" + "textSwitchedStandardView": "تم التبديل إلى العرض القياسي", + "warnEmptyRequiredField": "قم بملء كل الحقول المطلوبة لارسال الاستمارة." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/az.json b/apps/documenteditor/mobile/locale/az.json index fa395934b9..0ec8d99e2f 100644 --- a/apps/documenteditor/mobile/locale/az.json +++ b/apps/documenteditor/mobile/locale/az.json @@ -809,6 +809,7 @@ "stayButtonText": "Bu səhifədə qalın", "textCloseHistory": "Tarixçəni bağlayın", "textOk": "OK", + "warnEmptyRequiredField": "Tələb olunan bütün sahələri doldurub formanı göndərin.", "btnSend": "Send", "textEnterNewFileName": "Enter a new file name", "textRenameFile": "Rename File", diff --git a/apps/documenteditor/mobile/locale/be.json b/apps/documenteditor/mobile/locale/be.json index 7faf172b48..faa2fe9828 100644 --- a/apps/documenteditor/mobile/locale/be.json +++ b/apps/documenteditor/mobile/locale/be.json @@ -808,6 +808,7 @@ "stayButtonText": "Застацца на старонцы", "textCloseHistory": "Закрыць гісторыю", "textOk": "Добра", + "warnEmptyRequiredField": "Запоўніце ўсе абавязковыя палі, патрэбныя для адпраўлення формы. ", "btnSend": "Send", "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/bg.json b/apps/documenteditor/mobile/locale/bg.json index 0da51fe0bd..2b45403fe3 100644 --- a/apps/documenteditor/mobile/locale/bg.json +++ b/apps/documenteditor/mobile/locale/bg.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Rename File", "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" + "textSwitchedStandardView": "Switched to Standard view", + "warnEmptyRequiredField": "Fill all required fields to send form." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/ca.json b/apps/documenteditor/mobile/locale/ca.json index 34f224bd1a..896221ce90 100644 --- a/apps/documenteditor/mobile/locale/ca.json +++ b/apps/documenteditor/mobile/locale/ca.json @@ -813,6 +813,7 @@ "textRenameFile": "Canvia el nom del fitxer", "textSwitchedMobileView": "S'ha canviat a visualització mòbil", "textSwitchedStandardView": "S'ha canviat a visualització estàndard", + "warnEmptyRequiredField": "Emplena tots els camps necessaris per enviar el formulari.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/cs.json b/apps/documenteditor/mobile/locale/cs.json index 2adaedecc3..9eb9b5f4a4 100644 --- a/apps/documenteditor/mobile/locale/cs.json +++ b/apps/documenteditor/mobile/locale/cs.json @@ -813,6 +813,7 @@ "textRenameFile": "Přejmenovat soubor", "textSwitchedMobileView": "Přepnout na mobilní zobrazení", "textSwitchedStandardView": "Přepnout na standartní zobrazení", + "warnEmptyRequiredField": "Pro odeslání formuláře vyplňte všechna požadovaná pole.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/da.json b/apps/documenteditor/mobile/locale/da.json index 351fcac8d1..b47c307d96 100644 --- a/apps/documenteditor/mobile/locale/da.json +++ b/apps/documenteditor/mobile/locale/da.json @@ -659,6 +659,20 @@ "txtOk": "Ok", "txtProtected": "Once you enter the password and open the file, the current password will be reset" }, + "Toolbar": { + "warnEmptyRequiredField": "Udfyld alle obligatoriske felter for at sende formularen.", + "btnSend": "Send", + "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", + "dlgLeaveTitleText": "You leave the application", + "leaveButtonText": "Leave this Page", + "stayButtonText": "Stay on this page", + "textCloseHistory": "Close History", + "textEnterNewFileName": "Enter a new file name", + "textOk": "OK", + "textRenameFile": "Rename File", + "textSwitchedMobileView": "Switched to Mobile view", + "textSwitchedStandardView": "Switched to Standard view" + }, "About": { "textAbout": "About", "textAddress": "Address", @@ -801,18 +815,5 @@ "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", "waitText": "Please, wait..." - }, - "Toolbar": { - "btnSend": "Send", - "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", - "dlgLeaveTitleText": "You leave the application", - "leaveButtonText": "Leave this Page", - "stayButtonText": "Stay on this page", - "textCloseHistory": "Close History", - "textEnterNewFileName": "Enter a new file name", - "textOk": "OK", - "textRenameFile": "Rename File", - "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/de.json b/apps/documenteditor/mobile/locale/de.json index 54a30fda72..9040694d3f 100644 --- a/apps/documenteditor/mobile/locale/de.json +++ b/apps/documenteditor/mobile/locale/de.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Datei umbenennen", "textSwitchedMobileView": "Mobile Ansicht aktiviert", - "textSwitchedStandardView": "Standard-Ansicht aktiviert" + "textSwitchedStandardView": "Standard-Ansicht aktiviert", + "warnEmptyRequiredField": "Füllen Sie alle erforderlichen Felder aus, um das Formular zu senden." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/el.json b/apps/documenteditor/mobile/locale/el.json index 5b62e3d2ab..8299f66269 100644 --- a/apps/documenteditor/mobile/locale/el.json +++ b/apps/documenteditor/mobile/locale/el.json @@ -813,6 +813,7 @@ "textOk": "Εντάξει", "textRenameFile": "Μετονομασία αρχείου", "textSwitchedMobileView": "Μετάβαση σε προβολή κινητού", - "textSwitchedStandardView": "Εναλλαγή σε τυπική προβολή" + "textSwitchedStandardView": "Εναλλαγή σε τυπική προβολή", + "warnEmptyRequiredField": "Συμπληρώστε όλα τα απαιτούμενα πεδία για την αποστολή της φόρμας." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index f062089e42..dc2d268c63 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -804,7 +804,6 @@ }, "Toolbar": { "btnSend": "Send", - "warnEmptyRequiredField": "Fill all required fields to send form.", "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", "dlgLeaveTitleText": "You leave the application", "leaveButtonText": "Leave this Page", @@ -814,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Rename File", "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" + "textSwitchedStandardView": "Switched to Standard view", + "warnEmptyRequiredField": "Fill all required fields to send form." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/es.json b/apps/documenteditor/mobile/locale/es.json index cd2c7b3318..e6c3ad28f6 100644 --- a/apps/documenteditor/mobile/locale/es.json +++ b/apps/documenteditor/mobile/locale/es.json @@ -813,6 +813,7 @@ "textOk": "Aceptar", "textRenameFile": "Renombrar archivo", "textSwitchedMobileView": "Cambiado a vista móvil", - "textSwitchedStandardView": "Cambiado a vista estándar" + "textSwitchedStandardView": "Cambiado a vista estándar", + "warnEmptyRequiredField": "Rellene todos los campos obligatorios para enviar el formulario." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/eu.json b/apps/documenteditor/mobile/locale/eu.json index b5cd109950..a5d9978770 100644 --- a/apps/documenteditor/mobile/locale/eu.json +++ b/apps/documenteditor/mobile/locale/eu.json @@ -813,6 +813,7 @@ "textRenameFile": "Berrizendatu fitxategia", "textSwitchedMobileView": "Mugikorreko ikuspegira aldatu da", "textSwitchedStandardView": "Ikuspegi estandarrera aldatu da", + "warnEmptyRequiredField": "Bete derrigorrezko eremu guztiak formularioa bidaltzeko.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/fi.json b/apps/documenteditor/mobile/locale/fi.json index bc1a66aca8..9af211fed1 100644 --- a/apps/documenteditor/mobile/locale/fi.json +++ b/apps/documenteditor/mobile/locale/fi.json @@ -129,6 +129,7 @@ } }, "Settings": { + "textFillingForms": "Lomakkeiden täyttäminen", "textSameAsSystem": "Sama kuin järjetelmässä", "advDRMOptions": "Protected File", "advDRMPassword": "Password", @@ -184,7 +185,6 @@ "textExportAs": "Export As", "textFastWV": "Fast Web View", "textFeedback": "Feedback & Support", - "textFillingForms": "Filling forms", "textFind": "Find", "textFindAndReplace": "Find and Replace", "textFindAndReplaceAll": "Find and Replace All", @@ -270,6 +270,20 @@ "txtOk": "Ok", "txtProtected": "Once you enter the password and open the file, the current password will be reset" }, + "Toolbar": { + "warnEmptyRequiredField": "Täytä kaikki vaaditut kentät lähettääksesi lomakkeen.", + "btnSend": "Send", + "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", + "dlgLeaveTitleText": "You leave the application", + "leaveButtonText": "Leave this Page", + "stayButtonText": "Stay on this page", + "textCloseHistory": "Close History", + "textEnterNewFileName": "Enter a new file name", + "textOk": "OK", + "textRenameFile": "Rename File", + "textSwitchedMobileView": "Switched to Mobile view", + "textSwitchedStandardView": "Switched to Standard view" + }, "About": { "textAbout": "About", "textAddress": "Address", @@ -801,18 +815,5 @@ "warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.", "warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", "warnProcessRightsChange": "You don't have permission to edit this file." - }, - "Toolbar": { - "btnSend": "Send", - "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", - "dlgLeaveTitleText": "You leave the application", - "leaveButtonText": "Leave this Page", - "stayButtonText": "Stay on this page", - "textCloseHistory": "Close History", - "textEnterNewFileName": "Enter a new file name", - "textOk": "OK", - "textRenameFile": "Rename File", - "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/fr.json b/apps/documenteditor/mobile/locale/fr.json index 7d1172c524..dc7fb6c1d0 100644 --- a/apps/documenteditor/mobile/locale/fr.json +++ b/apps/documenteditor/mobile/locale/fr.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Renommer le fichier", "textSwitchedMobileView": "Passé à l'affichage mobile", - "textSwitchedStandardView": "Passé à l'affichage standard" + "textSwitchedStandardView": "Passé à l'affichage standard", + "warnEmptyRequiredField": "Veuillez remplir tous les champs obligatoires avant d'envoyer le formulaire." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/gl.json b/apps/documenteditor/mobile/locale/gl.json index 7f2a5ae252..5aeeeb947f 100644 --- a/apps/documenteditor/mobile/locale/gl.json +++ b/apps/documenteditor/mobile/locale/gl.json @@ -809,6 +809,7 @@ "stayButtonText": "Quedarse nesta páxina", "textCloseHistory": "Pechar historial", "textOk": "Aceptar", + "warnEmptyRequiredField": "Encha todos os campos obrigatorios para poder enviar o formulario.", "btnSend": "Send", "textEnterNewFileName": "Enter a new file name", "textRenameFile": "Rename File", diff --git a/apps/documenteditor/mobile/locale/he.json b/apps/documenteditor/mobile/locale/he.json index 88ceabc6ec..fb0b555d39 100644 --- a/apps/documenteditor/mobile/locale/he.json +++ b/apps/documenteditor/mobile/locale/he.json @@ -813,6 +813,7 @@ "textOk": "בסדר", "textRenameFile": "שינוי שם קובץ", "textSwitchedMobileView": "החלפה לתצוגה ניידת", - "textSwitchedStandardView": "החלפה לתצוגה רגילה" + "textSwitchedStandardView": "החלפה לתצוגה רגילה", + "warnEmptyRequiredField": "מלא את כל השדות הדרושים כדי לשלוח טופס." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/hu.json b/apps/documenteditor/mobile/locale/hu.json index 9bc8d4ed45..af5cbe2af4 100644 --- a/apps/documenteditor/mobile/locale/hu.json +++ b/apps/documenteditor/mobile/locale/hu.json @@ -813,6 +813,7 @@ "textRenameFile": "Fájl Átnevezése", "textSwitchedMobileView": "Váltás Mobil nézetre", "textSwitchedStandardView": "Normál nézetre váltott", + "warnEmptyRequiredField": "Az űrlap elküldéséhez töltse ki az összes szükséges mezőt.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/hy.json b/apps/documenteditor/mobile/locale/hy.json index 872c5b9ead..0e17107903 100644 --- a/apps/documenteditor/mobile/locale/hy.json +++ b/apps/documenteditor/mobile/locale/hy.json @@ -813,6 +813,7 @@ "textRenameFile": "Վերանվանել ֆայլը", "textSwitchedMobileView": " Փոխարկվել է բջջային տեսքի", "textSwitchedStandardView": " Փոխարկվել է ստանդարտ տեսքի", + "warnEmptyRequiredField": "Լրացրել բոլոր անհրաժեշտ դաշտերը՝ ձևն ուղարկելու համար:", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/id.json b/apps/documenteditor/mobile/locale/id.json index a53fd787bc..b1b9b63ee7 100644 --- a/apps/documenteditor/mobile/locale/id.json +++ b/apps/documenteditor/mobile/locale/id.json @@ -813,6 +813,7 @@ "textRenameFile": "Ganti Nama File", "textSwitchedMobileView": "Beralih ke Tampilan seluler", "textSwitchedStandardView": "Beralih ke Tampilan standar", + "warnEmptyRequiredField": "Isi semua ruas yang dibutuhkan untuk mengirim formulir.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/it.json b/apps/documenteditor/mobile/locale/it.json index c23e480a0a..eab54bd3f3 100644 --- a/apps/documenteditor/mobile/locale/it.json +++ b/apps/documenteditor/mobile/locale/it.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Rinomina file", "textSwitchedMobileView": "Passato alla visualizzazione per dispositivi mobili", - "textSwitchedStandardView": "Passato alla visualizzazione standard" + "textSwitchedStandardView": "Passato alla visualizzazione standard", + "warnEmptyRequiredField": "Compila tutti i campi richiesti per inviare il modulo." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/ja.json b/apps/documenteditor/mobile/locale/ja.json index 595a137bb1..cebf9d03ea 100644 --- a/apps/documenteditor/mobile/locale/ja.json +++ b/apps/documenteditor/mobile/locale/ja.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "ファイル名の変更", "textSwitchedMobileView": "モバイルビューに切り替えました", - "textSwitchedStandardView": "標準ビューに切り替えました" + "textSwitchedStandardView": "標準ビューに切り替えました", + "warnEmptyRequiredField": "必須事項をすべて入力し、送信してください。" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/ko.json b/apps/documenteditor/mobile/locale/ko.json index c772af9f81..d634af69db 100644 --- a/apps/documenteditor/mobile/locale/ko.json +++ b/apps/documenteditor/mobile/locale/ko.json @@ -813,6 +813,7 @@ "textRenameFile": "파일 이름 변경", "textSwitchedMobileView": "모바일 보기로 전환되었습니다.", "textSwitchedStandardView": "표준 보기로 전환되었습니다.", + "warnEmptyRequiredField": "양식을 보내려면 모든 필수 필드를 채우십시오.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/lo.json b/apps/documenteditor/mobile/locale/lo.json index f882e06244..27072a4dfd 100644 --- a/apps/documenteditor/mobile/locale/lo.json +++ b/apps/documenteditor/mobile/locale/lo.json @@ -807,6 +807,7 @@ "dlgLeaveTitleText": "ທ່ານໄດ້ອອກຈາກໜ້າຄໍາຮ້ອງສະຫມັກ", "leaveButtonText": "ອອກຈາກໜ້ານີ້", "stayButtonText": "ຢູ່ໃນໜ້ານີ້", + "warnEmptyRequiredField": "ຕື່ມຂໍ້ມູນໃສ່ທຸກຊ່ອງທີ່ຕ້ອງການເພື່ອສົ່ງແບບຟອມ.", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/lv.json b/apps/documenteditor/mobile/locale/lv.json index f0667680a7..4e5dbb0cac 100644 --- a/apps/documenteditor/mobile/locale/lv.json +++ b/apps/documenteditor/mobile/locale/lv.json @@ -811,6 +811,7 @@ "textOk": "Labi", "textSwitchedMobileView": "Pārslēgts uz mobilo skatu", "textSwitchedStandardView": "Pārslēgts uz standarta skatu", + "warnEmptyRequiredField": "Aizpildiet visus obligātos laukus, lai nosūtītu veidlapu.", "btnSend": "Send", "textEnterNewFileName": "Enter a new file name", "textRenameFile": "Rename File" diff --git a/apps/documenteditor/mobile/locale/ms.json b/apps/documenteditor/mobile/locale/ms.json index f3e6f7a0b5..5c614c977f 100644 --- a/apps/documenteditor/mobile/locale/ms.json +++ b/apps/documenteditor/mobile/locale/ms.json @@ -808,6 +808,7 @@ "leaveButtonText": "Tinggalkan Halaman ini", "stayButtonText": "Kekal pada Halaman ini", "textOk": "Okey", + "warnEmptyRequiredField": "Isi semua medan diperlukan untuk menyerahkan borang.", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/nl.json b/apps/documenteditor/mobile/locale/nl.json index 03f978693f..75bc95a625 100644 --- a/apps/documenteditor/mobile/locale/nl.json +++ b/apps/documenteditor/mobile/locale/nl.json @@ -807,6 +807,7 @@ "dlgLeaveTitleText": "U verlaat de toepassing", "leaveButtonText": "Pagina verlaten", "stayButtonText": "Op deze pagina blijven", + "warnEmptyRequiredField": "Vul alle verplichte velden in om het formulier te verzenden.", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/pl.json b/apps/documenteditor/mobile/locale/pl.json index 0038d70fdd..3433f2ad79 100644 --- a/apps/documenteditor/mobile/locale/pl.json +++ b/apps/documenteditor/mobile/locale/pl.json @@ -807,6 +807,7 @@ "textCloseHistory": "Zamknij historię", "textEnterNewFileName": "Wprowadź nową nazwę pliku", "textOk": "OK", + "warnEmptyRequiredField": "Wypełnij wszystkie wymagane pola, aby wysłać formularz.", "btnSend": "Send", "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", "dlgLeaveTitleText": "You leave the application", diff --git a/apps/documenteditor/mobile/locale/pt-pt.json b/apps/documenteditor/mobile/locale/pt-pt.json index 8c43561a36..5b1416e18f 100644 --- a/apps/documenteditor/mobile/locale/pt-pt.json +++ b/apps/documenteditor/mobile/locale/pt-pt.json @@ -813,6 +813,7 @@ "textRenameFile": "Mudar nome do ficheiro", "textSwitchedMobileView": "Alterado para vista móvel", "textSwitchedStandardView": "Alterado para a vista predefinida", + "warnEmptyRequiredField": "Preencha todos os campos obrigatórios para enviar o formulário.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/pt.json b/apps/documenteditor/mobile/locale/pt.json index d6276dc531..2815113de0 100644 --- a/apps/documenteditor/mobile/locale/pt.json +++ b/apps/documenteditor/mobile/locale/pt.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Renomear arquivo", "textSwitchedMobileView": "Alterado para a visualização móvel", - "textSwitchedStandardView": "Alterado para a visualização padrão" + "textSwitchedStandardView": "Alterado para a visualização padrão", + "warnEmptyRequiredField": "Preencha todos os campos obrigatórios para enviar o formulário." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/ro.json b/apps/documenteditor/mobile/locale/ro.json index e49d8d6d1d..8fea6aad6e 100644 --- a/apps/documenteditor/mobile/locale/ro.json +++ b/apps/documenteditor/mobile/locale/ro.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Redenumire fișier", "textSwitchedMobileView": "Comutat la vizualizarea mobilă", - "textSwitchedStandardView": "Comutat la vizualizarea standard" + "textSwitchedStandardView": "Comutat la vizualizarea standard", + "warnEmptyRequiredField": "Toate câmpurile din formular trebuie completate înainte de a-l trimite." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/ru.json b/apps/documenteditor/mobile/locale/ru.json index 6002216c38..c7bec7d38a 100644 --- a/apps/documenteditor/mobile/locale/ru.json +++ b/apps/documenteditor/mobile/locale/ru.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Переименовать файл", "textSwitchedMobileView": "Переключено на мобильный вид", - "textSwitchedStandardView": "Переключено на стандартный вид" + "textSwitchedStandardView": "Переключено на стандартный вид", + "warnEmptyRequiredField": "Заполните все обязательные поля для отправки формы." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/si.json b/apps/documenteditor/mobile/locale/si.json index a92bc5c720..6d622e9ad4 100644 --- a/apps/documenteditor/mobile/locale/si.json +++ b/apps/documenteditor/mobile/locale/si.json @@ -813,6 +813,7 @@ "textOk": "හරි", "textRenameFile": "ගොනුව නම් කරන්න", "textSwitchedMobileView": "ජංගම දැක්මට මාරු විය", - "textSwitchedStandardView": "සම්මත දැක්මට මාරු විය" + "textSwitchedStandardView": "සම්මත දැක්මට මාරු විය", + "warnEmptyRequiredField": "ආකෘතිපත්‍රය යැවීමට වුවමනා සියළුම ක්‍ෂේත්‍ර පුරවන්න." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/sk.json b/apps/documenteditor/mobile/locale/sk.json index c271d0f8a6..82f1e611bc 100644 --- a/apps/documenteditor/mobile/locale/sk.json +++ b/apps/documenteditor/mobile/locale/sk.json @@ -807,6 +807,7 @@ "dlgLeaveTitleText": "Opúšťate aplikáciu", "leaveButtonText": "Opustiť túto stránku", "stayButtonText": "Zostať na tejto stránke", + "warnEmptyRequiredField": "Vyplňte všetky požadované polia, aby ste formulár mohli odoslať.", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/sl.json b/apps/documenteditor/mobile/locale/sl.json index 049807d277..d1f38bcf53 100644 --- a/apps/documenteditor/mobile/locale/sl.json +++ b/apps/documenteditor/mobile/locale/sl.json @@ -701,6 +701,20 @@ "txtOk": "Ok", "txtProtected": "Once you enter the password and open the file, the current password will be reset" }, + "Toolbar": { + "warnEmptyRequiredField": "Za pošiljanje obrazca izpolnite vsa potrebna polja,", + "btnSend": "Send", + "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", + "dlgLeaveTitleText": "You leave the application", + "leaveButtonText": "Leave this Page", + "stayButtonText": "Stay on this page", + "textCloseHistory": "Close History", + "textEnterNewFileName": "Enter a new file name", + "textOk": "OK", + "textRenameFile": "Rename File", + "textSwitchedMobileView": "Switched to Mobile view", + "textSwitchedStandardView": "Switched to Standard view" + }, "Error": { "convertationTimeoutText": "Conversion timeout exceeded.", "criticalErrorExtText": "Press 'OK' to go back to the document list.", @@ -801,18 +815,5 @@ "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", "waitText": "Please, wait..." - }, - "Toolbar": { - "btnSend": "Send", - "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", - "dlgLeaveTitleText": "You leave the application", - "leaveButtonText": "Leave this Page", - "stayButtonText": "Stay on this page", - "textCloseHistory": "Close History", - "textEnterNewFileName": "Enter a new file name", - "textOk": "OK", - "textRenameFile": "Rename File", - "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/sr-cyrl.json b/apps/documenteditor/mobile/locale/sr-cyrl.json index efa8350f0d..1ee65b10ab 100644 --- a/apps/documenteditor/mobile/locale/sr-cyrl.json +++ b/apps/documenteditor/mobile/locale/sr-cyrl.json @@ -813,6 +813,7 @@ "textRenameFile": "Преименуј фајл", "textSwitchedMobileView": "Пребачено на мобилни приказ", "textSwitchedStandardView": "Пребачено на стандардни приказ", + "warnEmptyRequiredField": "Попуни сва потребна поља за слање обрасца.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/sr.json b/apps/documenteditor/mobile/locale/sr.json index 0bd9b7b0b1..e9eb536109 100644 --- a/apps/documenteditor/mobile/locale/sr.json +++ b/apps/documenteditor/mobile/locale/sr.json @@ -813,6 +813,7 @@ "textOk": "OK", "textRenameFile": "Preimenuj Fajl", "textSwitchedMobileView": "Prebačeno na mobilni prikaz", - "textSwitchedStandardView": "Prebačeno na standardni prikaz" + "textSwitchedStandardView": "Prebačeno na standardni prikaz", + "warnEmptyRequiredField": "Popuni sva potrebna polja za slanje obrasca." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/sv.json b/apps/documenteditor/mobile/locale/sv.json index 711ce9f0f3..ae9038f871 100644 --- a/apps/documenteditor/mobile/locale/sv.json +++ b/apps/documenteditor/mobile/locale/sv.json @@ -763,6 +763,20 @@ "txtOk": "Ok", "txtProtected": "Once you enter the password and open the file, the current password will be reset" }, + "Toolbar": { + "warnEmptyRequiredField": "Fyll i alla fält för att skicka formulär.", + "btnSend": "Send", + "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", + "dlgLeaveTitleText": "You leave the application", + "leaveButtonText": "Leave this Page", + "stayButtonText": "Stay on this page", + "textCloseHistory": "Close History", + "textEnterNewFileName": "Enter a new file name", + "textOk": "OK", + "textRenameFile": "Rename File", + "textSwitchedMobileView": "Switched to Mobile view", + "textSwitchedStandardView": "Switched to Standard view" + }, "LongActions": { "applyChangesTextText": "Loading data...", "applyChangesTitleText": "Loading Data", @@ -801,18 +815,5 @@ "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", "waitText": "Please, wait..." - }, - "Toolbar": { - "btnSend": "Send", - "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", - "dlgLeaveTitleText": "You leave the application", - "leaveButtonText": "Leave this Page", - "stayButtonText": "Stay on this page", - "textCloseHistory": "Close History", - "textEnterNewFileName": "Enter a new file name", - "textOk": "OK", - "textRenameFile": "Rename File", - "textSwitchedMobileView": "Switched to Mobile view", - "textSwitchedStandardView": "Switched to Standard view" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/tr.json b/apps/documenteditor/mobile/locale/tr.json index 864ad838b4..3186b26a04 100644 --- a/apps/documenteditor/mobile/locale/tr.json +++ b/apps/documenteditor/mobile/locale/tr.json @@ -813,6 +813,7 @@ "textRenameFile": "Dosyayı yeniden adlandır.", "textSwitchedMobileView": "Mobil görünüme geçildi", "textSwitchedStandardView": "Standart görünüme geçildi", + "warnEmptyRequiredField": "Formu gönderebilmek için gerekli tüm alanları doldurun.", "btnSend": "Send" } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/uk.json b/apps/documenteditor/mobile/locale/uk.json index a4fec6598d..008a7f5479 100644 --- a/apps/documenteditor/mobile/locale/uk.json +++ b/apps/documenteditor/mobile/locale/uk.json @@ -807,6 +807,7 @@ "dlgLeaveTitleText": "Ви виходите з програми", "leaveButtonText": "Залишити цю сторінку", "stayButtonText": "Залишитися на сторінці", + "warnEmptyRequiredField": "Заповніть всі обов'язкові поля для відправлення форми.", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/vi.json b/apps/documenteditor/mobile/locale/vi.json index 2e7beacc7c..5662da8b53 100644 --- a/apps/documenteditor/mobile/locale/vi.json +++ b/apps/documenteditor/mobile/locale/vi.json @@ -845,6 +845,7 @@ "textRenameFile": "Rename File", "textEnterNewFileName": "Enter a new file name", "textCloseHistory": "Close History", - "btnSend": "Send" + "btnSend": "Send", + "warnEmptyRequiredField": "Fill all required fields to send form." } } \ No newline at end of file diff --git a/apps/documenteditor/mobile/locale/zh-tw.json b/apps/documenteditor/mobile/locale/zh-tw.json index 85828e76e3..5270212e32 100644 --- a/apps/documenteditor/mobile/locale/zh-tw.json +++ b/apps/documenteditor/mobile/locale/zh-tw.json @@ -810,6 +810,7 @@ "textOk": "好", "textSwitchedMobileView": "切換至行動版檢視", "textSwitchedStandardView": "切換至標準版檢視", + "warnEmptyRequiredField": "填寫所有必填欄位以傳送表單。", "btnSend": "Send", "textCloseHistory": "Close History", "textEnterNewFileName": "Enter a new file name", diff --git a/apps/documenteditor/mobile/locale/zh.json b/apps/documenteditor/mobile/locale/zh.json index 020dfef2c2..3f6ab5c9fb 100644 --- a/apps/documenteditor/mobile/locale/zh.json +++ b/apps/documenteditor/mobile/locale/zh.json @@ -813,6 +813,7 @@ "textOk": "确定", "textRenameFile": "重命名文件", "textSwitchedMobileView": "切换到“移动设备”视图", - "textSwitchedStandardView": "切换到标准视图" + "textSwitchedStandardView": "切换到标准视图", + "warnEmptyRequiredField": "要发送表单,请填写所有必填项。" } } \ No newline at end of file From bc917736022b93a8a5fad9450b8bc2d2480dae15 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Fri, 22 Nov 2024 15:29:20 +0300 Subject: [PATCH 05/12] [DE mobile] added title in message --- apps/documenteditor/mobile/src/controller/Toolbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/src/controller/Toolbar.jsx b/apps/documenteditor/mobile/src/controller/Toolbar.jsx index 096ab7f84e..5f127d7c17 100644 --- a/apps/documenteditor/mobile/src/controller/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/controller/Toolbar.jsx @@ -379,7 +379,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto const api = Common.EditorApi.get(); if (!api.asc_IsAllRequiredFormsFilled()) { f7.dialog.create({ - title : '', + title : t('Main.notcriticalErrorTitle'), text : t('Toolbar.warnEmptyRequiredField'), buttons : [ { From 2587e1e0f5b1acf5bad8446ec1c3e9a1082ea107 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Sat, 23 Nov 2024 00:06:02 +0300 Subject: [PATCH 06/12] [DE mobile] fix "Mobile View" option for PDF forms --- apps/documenteditor/mobile/src/controller/Main.jsx | 10 +++++----- apps/documenteditor/mobile/src/controller/Toolbar.jsx | 1 + apps/documenteditor/mobile/src/store/appOptions.js | 1 + apps/documenteditor/mobile/src/view/Toolbar.jsx | 2 +- .../mobile/src/view/settings/SettingsPage.jsx | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index a2801fd532..97adb8ea46 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -347,7 +347,6 @@ class MainController extends Component { const isOForm = appOptions.isOForm; const appSettings = this.props.storeApplicationSettings; const customization = appOptions.customization; - const isStandardView = customization?.mobile?.standardView ?? false; f7.emit('resize'); @@ -378,10 +377,10 @@ class MainController extends Component { appSettings.changeShowTableEmptyLine(value); this.api.put_ShowTableEmptyLine(value); - - value = LocalStorage.getBool('mobile-view'); + value = LocalStorage.itemExists('mobile-view') ? + LocalStorage.getBool('mobile-view') : !(customization?.mobile?.standardView ?? false); - if(value || !isStandardView) { + if(appOptions.isMobileViewAvailable && value) { this.api.ChangeReaderMode(); } else { appOptions.changeMobileView(); @@ -466,7 +465,8 @@ class MainController extends Component { Common.Utils.Metric.setCurrentMetric(1); //pt - this.appOptions = {isCorePDF: isPDF}; + this.appOptions = {isCorePDF: isPDF}; + this.props.storeAppOptions.isMobileViewAvailable = !this.appOptions.isCorePDF; this.bindEvents(); Common.Gateway.on('init', loadConfig); diff --git a/apps/documenteditor/mobile/src/controller/Toolbar.jsx b/apps/documenteditor/mobile/src/controller/Toolbar.jsx index 5f127d7c17..c851fabc6f 100644 --- a/apps/documenteditor/mobile/src/controller/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/controller/Toolbar.jsx @@ -418,6 +418,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto isViewer={isViewer} turnOnViewerMode={turnOnViewerMode} isMobileView={isMobileView} + isMobileViewAvailable={appOptions.isMobileViewAvailable} changeMobileView={changeMobileView} changeTitleHandler={changeTitleHandler} isVersionHistoryMode={isVersionHistoryMode} diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 10513b6f84..ee26d13539 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -65,6 +65,7 @@ export class storeAppOptions { this.typeProtection = type; } + isMobileViewAvailable = true; isMobileView = true; changeMobileView() { this.isMobileView = !this.isMobileView; diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index a501573d50..ca22d1ade3 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -62,7 +62,7 @@ const ToolbarView = props => { }) } {!isEditableForms ? [ - ((isViewer || !Device.phone) && isAvailableExt && !props.disabledControls && !isVersionHistoryMode) && + ((isViewer || !Device.phone) && props.isMobileViewAvailable && !props.disabledControls && !isVersionHistoryMode) && { props.changeMobileView(); props.openOptions('snackbar'); diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index dfdb1931af..3075d3aa06 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -126,7 +126,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo } - {((!isViewer && Device.phone) || isEditableForms) && + {(appOptions.isMobileViewAvailable && ((Device.phone && !isViewer) || isEditableForms)) && { From 475ef968a52a1dd4b32f7902da14f53b994acb36 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Sat, 23 Nov 2024 00:11:07 +0300 Subject: [PATCH 07/12] [DE mobile] fix "Settings" popup position --- apps/documenteditor/mobile/src/view/Toolbar.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index ca22d1ade3..c2122535bc 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -96,6 +96,7 @@ const ToolbarView = props => { props.openOptions('settings')}>, Date: Sun, 24 Nov 2024 00:44:02 +0300 Subject: [PATCH 08/12] [desktop] for bug 71691 --- apps/common/main/lib/controller/Desktop.js | 5 +++++ .../forms/app/controller/ApplicationController.js | 1 + 2 files changed, 6 insertions(+) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index 13d5456720..2e307a73ac 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -663,6 +663,11 @@ define([ native.execCommand('editor:event', JSON.stringify({action:'file:close', url: config.customization.goback.url})); } }, + removeRecent: function () { + if ( config.isDesktopApp && !!native ) { + native.execCommand('recent:forget'); + } + }, isActive: function () { return !!native; }, diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 17f6bb50f0..9d29f7a24f 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -696,6 +696,7 @@ define([ me.api.asc_SendForm(); Common.Controllers.Desktop.process('goback'); Common.Controllers.Desktop.requestClose(); + Common.Controllers.Desktop.removeRecent(); }); me.view.btnDownload.on('click', function(){ if (me.appOptions.canDownload) { From 45bf88885cf9d7083efb1682a5266daf07a70d69 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Sun, 24 Nov 2024 13:09:57 +0300 Subject: [PATCH 09/12] [desktop] for bug 71691 --- .../forms/app/controller/ApplicationController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 9d29f7a24f..d05c172204 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -694,9 +694,9 @@ define([ return; } me.api.asc_SendForm(); + Common.Controllers.Desktop.removeRecent(); Common.Controllers.Desktop.process('goback'); Common.Controllers.Desktop.requestClose(); - Common.Controllers.Desktop.removeRecent(); }); me.view.btnDownload.on('click', function(){ if (me.appOptions.canDownload) { From d26e1ba0bb430742b75832774bbfdc22b8d9caad Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Mon, 25 Nov 2024 15:53:04 +0300 Subject: [PATCH 10/12] Removed setting focus to the editor iframe in the mobile version. Now the editor itself will take the focus as it should. --- apps/api/documents/api.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 6ef6643639..158e6b76f2 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -400,19 +400,6 @@ }; var _onAppReady = function() { - if (_config.type === 'mobile') { - document.body.onfocus = function(e) { - setTimeout(function(){ - iframe.contentWindow.focus(); - - _sendCommand({ - command: 'resetFocus', - data: {} - }) - }, 10); - }; - } - _attachMouseEvents(); if (_config.editorConfig) { From 198763c9a65db1f84fbeb4d584acb5391fa2bb8b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 25 Nov 2024 16:56:00 +0300 Subject: [PATCH 11/12] Fix styles for scroll --- apps/common/forms/resources/less/common.less | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index 3a5c42b90f..32e4e90225 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -63,6 +63,11 @@ @import "../../../../common/main/resources/mods/less/utilities.less"; @import "../../../../common/main/resources/mods/less/responsive-utilities.less"; +// +// Perfect scrollbar +// -------------------------------------------------- +@import (inline) "../../../../../vendor/perfect-scrollbar/src/perfect-scrollbar.css"; + @import "../../../../common/main/resources/less/buttons.less"; @import "../../../../common/main/resources/less/dropdown-menu.less"; @import "../../../../common/main/resources/less/dropdown-submenu.less"; From be49e66dbebe6528076734ae1f730a395d37408e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 27 Nov 2024 19:37:16 +0300 Subject: [PATCH 12/12] Fix loading plugins --- apps/common/main/lib/controller/Plugins.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index bfde101235..5d5e405d20 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -111,6 +111,7 @@ define([ this._moveOffset = {x:0, y:0}; this.autostart = []; + this.startOnPostLoad = false; this.customPluginsDlg = []; this.macrosPlugin = {el: null, show: false}; @@ -124,6 +125,7 @@ define([ Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); Common.NotificationCenter.on('doc:mode-changed', this.onChangeDocMode.bind(this)); Common.NotificationCenter.on('modal:close', this.onModalClose.bind(this)); + Common.NotificationCenter.on('script:loaded', this.onPostLoadComplete.bind(this)); }, loadConfig: function(data) { @@ -135,7 +137,7 @@ define([ loadPlugins: function() { this.configPlugins.plugins = - this.serverPlugins.plugins = false; + this.serverPlugins.plugins = undefined; if (this.configPlugins.config) { this.getPlugins(this.configPlugins.config.pluginsData) @@ -149,7 +151,8 @@ define([ if (this.configPlugins.config.options) this.api.setPluginsOptions(this.configPlugins.config.options); - } + } else + this.configPlugins.plugins = false; if ( !Common.Controllers.Desktop.isActive() || !Common.Controllers.Desktop.isOffline() ) { var server_plugins_url = '../../../../plugins.json', @@ -165,7 +168,8 @@ define([ .catch(function (err) { me.serverPlugins.plugins = false; }); - } + } else + me.serverPlugins.plugins = false; }); } }, @@ -1007,7 +1011,8 @@ define([ if (this.appOptions.canPlugins) { this.refreshPluginsList(); - this.runAutoStartPlugins(); + this.startOnPostLoad = !Common.Controllers.LaunchController.isScriptLoaded(); + !this.startOnPostLoad && this.runAutoStartPlugins(); } }, @@ -1378,6 +1383,10 @@ define([ } }, + onPostLoadComplete: function() { + this.startOnPostLoad && this.runAutoStartPlugins(); + }, + textRunPlugin: 'Run plugin', textRunInstalledPlugins: 'Run installed plugins', textPluginSuccessfullyInstalled: '{0} is successfully installed. You can access all background plugins here.',