Commit 96c7f57b authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] appcache storage limit allAttachments to one document

parent 602abb58
......@@ -10,7 +10,7 @@
this._gadget = spec.gadget;
this._take_installer = spec.take_installer || false;
this._origin_url = spec.origin_url !== undefined ?
spec.origin_url : new URL(window.location);
spec.origin_url : window.location.href;
this._version = spec.version || "";
this._gadget_list = [];
this._prefix = spec.prefix || "";
......@@ -72,7 +72,8 @@
});
};
AppCacheStorage.prototype.allAttachments = function () {
AppCacheStorage.prototype.allAttachments = function (id) {
if (id === this._origin_url) {
var result = {}, i, len = this._relative_url_list.length;
for (i = 0; i < len; i += 1) {
result[this._relative_url_list[i]] = {};
......@@ -81,6 +82,8 @@
result[this._gadget_list[i]] = {};
}
return result;
}
return [];
};
AppCacheStorage.prototype.buildQuery = function () {
......
......@@ -225,7 +225,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -239,7 +239,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.48080.27649.65467</string> </value>
<value> <string>963.7741.10364.409</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>1504083085.19</float>
<float>1509371482.86</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