From e243a3779d96e0b228c306ae0679f15751535415 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 10:25:55 +0530 Subject: [PATCH 01/14] add 'nodrive' to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9ed60e7..424f0789a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,9 @@ * updated catch-phrase (Collaboration suite\nend-to-end-encrypted and open-source * CKEditor * cursor jump when clicking on a comment bubble +* nodrive + * load anonymous accounts without creating a drive + * faster load time, less junk on the server # 4.2.1 From 2279898d1084592775543c0c9dccf40d814dfbd9 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 10:26:21 +0530 Subject: [PATCH 02/14] increment version string for 4.3.0 --- customize.dist/pages.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index 3ea9606d6..ff2b90b40 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -62,7 +62,7 @@ define([ var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? '/imprint.html' : AppConfig.imprint); - Pages.versionString = "v4.2.1"; + Pages.versionString = "v4.3.0"; // used for the about menu Pages.imprintLink = AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined; diff --git a/package-lock.json b/package-lock.json index 0196cac16..447f6a468 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cryptpad", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 98207db86..c059c6bd0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "4.2.1", + "version": "4.3.0", "license": "AGPL-3.0+", "repository": { "type": "git", From bced36b2f82d718a963b45c1668b5fd029c05405 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 10:42:05 +0530 Subject: [PATCH 03/14] ignore onlyoffice/v4 when linting --- .jshintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.jshintignore b/.jshintignore index b9ed0f0ce..1d7c897db 100644 --- a/.jshintignore +++ b/.jshintignore @@ -11,6 +11,7 @@ www/common/onlyoffice/web-apps www/common/onlyoffice/x2t www/common/onlyoffice/v1 www/common/onlyoffice/v2* +www/common/onlyoffice/v4 server.js www/common/old-media-tag.js From 163b870f92282a40edf2299369acc95bac794531 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 12:26:05 +0530 Subject: [PATCH 04/14] handle absent trailing slashes in config for checkup page --- www/checkup/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/checkup/main.js b/www/checkup/main.js index 06b69e12b..bcbdf0d7b 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -43,7 +43,11 @@ define([ }, _alert('Sandbox configuration: httpUnsafeOrigin !== httpSafeOrigin')); assert(function (cb) { - cb((window.location.origin + '/') === ApiConfig.httpUnsafeOrigin); + var origin = window.location.origin; + return void cb([ + origin, + origin + '/' + ].indexOf(ApiConfig.httpUnsafeOrigin) !== -1); }, _alert('Sandbox configuration: loading via httpUnsafeOrigin')); From 2c63a3ba7ea35ae86afbc0c9b2e3c5d4bbbd9fe4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 12:26:27 +0530 Subject: [PATCH 05/14] define some basic formatting keybindings in rich text --- www/pad/inner.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/www/pad/inner.js b/www/pad/inner.js index ede92a9e9..3ed2f130c 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -1404,6 +1404,33 @@ define([ }; framework._.sfCommon.getSframeChannel().event('EV_SHARE_OPEN', data); }; + + // remove selected formatting with ctrl-space + editor.addCommand('deformat', { + exec: function (edt) { + edt.execCommand( 'removeFormat', editor.selection ); + }, + }); + editor.setKeystroke(CKEDITOR.CTRL + 32, 'deformat'); + + // Add keybindings for CTRL+ALT+n to set headings 1-6 on selected text + var styleKeys = { + h1: 49, // 1 + h2: 50, // 2 + h3: 51, // 3 + h4: 52, // 4 + h5: 53, // 5 + h6: 54, // 6 + // 7 unassigned + div: 56,// 8 + pre: 57, // 9 + p: 48, // 0 + }; + Object.keys(styleKeys).forEach(function (tag) { + editor.addCommand(tag, new CKEDITOR.styleCommand(new CKEDITOR.style({ element: tag }))); + editor.setKeystroke( CKEDITOR.CTRL + CKEDITOR.ALT + styleKeys[tag], tag); + }); + Links.init(Ckeditor, editor); }).nThen(function() { // Move ckeditor parts to have a structure like the other apps From 4dd23275b01d62a7af54b7064f93de2b1c3adec2 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 13:06:43 +0530 Subject: [PATCH 06/14] ignore onlyoffice v4 when linting translations --- scripts/unused-translations.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/unused-translations.js b/scripts/unused-translations.js index ea866b489..26156cd03 100644 --- a/scripts/unused-translations.js +++ b/scripts/unused-translations.js @@ -30,6 +30,7 @@ var grep = function (pattern, cb) { 'www/common/translations/*', 'www/common/onlyoffice/v1/*', 'www/common/onlyoffice/v2b*', + 'www/common/onlyoffice/v4*', 'www/common/onlyoffice/x2t/*', //'www/common/onlyoffice/build/*', 'www/lib/*', From 100b3d22987a1113124c738d07e0bc17c1163c1f Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 13:07:04 +0530 Subject: [PATCH 07/14] update changelog with note about rich text keybindings --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 424f0789a..5e8379bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ * updated catch-phrase (Collaboration suite\nend-to-end-encrypted and open-source * CKEditor * cursor jump when clicking on a comment bubble + * keybindings for common styles * nodrive * load anonymous accounts without creating a drive * faster load time, less junk on the server From 51707fe97b6e9c5594078b618053bcce32359b65 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 13:12:14 +0530 Subject: [PATCH 08/14] remove two unused translations --- www/common/translations/messages.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 19b9ac01c..6112b780d 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -156,7 +156,6 @@ "cancel": "Cancel", "cancelButton": "Cancel (esc)", "show_help_button": "Show help", - "hide_help_button": "Hide help", "help_button": "Help", "historyText": "History", "historyButton": "Display the document history", @@ -419,7 +418,6 @@ "settings_deleteHint": "Account deletion is permanent. Your CryptDrive and your list of pads will be deleted from the server. The rest of your pads will be deleted in 90 days if nobody else has stored them in their CryptDrive.", "settings_deleteButton": "Delete your account", "settings_deleteModal": "Share the following information with your CryptPad administrator in order to have your data removed from their server.", - "settings_deleteConfirm": "Clicking OK will delete your account permanently. Are you sure?", "settings_deleted": "Your user account is now deleted. Press OK to go to the home page.", "settings_anonymous": "You are not logged in. Settings here are specific to this browser.", "settings_publicSigningKey": "Public Signing Key", From f90addc79c221a4b5a5435cf9cf97310bcdecf9b Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 18 Mar 2021 08:42:35 +0100 Subject: [PATCH 09/14] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ --- www/common/translations/messages.ca.json | 2 -- www/common/translations/messages.de.json | 2 -- www/common/translations/messages.es.json | 2 -- www/common/translations/messages.fi.json | 2 -- www/common/translations/messages.fr.json | 2 -- www/common/translations/messages.it.json | 2 -- www/common/translations/messages.ja.json | 1 - www/common/translations/messages.nb.json | 1 - www/common/translations/messages.nl.json | 2 -- www/common/translations/messages.pt-br.json | 1 - www/common/translations/messages.ro.json | 2 -- www/common/translations/messages.ru.json | 2 -- www/common/translations/messages.sv.json | 1 - 13 files changed, 22 deletions(-) diff --git a/www/common/translations/messages.ca.json b/www/common/translations/messages.ca.json index e9289ed56..9a1cf0ff3 100644 --- a/www/common/translations/messages.ca.json +++ b/www/common/translations/messages.ca.json @@ -153,7 +153,6 @@ "cancel": "Cancel·la", "cancelButton": "Cancel·la (Esc)", "show_help_button": "Mostra l'ajuda", - "hide_help_button": "Amaga l'ajuda", "help_button": "Ajuda", "historyText": "Historial", "historyButton": "Mostra l'historial del document", @@ -420,7 +419,6 @@ "settings_deleteHint": "La supressió del vostre compte és permanent. El vostre CryptDrive i la vostra llista de documents seran suprimits del servidor. La resta de documents serà suprimida després de 90 dies d'inactivitat si ningú els ha desat al seu CryptDrive.", "settings_deleteButton": "Suprimir el vostre compte", "settings_deleteModal": "Envieu la següent informació a qui administri el vostre CryptPad per tal que les vostres dades siguin esborrades del servidor.", - "settings_deleteConfirm": "Segur que voleu suprimir el vostre compte? Aquesta acció és irreversible.", "settings_deleted": "El vostre compte ha estat suprimit. Premeu D'acord per tornar a la pàgina inicial.", "storageStatus": "Emmagatzematge:
{0} utilitzats de {1}", "settings_anonymous": "No heu iniciat la sessió. Els paràmetres només s'aplicaran al navegador actual.", diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index ad982eaa6..cb5682dc7 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -151,7 +151,6 @@ "cancel": "Abbrechen", "cancelButton": "Abbrechen (Esc)", "show_help_button": "Hilfe anzeigen", - "hide_help_button": "Hilfe verbergen", "help_button": "Hilfe", "historyText": "Verlauf", "historyButton": "Dokumentverlauf anzeigen", @@ -402,7 +401,6 @@ "settings_deleteHint": "Die Löschung eines Accounts ist endgültig. Dein CryptDrive und die Liste deiner Pads werden vom Server gelöscht. Deine restlichen Pads werden nach 90 Tage gelöscht, wenn niemand anderes sie in seinem CryptDrive gespeichert hat.", "settings_deleteButton": "Deinen Account löschen", "settings_deleteModal": "Gib die folgenden Informationen an deinen CryptPad-Administrator weiter, damit er die Daten vom Server löschen kann.", - "settings_deleteConfirm": "Wenn du auf OK klickst, wird dein Account dauerhaft gelöscht. Bist du sicher?", "settings_deleted": "Dein Account ist jetzt gelöscht. Klicke auf OK, um zur Hauptseite zu gelangen.", "settings_anonymous": "Du bist nicht eingeloggt. Die Einstellungen hier gelten nur für diesen Browser.", "settings_publicSigningKey": "Öffentlicher Schlüssel zum Unterschreiben", diff --git a/www/common/translations/messages.es.json b/www/common/translations/messages.es.json index 0e4560238..e394fc8a0 100644 --- a/www/common/translations/messages.es.json +++ b/www/common/translations/messages.es.json @@ -377,7 +377,6 @@ "slide_invalidLess": "Estilo personalizado no válido", "ok": "OK", "show_help_button": "Mostrar ayuda", - "hide_help_button": "Esconder ayuda", "help_button": "Ayuda", "history_loadMore": "Cargar más historial", "pad_mediatagWidth": "Ancho (px)", @@ -484,7 +483,6 @@ "settings_deleteHint": "Borra la cuenta es permanente. SU CryptDrive y la lista de notas serán borradas del servidor. El resto de sus notas sera borrada en 90 días si nadie mas las ha guardado en su CryptDrive.", "settings_deleteButton": "Borrar su cuenta", "settings_deleteModal": "Compartir la siguiente información con el administrado de su CryptDrive a fin de que sus datos sean removidos de su servidor.", - "settings_deleteConfirm": "Presionar OK borrará su cuanta de manera permanente. Está seguro?", "settings_deleted": "Tu cuenta de usuario ha sido borrada. Presione OK para ir a la página principal.", "uploadFolderButton": "Subir carpeta", "fm_morePads": "Más", diff --git a/www/common/translations/messages.fi.json b/www/common/translations/messages.fi.json index a6db4ccfa..b64ab088b 100644 --- a/www/common/translations/messages.fi.json +++ b/www/common/translations/messages.fi.json @@ -156,7 +156,6 @@ "cancel": "Keskeytä", "cancelButton": "Keskeytä (Esc)", "show_help_button": "Näytä ohje", - "hide_help_button": "Piilota ohje", "help_button": "Ohje", "historyText": "Historia", "historyButton": "Näytä asiakirjan historia", @@ -419,7 +418,6 @@ "settings_deleteHint": "Käyttäjätilin poisto on pysyvä toimenpide. CryptDrivesi ja lista padeistasi poistetaan palvelimelta. Loput padeistasi poistetaan 90 päivän kuluttua, jos kukaan muu ei ole tallentanut niitä omaan CryptDriveensa.", "settings_deleteButton": "Poista käyttäjätilisi", "settings_deleteModal": "Jaa seuraavat tiedot CryptPad-instanssisi ylläpitäjän kanssa poistaaksesi tietosi palvelimelta.", - "settings_deleteConfirm": "Napsauttamalla OK käyttäjätilisi poistetaan pysyvästi. Oletko varma?", "settings_deleted": "Käyttäjätilisi on nyt poistettu. Napsauta OK siirtyäksesi kotisivulle.", "settings_anonymous": "Et ole kirjautunut sisään. Nämä asetukset koskevat vain tätä selainta.", "settings_publicSigningKey": "Julkinen salausavain", diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index 13a15bfef..3b4a81f6a 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -153,7 +153,6 @@ "cancel": "Annuler", "cancelButton": "Annuler (Échap)", "show_help_button": "Afficher l'aide", - "hide_help_button": "Cacher l'aide", "help_button": "Aide", "historyText": "Historique", "historyButton": "Afficher l'historique du document", @@ -409,7 +408,6 @@ "settings_deleteHint": "La suppression de votre compte utilisateur est permanente. Votre CryptDrive et votre liste de pads seront supprimés du serveur. Le reste de vos pads sera supprimé après 90 jours d'inactivité si personne ne les a stockés dans leur CryptDrive.", "settings_deleteButton": "Supprimer votre compte", "settings_deleteModal": "Veuillez envoyer les informations suivantes à votre administrateur CryptPad afin que vos données soient supprimées du serveur.", - "settings_deleteConfirm": "Êtes-vous sûr de vouloir supprimer votre compte utilisateur ? Cette action est irréversible.", "settings_deleted": "Votre compte utilisateur a été supprimé. Appuyez sur OK pour être redirigé(e) vers la page d'accueil.", "settings_anonymous": "Vous n'êtes pas connecté. Ces préférences seront utilisées pour ce navigateur.", "settings_publicSigningKey": "Clé publique de signature", diff --git a/www/common/translations/messages.it.json b/www/common/translations/messages.it.json index 988904bbd..68a68aaef 100644 --- a/www/common/translations/messages.it.json +++ b/www/common/translations/messages.it.json @@ -153,7 +153,6 @@ "cancel": "Annulla", "cancelButton": "Annulla (Esc)", "show_help_button": "Mostra la guida", - "hide_help_button": "Nascondi la guida", "help_button": "Guida", "historyText": "Cronologia", "historyButton": "Mostra la cronologia del documento", @@ -570,7 +569,6 @@ "settings_anonymous": "Non sei connesso. Queste impostazioni sono specifiche per questo browser.", "settings_deleted": "Il tuo account utente è stato cancellato. Premi OK per tornare alla home page.", "settings_deleteModal": "Condividi le seguenti informazioni con il tuo amministratore CryptPad per far rimuovere i tuoi dati dal server.", - "settings_deleteConfirm": "Cliccando OK cancellerai il tuo account definitivamente. Sei sicuro?", "settings_autostoreHint": "Automatico Tutti i pad che visiti sono conservati nel tuo CryptDrive.
Manuale (chiedi sempre) Se non hai ancora conservato alcun pad ti verrà chiesto se vuoi conservarli nel tuo CryptDrive.
Manuale (non chiedere mai) I pads non sono conservati automaticamente nel tuo Cryptpad. L'opzione di conservarli sarà nascosta.", "settings_autostoreNo": "Manuale (non chiedere mai)", "settings_autostoreYes": "Automatico", diff --git a/www/common/translations/messages.ja.json b/www/common/translations/messages.ja.json index ee9916d6e..43c4ddacf 100644 --- a/www/common/translations/messages.ja.json +++ b/www/common/translations/messages.ja.json @@ -285,7 +285,6 @@ "historyText": "履歴", "help_button": "ヘルプ", "show_help_button": "ヘルプを表示", - "hide_help_button": "ヘルプを非表示", "cancel": "キャンセル", "ok": "OK", "okButton": "OK (enter)", diff --git a/www/common/translations/messages.nb.json b/www/common/translations/messages.nb.json index 391be52ad..64419f62b 100644 --- a/www/common/translations/messages.nb.json +++ b/www/common/translations/messages.nb.json @@ -276,7 +276,6 @@ "historyButton": "Vis dokumenthistorikken", "historyText": "Historikk", "help_button": "Hjelp", - "hide_help_button": "Skjul Hjelp", "show_help_button": "Vis Hjelp", "cancelButton": "Avslutt (esc)", "cancel": "Avslutt", diff --git a/www/common/translations/messages.nl.json b/www/common/translations/messages.nl.json index 556cab512..95bbb4f34 100644 --- a/www/common/translations/messages.nl.json +++ b/www/common/translations/messages.nl.json @@ -38,7 +38,6 @@ "historyButton": "Toon documentgeschiedenis", "historyText": "Geschiedenis", "help_button": "Hulp", - "hide_help_button": "Verberg hulp", "show_help_button": "Toon hulp", "cancelButton": "Annuleren (esc)", "cancel": "Annuleren", @@ -316,7 +315,6 @@ "settings_publicSigningKey": "Openbare Ondertekeningssleutel", "settings_anonymous": "U bent niet ingelogd. Instellingen hier gelden alleen voor deze browser.", "settings_deleted": "Uw account is nu verwijderd. Klik OK om naar de startpagina te gaan.", - "settings_deleteConfirm": "Als u op OK klikt, wordt uw account blijvend verwijderd. Weet u het zeker?", "settings_deleteModal": "Deel de volgende informatie met uw CryptPad administrator om uw data te laten verwijderen van de server.", "settings_deleteButton": "Uw account verwijderen", "settings_deleteHint": "Het verwijderen van uw account is blijvend. Uw CryptDrive en lijst van werkomgevingen worden voorgoed verwijderd van de server. Uw overige werkomgevingen worden over 90 dagen verwijderd, behalve als ze door een andere gebruiker zijn opgeslagen.", diff --git a/www/common/translations/messages.pt-br.json b/www/common/translations/messages.pt-br.json index eed784a38..d9ebe6794 100644 --- a/www/common/translations/messages.pt-br.json +++ b/www/common/translations/messages.pt-br.json @@ -325,7 +325,6 @@ "fileEmbedTag": "", "ok": "", "show_help_button": "", - "hide_help_button": "", "help_button": "", "historyText": "", "openLinkInNewTab": "", diff --git a/www/common/translations/messages.ro.json b/www/common/translations/messages.ro.json index 0449a55ed..2d22b2642 100644 --- a/www/common/translations/messages.ro.json +++ b/www/common/translations/messages.ro.json @@ -317,7 +317,6 @@ "fileEmbedTag": "După care plasează această etichetă Media oriunde pe pagina unde vrei sa o plasezi", "ok": "Ok", "show_help_button": "Arată ajutorul", - "hide_help_button": "Maschează ajutorul", "help_button": "Ajutor", "historyText": "Istoric", "history_loadMore": "Afișează mai multe elemente din istoric", @@ -462,7 +461,6 @@ "padNotPinnedVariable": "Acest document va expira dupa {4} zile de inactivitate, {0}autentifică-te{1} sau {2}creează-ți un cont{3} pentru a-l pastra.", "settings_logoutEverywhereButton": "Deconectează-te", "settings_deleted": "Contul tău de utilizator este șters. Apasă OK pentru a reveni la pagina principală.", - "settings_deleteConfirm": "Dacă apeși OK, contul tău va fi șters permanent. Ești sigur?", "settings_deleteModal": "Furnizați informațiile următoare administratorului CryptPad-ului dvs. astfel încât acestea să fie șterse de pe server.", "settings_deleteButton": "Șterge contul tău", "settings_deleteHint": "Ștergerea contului este permanentă. Cryptdrive-ul tău și lista ta de documente vor fi șterse de pe server. Restul documentelor vor fi șterse în timp de 90 de zile dacă nimeni nu le stochează în CryptDrive-ul său.", diff --git a/www/common/translations/messages.ru.json b/www/common/translations/messages.ru.json index f61f8bee8..4793180e2 100644 --- a/www/common/translations/messages.ru.json +++ b/www/common/translations/messages.ru.json @@ -149,7 +149,6 @@ "cancel": "Отмена", "cancelButton": "Отмена (Esc)", "show_help_button": "Показать справку", - "hide_help_button": "Скрыть справку", "help_button": "Справка", "historyText": "История", "historyButton": "Показать историю документа", @@ -413,7 +412,6 @@ "settings_deleteHint": "Удаление аккаунта является постоянным. Ваш CryptDrive и список пэдов будут удалены с сервера. Остальные ваши пэды будут удалены через 90 дней, если никто другой не сохранил их в CryptDrive.", "settings_deleteButton": "Удалить ваш аккаунт", "settings_deleteModal": "Обменивайтесь следующей информацией с администратором CryptPad, чтобы удалить ваши данные с сервера.", - "settings_deleteConfirm": "Нажмите OK, чтобы удалить ваш аккаунт навсегда. Вы уверены?", "settings_deleted": "Ваша учетная запись пользователя удалена. Нажмите OK, чтобы перейти на главную страницу.", "settings_publicSigningKey": "Публичный ключ подписи", "oo_exportInProgress": "Экспорт в процессе", diff --git a/www/common/translations/messages.sv.json b/www/common/translations/messages.sv.json index 8f09b15aa..f79764fc6 100644 --- a/www/common/translations/messages.sv.json +++ b/www/common/translations/messages.sv.json @@ -171,7 +171,6 @@ "historyButton": "Visa dokumenthistoriken", "historyText": "Historik", "help_button": "Hjälp", - "hide_help_button": "Dölj hjälp", "show_help_button": "Visa hjälp", "cancelButton": "Avbryt (Esc)", "cancel": "Avbryt", From 63459b914e1d75adcb151ffd959e112ea8ba3ffc Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 13:52:28 +0530 Subject: [PATCH 10/14] lint compliance --- www/pad/inner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/pad/inner.js b/www/pad/inner.js index 3ed2f130c..96ea320bc 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -1405,6 +1405,8 @@ define([ framework._.sfCommon.getSframeChannel().event('EV_SHARE_OPEN', data); }; + var CKEDITOR = window.CKEDITOR; + // remove selected formatting with ctrl-space editor.addCommand('deformat', { exec: function (edt) { From b4adf0ac4a3dcd888dfcba0de9d5d63eaf1db804 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 18 Mar 2021 14:08:40 +0530 Subject: [PATCH 11/14] fix a broken link in the help menu --- www/common/common-ui-elements.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 8f6335d27..562c3757c 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1536,7 +1536,7 @@ define([ var legalLine = template(Messages.info_imprintFlavour, Pages.imprintLink); var privacyLine = template(Messages.info_privacyFlavour, Pages.privacyLink); - var faqLine = template(Messages.help.generic.more, Pages.docsLink); + var faqLine = template(Messages.help_genericMore, Pages.docsLink); var content = h('div.cp-info-menu-container', [ h('div.logo-block', [ From f6f90712af9e7d7358de9db3d92704f6f3fb8471 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 19 Mar 2021 15:20:33 +0530 Subject: [PATCH 12/14] stricter tests for the sandbox checkup --- www/checkup/main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/www/checkup/main.js b/www/checkup/main.js index bcbdf0d7b..5dcd1e8cf 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -42,12 +42,13 @@ define([ return void cb(trimmedSafe !== trimmedUnsafe); }, _alert('Sandbox configuration: httpUnsafeOrigin !== httpSafeOrigin')); + assert(function (cb) { + cb(trimmedSafe === ApiConfig.httpSafeOrigin); + }, "httpSafeOrigin must not have a trailing slash"); + assert(function (cb) { var origin = window.location.origin; - return void cb([ - origin, - origin + '/' - ].indexOf(ApiConfig.httpUnsafeOrigin) !== -1); + return void cb(ApiConfig.httpUnsafeOrigin === origin); }, _alert('Sandbox configuration: loading via httpUnsafeOrigin')); From 91e1063e4a903dffdc5fc0c2728bce138daf8315 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 19 Mar 2021 10:51:47 +0100 Subject: [PATCH 13/14] Fix OO generated ID for image properties --- www/common/onlyoffice/inner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 84ad474b0..d06e9a534 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1281,13 +1281,15 @@ define([ '#title-user-name { display: none !important; }' + (supportsXLSX() ? '' : '#slot-btn-dt-print { display: none !important; }') + // New OO: - '#asc-gen566 { display: none !important; }' + // Insert image from url + '#asc-gen257 { display: none !important; }' + // Insert image from url 'section[data-tab="ins"] .separator:nth-last-child(2) { display: none !important; }' + // separator '#slot-btn-insequation { display: none !important; }' + // Insert equation //'.toolbar .tabs .ribtab:not(.canedit) { display: none !important; }' + // Switch collaborative mode '#fm-btn-info { display: none !important; }' + // Author name, doc title, etc. in "File" (menu entry) '#panel-info { display: none !important; }' + // Same but content '#image-button-from-url { display: none !important; }' + // Inline image settings: replace with url + '#asc-gen1839 { display: none !important; }' + // Image context menu: replace with url + '#asc-gen5883 { display: none !important; }' + // Rightside image menu: replace with url '#file-menu-panel .devider { display: none !important; }' + // separator in the "File" menu '#left-btn-spellcheck, #left-btn-about { display: none !important; }'+ 'div.btn-users.dropdown-toggle { display: none; !important }'; From e1e1795714f5e13fbf912ac6ed918ee0ad8b032e Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 19 Mar 2021 10:57:06 +0100 Subject: [PATCH 14/14] Fix race condition and display name with noDrive --- www/common/outer/async-store.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 4db6a6142..60dc9ca73 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2835,6 +2835,9 @@ define([ if (store.ready) { return; } // the store is already ready, it is a reconnection store.driveMetadata = info.metadata; if (!rt.proxy.drive || typeof(rt.proxy.drive) !== 'object') { rt.proxy.drive = {}; } + if (!rt.proxy[Constants.displayNameKey] && store.noDriveName) { + store.proxy[Constants.displayNameKey] = store.noDriveName; + } /* // deprecating localStorage migration as of 4.2.0 var drive = rt.proxy.drive; @@ -2950,7 +2953,13 @@ define([ if (!store.network) { var wsUrl = NetConfig.getWebsocketURL(); return void Netflux.connect(wsUrl).then(function (network) { - store.network = network; + // If we already haave a network (race condition), use the + // existing one and forget this one + if (!store.network) { store.network = network; } + else { + network.disconnect(); + network = store.network; + } // We need to know the HistoryKeeper ID to initialize the anon RPC // Join a basic ephemeral channel, get the ID and leave it instantly network.join('0000000000000000000000000000000000').then(function (wc) {