Commit 1f475772 authored by Vincent Bechu's avatar Vincent Bechu

[OfficeJS] Add dateupdater storage on top of all officejs storage

And adapt cache
parent 3bfe34e0
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
doc = gadget.state.doc; doc = gadget.state.doc;
doc.text_content = content.text_content; doc.text_content = content.text_content;
} }
doc.modification_date = (new Date()).toUTCString();
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
}) })
.push(function () { .push(function () {
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37006.38613.44356</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195115.29</float> <float>1507216731.96</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -70,6 +70,11 @@ ...@@ -70,6 +70,11 @@
if (jio_options === undefined) { if (jio_options === undefined) {
return; return;
} }
jio_options = {
type: 'dateupdater',
sub_storage: jio_options,
property_list: ['modification_date']
};
try { try {
this.state_parameter_dict.jio_storage = jIO.createJIO(jio_options); this.state_parameter_dict.jio_storage = jIO.createJIO(jio_options);
} catch (error) { } catch (error) {
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,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>
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.14325.54663.48878</string> </value> <value> <string>962.36985.29761.10359</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1505921031.1</float> <float>1507216488.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
return gadget.jio_putAttachment(gadget.state.doc.jio_key, "data", blob); return gadget.jio_putAttachment(gadget.state.doc.jio_key, "data", blob);
}); });
} }
doc.modification_date = (new Date()).toISOString();
}) })
.push(function () { .push(function () {
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37007.2490.4437</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195142.2</float> <float>1507216751.29</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
doc = gadget.state.doc; doc = gadget.state.doc;
doc.text_content = content.text_content; doc.text_content = content.text_content;
} }
doc.modification_date = (new Date()).toISOString();
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
}) })
.push(function () { .push(function () {
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37007.62049.31914</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195196.76</float> <float>1507216794.53</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
doc = gadget.state.doc; doc = gadget.state.doc;
doc.text_content = content.text_content; doc.text_content = content.text_content;
} }
doc.modification_date = (new Date()).toISOString();
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
}) })
.push(function () { .push(function () {
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37008.9624.51234</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195208.76</float> <float>1507216802.33</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
return gadget.jio_putAttachment(gadget.state.jio_key, "data", blob); return gadget.jio_putAttachment(gadget.state.jio_key, "data", blob);
}); });
} }
doc.modification_date = (new Date()).toISOString();
}) })
.push(function () { .push(function () {
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
......
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37006.51899.60586</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195127.46</float> <float>1507216742.11</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
doc = gadget.state.doc; doc = gadget.state.doc;
doc.text_content = content.text_content; doc.text_content = content.text_content;
} }
doc.modification_date = (new Date()).toISOString();
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
}) })
.push(function () { .push(function () {
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37008.22150.56354</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195220.23</float> <float>1507216811.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
jIO.util.dataURItoBlob(content.text_content) jIO.util.dataURItoBlob(content.text_content)
); );
} }
doc.modification_date = (new Date()).toISOString();
}) })
.push(function () { .push(function () {
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37007.20027.35498</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195158.28</float> <float>1507216762.23</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
jIO.util.dataURItoBlob(content.text_content) jIO.util.dataURItoBlob(content.text_content)
); );
} }
doc.modification_date = (new Date()).toISOString();
}) })
.push(function () { .push(function () {
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37007.35052.50005</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195172.04</float> <float>1507216770.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
jIO.util.dataURItoBlob(content.text_content) jIO.util.dataURItoBlob(content.text_content)
); );
} }
doc.modification_date = (new Date()).toISOString();
}) })
.push(function () { .push(function () {
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc);
......
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>962.36985.29761.10359</string> </value> <value> <string>962.37007.50396.49885</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1507195186.09</float> <float>1507216779.66</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