Commit e00338be authored by Vincent Bechu's avatar Vincent Bechu

[erp5_web_renderjs_ui] Handle Progress Event error.

parent 59e32955
/*globals window, document, RSVP, rJS, /*globals window, document, RSVP, rJS,
URI, location, XMLHttpRequest, console, navigator*/ URI, location, XMLHttpRequest, console, navigator, ProgressEvent*/
/*jslint indent: 2, maxlen: 80*/ /*jslint indent: 2, maxlen: 80*/
(function (window, document, RSVP, rJS, (function (window, document, RSVP, rJS,
XMLHttpRequest, location, console, navigator) { XMLHttpRequest, location, console, navigator, ProgressEvent) {
"use strict"; "use strict";
var MAIN_SCOPE = "m"; var MAIN_SCOPE = "m";
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
// Display it to the user for now, // Display it to the user for now,
// and allow user to go back to the frontpage // and allow user to go back to the frontpage
var error_text = ""; var error_text = "";
if (error instanceof ProgressEvent) {
error = error.target.error;
}
if (error.target instanceof XMLHttpRequest) { if (error.target instanceof XMLHttpRequest) {
error_text = error.target.toString() + " " + error_text = error.target.toString() + " " +
...@@ -647,4 +650,4 @@ ...@@ -647,4 +650,4 @@
}); });
}(window, document, RSVP, rJS, }(window, document, RSVP, rJS,
XMLHttpRequest, location, console, navigator)); XMLHttpRequest, location, console, navigator, ProgressEvent));
\ No newline at end of file \ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>964.44144.54943.18056</string> </value> <value> <string>964.44401.33443.35072</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1515401365.21</float> <float>1516619185.21</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment