Commit a6c1b517 authored by Roque's avatar Roque

erp5_officejs: include non-json resources from appcache as blobs

parent 81e07103
......@@ -141,13 +141,15 @@
return new RSVP.Queue()
.push(function () {
var promise_list = [], i = 0,
ignore_urls = [prefix + "/", prefix + version, prefix + version + manifest];
blob_urls = [prefix + "/", prefix + version, prefix + version + manifest];
for (var id in attachment_dict) {
if (ignore_urls.indexOf(id) < 0) {
if (blob_urls.indexOf(id) >= 0) {
promise_list.push(appcache_storage.getAttachment(origin_url, id));
} else {
promise_list.push(appcache_storage.getAttachment(origin_url, id, {"format": "json"}));
configuration_ids_dict["" + i] = id;
i += 1;
}
configuration_ids_dict["" + i] = id;
i += 1;
}
return RSVP.all(promise_list);
})
......@@ -159,6 +161,7 @@
parser.href = id;
var urlParams = new URLSearchParams(parser.search);
id = urlParams.get("relative_url");
if (id === null) { id = configuration_ids_dict["" + i]; }
promise_list.push(appcache_storage.put(id, content_list[i]));
}
return RSVP.all(promise_list);
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.24075.46226.21333</string> </value>
<value> <string>974.24123.33456.1297</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1552654807.29</float>
<float>1552673890.26</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