From 53e2a30af5139561ca2b74aa5ec593fcbda5186d Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 3 May 2021 13:05:45 +0200 Subject: [PATCH 1/6] Translated using Weblate (French) Currently translated at 100.0% (1227 of 1227 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index f1d782e43..a2a9e8a6c 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1226,5 +1226,6 @@ "pad_goToAnchor": "Aller à cette ancre", "settings_padOpenLinkLabel": "Activer l'ouverture directe des liens", "settings_padOpenLinkHint": "Cette option permet d'ouvrir les liens dans un document texte sans fenêtre d’aperçu", - "settings_padOpenLinkTitle": "Ouvrir les lien avec un seul clic" + "settings_padOpenLinkTitle": "Ouvrir les lien avec un seul clic", + "toolbar_storeInDrive": "Stocker dans CryptDrive" } From ec4bdc2fece59c44f6ff2c1f85d0947954cc81c9 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 3 May 2021 13:05:46 +0200 Subject: [PATCH 2/6] Translated using Weblate (English) Currently translated at 100.0% (1227 of 1227 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 06df08b31..a21ae4609 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1226,5 +1226,6 @@ "settings_notifCalendarCheckbox": "Enable calendar notifications", "calendar_notifications": "Reminders", "calendar_addNotification": "Add reminder", - "calendar_noNotification": "None" + "calendar_noNotification": "None", + "toolbar_storeInDrive": "Store in CryptDrive" } From a35dabb0bc60be26637b2bf3f9b483f83f17fb5d Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 3 May 2021 14:16:44 +0200 Subject: [PATCH 3/6] Translated using Weblate (French) Currently translated at 100.0% (1228 of 1228 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index a2a9e8a6c..e17729dc3 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1227,5 +1227,6 @@ "settings_padOpenLinkLabel": "Activer l'ouverture directe des liens", "settings_padOpenLinkHint": "Cette option permet d'ouvrir les liens dans un document texte sans fenêtre d’aperçu", "settings_padOpenLinkTitle": "Ouvrir les lien avec un seul clic", - "toolbar_storeInDrive": "Stocker dans CryptDrive" + "toolbar_storeInDrive": "Stocker dans CryptDrive", + "genericCopySuccess": "Copié dans le presse-papiers" } From 176c9b99b86575ffb2ed74bd70d498e55396c5cd Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 3 May 2021 14:16:44 +0200 Subject: [PATCH 4/6] Translated using Weblate (English) Currently translated at 100.0% (1228 of 1228 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index a21ae4609..b8c70c56a 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1227,5 +1227,6 @@ "calendar_notifications": "Reminders", "calendar_addNotification": "Add reminder", "calendar_noNotification": "None", - "toolbar_storeInDrive": "Store in CryptDrive" + "toolbar_storeInDrive": "Store in CryptDrive", + "genericCopySuccess": "Copied to clipboard" } From 937d42e267dfb5ec618c63d3e0392d3b974f2ca5 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 28 Apr 2021 18:21:28 +0200 Subject: [PATCH 5/6] Fix small OO bugs --- www/common/cryptpad-common.js | 5 +++++ www/common/onlyoffice/inner.js | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 04dabb02d..dbbb3b18e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -2373,9 +2373,14 @@ define([ }; postMsg('INIT'); + /* window.addEventListener('beforeunload', function () { postMsg('CLOSE'); }); + */ + window.addEventListener('unload', function () { + postMsg('CLOSE'); + }); } else if (false && !noWorker && !noSharedWorker && 'serviceWorker' in navigator) { var initializing = true; var stopWaiting = waitFor2(); // Call this function when we're ready diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index fcffadb52..bb282a3aa 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2215,20 +2215,22 @@ define([ } }; + var wasEditing = false; var setStrictEditing = function () { if (APP.isFast) { return; } var editor = getEditor(); - var isModified = editor.asc_isDocumentModified || editor.isDocumentModified; - var editing = isModified(); + var editing = editor.asc_isDocumentModified ? editor.asc_isDocumentModified() : editor.isDocumentModified(); if (editing) { evOnPatch.fire(); } else { evOnSync.fire(); } + wasEditing = Boolean(editing); }; APP.onFastChange = function (isFast) { APP.isFast = isFast; if (isFast) { + wasEditing = false; if (APP.hasChangedInterval) { window.clearInterval(APP.hasChangedInterval); } @@ -2575,6 +2577,7 @@ define([ sframeChan.event("EV_CORRUPTED_CACHE"); }; + var firstReady = true; config.onReady = function (info) { if (APP.realtime !== info.realtime) { APP.realtime = info.realtime; @@ -2684,8 +2687,12 @@ define([ setMyId(); oldHashes = JSON.parse(JSON.stringify(content.hashes)); initializing = false; - common.openPadChat(APP.onLocal); + // Only execute the following code the first time we call onReady + if (!firstReady) { return void setEditable(!readOnly); } + firstReady = false; + + common.openPadChat(APP.onLocal); if (!readOnly) { var cursors = {}; From 09af3f1c8698e3bdf7ba5a6b096121c0e69b4a49 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 3 May 2021 16:37:53 +0200 Subject: [PATCH 6/6] Fix checkpoint issues in sheets --- www/common/onlyoffice/inner.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index bb282a3aa..be41b4d5b 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2804,10 +2804,8 @@ define([ checkNewCheckpoint(); }); }; - var isModified = editor.asc_isDocumentModified || function () { - return editor.isDocumentModify; - }; - if (isModified()) { + var editing = editor.asc_isDocumentModified ? editor.asc_isDocumentModified() : editor.isDocumentModify; + if (editing) { setEditable(false); APP.unsavedLocks = myLocks; APP.onStrictSaveChanges = function () {