From b0e59d6df832620a44250634f294e2f7d28f23a4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 14 Mar 2022 16:36:33 +0300 Subject: [PATCH] [DE][DE mobile] Handle ComplexFieldEmptyTOC, ComplexFieldNoTOC errors --- apps/documenteditor/main/app/controller/Links.js | 8 +++----- apps/documenteditor/main/app/controller/Main.js | 8 +++++++- apps/documenteditor/main/locale/en.json | 3 ++- apps/documenteditor/mobile/locale/az.json | 4 +++- apps/documenteditor/mobile/locale/be.json | 4 +++- apps/documenteditor/mobile/locale/bg.json | 4 +++- apps/documenteditor/mobile/locale/ca.json | 4 +++- apps/documenteditor/mobile/locale/cs.json | 4 +++- apps/documenteditor/mobile/locale/da.json | 4 +++- apps/documenteditor/mobile/locale/de.json | 4 +++- apps/documenteditor/mobile/locale/el.json | 4 +++- apps/documenteditor/mobile/locale/en.json | 2 ++ apps/documenteditor/mobile/locale/es.json | 4 +++- apps/documenteditor/mobile/locale/fi.json | 4 +++- apps/documenteditor/mobile/locale/fr.json | 4 +++- apps/documenteditor/mobile/locale/gl.json | 4 +++- apps/documenteditor/mobile/locale/hu.json | 4 +++- apps/documenteditor/mobile/locale/it.json | 4 +++- apps/documenteditor/mobile/locale/ja.json | 4 +++- apps/documenteditor/mobile/locale/ko.json | 4 +++- apps/documenteditor/mobile/locale/lo.json | 4 +++- apps/documenteditor/mobile/locale/lv.json | 4 +++- apps/documenteditor/mobile/locale/nb.json | 4 +++- apps/documenteditor/mobile/locale/nl.json | 4 +++- apps/documenteditor/mobile/locale/pl.json | 4 +++- apps/documenteditor/mobile/locale/pt.json | 4 +++- apps/documenteditor/mobile/locale/ro.json | 4 +++- apps/documenteditor/mobile/locale/ru.json | 4 +++- apps/documenteditor/mobile/locale/sk.json | 4 +++- apps/documenteditor/mobile/locale/sl.json | 4 +++- apps/documenteditor/mobile/locale/sv.json | 4 +++- apps/documenteditor/mobile/locale/tr.json | 4 +++- apps/documenteditor/mobile/locale/uk.json | 4 +++- apps/documenteditor/mobile/locale/vi.json | 4 +++- apps/documenteditor/mobile/locale/zh.json | 4 +++- apps/documenteditor/mobile/src/controller/ContextMenu.jsx | 8 +++----- apps/documenteditor/mobile/src/controller/Error.jsx | 8 ++++++++ .../mobile/src/controller/edit/EditTableContents.jsx | 8 +++----- 38 files changed, 121 insertions(+), 48 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index bfe29f5e6..90c9e71c0 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -304,11 +304,9 @@ define([ onTableContentsUpdate: function(type, currentTOC){ var props = this.api.asc_GetTableOfContentsPr(currentTOC); - if (props) { - if (currentTOC && props) - currentTOC = props.get_InternalClass(); - this.api.asc_UpdateTableOfContents(type == 'pages', currentTOC); - } + if (currentTOC && props) + currentTOC = props.get_InternalClass(); + this.api.asc_UpdateTableOfContents(type == 'pages', currentTOC); Common.NotificationCenter.trigger('edit:complete', this.toolbar); }, diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 1950a8d9d..6814dd871 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1904,9 +1904,14 @@ define([ break; case Asc.c_oAscError.ID.ComplexFieldEmptyTOC: + config.maxwidth = 600; config.msg = this.errorEmptyTOC; break; + case Asc.c_oAscError.ID.ComplexFieldNoTOC: + config.msg = this.errorNoTOC; + break; + default: config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id); break; @@ -3135,7 +3140,8 @@ define([ textReconnect: 'Connection is restored', errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.', errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.', - errorEmptyTOC: 'There\'s no table of contents to update. You can insert one from the References tab.' + errorEmptyTOC: 'Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.', + errorNoTOC: 'There\'s no table of contents to update. You can insert one from the References tab.' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 2976f36a4..4fc7b90e5 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -564,7 +564,8 @@ "DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.", "DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded", "DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,
but will not be able to download or print it until the connection is restored and page is reloaded.", - "DE.Controllers.Main.errorEmptyTOC": "There's no table of contents to update. You can insert one from the References tab.", + "DE.Controllers.Main.errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "DE.Controllers.Main.errorNoTOC": "There's no table of contents to update. You can insert one from the References tab.", "DE.Controllers.Main.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.", "DE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this document will be lost.
Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.", "DE.Controllers.Main.loadFontsTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/az.json b/apps/documenteditor/mobile/locale/az.json index e60226d78..c9bd04ee3 100644 --- a/apps/documenteditor/mobile/locale/az.json +++ b/apps/documenteditor/mobile/locale/az.json @@ -397,7 +397,9 @@ "unknownErrorText": "Naməlum xəta.", "uploadImageExtMessage": "Naməlum təsvir formatı.", "uploadImageFileCountMessage": "Heç bir təsvir yüklənməyib.", - "uploadImageSizeMessage": "Təsvir çox böyükdür. Maksimum ölçü 25 MB-dır." + "uploadImageSizeMessage": "Təsvir çox böyükdür. Maksimum ölçü 25 MB-dır.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Məlumat yüklənir...", diff --git a/apps/documenteditor/mobile/locale/be.json b/apps/documenteditor/mobile/locale/be.json index bf8883a9f..1d5aa1e80 100644 --- a/apps/documenteditor/mobile/locale/be.json +++ b/apps/documenteditor/mobile/locale/be.json @@ -397,7 +397,9 @@ "openErrorText": "An error has occurred while opening the file", "saveErrorText": "An error has occurred while saving the file", "scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please, reload the page.", - "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB." + "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Загрузка даных…", diff --git a/apps/documenteditor/mobile/locale/bg.json b/apps/documenteditor/mobile/locale/bg.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/bg.json +++ b/apps/documenteditor/mobile/locale/bg.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/ca.json b/apps/documenteditor/mobile/locale/ca.json index 0dec8c3c7..d4357e87a 100644 --- a/apps/documenteditor/mobile/locale/ca.json +++ b/apps/documenteditor/mobile/locale/ca.json @@ -397,7 +397,9 @@ "unknownErrorText": "Error desconegut.", "uploadImageExtMessage": "Format d'imatge desconegut.", "uploadImageFileCountMessage": "No s'ha carregat cap imatge.", - "uploadImageSizeMessage": "La imatge és massa gran. La mida màxima és de 25 MB." + "uploadImageSizeMessage": "La imatge és massa gran. La mida màxima és de 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "S'estan carregant les dades...", diff --git a/apps/documenteditor/mobile/locale/cs.json b/apps/documenteditor/mobile/locale/cs.json index 55a84acb0..5ec84c9bb 100644 --- a/apps/documenteditor/mobile/locale/cs.json +++ b/apps/documenteditor/mobile/locale/cs.json @@ -397,7 +397,9 @@ "unknownErrorText": "Neznámá chyba.", "uploadImageExtMessage": "Neznámý formát obrázku.", "uploadImageFileCountMessage": "Nenahrány žádné obrázky.", - "uploadImageSizeMessage": "Obrázek je příliš velký. Maximální velikost je 25 MB." + "uploadImageSizeMessage": "Obrázek je příliš velký. Maximální velikost je 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Načítání dat...", diff --git a/apps/documenteditor/mobile/locale/da.json b/apps/documenteditor/mobile/locale/da.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/da.json +++ b/apps/documenteditor/mobile/locale/da.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/de.json b/apps/documenteditor/mobile/locale/de.json index 4c0ad5f90..b5de5fdcb 100644 --- a/apps/documenteditor/mobile/locale/de.json +++ b/apps/documenteditor/mobile/locale/de.json @@ -397,7 +397,9 @@ "unknownErrorText": "Unbekannter Fehler.", "uploadImageExtMessage": "Unbekanntes Bildformat.", "uploadImageFileCountMessage": "Keine Bilder hochgeladen.", - "uploadImageSizeMessage": "Die maximal zulässige Bildgröße von 25 MB ist überschritten." + "uploadImageSizeMessage": "Die maximal zulässige Bildgröße von 25 MB ist überschritten.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Daten werden geladen...", diff --git a/apps/documenteditor/mobile/locale/el.json b/apps/documenteditor/mobile/locale/el.json index a64efce61..baad4ba5e 100644 --- a/apps/documenteditor/mobile/locale/el.json +++ b/apps/documenteditor/mobile/locale/el.json @@ -397,7 +397,9 @@ "unknownErrorText": "Άγνωστο σφάλμα.", "uploadImageExtMessage": "Άγνωστη μορφή εικόνας.", "uploadImageFileCountMessage": "Δεν μεταφορτώθηκαν εικόνες.", - "uploadImageSizeMessage": "Η εικόνα είναι πολύ μεγάλη. Το μέγιστο μέγεθος είναι 25MB." + "uploadImageSizeMessage": "Η εικόνα είναι πολύ μεγάλη. Το μέγιστο μέγεθος είναι 25MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Φόρτωση δεδομένων...", diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index e80ba9648..dc6f715e5 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -387,6 +387,8 @@ "errorUserDrop": "The file can't be accessed right now.", "errorUsersExceed": "The number of users allowed by the pricing plan was exceeded", "errorViewerDisconnect": "Connection is lost. You can still view the document,
but you won't be able to download or print it until the connection is restored and the page is reloaded.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab.", "notcriticalErrorTitle": "Warning", "openErrorText": "An error has occurred while opening the file", "saveErrorText": "An error has occurred while saving the file", diff --git a/apps/documenteditor/mobile/locale/es.json b/apps/documenteditor/mobile/locale/es.json index c9078153c..f2158e91f 100644 --- a/apps/documenteditor/mobile/locale/es.json +++ b/apps/documenteditor/mobile/locale/es.json @@ -397,7 +397,9 @@ "unknownErrorText": "Error desconocido.", "uploadImageExtMessage": "Formato de imagen desconocido.", "uploadImageFileCountMessage": "No hay imágenes subidas.", - "uploadImageSizeMessage": "La imagen es demasiado grande. El tamaño máximo es de 25 MB." + "uploadImageSizeMessage": "La imagen es demasiado grande. El tamaño máximo es de 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Cargando datos...", diff --git a/apps/documenteditor/mobile/locale/fi.json b/apps/documenteditor/mobile/locale/fi.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/fi.json +++ b/apps/documenteditor/mobile/locale/fi.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/fr.json b/apps/documenteditor/mobile/locale/fr.json index cc2b96cff..b54fe6bd3 100644 --- a/apps/documenteditor/mobile/locale/fr.json +++ b/apps/documenteditor/mobile/locale/fr.json @@ -397,7 +397,9 @@ "unknownErrorText": "Erreur inconnue.", "uploadImageExtMessage": "Format d'image inconnu.", "uploadImageFileCountMessage": "Aucune image chargée.", - "uploadImageSizeMessage": "L'image est trop grande. La taille limite est de 25 Mo." + "uploadImageSizeMessage": "L'image est trop grande. La taille limite est de 25 Mo.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Chargement des données en cours...", diff --git a/apps/documenteditor/mobile/locale/gl.json b/apps/documenteditor/mobile/locale/gl.json index 13d98227b..dc3eb0fec 100644 --- a/apps/documenteditor/mobile/locale/gl.json +++ b/apps/documenteditor/mobile/locale/gl.json @@ -397,7 +397,9 @@ "unknownErrorText": "Erro descoñecido.", "uploadImageExtMessage": "Formato de imaxe descoñecido.", "uploadImageFileCountMessage": "Non hai imaxes subidas.", - "uploadImageSizeMessage": "A imaxe é demasiado grande. O tamaño máximo é de 25 MB." + "uploadImageSizeMessage": "A imaxe é demasiado grande. O tamaño máximo é de 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Cargando datos...", diff --git a/apps/documenteditor/mobile/locale/hu.json b/apps/documenteditor/mobile/locale/hu.json index c3aed9719..9d349c667 100644 --- a/apps/documenteditor/mobile/locale/hu.json +++ b/apps/documenteditor/mobile/locale/hu.json @@ -397,7 +397,9 @@ "unknownErrorText": "Ismeretlen hiba.", "uploadImageExtMessage": "Ismeretlen képformátum.", "uploadImageFileCountMessage": "Nincs kép feltöltve.", - "uploadImageSizeMessage": "A kép túl nagy. A maximális méret 25 MB." + "uploadImageSizeMessage": "A kép túl nagy. A maximális méret 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Adatok betöltése...", diff --git a/apps/documenteditor/mobile/locale/it.json b/apps/documenteditor/mobile/locale/it.json index b7a90ec30..ba7f1b4d9 100644 --- a/apps/documenteditor/mobile/locale/it.json +++ b/apps/documenteditor/mobile/locale/it.json @@ -397,7 +397,9 @@ "unknownErrorText": "Errore sconosciuto.", "uploadImageExtMessage": "Formato d'immagine sconosciuto.", "uploadImageFileCountMessage": "Nessuna immagine caricata.", - "uploadImageSizeMessage": "L'immagine è troppo grande. La dimensione massima è 25 MB." + "uploadImageSizeMessage": "L'immagine è troppo grande. La dimensione massima è 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Caricamento di dati...", diff --git a/apps/documenteditor/mobile/locale/ja.json b/apps/documenteditor/mobile/locale/ja.json index 5b88b1cec..e1dd19b55 100644 --- a/apps/documenteditor/mobile/locale/ja.json +++ b/apps/documenteditor/mobile/locale/ja.json @@ -397,7 +397,9 @@ "unknownErrorText": "不明なエラー", "uploadImageExtMessage": "不明なイメージの形式", "uploadImageFileCountMessage": "アップロードしたイメージがない", - "uploadImageSizeMessage": "イメージのサイズの上限が超えさせました。サイズの上限が25MB。" + "uploadImageSizeMessage": "イメージのサイズの上限が超えさせました。サイズの上限が25MB。", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "データの読み込み中...", diff --git a/apps/documenteditor/mobile/locale/ko.json b/apps/documenteditor/mobile/locale/ko.json index 46fd4da58..ef119bc6d 100644 --- a/apps/documenteditor/mobile/locale/ko.json +++ b/apps/documenteditor/mobile/locale/ko.json @@ -397,7 +397,9 @@ "unknownErrorText": "알 수 없는 오류.", "uploadImageExtMessage": "알 수없는 이미지 형식입니다.", "uploadImageFileCountMessage": "이미지가 업로드되지 않았습니다.", - "uploadImageSizeMessage": "이미지 크기 제한을 초과했습니다." + "uploadImageSizeMessage": "이미지 크기 제한을 초과했습니다.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "데이터로드 중 ...", diff --git a/apps/documenteditor/mobile/locale/lo.json b/apps/documenteditor/mobile/locale/lo.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/lo.json +++ b/apps/documenteditor/mobile/locale/lo.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/lv.json b/apps/documenteditor/mobile/locale/lv.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/lv.json +++ b/apps/documenteditor/mobile/locale/lv.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/nb.json b/apps/documenteditor/mobile/locale/nb.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/nb.json +++ b/apps/documenteditor/mobile/locale/nb.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/nl.json b/apps/documenteditor/mobile/locale/nl.json index bc0ce1c29..62c864c06 100644 --- a/apps/documenteditor/mobile/locale/nl.json +++ b/apps/documenteditor/mobile/locale/nl.json @@ -397,7 +397,9 @@ "unknownErrorText": "Onbekende fout.", "uploadImageExtMessage": "Onbekende afbeeldingsindeling.", "uploadImageFileCountMessage": "Geen afbeeldingen geüpload.", - "uploadImageSizeMessage": "De afbeelding is te groot. De maximale grootte is 25MB." + "uploadImageSizeMessage": "De afbeelding is te groot. De maximale grootte is 25MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Gegevens worden geladen...", diff --git a/apps/documenteditor/mobile/locale/pl.json b/apps/documenteditor/mobile/locale/pl.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/pl.json +++ b/apps/documenteditor/mobile/locale/pl.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/pt.json b/apps/documenteditor/mobile/locale/pt.json index f670331a6..0e499eb55 100644 --- a/apps/documenteditor/mobile/locale/pt.json +++ b/apps/documenteditor/mobile/locale/pt.json @@ -397,7 +397,9 @@ "unknownErrorText": "Erro desconhecido.", "uploadImageExtMessage": "Formato de imagem desconhecido.", "uploadImageFileCountMessage": "Sem imagens carregadas.", - "uploadImageSizeMessage": "Tamanho limite máximo da imagem excedido. O tamanho máximo é de 25 MB." + "uploadImageSizeMessage": "Tamanho limite máximo da imagem excedido. O tamanho máximo é de 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Carregando dados...", diff --git a/apps/documenteditor/mobile/locale/ro.json b/apps/documenteditor/mobile/locale/ro.json index 421ef49b9..8538316f3 100644 --- a/apps/documenteditor/mobile/locale/ro.json +++ b/apps/documenteditor/mobile/locale/ro.json @@ -397,7 +397,9 @@ "unknownErrorText": "Eroare necunoscută.", "uploadImageExtMessage": "Format de imagine nerecunoscut.", "uploadImageFileCountMessage": "Nicio imagine nu a fost încărcată.", - "uploadImageSizeMessage": "Imaginea este prea mare. Limita de dimensiune este de 25 MB." + "uploadImageSizeMessage": "Imaginea este prea mare. Limita de dimensiune este de 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Încărcarea datelor...", diff --git a/apps/documenteditor/mobile/locale/ru.json b/apps/documenteditor/mobile/locale/ru.json index 98e921142..8b90142c9 100644 --- a/apps/documenteditor/mobile/locale/ru.json +++ b/apps/documenteditor/mobile/locale/ru.json @@ -397,7 +397,9 @@ "unknownErrorText": "Неизвестная ошибка.", "uploadImageExtMessage": "Неизвестный формат рисунка.", "uploadImageFileCountMessage": "Ни одного рисунка не загружено.", - "uploadImageSizeMessage": "Слишком большой рисунок. Максимальный размер - 25 MB." + "uploadImageSizeMessage": "Слишком большой рисунок. Максимальный размер - 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Загрузка данных...", diff --git a/apps/documenteditor/mobile/locale/sk.json b/apps/documenteditor/mobile/locale/sk.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/sk.json +++ b/apps/documenteditor/mobile/locale/sk.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/sl.json b/apps/documenteditor/mobile/locale/sl.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/sl.json +++ b/apps/documenteditor/mobile/locale/sl.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/sv.json b/apps/documenteditor/mobile/locale/sv.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/sv.json +++ b/apps/documenteditor/mobile/locale/sv.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/tr.json b/apps/documenteditor/mobile/locale/tr.json index 3405fb063..257d790ae 100644 --- a/apps/documenteditor/mobile/locale/tr.json +++ b/apps/documenteditor/mobile/locale/tr.json @@ -397,7 +397,9 @@ "unknownErrorText": "Bilinmeyen hata.", "uploadImageExtMessage": "Bilinmeyen resim formatı.", "uploadImageFileCountMessage": "Resim yüklenmedi.", - "uploadImageSizeMessage": "Görüntü çok büyük. Maksimum boyut 25 MB'dir." + "uploadImageSizeMessage": "Görüntü çok büyük. Maksimum boyut 25 MB'dir.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Veri yükleniyor...", diff --git a/apps/documenteditor/mobile/locale/uk.json b/apps/documenteditor/mobile/locale/uk.json index 801ae73f6..ed41c3cfd 100644 --- a/apps/documenteditor/mobile/locale/uk.json +++ b/apps/documenteditor/mobile/locale/uk.json @@ -397,7 +397,9 @@ "unknownErrorText": "Невідома помилка.", "uploadImageExtMessage": "Невідомий формат зображення.", "uploadImageFileCountMessage": "Жодного зображення не завантажено.", - "uploadImageSizeMessage": "Занадто велике зображення. Максимальний розмір – 25 MB." + "uploadImageSizeMessage": "Занадто велике зображення. Максимальний розмір – 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Завантаження даних...", diff --git a/apps/documenteditor/mobile/locale/vi.json b/apps/documenteditor/mobile/locale/vi.json index 97fde94a6..823418902 100644 --- a/apps/documenteditor/mobile/locale/vi.json +++ b/apps/documenteditor/mobile/locale/vi.json @@ -397,7 +397,9 @@ "uploadImageExtMessage": "Unknown image format.", "uploadImageFileCountMessage": "No images uploaded.", "uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.", - "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator." + "errorLoadingFont": "Fonts are not loaded.
Please contact your Document Server administrator.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "Loading data...", diff --git a/apps/documenteditor/mobile/locale/zh.json b/apps/documenteditor/mobile/locale/zh.json index d104072cd..a81e245e3 100644 --- a/apps/documenteditor/mobile/locale/zh.json +++ b/apps/documenteditor/mobile/locale/zh.json @@ -397,7 +397,9 @@ "unknownErrorText": "未知错误。", "uploadImageExtMessage": "未知图像格式。", "uploadImageFileCountMessage": "没有图片上传", - "uploadImageSizeMessage": "图片太大了。最大允许的大小是 25 MB." + "uploadImageSizeMessage": "图片太大了。最大允许的大小是 25 MB.", + "errorEmptyTOC": "Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.", + "errorNoTOC": "There's no table of contents to update. You can insert one from the References tab." }, "LongActions": { "applyChangesTextText": "数据加载中…", diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 3da5ad07d..f346c8f1c 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -134,11 +134,9 @@ class ContextMenu extends ContextMenuController { const api = Common.EditorApi.get(); let props = api.asc_GetTableOfContentsPr(currentTOC); - if (props) { - if (currentTOC && props) - currentTOC = props.get_InternalClass(); - api.asc_UpdateTableOfContents(type == 'pages', currentTOC); - } + if (currentTOC && props) + currentTOC = props.get_InternalClass(); + api.asc_UpdateTableOfContents(type == 'pages', currentTOC); }; showCopyCutPasteModal() { diff --git a/apps/documenteditor/mobile/src/controller/Error.jsx b/apps/documenteditor/mobile/src/controller/Error.jsx index 4373e04d0..7596024da 100644 --- a/apps/documenteditor/mobile/src/controller/Error.jsx +++ b/apps/documenteditor/mobile/src/controller/Error.jsx @@ -181,6 +181,14 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu config.msg = _t.errorLoadingFont; break; + case Asc.c_oAscError.ID.ComplexFieldEmptyTOC: + config.msg = _t.errorEmptyTOC; + break; + + case Asc.c_oAscError.ID.ComplexFieldNoTOC: + config.msg = _t.errorNoTOC; + break; + default: config.msg = _t.errorDefaultMessage.replace('%1', id); break; diff --git a/apps/documenteditor/mobile/src/controller/edit/EditTableContents.jsx b/apps/documenteditor/mobile/src/controller/edit/EditTableContents.jsx index 584a5c196..3045c2871 100644 --- a/apps/documenteditor/mobile/src/controller/edit/EditTableContents.jsx +++ b/apps/documenteditor/mobile/src/controller/edit/EditTableContents.jsx @@ -238,11 +238,9 @@ class EditTableContentsController extends Component { const api = Common.EditorApi.get(); let props = api.asc_GetTableOfContentsPr(currentTOC); - if (props) { - if (currentTOC && props) - currentTOC = props.get_InternalClass(); - api.asc_UpdateTableOfContents(type == 'pages', currentTOC); - } + if (currentTOC && props) + currentTOC = props.get_InternalClass(); + api.asc_UpdateTableOfContents(type == 'pages', currentTOC); }; onRemoveTableContents(currentTOC) {