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 @@ ...@@ -10,7 +10,7 @@
this._gadget = spec.gadget; this._gadget = spec.gadget;
this._take_installer = spec.take_installer || false; this._take_installer = spec.take_installer || false;
this._origin_url = spec.origin_url !== undefined ? 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._version = spec.version || "";
this._gadget_list = []; this._gadget_list = [];
this._prefix = spec.prefix || ""; this._prefix = spec.prefix || "";
...@@ -72,15 +72,18 @@ ...@@ -72,15 +72,18 @@
}); });
}; };
AppCacheStorage.prototype.allAttachments = function () { AppCacheStorage.prototype.allAttachments = function (id) {
var result = {}, i, len = this._relative_url_list.length; if (id === this._origin_url) {
for (i = 0; i < len; i += 1) { var result = {}, i, len = this._relative_url_list.length;
result[this._relative_url_list[i]] = {}; for (i = 0; i < len; i += 1) {
} result[this._relative_url_list[i]] = {};
for (i = 0; i < this._gadget_list.length; i += 1) { }
result[this._gadget_list[i]] = {}; for (i = 0; i < this._gadget_list.length; i += 1) {
result[this._gadget_list[i]] = {};
}
return result;
} }
return result; return [];
}; };
AppCacheStorage.prototype.buildQuery = function () { AppCacheStorage.prototype.buildQuery = function () {
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>vincent</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>961.48080.27649.65467</string> </value> <value> <string>963.7741.10364.409</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>1504083085.19</float> <float>1509371482.86</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