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