| ... |
... |
@@ -63,7 +63,12 @@ |
| 63 |
63 |
document.fire('xwiki:activity:newActivity', msForm); |
| 64 |
64 |
}, |
| 65 |
65 |
onFailure: function(response) { |
| 66 |
|
- var failureReason = response.statusText || 'Server not responding'; |
|
66 |
+ var failureReason = ''; |
|
67 |
+ if (response.statusText == '' /* No response */ || response.status == 12031 /* In IE */) { |
|
68 |
+ failureReason = 'Server not responding'; |
|
69 |
+ } else { |
|
70 |
+ failureReason = response.statusText; |
|
71 |
+ } |
| 67 |
67 |
if (msForm) { |
| 68 |
68 |
msForm._disabled = false |
| 69 |
69 |
if (msForm._notification) { |
| ... |
... |
@@ -72,6 +72,9 @@ |
| 72 |
72 |
msForm._notification = new XWiki.widgets.Notification("$services.localization.render('xe.activity.messages.submit.failed'): " + failureReason, 'error'); |
| 73 |
73 |
} |
| 74 |
74 |
}, |
|
80 |
+ on1223 : function(response) { /*SUCCESS*/ |
|
81 |
+ response.request.options.onSuccess(response); |
|
82 |
+ }, |
| 75 |
75 |
on0 : function(response) { /*FAILURE*/ |
| 76 |
76 |
response.request.options.onFailure(response); |
| 77 |
77 |
}, |