Commit ce790c75 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Use the proper object to build url in appcache storage

parent 96c7f57b
......@@ -57,13 +57,14 @@
return new Blob([]);
});
}
if (relative_url === '/') {
relative_url = '';
}
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
type: "GET",
url: (relative_url.startsWith("http") ||
relative_url.startsWith("//")) ?
relative_url : origin_url + relative_url,
url: new URL(relative_url, origin_url),
dataType: "blob"
});
})
......@@ -106,7 +107,8 @@
.push(function () {
return jIO.util.ajax({
type: "GET",
url: storage._origin_url + storage._version + storage._manifest
url: new URL(storage._manifest, new URL(storage._version,
storage._origin_url))
});
})
.push(function (response) {
......
......@@ -225,7 +225,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.7741.10364.409</string> </value>
<value> <string>963.8873.18455.40004</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1509371482.86</float>
<float>1509439359.17</float>
<string>UTC</string>
</tuple>
</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