+ :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: '',