Commit f9435ae1 authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: using MappingStorge thx @vincentB

parent c7647853
......@@ -19,13 +19,10 @@
function get_jio_cache_storage(name) {
return {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: 'officejs_' + name + '_cache_erp5'
}
}
};
}
......@@ -146,7 +143,7 @@
return jIO.createJIO({
type: "replicate",
query: {
query: '(portal_type: ("Web Style", "Web Page", "Web Script")) AND ' +
query: 'reference: "%" AND (portal_type: ("Web Style", "Web Page", "Web Script")) AND ' +
erp5_query + modification_date,
limit: [0, 1234567890]
},
......@@ -158,26 +155,22 @@
check_remote_modification: true,
check_remote_creation: true,
check_remote_deletion: true,
local_sub_storage: {
type: "attachasproperty",
map: {
text_content: {
body_name: "text_content",
content_type_name: "content_type"
},
data: {
body_name: "data",
content_type_name: "content_type"
}
},
sub_storage: get_jio_cache_storage(name)
},
//use_bulk_get: true,
use_bulk: false,
local_sub_storage: get_jio_cache_storage(name),
remote_sub_storage: {
type: "mapping",
sub_storage: {
type: "erp5",
url: (new URI("hateoasnoauth"))
.absoluteTo(location.href)
.toString(),
default_view_reference: "jio_view"
},
mapping_dict: {"id": {
"equal": "url_string",
"default_property": "reference"
}}
}
});
}
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.8487.48731.31863</string> </value>
<value> <string>955.20973.48171.43827</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1478563709.48</float>
<float>1480578496.19</float>
<string>UTC</string>
</tuple>
</state>
......
/*global window, rJS, jIO, URI, location, console, document, RSVP, loopEventListener, navigator, XMLHttpRequest, ProgressEvent */
/*jslint nomen: true, indent: 2, maxerr: 15*/
/*global window, rJS, jIO, URI, location, console, document, RSVP, loopEventListener, navigator, XMLHttpRequest, ProgressEvent*/
/*jslint nomen: true, indent: 2*/
(function (window, rJS) {
"use strict";
......@@ -12,13 +12,10 @@
function get_jio_cache_storage(name) {
return {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: 'officejs_' + name + '_cache_erp5'
}
}
};
}
......@@ -139,7 +136,7 @@
return jIO.createJIO({
type: "replicate",
query: {
query: '(portal_type: ("Web Style", "Web Page", "Web Script")) AND ' +
query: 'reference: "%" AND (portal_type: ("Web Style", "Web Page", "Web Script")) AND ' +
erp5_query + modification_date,
limit: [0, 1234567890]
},
......@@ -151,26 +148,22 @@
check_remote_modification: true,
check_remote_creation: true,
check_remote_deletion: true,
local_sub_storage: {
type: "attachasproperty",
map: {
text_content: {
body_name: "text_content",
content_type_name: "content_type"
},
data: {
body_name: "data",
content_type_name: "content_type"
}
},
sub_storage: get_jio_cache_storage(name)
},
//use_bulk_get: true,
use_bulk: false,
local_sub_storage: get_jio_cache_storage(name),
remote_sub_storage: {
type: "mapping",
sub_storage: {
type: "erp5",
url: (new URI("hateoasnoauth"))
.absoluteTo(location.href)
.toString(),
default_view_reference: "jio_view"
},
mapping_dict: {"id": {
"equal": "url_string",
"default_property": "reference"
}}
}
});
}
......
......@@ -224,7 +224,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.22065.61366.57770</string> </value>
<value> <string>955.40145.23133.18397</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>1479378360.51</float>
<float>1480578663.21</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -243,7 +243,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.630.63038.16349</string> </value>
<value> <string>955.40147.13377.15940</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -261,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>1478729480.3</float>
<float>1480529399.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