From ceea6aa8b8211060c7d1b31974b14151018cac54 Mon Sep 17 00:00:00 2001 From: Manuel Leduc Date: Tue, 27 Feb 2024 16:37:20 +0100 Subject: [PATCH] XWIKI-21944: Allow live data action to be async --- .../livedata/LiveDataActionDescriptor.java | 24 +++++++++---------- .../main/vue/displayers/DisplayerActions.vue | 2 -- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-api/src/main/java/org/xwiki/livedata/LiveDataActionDescriptor.java b/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-api/src/main/java/org/xwiki/livedata/LiveDataActionDescriptor.java index e87e465f3b4e..3e0fbbcd4c35 100644 --- a/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-api/src/main/java/org/xwiki/livedata/LiveDataActionDescriptor.java +++ b/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-api/src/main/java/org/xwiki/livedata/LiveDataActionDescriptor.java @@ -28,7 +28,7 @@ /** * Describes a live data action. - * + * * @version $Id$ * @since 12.10.1 * @since 13.0 @@ -69,8 +69,6 @@ public class LiveDataActionDescriptor extends BaseDescriptor */ private LiveDataAsyncActionDescriptor async; - - /** * Default constructor. */ @@ -80,7 +78,7 @@ public LiveDataActionDescriptor() /** * Creates a new descriptor for the specified action. - * + * * @param id the action id */ public LiveDataActionDescriptor(String id) @@ -98,7 +96,7 @@ public String getName() /** * Sets the action pretty name. - * + * * @param name the new pretty name */ public void setName(String name) @@ -116,7 +114,7 @@ public String getDescription() /** * Sets the action description. - * + * * @param description the new action description */ public void setDescription(String description) @@ -134,7 +132,7 @@ public Map getIcon() /** * Sets the icon meta data. - * + * * @param icon the new icon meta data */ public void setIcon(Map icon) @@ -144,7 +142,7 @@ public void setIcon(Map icon) /** * @return the live data property used to determine if the current user is allowed to perform this action on a given - * live data entry + * live data entry * @since 12.10.4 * @since 13.0 */ @@ -156,9 +154,9 @@ public String getAllowProperty() /** * Sets the live data property to be used to determine if the current user is allowed to perform this action on a * given live data entry. - * + * * @param allowProperty the live data property used to determine if the current user is allowed to perform this - * action on a given live data entry + * action on a given live data entry * @since 12.10.4 * @since 13.0 */ @@ -179,9 +177,9 @@ public String getUrlProperty() /** * Sets the live data property that holds the URL that can be used to perform this action on a given entry. - * - * @param urlProperty the live data property that holds the URL that can be used to perform this action on a - * given entry + * + * @param urlProperty the live data property that holds the URL that can be used to perform this action on a given + * entry * @since 12.10.4 * @since 13.0 */ diff --git a/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-webjar/src/main/vue/displayers/DisplayerActions.vue b/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-webjar/src/main/vue/displayers/DisplayerActions.vue index b5cd04b3edd3..3c3ef62ded25 100644 --- a/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-webjar/src/main/vue/displayers/DisplayerActions.vue +++ b/xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-webjar/src/main/vue/displayers/DisplayerActions.vue @@ -51,7 +51,6 @@ > {{ action.name }} - @@ -125,7 +124,6 @@ export default { } const response = await fetch(resource, options) - if (response.ok) { notif.replace(new XWiki.widgets.Notification(async.successMessage, 'done')); this.logic.updateEntries();