Commit 8a07c6e3 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_gadget_interface_validator] Simplify

parent e1708acd
/*jslint nomen: true, indent: 2, maxerr: 30, maxlen: 80 */ /*jslint nomen: true, indent: 2, maxerr: 30, maxlen: 80 */
/*global DOMParser, document, rJS, renderJS, RSVP, window, /*global DOMParser, document, rJS, RSVP, window,
jIO*/ jIO*/
(function (window, rJS, RSVP, DOMParser, renderJS, jIO) { (function (window, rJS, RSVP, DOMParser, jIO) {
"use strict"; "use strict";
function fetchAppcacheData(appcache_url) { function fetchAppcacheData(appcache_url) {
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
if (element.href !== null && if (element.href !== null &&
element.rel === "http://www.renderjs.org/rel/interface") { element.rel === "http://www.renderjs.org/rel/interface") {
interface_list.push( interface_list.push(
renderJS.getAbsoluteURL(element.getAttribute("href"), rJS.getAbsoluteURL(element.getAttribute("href"),
window.location.href) window.location.href)
); );
} }
...@@ -279,9 +279,7 @@ ...@@ -279,9 +279,7 @@
return interface_gadget.declareGadget(gadget_url, { return interface_gadget.declareGadget(gadget_url, {
scope: gadget_url scope: gadget_url
}) })
.push(function () { .push(undefined, function (error) {
return interface_gadget.getDeclaredGadget(gadget_url);
}, function (error) {
var message = "Error with loading the gadget.\n"; var message = "Error with loading the gadget.\n";
error.message = message + error.message; error.message = message + error.message;
throw error; throw error;
...@@ -590,4 +588,4 @@ ...@@ -590,4 +588,4 @@
}); });
}); });
}(window, rJS, RSVP, DOMParser, renderJS, jIO)); }(window, rJS, RSVP, DOMParser, jIO));
\ 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>968.15691.27792.32785</string> </value> <value> <string>968.15707.16175.19985</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>1529077770.12</float> <float>1529078216.58</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