From 533df68cadbe4ce76069aa387010a992876fa752 Mon Sep 17 00:00:00 2001 From: Ayoub Zayati Date: Mon, 14 Oct 2024 17:13:23 +0200 Subject: [PATCH 01/29] fix: Fix delete label in deletion confirmation popup - EXO-74699 - Meeds-io/MIPs#161 (#1163) --- .../resources/locale/portlet/notes/notesPortlet_ar.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_aro.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_az.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ca.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ceb.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_co.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_cs.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_de.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_el.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_en.properties | 3 ++- .../locale/portlet/notes/notesPortlet_es_ES.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_eu.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_fa.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_fi.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_fil.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_fr.properties | 3 ++- .../resources/locale/portlet/notes/notesPortlet_hi.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_hu.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_id.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_in.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_it.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ja.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_kab.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ko.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_lt.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ms.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_nl.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_no.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_pcm.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_pl.properties | 1 - .../locale/portlet/notes/notesPortlet_pt_PT.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ro.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_ru.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_sk.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_sl.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_sq.properties | 1 - .../locale/portlet/notes/notesPortlet_sv_SE.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_th.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_tl.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_tr.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_uk.properties | 1 - .../locale/portlet/notes/notesPortlet_ur_IN.properties | 1 - .../resources/locale/portlet/notes/notesPortlet_vi.properties | 1 - .../locale/portlet/notes/notesPortlet_zh_CN.properties | 1 - .../locale/portlet/notes/notesPortlet_zh_TW.properties | 1 - .../webapp/vue-app/notes/components/NoteTreeviewDrawer.vue | 2 +- .../src/main/webapp/vue-app/notes/components/NotesOverview.vue | 2 +- 47 files changed, 6 insertions(+), 47 deletions(-) diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ar.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ar.properties index 82139fd526..89c8e7a8e6 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ar.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ar.properties @@ -43,7 +43,6 @@ notes.button.publish=حفظ notes.button.publishAndPost=حفظ و نشر notes.button.update=تحديث notes.button.updateAndPost=التحديث والنشر -notes.button.ok=موافق notes.button.loadMore=تحميل المزيد notes.label.drop.draft=حذفها notes.composer.createNotes=كتابة ملاحظة لـ {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_aro.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_aro.properties index cae2b728cd..f42ad2cb48 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_aro.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_aro.properties @@ -43,7 +43,6 @@ notes.button.publish=حفظ notes.button.publishAndPost=حفظ و نشر notes.button.update=تحديث notes.button.updateAndPost=التحديث والنشر -notes.button.ok=موافق notes.button.loadMore=تحميل المزيد notes.label.drop.draft=حذفها notes.composer.createNotes=كتابة ملاحظة لـ {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_az.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_az.properties index fbe8f3a2b2..fc153fac6c 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_az.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_az.properties @@ -43,7 +43,6 @@ notes.button.publish=Saxla notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ca.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ca.properties index 25360ab044..36e33daf06 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ca.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ca.properties @@ -43,7 +43,6 @@ notes.button.publish=Desa notes.button.publishAndPost=Guarda i publica notes.button.update=Actualitza notes.button.updateAndPost=Actualització i publicació -notes.button.ok=Mou-te notes.button.loadMore=Carrega més notes.label.drop.draft=Deixa'l caure notes.composer.createNotes=Crear diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ceb.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ceb.properties index 1a33997659..91c410e335 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ceb.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ceb.properties @@ -43,7 +43,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=I-update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_co.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_co.properties index f9dc8d0af8..bd7423c772 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_co.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_co.properties @@ -43,7 +43,6 @@ notes.button.publish=Salvà notes.button.publishAndPost=Salvà è Post notes.button.update=Actualizazione notes.button.updateAndPost=Actualizazione è Post -notes.button.ok=Sposta notes.button.loadMore=Carica di più notes.label.drop.draft=Lascià notes.composer.createNotes=Crià diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_cs.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_cs.properties index dff63dfb62..4b5ac3e146 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_cs.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_cs.properties @@ -43,7 +43,6 @@ notes.button.publish=Uložit notes.button.publishAndPost=Uložit a odeslat notes.button.update=Aktualizovat notes.button.updateAndPost=Aktualizovat a odeslat -notes.button.ok=Ok notes.button.loadMore=Načíst další notes.label.drop.draft=Zahodit notes.composer.createNotes=Napsat poznámku pro {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_de.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_de.properties index bff6926633..c28dc95e2e 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_de.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_de.properties @@ -43,7 +43,6 @@ notes.button.publish=Speichern notes.button.publishAndPost=Speichern und veröffentlichen notes.button.update=Aktualisieren notes.button.updateAndPost=Aktualisieren und im Stream veröffentlichen -notes.button.ok=Verschieben notes.button.loadMore=Mehr laden notes.label.drop.draft=Ablegen notes.composer.createNotes=Erstellen diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_el.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_el.properties index ccb510cf76..2d98ae35bf 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_el.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_el.properties @@ -43,7 +43,6 @@ notes.button.publish=Αποθήκευση notes.button.publishAndPost=Αποθήκευση και Δημοσίευση notes.button.update=Ενημέρωση notes.button.updateAndPost=Ενημέρωση και Δημοσίευση -notes.button.ok=Εντάξει notes.button.loadMore=Φόρτωσε περισσότερα notes.label.drop.draft=Ρίξτε το notes.composer.createNotes=Γράψτε μια σημείωση για {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties index d7814f5f44..a3a4a9bcef 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties @@ -43,7 +43,8 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move +notes.button.move=Move +notes.button.delete=Delete notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_es_ES.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_es_ES.properties index f095b668be..29d3787296 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_es_ES.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_es_ES.properties @@ -43,7 +43,6 @@ notes.button.publish=Guardar notes.button.publishAndPost=Guardar y publicar notes.button.update=Actualizar notes.button.updateAndPost=Actualizar y publicar -notes.button.ok=Aceptar notes.button.loadMore=Cargar más notes.label.drop.draft=¡Suéltalo! notes.composer.createNotes=Escribir una nota para {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_eu.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_eu.properties index d7814f5f44..3660f84fe1 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_eu.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_eu.properties @@ -43,7 +43,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fa.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fa.properties index 8cf8aa4349..461f61d304 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fa.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fa.properties @@ -43,7 +43,6 @@ notes.button.publish=ذخيره notes.button.publishAndPost=ذخیره و ارسال کنید notes.button.update=به روز رسانی notes.button.updateAndPost=به روز رسانی و ارسال -notes.button.ok=حرکت کنید notes.button.loadMore=بارگذاری بیشتر notes.label.drop.draft=ولش کن notes.composer.createNotes=ایجاد کنید diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fi.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fi.properties index 40dc6a1528..a1160b2ba6 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fi.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fi.properties @@ -43,7 +43,6 @@ notes.button.publish=Tallenna notes.button.publishAndPost=Tallenna ja lähetä notes.button.update=Päivitä notes.button.updateAndPost=Päivitä ja lähetä -notes.button.ok=OK notes.button.loadMore=Lataa lisää notes.label.drop.draft=Pudota se notes.composer.createNotes=Kirjoita muistilappu {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fil.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fil.properties index 2572fd38e2..4dc64c3dc4 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fil.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fil.properties @@ -43,7 +43,6 @@ notes.button.publish=Seyb notes.button.publishAndPost=I-save at I-post notes.button.update=Mag-update notes.button.updateAndPost=I-update at I-post -notes.button.ok=Ilipat notes.button.loadMore=Mag-load paa notes.label.drop.draft=I-drop ito notes.composer.createNotes=Lumikha diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties index c1bccfcd7e..b34df49e26 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties @@ -43,7 +43,8 @@ notes.button.publish=Enregistrer notes.button.publishAndPost=Publier notes.button.update=Mettre à jour notes.button.updateAndPost=Publier -notes.button.ok=Déplacer +notes.button.move=Déplacer +notes.button.delete=Supprimer notes.button.loadMore=Charger plus notes.label.drop.draft=Abandonner notes.composer.createNotes=Créer diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hi.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hi.properties index d7814f5f44..3660f84fe1 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hi.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hi.properties @@ -43,7 +43,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hu.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hu.properties index e258453acd..93dd997853 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hu.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_hu.properties @@ -43,7 +43,6 @@ notes.button.publish=Mentés notes.button.publishAndPost=Mentés és közzététel notes.button.update=Frissítés notes.button.updateAndPost=Frissítés és közzététel -notes.button.ok=Mozog notes.button.loadMore=Töltsön többet notes.label.drop.draft=Dobd el notes.composer.createNotes=Teremt diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_id.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_id.properties index 7ecef7e671..1adb8eb16d 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_id.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_id.properties @@ -43,7 +43,6 @@ notes.button.publish=Simpan notes.button.publishAndPost=Simpan dan Posting notes.button.update=Perbaharui notes.button.updateAndPost=Perbarharui dan Posting -notes.button.ok=Oke notes.button.loadMore=muat lebih banyak notes.label.drop.draft=Lepaskan notes.composer.createNotes=Buat catatan untuk {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_in.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_in.properties index f9070711b2..3c8c27d1c9 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_in.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_in.properties @@ -42,7 +42,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Ok notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Write a note for {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_it.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_it.properties index 12c3ee51e8..e4cd62f3b0 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_it.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_it.properties @@ -43,7 +43,6 @@ notes.button.publish=Salva notes.button.publishAndPost=Salvare e Pubblicare notes.button.update=Aggiorna notes.button.updateAndPost=Aggiornare e Pubblicare -notes.button.ok=Ok notes.button.loadMore=Carica più notes.label.drop.draft=Rilasciarlo notes.composer.createNotes=Scrivere una nota per {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ja.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ja.properties index 55a376057f..412058bcb1 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ja.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ja.properties @@ -43,7 +43,6 @@ notes.button.publish=保存 notes.button.publishAndPost=保存して投稿 notes.button.update=アップデート notes.button.updateAndPost=更新と投稿 -notes.button.ok=OK notes.button.loadMore=さらに読み込む notes.label.drop.draft=ドロップしてください notes.composer.createNotes={0} のメモを書く diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_kab.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_kab.properties index fd8680331a..59b16f7343 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_kab.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_kab.properties @@ -42,7 +42,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Ok notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Write a note for {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ko.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ko.properties index 30d695f73b..c253277a22 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ko.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ko.properties @@ -43,7 +43,6 @@ notes.button.publish=구하다 notes.button.publishAndPost=저장하고 게시하기 notes.button.update=업데이트 notes.button.updateAndPost=업데이트 및 게시 -notes.button.ok=이동하다 notes.button.loadMore=더 로드하기 notes.label.drop.draft=그것을 내려 놓으세요 notes.composer.createNotes=만들다 diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_lt.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_lt.properties index 1cb7271501..f195071e69 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_lt.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_lt.properties @@ -43,7 +43,6 @@ notes.button.publish=Išsaugoti notes.button.publishAndPost=Išsaugoti ir paskelbti notes.button.update=Atnaujinti notes.button.updateAndPost=Atnaujinkite ir paskelbkite -notes.button.ok=Judėti notes.button.loadMore=Įkelti daugiau notes.label.drop.draft=Numesk notes.composer.createNotes=Sukurti diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ms.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ms.properties index 9df3649adf..2591e54ca7 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ms.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ms.properties @@ -43,7 +43,6 @@ notes.button.publish=Simpan notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_nl.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_nl.properties index 8494e201d9..21b10ba483 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_nl.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_nl.properties @@ -43,7 +43,6 @@ notes.button.publish=Opslaan notes.button.publishAndPost=Opslaan en posten notes.button.update=Choose file notes.button.updateAndPost=Bijwerken en posten -notes.button.ok=OK notes.button.loadMore=Meer laden notes.label.drop.draft=Laat het vallen notes.composer.createNotes=Schrijf een opmerking voor {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_no.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_no.properties index 4f0e30a36d..6237ba5b9f 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_no.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_no.properties @@ -43,7 +43,6 @@ notes.button.publish=Lagre notes.button.publishAndPost=Lagre og Innlegg notes.button.update=Oppdater notes.button.updateAndPost=Oppdater og legg innlegg -notes.button.ok=OK notes.button.loadMore=Last mer notes.label.drop.draft=Slipp den notes.composer.createNotes=Skriv et notat for {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pcm.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pcm.properties index d7814f5f44..3660f84fe1 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pcm.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pcm.properties @@ -43,7 +43,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=Update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pl.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pl.properties index d1d9631464..04c3f90828 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pl.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pl.properties @@ -43,7 +43,6 @@ notes.button.publish=Zapisz notes.button.publishAndPost=Zapisz i postuj notes.button.update=Zaktualizuj notes.button.updateAndPost=Aktualizuj i postuj -notes.button.ok=Ok notes.button.loadMore=Załaduj więcej notes.label.drop.draft=Upuść notes.composer.createNotes=Napisz notatkę dla {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pt_PT.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pt_PT.properties index 9ab1aec460..f36eaa21d4 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pt_PT.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_pt_PT.properties @@ -43,7 +43,6 @@ notes.button.publish=Gravar notes.button.publishAndPost=Salvar e Publicar notes.button.update=Atualizar notes.button.updateAndPost=Atualizar e Postar -notes.button.ok=OK notes.button.loadMore=Carregar mais notes.label.drop.draft=Solte isso notes.composer.createNotes=Escrever uma nota para {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ro.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ro.properties index a52a631910..659e8c5041 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ro.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ro.properties @@ -43,7 +43,6 @@ notes.button.publish=Salvaţi notes.button.publishAndPost=Salvează și postează notes.button.update=Actualizare notes.button.updateAndPost=Actualizare și postare -notes.button.ok=Ok notes.button.loadMore=Încarcă mai mult notes.label.drop.draft=Lasă-l notes.composer.createNotes=Scrieți o notă pentru {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ru.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ru.properties index 8af2aa2c34..3bc6a6a184 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ru.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ru.properties @@ -43,7 +43,6 @@ notes.button.publish=Сохранить notes.button.publishAndPost=Сохранить и постить notes.button.update=Обновить notes.button.updateAndPost=Обновить и постить -notes.button.ok=Ок notes.button.loadMore=Загрузить больше notes.label.drop.draft=Удалить notes.composer.createNotes=Написать заметку для {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sk.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sk.properties index d4784f4850..a36eaeb069 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sk.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sk.properties @@ -43,7 +43,6 @@ notes.button.publish=Uložiť notes.button.publishAndPost=Uložiť a odoslať notes.button.update=Aktualizácia notes.button.updateAndPost=Aktualizovať a uverejniť -notes.button.ok=Pohybujte sa notes.button.loadMore=Prihlásiť sa notes.label.drop.draft=Pustite to notes.composer.createNotes=Vytvorte diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sl.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sl.properties index 62f6545d76..8faa890d80 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sl.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sl.properties @@ -43,7 +43,6 @@ notes.button.publish=Shrani notes.button.publishAndPost=Shrani in objavi notes.button.update=Posodobi notes.button.updateAndPost=Posodobi in objavi -notes.button.ok=Premakni se notes.button.loadMore=Naloži več notes.label.drop.draft=Spusti ga notes.composer.createNotes=Ustvari diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sq.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sq.properties index 4a16dbad3d..b4afe214e2 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sq.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sq.properties @@ -43,7 +43,6 @@ notes.button.publish=crwdns44670:0crwdne44670:0 notes.button.publishAndPost=crwdns44672:0crwdne44672:0 notes.button.update=crwdns44674:0crwdne44674:0 notes.button.updateAndPost=crwdns44676:0crwdne44676:0 -notes.button.ok=crwdns44678:0crwdne44678:0 notes.button.loadMore=crwdns44680:0crwdne44680:0 notes.label.drop.draft=crwdns44682:0crwdne44682:0 notes.composer.createNotes=crwdns44684:0crwdne44684:0 diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sv_SE.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sv_SE.properties index 46593bdce3..6040e9d295 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sv_SE.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_sv_SE.properties @@ -43,7 +43,6 @@ notes.button.publish=Spara notes.button.publishAndPost=Spara och posta notes.button.update=Uppdatering notes.button.updateAndPost=Uppdatering och inlägg -notes.button.ok=OK notes.button.loadMore=Ladda mer notes.label.drop.draft=Släpp den notes.composer.createNotes=Skriv en anteckning till {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_th.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_th.properties index 01a514cace..adab3c54ed 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_th.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_th.properties @@ -43,7 +43,6 @@ notes.button.publish=บันทึก notes.button.publishAndPost=บันทึกและโพสต์ notes.button.update=สร้าง notes.button.updateAndPost=อัปเดตและโพสต์ -notes.button.ok=เคลื่อนไหว notes.button.loadMore=โหลดเพิ่มเติม notes.label.drop.draft=ทิ้งมันไป notes.composer.createNotes=สร้าง diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tl.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tl.properties index 8deedbd999..2302adb971 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tl.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tl.properties @@ -43,7 +43,6 @@ notes.button.publish=Save notes.button.publishAndPost=Save and Post notes.button.update=I-update notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tr.properties index 53c109bf73..9ab4d378c9 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_tr.properties @@ -43,7 +43,6 @@ notes.button.publish=Kaydet notes.button.publishAndPost=Kaydet ve Gönder notes.button.update=Güncelleştirme notes.button.updateAndPost=Güncelle ve Gönder -notes.button.ok=Taşınmak notes.button.loadMore=Daha fazla yükle notes.label.drop.draft=Bırak onu notes.composer.createNotes=Yaratmak diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_uk.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_uk.properties index dd87639d6a..a4119b0dac 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_uk.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_uk.properties @@ -43,7 +43,6 @@ notes.button.publish=Зберегти notes.button.publishAndPost=Зберегти і допису notes.button.update=Поновити notes.button.updateAndPost=Оновити та надіслати -notes.button.ok=Гаразд notes.button.loadMore=Завантажити ще notes.label.drop.draft=Кинути notes.composer.createNotes=Написати примітку для {0} diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ur_IN.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ur_IN.properties index 0e518daef1..489a0bad7e 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ur_IN.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_ur_IN.properties @@ -43,7 +43,6 @@ notes.button.publish=محفوظ کریں notes.button.publishAndPost=Save and Post notes.button.update=تازہ کاری کریں notes.button.updateAndPost=Update and Post -notes.button.ok=Move notes.button.loadMore=Load more notes.label.drop.draft=Drop it notes.composer.createNotes=Create diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_vi.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_vi.properties index 009fd9614b..f6534f44d8 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_vi.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_vi.properties @@ -43,7 +43,6 @@ notes.button.publish=Lưu notes.button.publishAndPost=Lưu và Đăng notes.button.update=Cập nhật notes.button.updateAndPost=Cập nhật và Đăng bài -notes.button.ok=Di chuyển notes.button.loadMore=Tải thêm notes.label.drop.draft=Thả nó xuống notes.composer.createNotes=Tạo nên diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_CN.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_CN.properties index 395afb9e4a..7bcf7729c6 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_CN.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_CN.properties @@ -43,7 +43,6 @@ notes.button.publish=保存 notes.button.publishAndPost=保存并发布 notes.button.update=更新 notes.button.updateAndPost=更新和发布 -notes.button.ok=好的 notes.button.loadMore=加载更多 notes.label.drop.draft=丢弃它 notes.composer.createNotes=为 {0} 写一个便笺 diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_TW.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_TW.properties index 4f98885aea..daa788a730 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_TW.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_zh_TW.properties @@ -43,7 +43,6 @@ notes.button.publish=儲存 notes.button.publishAndPost=儲存並發布 notes.button.update=更新 notes.button.updateAndPost=更新並發布 -notes.button.ok=移動 notes.button.loadMore=裝載更多\nZhuāngzǎi gèng duō notes.label.drop.draft=放下它 notes.composer.createNotes=創造 diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue index bb437f84a6..a44f001d73 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue @@ -404,7 +404,7 @@ - {{ $t('notes.button.ok') }} + {{ $t('notes.button.move') }} diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue index 9c097a9ef1..c96fbada64 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue @@ -293,7 +293,7 @@ ref="DeleteNoteDialog" :message="confirmMessage" :title="hasDraft ? $t('popup.confirmation.delete.draft') : $t('popup.confirmation.delete')" - :ok-label="$t('notes.button.ok')" + :ok-label="$t('notes.button.delete')" :cancel-label="$t('notes.button.cancel')" persistent @ok="deleteNote()" From 7376c88262cd034819da6ab57adc4d65c48663ca Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:49:04 +0100 Subject: [PATCH 02/29] feat: Implement notes publication drawer - EXO-72738_EXO-72741 - Meeds-io/MIPs#161 (#1152) Implement note publication drawer --- .../wiki/service/rest/NotesRestService.java | 8 +- .../portlet/notes/notesPortlet_en.properties | 9 +- .../portlet/notes/notesPortlet_fr.properties | 7 + .../main/webapp/skin/less/notes/notes.less | 2 +- .../components/NotesEditorDashboard.vue | 6 +- .../components/NoteEditorMetadataDrawer.vue | 310 ------------------ .../components/NoteFullRichEditor.vue | 82 ++++- .../NoteEditorFeaturedImageDrawer.vue | 0 .../NoteEditorMetadataDrawer.vue | 160 +++++++++ .../NoteMetadataPropertiesForm.vue | 272 +++++++++++++++ .../NotePublicationDrawer.vue | 276 ++++++++++++++++ .../notes-rich-editor/initComponents.js | 10 +- 12 files changed, 804 insertions(+), 338 deletions(-) delete mode 100644 notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorMetadataDrawer.vue rename notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/{ => note-properties}/NoteEditorFeaturedImageDrawer.vue (100%) create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorMetadataDrawer.vue create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java b/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java index 5922abd170..6fdf4012a7 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java @@ -760,8 +760,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr } note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT_AND_TITLE, identity); } else { - note_.setLang(note.getLang()); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT_AND_TITLE, identity); + note_.setLang(note.getLang()); note_.setTitle(note.getTitle()); note_.setContent(note.getContent()); note_.setProperties(notePageProperties); @@ -782,8 +782,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr note_.setProperties(notePageProperties); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_TITLE, identity); } else { - note_.setLang(note.getLang()); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_TITLE, identity); + note_.setLang(note.getLang()); note_.setTitle(note.getTitle()); note_.setProperties(notePageProperties); } @@ -798,8 +798,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr note_.setProperties(notePageProperties); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT, identity); } else { - note_.setLang(note.getLang()); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT, identity); + note_.setLang(note.getLang()); note_.setContent(note.getContent()); note_.setProperties(notePageProperties); } @@ -814,8 +814,8 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr note_.setProperties(notePageProperties); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_PROPERTIES, identity); } else { - note_.setLang(note.getLang()); note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_PROPERTIES, identity); + note_.setLang(note.getLang()); note_.setProperties(notePageProperties); } noteService.createVersionOfNote(note_, identity.getUserId()); diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties index a3a4a9bcef..b5863d7480 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties @@ -53,7 +53,7 @@ notes.save.success.message=Note saved successfully notes.view.label=View notes.metadata.properties.label=Properties -notes.metadata.featuredImage.label=Featured images +notes.metadata.featuredImage.label=Featured image notes.metadata.featuredImage.add.label=Add an image notes.metadata.featuredImage.alt=Featured image notes.metadata.summary.label=Summary @@ -65,6 +65,13 @@ notes.featuredImage.remove.error.message=Error while removing featured image notes.featuredImage.remove.success.message=Featured image removed successfully notes.featuredImage.size.error.message=Featured image size should be less or equals to 20MB +notes.publication.publish.label=Publication +notes.publication.label=Choose your publication options +notes.publication.check.properties.label=Check the teaser +notes.publication.publish.next.label=Next +notes.publication.post.in.feed.label=Post in Activity stream of +notes.publication.publish.save.label=Publish + popup.confirm=Confirm popup.msg.confirmation=Confirmation popup.confirmation.delete=Delete the note diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties index b34df49e26..dd835b8701 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties @@ -65,6 +65,13 @@ notes.featuredImage.remove.error.message=Erreur lors de la suppression de l'illu notes.featuredImage.remove.success.message=Illustration supprimée avec succès notes.featuredImage.size.error.message=La taille de l'illustration doit être inférieure ou égale à 20Mo +notes.publication.publish.label=Publication +notes.publication.label=Choisir les options de publication +notes.publication.check.properties.label=Vérifier l'accroche +notes.publication.publish.next.label=Suivant +notes.publication.post.in.feed.label=Publier dans le fil d'activités de +notes.publication.publish.save.label=Publier + popup.confirm=Confirmer popup.msg.confirmation=Confirmation popup.confirmation.delete=Supprimer la note diff --git a/notes-webapp/src/main/webapp/skin/less/notes/notes.less b/notes-webapp/src/main/webapp/skin/less/notes/notes.less index 65d9f1a229..2f629aaac7 100644 --- a/notes-webapp/src/main/webapp/skin/less/notes/notes.less +++ b/notes-webapp/src/main/webapp/skin/less/notes/notes.less @@ -212,7 +212,7 @@ } } -#editorMetadataDrawer { +#editorMetadataDrawer, #editorPublicationDrawer { .add-image-area, .image-preview { background-color: @primaryBackground !important; diff --git a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue index 4ebe64b81e..ff2f8fb26f 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue @@ -283,7 +283,7 @@ export default { this.note.content = noteObject.content; this.note.properties = noteObject.properties; }, - postNote(toPublish) { + postNote() { this.postingNote = true; clearTimeout(this.saveDraft); const properties = this.note?.properties; @@ -299,7 +299,7 @@ export default { wikiOwner: this.note.wikiOwner, content: this.$noteUtils.getContentToSave('notesContent', this.oembedMinWidth) || this.note.content, parentPageId: this.note?.draftPage && this.note?.targetPageId === this.parentPageId ? null : this.parentPageId, - toBePublished: toPublish, + toBePublished: false, appName: this.appName, properties: properties }; @@ -564,7 +564,7 @@ export default { if (draftNote.properties) { draftNote.properties.draft = true; if (this.newTranslation && !this.featuredImageUpdated) { - draftNote.properties.featuredImage = null; + draftNote.properties.featuredImage = {}; } } this.$notesService.saveDraftNote(draftNote, this.parentPageId).then(savedDraftNote => { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorMetadataDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorMetadataDrawer.vue deleted file mode 100644 index 970319b5bb..0000000000 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorMetadataDrawer.vue +++ /dev/null @@ -1,310 +0,0 @@ - - - - - diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index dd3965a072..1116462033 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -30,7 +30,7 @@ :selected-language="selectedLanguage" :translations="translations" :is-mobile="isMobile" - :post-key="postKey" + :post-key="postKey + enablePostKeys" :draft-saving-status="draftSavingStatus" :publish-button-text="publishButtonText" :lang-button-tooltip-text="langButtonTooltipText" @@ -78,6 +78,16 @@ ref="featuredImageDrawer" :note="noteObject" :has-featured-image="hasFeaturedImage" /> + @@ -192,14 +202,19 @@ export default { imagesDownloadFolder: { type: String, default: 'DRIVE_ROOT_NODE/notes/images' + }, + canPublish: { + type: Boolean, + default: false + }, + spaceId: { + type: String, + default: null } }, watch: { 'noteObject.title': function(newVal, oldVal) { - if (newVal.length > this.noteTitleMaxLength) { - this.displayNoteTitleMaxLengthCheckAlert(); - this.noteObject.title = oldVal; - } + this.displayNoteTitleMaxLengthCheckAlert(newVal, oldVal); this.updateData(); }, 'noteObject.content': function () { @@ -234,6 +249,18 @@ export default { }, isContentImagesUploadProgress() { return this.contentImageUploadProgress; + }, + newPageDraft() { + return !this.noteObject?.id || (this.noteObject?.draftPage && !this.noteObject?.targetPageId); + }, + editMode() { + return this.noteObject?.id && !this.newPageDraft; + }, + isTranslation() { + return !!this.noteObject?.lang; + }, + newPublicationDrawerEnabled() { + return eXo?.env?.portal?.newPublicationDrawerEnabled; } }, created() { @@ -261,7 +288,7 @@ export default { this.autoSave(); this.waitForNoteMetadataUpdate(); } else { - this.updatingProperties = null; + this.updatingProperties = false; } }, editorClosed(){ @@ -347,8 +374,20 @@ export default { }, 200); } }, - postNote(toPublish) { - this.$emit('post-note', toPublish); + postNote() { + if (this.newPublicationDrawerEnabled && this.canPublish + && !this.isTranslation && !this.editMode) { + this.openPublicationDrawer(this.noteObject); + return; + } + this.postAndPublishNote(); + }, + postAndPublishNote(note, publicationSettings) { + if (this.newPublicationDrawerEnabled) { + this.noteObject = note; + this.updateData(); + } + this.$emit('post-note', publicationSettings); }, resetEditorData() { this.noteObject.title = null; @@ -511,6 +550,12 @@ export default { isImageDrawerClosed() { return this.$refs.featuredImageDrawer.isClosed(); }, + openPublicationDrawer() { + this.$refs.editorPublicationDrawer.open(this.noteObject); + }, + publicationDrawerClosed() { + this.enablePostKeys ++; + }, openMetadataDrawer() { this.$refs.editorMetadataDrawer.open(this.noteObject); }, @@ -520,18 +565,23 @@ export default { alertMessage: detail?.message, }})); }, - displayNoteTitleMaxLengthCheckAlert(){ - const messageObject = { - type: 'warning', - message: this.$t('notes.title.max.length.warning.message', {0: this.noteTitleMaxLength}) - }; - this.displayAlert(messageObject); + displayNoteTitleMaxLengthCheckAlert(newTitle, oldTitle) { + if (newTitle?.length > this.noteTitleMaxLength) { + this.noteObject.title = oldTitle; + this.displayAlert({ + type: 'warning', + message: this.$t('notes.title.max.length.warning.message', {0: this.noteTitleMaxLength}) + }); + } }, waitForNoteMetadataUpdate() { setTimeout(() => { - this.updatingProperties = null; + this.updatingProperties = false; }, 1000); - } + }, + setPublishing(publishing) { + this.isPublishing = publishing; + }, } }; diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorFeaturedImageDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorFeaturedImageDrawer.vue similarity index 100% rename from notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteEditorFeaturedImageDrawer.vue rename to notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorFeaturedImageDrawer.vue diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorMetadataDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorMetadataDrawer.vue new file mode 100644 index 0000000000..89fd086cb0 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteEditorMetadataDrawer.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue new file mode 100644 index 0000000000..498ab83a11 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue @@ -0,0 +1,272 @@ + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue new file mode 100644 index 0000000000..f7d16cbec9 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue @@ -0,0 +1,276 @@ + + + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js index 91112ea135..55c0e4f829 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js @@ -3,8 +3,10 @@ import TranslationsEditBar from '../notes-rich-editor/components/TranslationsEdi import NoteTreeviewDrawer from '../notes/components/NoteTreeviewDrawer.vue'; import NoteEditorTopBar from '../notes-rich-editor/components/NoteEditorTopBar.vue'; import NoteFullRichEditor from './components/NoteFullRichEditor.vue'; -import NoteEditorMetadataDrawer from './components/NoteEditorMetadataDrawer.vue'; -import NoteEditorFeaturedImageDrawer from './components/NoteEditorFeaturedImageDrawer.vue'; +import NoteEditorMetadataDrawer from './components/note-properties/NoteEditorMetadataDrawer.vue'; +import NoteEditorFeaturedImageDrawer from './components/note-properties/NoteEditorFeaturedImageDrawer.vue'; +import NotePublicationDrawer from './components/note-publication/NotePublicationDrawer.vue'; +import NoteMetadataPropertiesForm from './components/note-properties/NoteMetadataPropertiesForm.vue'; const components = { 'note-custom-plugins': NoteCustomPlugins, @@ -13,7 +15,9 @@ const components = { 'note-editor-top-bar': NoteEditorTopBar, 'note-full-rich-editor': NoteFullRichEditor, 'note-editor-metadata-drawer': NoteEditorMetadataDrawer, - 'note-editor-featured-image-drawer': NoteEditorFeaturedImageDrawer + 'note-editor-featured-image-drawer': NoteEditorFeaturedImageDrawer, + 'note-publication-drawer': NotePublicationDrawer, + 'note-metadata-properties-form': NoteMetadataPropertiesForm }; for (const key in components) { From c874821ddcbda8d116bee82f9551b3487dea77d1 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:47:29 +0100 Subject: [PATCH 03/29] feat: Notes publication drawer in edit mode - EXO-72749_EXO-73246 - Meeds-io/MIPs#161 (#1153) Enhance reusability of notes publication drawer and implement the edit mode of publication drawer --- .../main/webapp/WEB-INF/gatein-resources.xml | 29 ++++++++++++++++ .../main/webapp/skin/less/notes/notes.less | 7 ++++ .../components}/NotePublicationDrawer.vue | 33 ++++++++++++++----- .../notes-publication/initComponents.js | 11 +++++++ .../webapp/vue-app/notes-publication/main.js | 11 +++++++ .../notes-rich-editor/initComponents.js | 2 -- notes-webapp/webpack.prod.js | 4 ++- 7 files changed, 85 insertions(+), 12 deletions(-) rename notes-webapp/src/main/webapp/vue-app/{notes-rich-editor/components/note-publication => notes-publication/components}/NotePublicationDrawer.vue (87%) create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js create mode 100644 notes-webapp/src/main/webapp/vue-app/notes-publication/main.js diff --git a/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml index 41917e491b..fbb9ee85ed 100644 --- a/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -86,6 +86,9 @@ + + NotesPublication + commonVueComponents @@ -114,6 +117,32 @@ + + NotesPublication + NotesGRP + + + commonVueComponents + + + extensionRegistry + + + vue + + + vuetify + + + eXoVueI18n + + + imageCropper + + + NotesEditor diff --git a/notes-webapp/src/main/webapp/skin/less/notes/notes.less b/notes-webapp/src/main/webapp/skin/less/notes/notes.less index 2f629aaac7..a8f4b78530 100644 --- a/notes-webapp/src/main/webapp/skin/less/notes/notes.less +++ b/notes-webapp/src/main/webapp/skin/less/notes/notes.less @@ -212,6 +212,13 @@ } } +#editorPublicationDrawer { + .post-feed-target { + max-width: 335px; + } + +} + #editorMetadataDrawer, #editorPublicationDrawer { .add-image-area, .image-preview { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue similarity index 87% rename from notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue rename to notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index f7d16cbec9..f707dce706 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-publication/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -46,6 +46,7 @@ vertical flat>
-
+
+ :class="{'mt-8': !editMode}" + class="d-flex flex-column">
- - {{ $t('notes.publication.post.in.feed.label') }} +
+

+ {{ $t('notes.publication.post.in.feed.label') }} +

- +
@@ -187,7 +195,7 @@ export default { }, computed: { saveButtonLabel() { - return (this.stepper === 1 && !this.expanded) && this.$t('notes.publication.publish.next.label') + return (!this.editMode && this.stepper === 1 && !this.expanded) && this.$t('notes.publication.publish.next.label') || this.$t('notes.publication.publish.save.label'); }, summaryLengthError() { @@ -217,6 +225,9 @@ export default { }, open(noteObject) { this.noteObject = noteObject; + if (this.editMode) { + this.publicationSettings.post = this.noteObject?.activityPosted; + } this.cloneProperties(); this.$refs.publicationDrawer.open(); this.toggleExpand(); @@ -253,6 +264,10 @@ export default { }, 1000); }, save() { + if (this.editMode) { + this.$emit('publish', this.publicationSettings); + return; + } if (!this.expanded && this.stepper === 1) { this.stepper += 1; return; diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js new file mode 100644 index 0000000000..7c7fc54b70 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js @@ -0,0 +1,11 @@ +import NotePublicationDrawer from './components/NotePublicationDrawer.vue'; +import NoteMetadataPropertiesForm from '../notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue'; + +const components = { + 'note-publication-drawer': NotePublicationDrawer, + 'note-metadata-properties-form': NoteMetadataPropertiesForm +}; + +for (const key in components) { + Vue.component(key, components[key]); +} diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/main.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/main.js new file mode 100644 index 0000000000..73ebc6d78d --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/main.js @@ -0,0 +1,11 @@ +import './initComponents.js'; + +// get overrided components if exists +if (extensionRegistry) { + const components = extensionRegistry.loadComponents('notesPublication'); + if (components && components.length > 0) { + components.forEach(cmp => { + Vue.component(cmp.componentName, cmp.componentOptions); + }); + } +} diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js index 55c0e4f829..b98d5b607e 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js @@ -5,7 +5,6 @@ import NoteEditorTopBar from '../notes-rich-editor/components/NoteEditorTopBar.v import NoteFullRichEditor from './components/NoteFullRichEditor.vue'; import NoteEditorMetadataDrawer from './components/note-properties/NoteEditorMetadataDrawer.vue'; import NoteEditorFeaturedImageDrawer from './components/note-properties/NoteEditorFeaturedImageDrawer.vue'; -import NotePublicationDrawer from './components/note-publication/NotePublicationDrawer.vue'; import NoteMetadataPropertiesForm from './components/note-properties/NoteMetadataPropertiesForm.vue'; const components = { @@ -16,7 +15,6 @@ const components = { 'note-full-rich-editor': NoteFullRichEditor, 'note-editor-metadata-drawer': NoteEditorMetadataDrawer, 'note-editor-featured-image-drawer': NoteEditorFeaturedImageDrawer, - 'note-publication-drawer': NotePublicationDrawer, 'note-metadata-properties-form': NoteMetadataPropertiesForm }; diff --git a/notes-webapp/webpack.prod.js b/notes-webapp/webpack.prod.js index 022fdf509b..a896dc3f8e 100644 --- a/notes-webapp/webpack.prod.js +++ b/notes-webapp/webpack.prod.js @@ -19,7 +19,9 @@ const config = { engagementCenterExtensions: './src/main/webapp/vue-app/engagementCenterExtensions/extensions.js', connectorEventExtensions: './src/main/webapp/vue-app/connectorEventExtensions/extensions.js', notePageView: './src/main/webapp/vue-app/note-page-view/main.js', - notesNotificationExtension: './src/main/webapp/vue-app/notification-extensions/main.js' + notesNotificationExtension: './src/main/webapp/vue-app/notification-extensions/main.js', + notesPublication: './src/main/webapp/vue-app/notes-publication/main.js', + }, output: { publicPath: '', From f10c633c0e1b958274b2e397782b031dbc0127ef Mon Sep 17 00:00:00 2001 From: Sofien Haj Chedhli Date: Thu, 10 Oct 2024 14:47:02 +0100 Subject: [PATCH 04/29] feat: Update note Editor and model to relay on note editor extensions - EXO-73275 - Meeds-io/meeds#2478 (#1149) --- .../io/meeds/notes/rest/model/PageEntity.java | 2 + .../java/org/exoplatform/wiki/model/Page.java | 2 + .../wiki/service/impl/NoteServiceImpl.java | 33 ++++++++- .../wiki/service/rest/NotesRestService.java | 11 ++- .../wiki/service/TestNoteService.java | 6 +- .../WEB-INF/conf/wiki/ckeditor/config.js | 7 +- .../components/NotesEditorDashboard.vue | 74 ++++++++++++++++++- .../components/NoteFullRichEditor.vue | 58 ++++++++++++--- .../notes/components/NotesOverview.vue | 2 +- 9 files changed, 170 insertions(+), 25 deletions(-) diff --git a/notes-service/src/main/java/io/meeds/notes/rest/model/PageEntity.java b/notes-service/src/main/java/io/meeds/notes/rest/model/PageEntity.java index 1085dc6ca7..aaaa3a1360 100644 --- a/notes-service/src/main/java/io/meeds/notes/rest/model/PageEntity.java +++ b/notes-service/src/main/java/io/meeds/notes/rest/model/PageEntity.java @@ -44,4 +44,6 @@ public class PageEntity implements Serializable { private String lang; private PagePropertiesEntity properties; + + private boolean extensionDataUpdated; } diff --git a/notes-service/src/main/java/org/exoplatform/wiki/model/Page.java b/notes-service/src/main/java/org/exoplatform/wiki/model/Page.java index ddaefeac43..8136535e6a 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/model/Page.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/model/Page.java @@ -94,6 +94,8 @@ public class Page { private boolean hasChild; + private String latestVersionId; + private boolean isDeleted; private Page parent; diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java index 6c741749aa..1cfbf91594 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java @@ -270,6 +270,15 @@ public Page createNote(Wiki noteBook, createdPage.setCanImport(canImportNotes(note.getAuthor(), space, note)); createdPage.setCanView(canViewNotes(note.getAuthor(), space, note)); } + dataStorage.addPageVersion(createdPage, userIdentity.getUserId()); + PageVersion pageVersion = dataStorage.getPublishedVersionByPageIdAndLang(Long.valueOf(createdPage.getId()), createdPage.getLang()); + createdPage.setLatestVersionId(pageVersion != null ? pageVersion.getId() : null); + if (pageVersion != null && draftPageId != null) { + Map eventData = new HashMap<>(); + eventData.put("draftPageId", draftPageId); + eventData.put("pageVersionId", pageVersion.getId()); + Utils.broadcast(listenerService, "note.page.version.created", this, eventData); + } return createdPage; } else { throw new EntityNotFoundException("Parent note not found"); @@ -1002,6 +1011,8 @@ public void createVersionOfNote(Page note, String userName) throws WikiException PageVersion pageVersion = dataStorage.addPageVersion(note, userName); pageVersion.setAttachmentObjectType(note.getAttachmentObjectType()); updateVersionContentImages(pageVersion); + String pageVersionId = pageVersion.getId(); + note.setLatestVersionId(pageVersionId); if (note.getLang() != null) { try { NotePageProperties properties = note.getProperties(); @@ -1023,8 +1034,14 @@ public void createVersionOfNote(Page note, String userName) throws WikiException null, NOTE_METADATA_PAGE_OBJECT_TYPE, NOTE_METADATA_VERSION_PAGE_OBJECT_TYPE, - userName - ); + userName); + } + DraftPage draftPage = dataStorage.getLatestDraftPageByTargetPageAndLang(Long.valueOf(note.getId()), note.getLang()); + if (draftPage != null) { + Map eventData = new HashMap<>(); + eventData.put("draftPageId", draftPage.getId()); + eventData.put("pageVersionId", pageVersionId); + Utils.broadcast(listenerService, "note.page.version.created", this, eventData); } } @@ -1209,6 +1226,14 @@ public DraftPage createDraftForExistPage(DraftPage draftPage, newDraftPage.setProperties(properties); newDraftPage.setAttachmentObjectType(draftPage.getAttachmentObjectType()); newDraftPage = processImagesOnDraftCreation(newDraftPage, Long.parseLong(userIdentity.getId())); + // + PageVersion pageVersion = getPublishedVersionByPageIdAndLang(Long.valueOf(newDraftPage.getTargetPageId()), newDraftPage.getLang()); + if (pageVersion != null) { + Map eventData = new HashMap<>(); + eventData.put("pageVersionId", pageVersion.getId()); + eventData.put("draftForExistingPageId", newDraftPage.getId()); + Utils.broadcast(listenerService, "note.draft.for.exist.page.created", this, eventData); + } return newDraftPage; } @@ -1404,6 +1429,7 @@ public Page getNoteByIdAndLang(Long pageId, Identity userIdentity, String source page.setContent(publishedVersion.getContent()); page.setLang(publishedVersion.getLang()); page.setProperties(publishedVersion.getProperties()); + page.setLatestVersionId(publishedVersion.getId()); if (lang != null) { page.setMetadatas(retrieveMetadataItems(pageId + "-" + lang, userIdentity.getUserId())); } @@ -1420,8 +1446,7 @@ public Page getNoteByIdAndLang(Long pageId, String lang) { page.setTitle(publishedVersion.getTitle()); page.setContent(publishedVersion.getContent()); page.setLang(publishedVersion.getLang()); - page.setProperties(publishedVersion.getProperties()); - } + page.setProperties(publishedVersion.getProperties());} return page; } diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java b/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java index 6fdf4012a7..9f8863868d 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/rest/NotesRestService.java @@ -823,8 +823,15 @@ public Response updateNoteById(@Parameter(description = "Note id", required = tr WikiPageParams noteParams = new WikiPageParams(note_.getWikiType(), note_.getWikiOwner(), newNoteName); noteService.removeDraftOfNote(noteParams, note.getLang()); } - } else if (note_.isToBePublished()){ - note_ = noteService.updateNote(note_, PageUpdateType.PUBLISH, identity); + } else if (note_.isToBePublished()) { + note_ = noteService.updateNote(note_, PageUpdateType.PUBLISH, identity); + } else if (note.isExtensionDataUpdated()) { + note_ = noteService.updateNote(note_, PageUpdateType.EDIT_PAGE_CONTENT_AND_TITLE, identity); + noteService.createVersionOfNote(note_, identity.getUserId()); + if (!Utils.ANONYM_IDENTITY.equals(identity.getUserId())) { + WikiPageParams noteParams = new WikiPageParams(note_.getWikiType(), note_.getWikiOwner(), newNoteName); + noteService.removeDraftOfNote(noteParams, note.getLang()); + } } else { // in this case, the note didnt change on title nor content. As we need the page // url in front side, we compute it here diff --git a/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java b/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java index 7b9a402bf5..2f1e0dcce4 100644 --- a/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java +++ b/notes-service/src/test/java/org/exoplatform/wiki/service/TestNoteService.java @@ -992,10 +992,10 @@ public void testFeaturedImageWhenRemoveDraftById() throws Exception { } public void testGetDraftsOfWiki() throws Exception { - Identity user = new Identity("user"); + Identity root = new Identity("root"); Wiki portalWiki = getOrCreateWiki(wService, PortalConfig.PORTAL_TYPE, "testPortal"); - Page note = noteService.createNote(portalWiki, "Home", new Page("testGetDraftsOfWiki", "testGetDraftsOfWiki"), user); - Page note2 = noteService.createNote(portalWiki, "Home", new Page("testGetDraftsOfWiki", "testGetDraftsOfWiki"), user); + Page note = noteService.createNote(portalWiki, "Home", new Page("testGetDraftsOfWiki", "testGetDraftsOfWiki"), root); + Page note2 = noteService.createNote(portalWiki, "Home", new Page("testGetDraftsOfWiki", "testGetDraftsOfWiki"), root); DraftPage draftPage = new DraftPage(); draftPage.setTitle("test"); draftPage.setContent("test"); diff --git a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/ckeditor/config.js b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/ckeditor/config.js index 56547e1c72..1fa6bd6980 100644 --- a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/ckeditor/config.js +++ b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/ckeditor/config.js @@ -30,6 +30,7 @@ CKEDITOR.editorConfig = function (config) { 'Table', 'EmbedSemantic', 'CodeSnippet', + 'attachFile', 'InsertOptions' ]; if (webPageNote) { @@ -69,7 +70,7 @@ CKEDITOR.editorConfig = function (config) { }, { name: 'blocks', - items: ['Blockquote'] + items: ['Blockquote', 'attachFile'] }, ]; if (!webPageNote) { @@ -80,7 +81,7 @@ CKEDITOR.editorConfig = function (config) { require(['SHARED/extensionRegistry'], function(extensionRegistry) { const notesEditorExtensions = extensionRegistry.loadExtensions('NotesEditor', 'ckeditor-extensions'); - if (notesEditorExtensions?.length && this.useExtraPlugins) { + if (notesEditorExtensions?.length) { notesEditorExtensions.forEach(notesEditorExtension => { if (notesEditorExtension.extraPlugin) { extraPlugins = `${extraPlugins},${notesEditorExtension.extraPlugin}`; @@ -89,7 +90,7 @@ CKEDITOR.editorConfig = function (config) { removePlugins = `${extraPlugins},${notesEditorExtension.removePlugin}`; } if (notesEditorExtension.extraToolbarItem) { - toolbar[0].push(notesEditorExtension.extraToolbarItem); + toolbar[toolbar.length - 1].items.push(notesEditorExtension.extraToolbarItem); } }); } diff --git a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue index ff2f8fb26f..5c3ade30ec 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue @@ -130,7 +130,9 @@ export default { translationSwitch: false, newTranslation: false, wikiDraftObjectType: 'wikiDraft', - wikiPageObjectType: 'wikiPage' + wikiPageObjectType: 'wikiPage', + autosaveProcessedFromEditorExtension: false, + extensionDataUpdated: false }; }, computed: { @@ -138,7 +140,7 @@ export default { return (!this.note?.title || this.note?.title?.length < 3 || this.note?.title?.length > this.titleMaxLength) || (this.noteNotModified - && !this.propertiesModified && !this.draftNote) || this.savingDraft; + && !this.propertiesModified && !this.draftNote && !this.note.draftPage) || this.savingDraft; }, noteNotModified() { return this.note?.title === this.originalNote?.title && this.$noteUtils.isSameContent(this.note?.content, this.originalNote?.content); @@ -197,6 +199,7 @@ export default { document.addEventListener('automatic-translation-extensions-updated', () => { this.refreshTranslationExtensions(); }); + document.addEventListener('note-editor-extensions-data-updated', (evt) => this.processAutoSaveFromEditorExtension(evt)); this.getAvailableLanguages(); window.addEventListener('beforeunload', () => { if (!this.postingNote && this.note.draftPage && this.note.id) { @@ -250,6 +253,65 @@ export default { }); }, methods: { + processAutoSaveFromEditorExtension(event) { + if (event.detail.processAutoSave) { + this.extensionDataUpdated = true; + this.autosaveProcessedFromEditorExtension = true; + this.draftSavingStatus = this.$t('notes.draft.savingDraftStatus'); + clearTimeout(this.saveDraft); + const draftNote = this.fillDraftNote(); + if (!draftNote.title) { + draftNote.title = this.$t('notes.untitled.title'); + } + draftNote.lang = this.selectedLanguage; + if (this.newDraft){ + draftNote.id = null; + } + if (draftNote.properties) { + draftNote.properties.draft = true; + if (this.newTranslation && !this.featuredImageUpdated) { + draftNote.properties.featuredImage = null; + } + } + this.$notesService.saveDraftNote(draftNote, this.parentPageId).then(savedDraftNote => { + this.actualNote = { + id: savedDraftNote.id, + name: savedDraftNote.name, + title: savedDraftNote.title, + content: savedDraftNote.content, + author: savedDraftNote.author, + owner: savedDraftNote.owner, + properties: savedDraftNote.properties + }; + this.newDraft=false; + savedDraftNote.parentPageId = this.parentPageId; + this.note = savedDraftNote; + localStorage.setItem(`draftNoteId-${this.note.id}-${this.selectedLanguage}`, JSON.stringify(savedDraftNote)); + this.newTranslation = false; + }).then(() => { + this.savingDraft = false; + setTimeout(() => { + this.draftSavingStatus = this.$t('notes.draft.savedDraftStatus'); + if (this.autosaveProcessedFromEditorExtension) { + document.dispatchEvent(new CustomEvent('note-draft-auto-save-done', { + detail: { + draftId: this.note.id + } + })); + } + this.autosaveProcessedFromEditorExtension = false; + }, this.autoSaveDelay); + }).catch(e => { + console.error('Error when creating draft note: ', e); + this.$root.$emit('show-alert', { + type: 'error', + message: this.$t(`notes.message.${e.message}`) + }); + }); + } else { + this.draftSavingStatus = this.$t('notes.draft.savedDraftStatus'); + } + }, editorClosed() { window.close(); }, @@ -301,7 +363,8 @@ export default { parentPageId: this.note?.draftPage && this.note?.targetPageId === this.parentPageId ? null : this.parentPageId, toBePublished: false, appName: this.appName, - properties: properties + properties: properties, + extensionDataUpdated: this.extensionDataUpdated }; if (note.id) { this.updateNote(note); @@ -339,9 +402,14 @@ export default { }).finally(() => { this.enableClickOnce(); this.removeLocalStorageCurrentDraft(currentDraftId); + this.extensionDataUpdated = false; }); }, createNote(note) { + note.properties = { + draft: this.note?.draftPage, + noteId: this.note?.id + }; return this.$notesService.createNote(note).then(data => { const draftNote = JSON.parse(localStorage.getItem(`draftNoteId-${this.note.id}-${this.selectedLanguage}`)); document.dispatchEvent(new CustomEvent('update-processed-image-url', {detail: { diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index 1116462033..05081aa0b7 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -54,7 +54,8 @@ :placeholder="titlePlaceholder" type="text" :maxlength="noteTitleMaxLength + 1" - class="py-0 px-1 mt-5 mb-0"> + class="py-0 px-1 mt-5 mb-0" + @input="waitUserTyping()">
-
+
+
+
- + Date: Thu, 31 Oct 2024 17:57:34 +0100 Subject: [PATCH 16/29] feat: Allow space member to schedule post - EXO-75098 - Meeds-io/MIPs#161 (#1194) Allow space member to schedule post --- .../components/NotePublicationDrawer.vue | 19 +++++++++++++++---- .../schedule-option/NoteScheduleOption.vue | 5 +++++ .../components/NoteFullRichEditor.vue | 7 ++----- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index f3aa9ff70c..6cfa6a350d 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -138,7 +138,7 @@ @@ -41,7 +53,8 @@ export default { data() { return { - hideAuthor: false + hideAuthor: false, + hideReaction: false }; }, props: { @@ -61,6 +74,9 @@ export default { watch: { hideAuthor() { this.emitAdvancedSettingsUpdate(); + }, + hideReaction() { + this.emitAdvancedSettingsUpdate(); } }, created() { @@ -69,7 +85,8 @@ export default { methods: { emitAdvancedSettingsUpdate() { this.$emit('update', { - hideAuthor: this.hideAuthor + hideAuthor: this.hideAuthor, + hideReaction: this.hideReaction }); }, initSettings() { @@ -77,6 +94,7 @@ export default { return; } this.hideAuthor = this.savedAdvancedSettings?.hideAuthor; + this.hideReaction = this.savedAdvancedSettings?.hideReaction; }, cancelChanges() { this.initSettings(); diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue index 4c5b25c882..300b78daaa 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/note-properties/NoteMetadataPropertiesForm.vue @@ -226,6 +226,7 @@ export default { noteId: this.noteObject?.id, summary: this.summaryContent, hideAuthor: this.noteObject?.properties?.hideAuthor, + hideReaction: this.noteObject?.properties?.hideReaction, featuredImage: { id: savedFeaturedImageId, uploadId: this.uploadId, From 1ef7ae9421d37a37bf4d196497143a18c5883139 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:37:19 +0100 Subject: [PATCH 20/29] feat: Implement publish note - EXO-73041 - Meeds-io/MIPs#161 (#1212) Implement publish note feat: Add feature flag for publish note option - EXO-73041 - Meeds-io/MIPs#161 (#1219) Add feature flag for publish note optio fix: Fix enable condition of delete and import/export action menu options - EXO-73041 - Meeds-io/MIPs#161 fix enable condition of delete/import/export action menu options feat: Refactor publish note option integration - EXO-73041 - Meeds-io/Meeds#161 (#1220) Refactor publish note option integration --- .../portlet/notes/notesPortlet_en.properties | 3 + .../portlet/notes/notesPortlet_fr.properties | 3 + .../conf/wiki/feature-flags-configuration.xml | 53 +++++++ .../main/webapp/WEB-INF/gatein-resources.xml | 6 + .../webui/workspace/UINotesHeadTemplate.gtmpl | 11 ++ .../components/NotePublicationDrawer.vue | 9 +- .../NotePublicationAdvancedOption.vue | 5 + .../schedule-option/NoteScheduleOption.vue | 25 +++- .../components/NoteFullRichEditor.vue | 2 +- .../vue-app/notes-rich-editor/js/Utils.js | 2 +- .../notes/components/NoteBreadcrumb.vue | 1 + .../notes/components/NoteTreeviewDrawer.vue | 1 + .../notes/components/NotesOverview.vue | 119 ++++++++++++--- .../components/menu/NotesActionMenuItems.vue | 136 ++++-------------- .../components/menu/NotesActionsMenu.vue | 7 +- .../components/menu/NotesMobileActionMenu.vue | 3 +- .../main/webapp/vue-app/notes/extensions.js | 76 ++++++++++ .../webapp/vue-app/notes/initComponents.js | 4 +- .../src/main/webapp/vue-app/notes/main.js | 3 +- 19 files changed, 326 insertions(+), 143 deletions(-) create mode 100644 notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml create mode 100644 notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl create mode 100644 notes-webapp/src/main/webapp/vue-app/notes/extensions.js diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties index 4452fbd1bb..b6e0e39877 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties @@ -104,6 +104,9 @@ notes.publication.schedule.publish.now.tooltip=By scheduling only a end date you notes.publication.advanced.option.label=Advanced options notes.publication.hide.author.label=Hide author notes.publication.hide.reaction.label=Hide reaction +notes.publication.success.message=Note successfully published +notes.schedule.success.message=Note scheduled successfully +notes.publication.externalPage.publish.cancel.label=Cancel publishing popup.confirm=Confirm popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties index 94bf19edf0..feb72e9477 100644 --- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties +++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties @@ -104,6 +104,9 @@ notes.publication.schedule.publish.now.tooltip=En programmant uniquement une dat notes.publication.advanced.option.label=Options avancées notes.publication.hide.author.label=Masquer l'auteur notes.publication.hide.reaction.label=Masquer la réaction +notes.publication.success.message=Note publi\u00E9e avec succ\u00E8s +notes.schedule.success.message=Note planifi\u00E9 avec succ\u00E8s +notes.publication.externalPage.publish.cancel.label=Annuler la publication popup.confirm=Confirmer popup.msg.confirmation=Confirmation diff --git a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml new file mode 100644 index 0000000000..5202dd8bad --- /dev/null +++ b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml @@ -0,0 +1,53 @@ + + + + + NoteFeatureProperties + org.exoplatform.container.ExtendedPropertyConfigurator + + + NoteFeatureProperties + Note Feature enablement flag + + + + + + + org.exoplatform.groovyscript.text.TemplateService + + UIPortalApplication-head + addTemplateExtension + org.exoplatform.groovyscript.text.TemplateExtensionPlugin + + + templates + The list of templates to include in HTML Page Header with UIPortalApplication.gtmpl + war:/groovy/webui/workspace/UINotesHeadTemplate.gtmpl + + + + + diff --git a/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml b/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml index fbb9ee85ed..30e78d4ab6 100644 --- a/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/notes-webapp/src/main/webapp/WEB-INF/gatein-resources.xml @@ -49,6 +49,12 @@ false /javascript/notes.bundle.js + + NotesPublication + + + imageCropper + html2canvas diff --git a/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl b/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl new file mode 100644 index 0000000000..e9aacd6a2d --- /dev/null +++ b/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl @@ -0,0 +1,11 @@ +<% + import org.exoplatform.commons.api.settings.ExoFeatureService; + def rcontext = _ctx.getRequestContext(); + ExoFeatureService featureService = uicomponent.getApplicationComponent(ExoFeatureService.class); + def userName = rcontext.getRemoteUser(); +%> + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index bda62e85b1..db4019ab4c 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -342,6 +342,8 @@ export default { this.cloneScheduleSettings(); this.cloneAdvancedSettings(); this.clonePublicationSettings(); + } else { + this.initSettings(); } this.currentScheduleSettings = structuredClone(this.scheduleSettings); this.currentAdvancedSettings = structuredClone(this.advancedSettings); @@ -400,6 +402,11 @@ export default { this.$refs?.scheduleOption?.cancelChanges(); this.$refs?.advancedOption?.cancelChanges(); }, + initSettings() { + this.scheduleSettings = {}; + this.advancedSettings = {}; + this.publicationSettings = {post: true}; + }, reset() { setTimeout(() => { this.cancelChanges(); @@ -422,7 +429,7 @@ export default { return; } this.$emit('metadata-updated', this.noteObject.properties); - this.$emit('publish', this.noteObject, this.publicationSettings); + this.$emit('publish', this.publicationSettings, this.noteObject,); }, updateCurrentNoteObjectProperties(properties) { this.noteObject.properties.noteId = Number(properties.noteId); diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue index a2bfb8e007..7232a10188 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/advanced-option/NotePublicationAdvancedOption.vue @@ -91,6 +91,7 @@ export default { }, initSettings() { if (!this.editMode) { + this.resetSettings(); return; } this.hideAuthor = this.savedAdvancedSettings?.hideAuthor; @@ -98,6 +99,10 @@ export default { }, cancelChanges() { this.initSettings(); + }, + resetSettings() { + this.hideAuthor = false; + this.hideReaction = false; } } }; diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue index 1df7e12d1d..139a8803be 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue @@ -30,8 +30,17 @@ :multiple="isMultipleSelectionOption" class="d-flex ms-n1 mt-0 pt-0"> + v-if="fromExternalPage && !hasSavedUnpublishSchedule" + :label="$t('notes.publication.externalPage.publish.cancel.label')" + :value="CANCEL_SCHEDULE_OPTION" /> + + + + :note="note" /> + :note="note" /> - + + + diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index db4019ab4c..107757e5f6 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -157,6 +157,7 @@ :publish="publicationSettings?.publish" :is-publishing="isPublishing" :edit-mode="editMode" + :from-external-page="noteObject?.fromExternalPage" :saved-schedule-settings="{ scheduled: currentScheduleSettings?.schedule, postDate: currentScheduleSettings?.postDate, diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue index 139a8803be..8fb196c765 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/schedule-option/NoteScheduleOption.vue @@ -203,10 +203,10 @@ + + commonVueComponents + + + extensionRegistry + + + vue + + + vuetify + + + eXoVueI18n + +
NotesEditor diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js index b98d5b607e..e638344d2a 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/initComponents.js @@ -1,6 +1,5 @@ import NoteCustomPlugins from '../notes-rich-editor/components/NoteCustomPlugins.vue'; import TranslationsEditBar from '../notes-rich-editor/components/TranslationsEditBar.vue'; -import NoteTreeviewDrawer from '../notes/components/NoteTreeviewDrawer.vue'; import NoteEditorTopBar from '../notes-rich-editor/components/NoteEditorTopBar.vue'; import NoteFullRichEditor from './components/NoteFullRichEditor.vue'; import NoteEditorMetadataDrawer from './components/note-properties/NoteEditorMetadataDrawer.vue'; @@ -9,7 +8,6 @@ import NoteMetadataPropertiesForm from './components/note-properties/NoteMetadat const components = { 'note-custom-plugins': NoteCustomPlugins, - 'note-treeview-drawer': NoteTreeviewDrawer, 'note-translation-edit-bar': TranslationsEditBar, 'note-editor-top-bar': NoteEditorTopBar, 'note-full-rich-editor': NoteFullRichEditor, diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-treeview/components/NoteTreeviewDrawer.vue similarity index 86% rename from notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue rename to notes-webapp/src/main/webapp/vue-app/notes-treeview/components/NoteTreeviewDrawer.vue index 40468ed419..7ca6119fbb 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NoteTreeviewDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-treeview/components/NoteTreeviewDrawer.vue @@ -4,20 +4,26 @@ z-index="1031" :value="drawer" @click.native="drawer = false" /> - - - - @@ -192,13 +212,15 @@ size="18" /> - {{ $t('notes.export.status.label.cleaningTemps') }} + + {{ $t('notes.export.status.label.cleaningTemps') }} + @@ -223,42 +247,63 @@ - {{ note.name }} + + {{ note.title }} +
-
{{ $t('notes.label.movePageSpace') }}
+
+ + {{ $t('notes.label.movePageSpace') }} + +
- {{ spaceDisplayName }} + {{ currentSpaceDisplayName }}
- +
- {{ $t('notes.label.movePageCurrentPosition') }} + + {{ $t('notes.label.movePageCurrentPosition') }} +
-
- {{ $t('notes.label.movePageDestination') }} - +
+ + {{ $t('notes.label.movePageDestination') }} + +

+ {{ $t('notes.move.select.destination.label') }} +

+
- {{ $t('notes.label.movePagePosition') }} + + {{ $t('notes.label.movePagePosition') }} +
-
+
@@ -402,9 +458,11 @@ {{ $t('notes.button.cancel') }} - {{ $t('notes.button.move') }} + :loading="isLoading" + :disabled="!enableMove" + class="btn btn-primary ml-2" + @click="moveNote()"> + {{ saveButtonLabel || $t('notes.button.move') }}
@@ -476,7 +534,18 @@ export default { limit: 20, timeout: 1000, searchTimer: null, + enableMove: false }), + props: { + selectedTranslation: { + type: String, + default: () => null, + }, + settings: { + type: Object, + default: null + } + }, computed: { homeLabel() { return this.home?.name === 'Home' && this.$t('notes.label.noteHome') || this.home.name; @@ -518,6 +587,18 @@ export default { }, isDraftFilter() { return this.filter === this.$t('notes.filter.label.drafts'); + }, + drawerTitle() { + return this.settings?.drawerTitle; + }, + saveButtonLabel() { + return this.settings?.saveButtonLabel; + }, + showCurrentDestination() { + return this.settings?.showCurrentDestination ?? true; + }, + currentSpaceDisplayName() { + return this.settings?.spaceDisplayName || this.spaceDisplayName; } }, watch: { @@ -655,6 +736,7 @@ export default { this.isIncludePage = source === 'includePages'; this.displayArrow = !includeDisplay; if (source === 'movePage') { + this.enableMove = false; this.movePage = true; this.exportNotes = false; } @@ -677,6 +759,7 @@ export default { }, backToPlugins() { this.closeAll = false; + this.close(); }, openNote(event, note) { const canOpenNote = (this.filter !== this.$t('notes.filter.label.drafts') || this.filter === this.$t('notes.filter.label.drafts') && note.draftPage) && note.noteId !== this.note.id; @@ -690,7 +773,8 @@ export default { } else if (this.movePage) { if (note.noteId !== this.note.id) { this.$notesService.getNoteById(note.noteId,'', '', '', '', true).then(data => { - this.breadcrumb = data && data.breadcrumb || []; + this.breadcrumb = data?.breadcrumb || []; + this.enableMove = true; this.breadcrumb[0].name = this.$t('notes.label.noteHome'); this.destinationNote = data; }); diff --git a/notes-webapp/src/main/webapp/vue-app/notes-treeview/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-treeview/initComponents.js new file mode 100644 index 0000000000..0c21c529a2 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-treeview/initComponents.js @@ -0,0 +1,11 @@ +import NoteBreadcrumb from '../notes/components/NoteBreadcrumb.vue'; +import NoteTreeviewDrawer from './components/NoteTreeviewDrawer.vue'; + +const components = { + 'note-treeview-drawer': NoteTreeviewDrawer, + 'note-breadcrumb': NoteBreadcrumb +}; + +for (const key in components) { + Vue.component(key, components[key]); +} diff --git a/notes-webapp/src/main/webapp/vue-app/notes-treeview/main.js b/notes-webapp/src/main/webapp/vue-app/notes-treeview/main.js new file mode 100644 index 0000000000..b56bded274 --- /dev/null +++ b/notes-webapp/src/main/webapp/vue-app/notes-treeview/main.js @@ -0,0 +1 @@ +import './initComponents.js'; diff --git a/notes-webapp/src/main/webapp/vue-app/notes/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes/initComponents.js index d72326e076..118285d85e 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes/initComponents.js @@ -1,5 +1,4 @@ import NotesOverview from './components/NotesOverview.vue'; -import NoteTreeviewDrawer from './components/NoteTreeviewDrawer.vue'; import NotesActionsMenu from './components/menu/NotesActionsMenu.vue'; import NoteBreadcrumb from './components/NoteBreadcrumb.vue'; import NoteImportDrawer from './components/NoteImportDrawer.vue'; @@ -16,7 +15,6 @@ import NoteEditorFeaturedImageDrawer from '../notes-rich-editor/components/note- const components = { 'notes-overview': NotesOverview, - 'note-treeview-drawer': NoteTreeviewDrawer, 'notes-actions-menu': NotesActionsMenu, 'note-breadcrumb': NoteBreadcrumb, 'note-import-drawer': NoteImportDrawer, diff --git a/notes-webapp/webpack.prod.js b/notes-webapp/webpack.prod.js index a896dc3f8e..99e45e694b 100644 --- a/notes-webapp/webpack.prod.js +++ b/notes-webapp/webpack.prod.js @@ -21,7 +21,7 @@ const config = { notePageView: './src/main/webapp/vue-app/note-page-view/main.js', notesNotificationExtension: './src/main/webapp/vue-app/notification-extensions/main.js', notesPublication: './src/main/webapp/vue-app/notes-publication/main.js', - + notesTreeview: './src/main/webapp/vue-app/notes-treeview/main.js', }, output: { publicPath: '', From b62b4294396ea4e30eb92b945a4f9afce520f2f6 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:00:24 +0100 Subject: [PATCH 24/29] Fix: fix unable to save snv translation - EXO-75758 - Meeds-io/meeds#2642 (#1238) prior to this change, when editing an snv with advanced edition option and adding a translation while automatic translation is disabled, the save button remains disabled as it checks the validity of the note title in the snv while it shouldn't in this case which causes the non validation of the from to enable the save. This PR ensures to ignore validating the title in an snv case to fix thus issue. --- .../notes-editor/components/NotesEditorDashboard.vue | 9 +++++---- .../notes-rich-editor/components/NoteFullRichEditor.vue | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue index 7c36e4aceb..86fc9b498d 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue @@ -137,11 +137,12 @@ export default { }, computed: { saveOrUpdateDisabled() { - return (!this.note?.title || this.note?.title?.length < 3 - || this.note?.title?.length > this.titleMaxLength) - || (this.noteNotModified + return this.notValidTitle || (this.noteNotModified && !this.propertiesModified && !this.draftNote && !this.note.draftPage) || this.savingDraft; }, + notValidTitle() { + return !this.webPageNote && (!this.note?.title || this.note?.title?.length < 3 || this.note?.title?.length > this.titleMaxLength); + }, noteNotModified() { return this.note?.title === this.originalNote?.title && this.$noteUtils.isSameContent(this.note?.content, this.originalNote?.content); }, @@ -616,7 +617,7 @@ export default { this.persistDraftNote(draftNote,update); } } - } else { + } else if (!this.newTranslation) { // delete draft this.deleteDraftNote(); } diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index 6289bb9f57..682e1f8fb3 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -409,7 +409,7 @@ export default { this.postAndPublishNote(); }, postAndPublishNote(publicationSettings, note) { - if (this.newPublicationDrawerEnabled) { + if (this.newPublicationDrawerEnabled && this.publicationParams) { this.noteObject = note; this.updateData(); } From f26eb8513ebf52ebd218aeba9da1714749f7f58d Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:48:53 +0100 Subject: [PATCH 25/29] feat: broadcast note deleted event - EXO-75617 - Meeds-io/MIPs#161 (#1239) broadcast note deleted event --- .../org/exoplatform/wiki/service/impl/NoteServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java index 8c94cff547..23ea9e9642 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java @@ -164,6 +164,8 @@ public class NoteServiceImpl implements NoteService { public static final String FEATURED_IMAGE_ALT_TEXT = "featuredImageAltText"; + public static final String NOTE_DELETED = "note.deleted"; + private final WikiService wikiService; private final DataStorage dataStorage; @@ -408,7 +410,6 @@ public boolean deleteNote(String noteType, String noteOwner, String noteName) th try { dataStorage.deletePage(noteType, noteOwner, noteName); - } catch (WikiException e) { log.error("Can't delete note '" + noteName + "' ", e); return false; @@ -458,7 +459,7 @@ public boolean deleteNote(String noteType, String noteOwner, String noteName, Id deleteNote(noteType, noteOwner, noteName); postDeletePage(noteType, noteOwner, noteName, note); - + Utils.broadcast(listenerService, NOTE_DELETED, userIdentity, note); // Post delete activity for all children pages for (Page childNote : allChrildrenPages) { postDeletePage(childNote.getWikiType(), childNote.getWikiOwner(), childNote.getName(), childNote); From 981999314ed5fe4ccc6a5ab0a053ec612e722e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20D=C3=A9nari=C3=A9?= Date: Wed, 11 Dec 2024 17:36:55 +0100 Subject: [PATCH 26/29] fix: labels are not translated in publication drawer - EXO-75965 - meeds-io/MIPS#161 Before this fix, the i18n file for noptespublicationDrawer is not loaded when the drawer is opened from the news detail. This commit add the load of the needed file on drawer creation --- .../components/NotePublicationDrawer.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue index 107757e5f6..1e580ad40d 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/components/NotePublicationDrawer.vue @@ -298,6 +298,14 @@ export default { } } }, + created() { + const lang = eXo.env.portal.language; + const urls = `/content/i18n/locale.portlet.notes.notesPortlet?lang=${lang}`; + + exoi18n.loadLanguageAsync(lang, urls) + .then(() => this.$nextTick()) + .finally(() => this.loading = false); + }, methods: { updateAdvancedSettings(settings) { this.advancedSettings = structuredClone(settings); From 3f20fa4cb9ddd388e013e7a78342541d81726879 Mon Sep 17 00:00:00 2001 From: Ayoub Zayati Date: Tue, 17 Dec 2024 10:37:40 +0100 Subject: [PATCH 27/29] fix: Fix broadcasting note.page.version.created event when draftId is null - EXO-75949 - Meeds-io/MIPs#161 (#1257) --- .../java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java index 23ea9e9642..642be9c3e8 100644 --- a/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java +++ b/notes-service/src/main/java/org/exoplatform/wiki/service/impl/NoteServiceImpl.java @@ -250,7 +250,7 @@ public Page createNote(Wiki noteBook, note.setContent(note.getContent()); Page createdPage = createNote(noteBook, parentPage, note); NotePageProperties properties = note.getProperties(); - String draftPageId = String.valueOf(properties != null && properties.isDraft() ? properties.getNoteId() : null); + String draftPageId = properties != null && properties.isDraft() ? String.valueOf(properties.getNoteId()) : null; try { if (properties != null) { properties.setNoteId(Long.parseLong(createdPage.getId())); From ecc1365bb8c166fbde78246604fea73fbbf31578 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:25:29 +0100 Subject: [PATCH 28/29] feat: Add note toc plugin styles to generated sources - EXO-75747 - Meeds-io/MIPs#161 (#1255) Add note toc plugin styles in generated sources --- notes-webapp/pom.xml | 57 +++++++++++++++---- .../eXo/wiki/ckeditor/plugins/toc/toc.css | 7 +-- .../components/NoteFullRichEditor.vue | 28 +++++---- .../notes/components/NotesOverview.vue | 2 + pom.xml | 6 ++ 5 files changed, 74 insertions(+), 26 deletions(-) diff --git a/notes-webapp/pom.xml b/notes-webapp/pom.xml index b914c8f6f6..91a96ea493 100644 --- a/notes-webapp/pom.xml +++ b/notes-webapp/pom.xml @@ -40,16 +40,6 @@ com.github.eirslett frontend-maven-plugin - - org.apache.maven.plugins - maven-war-plugin - - - WEB-INF/lib/*.jar - - maven-resources-plugin @@ -85,6 +75,43 @@ true + + c-copy-resources + generate-sources + + copy-resources + + + ${project.build.directory}/src/main/webapp/skin/css/toc + + + src/main/webapp/javascript/eXo/wiki/ckeditor/plugins + + toc/*.css + + + + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-source + generate-sources + + add-source + + + + ${project.build.directory}/src/main/webapp/skin/css/toc + + + @@ -140,6 +167,16 @@ + + org.apache.maven.plugins + maven-war-plugin + + + WEB-INF/lib/*.jar + + diff --git a/notes-webapp/src/main/webapp/javascript/eXo/wiki/ckeditor/plugins/toc/toc.css b/notes-webapp/src/main/webapp/javascript/eXo/wiki/ckeditor/plugins/toc/toc.css index daa22d9b1c..58f551059c 100644 --- a/notes-webapp/src/main/webapp/javascript/eXo/wiki/ckeditor/plugins/toc/toc.css +++ b/notes-webapp/src/main/webapp/javascript/eXo/wiki/ckeditor/plugins/toc/toc.css @@ -38,9 +38,8 @@ cursor: default; } -.navigation-img-wrapper .cke_widget_selectImage { - margin-bottom: 0!important; - margin-right: 4px !important; +.navigation-img-wrapper .cke_widget_image { + margin: 0 0 0 10px !important; } #remove-treeview { @@ -57,7 +56,7 @@ display: none; } -.cke_widget_wrapper.cke_widget_inline.cke_widget_selectImage.cke_image_nocaption #remove-treeview { +.cke_widget_wrapper.cke_widget_inline.cke_widget_image.cke_image_nocaption #remove-treeview { top: -55px!important; right: -95px!important; diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index 682e1f8fb3..7911341206 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -247,6 +247,7 @@ export default { instanceReady() { if (this.instanceReady) { this.$emit('editor-ready', this.editor); + this.bindNavigationRemoveListener(); } } }, @@ -484,20 +485,9 @@ export default { const treeviewParentWrapper = self.editor.window.$.document.getElementById('note-children-container'); if ( treeviewParentWrapper ) { - treeviewParentWrapper.contentEditable='false'; + treeviewParentWrapper.contentEditable = 'false'; } - const removeTreeviewBtn = evt.editor.document.getById( 'remove-treeview' ); - if ( removeTreeviewBtn ) { - evt.editor.editable().attachListener( removeTreeviewBtn, 'click', function() { - const treeviewParentWrapper = evt.editor.document.getById( 'note-children-container' ); - if ( treeviewParentWrapper) { - treeviewParentWrapper.remove(); - self.noteObject.content = evt.editor.getData(); - } - self.setFocus(); - }); - } window.setTimeout(() => self.setFocus(), 50); self.$root.$applicationLoaded(); self.instanceReady = true; @@ -623,6 +613,20 @@ export default { component.typingTimer = setTimeout(function () { component.isUserTyping = false; }, 1000); + }, + bindNavigationRemoveListener() { + const removeTreeviewBtn = this.editor.document.getById('remove-treeview'); + if (removeTreeviewBtn) { + const self = this; + this.editor.editable().attachListener(removeTreeviewBtn, 'click', function () { + const treeviewParentWrapper = self.editor.document.getById('note-children-container'); + if (treeviewParentWrapper) { + treeviewParentWrapper.remove(); + self.noteObject.content = self.editor.getData(); + } + self.setFocus(); + }); + } } } }; diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue index 174ed65ae1..45d0515459 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue @@ -681,6 +681,8 @@ export default { noteArticle.published = publicationSettings?.publish; noteArticle.targets = publicationSettings?.selectedTargets; noteArticle.audience = publicationSettings?.selectedAudience; + noteArticle.isHomeDefaultContent = this.isHomeNoteDefaultContent; + noteArticle.hasChildren = this.hasChildren; this.isPublishing = true; if (note) { this.$notesService.updateNoteById(note).then(() => { diff --git a/pom.xml b/pom.xml index eb2123aff2..9a0d283c7b 100644 --- a/pom.xml +++ b/pom.xml @@ -111,6 +111,12 @@ ${project.version} pom + + ${project.groupId} + notes-webapp + ${project.version} + sources + ${project.groupId} notes-packaging From efefce041e16a57c20e5b58f35fdd64c9b0f0638 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:00:36 +0100 Subject: [PATCH 29/29] feat: Remove MIP-161 feature flags - EXO-76014 - Meeds-io/MIPs#161 (#1258) Remove MIP-161 feature flags --- .../conf/wiki/feature-flags-configuration.xml | 51 ------------------- .../webui/workspace/UINotesHeadTemplate.gtmpl | 10 ---- .../notes-publication/initComponents.js | 9 ++++ .../components/NoteFullRichEditor.vue | 8 +-- .../notes/components/NotesOverview.vue | 4 -- 5 files changed, 11 insertions(+), 71 deletions(-) delete mode 100644 notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml delete mode 100644 notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl diff --git a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml deleted file mode 100644 index d7f415e4a3..0000000000 --- a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - NoteFeatureProperties - org.exoplatform.container.ExtendedPropertyConfigurator - - - NoteFeatureProperties - Note Feature enablement flag - - - - - - org.exoplatform.groovyscript.text.TemplateService - - UIPortalApplication-head - addTemplateExtension - org.exoplatform.groovyscript.text.TemplateExtensionPlugin - - - templates - The list of templates to include in HTML Page Header with UIPortalApplication.gtmpl - war:/groovy/webui/workspace/UINotesHeadTemplate.gtmpl - - - - - diff --git a/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl b/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl deleted file mode 100644 index 180a6e0e5a..0000000000 --- a/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl +++ /dev/null @@ -1,10 +0,0 @@ -<% - import org.exoplatform.commons.api.settings.ExoFeatureService; - def rcontext = _ctx.getRequestContext(); - ExoFeatureService featureService = uicomponent.getApplicationComponent(ExoFeatureService.class); - def userName = rcontext.getRemoteUser(); -%> - - diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js index 0a52aa0c10..f1e6cbca0a 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js +++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js @@ -6,6 +6,8 @@ import NotePublicationTargetList from './components/publish-option/NotePublicati import NoteScheduleOption from './components/schedule-option/NoteScheduleOption.vue'; import NotePublicationAdvancedOption from './components/advanced-option/NotePublicationAdvancedOption.vue'; +import * as notesService from '../../javascript/eXo/wiki/notesService.js'; + const components = { 'note-publication-drawer': NotePublicationDrawer, 'note-metadata-properties-form': NoteMetadataPropertiesForm, @@ -19,3 +21,10 @@ const components = { for (const key in components) { Vue.component(key, components[key]); } + + +if (!Vue.prototype.$notesService) { + window.Object.defineProperty(Vue.prototype, '$notesService', { + value: notesService, + }); +} diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue index 7911341206..b44a8b900e 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue @@ -284,9 +284,6 @@ export default { }, isTranslation() { return !!this.noteObject?.lang; - }, - newPublicationDrawerEnabled() { - return eXo?.env?.portal?.newPublicationDrawerEnabled; } }, created() { @@ -402,15 +399,14 @@ export default { } }, postNote() { - if (this.newPublicationDrawerEnabled && this.publicationParams - && !this.isTranslation && !this.editMode) { + if (this.publicationParams && !this.isTranslation && !this.editMode) { this.openPublicationDrawer(this.noteObject); return; } this.postAndPublishNote(); }, postAndPublishNote(publicationSettings, note) { - if (this.newPublicationDrawerEnabled && this.publicationParams) { + if (this.publicationParams) { this.noteObject = note; this.updateData(); } diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue index 45d0515459..ff74163f35 100644 --- a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue +++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue @@ -314,7 +314,6 @@ :has-featured-image="hasFeaturedImage" />