Changes for page Message Sender Macro
Last modified by Ludovic Dubost on 2024/07/22 15:51
From version 14.1
edited by Ludovic Dubost
on 2022/08/01 13:48
on 2022/08/01 13:48
Change comment:
Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]
To version 12.1
edited by Ludovic Dubost
on 2021/11/08 18:28
on 2021/11/08 18:28
Change comment:
Migrated property [priority] from class [XWiki.WikiMacroClass]
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -64,7 +64,12 @@ 64 64 document.fire('xwiki:activity:newActivity', msForm); 65 65 }, 66 66 onFailure: function(response) { 67 - var failureReason = response.statusText || 'Server not responding'; 67 + var failureReason = ''; 68 + if (response.statusText == '' /* No response */ || response.status == 12031 /* In IE */) { 69 + failureReason = 'Server not responding'; 70 + } else { 71 + failureReason = response.statusText; 72 + } 68 68 if (msForm) { 69 69 msForm._disabled = false 70 70 if (msForm._notification) { ... ... @@ -73,6 +73,9 @@ 73 73 msForm._notification = new XWiki.widgets.Notification("$services.localization.render('xe.activity.messages.submit.failed'): " + failureReason, 'error'); 74 74 } 75 75 }, 81 + on1223 : function(response) { /*SUCCESS*/ 82 + response.request.options.onSuccess(response); 83 + }, 76 76 on0 : function(response) { /*FAILURE*/ 77 77 response.request.options.onFailure(response); 78 78 },