Commit 3fe42b95 authored by Bryan Kaperick's avatar Bryan Kaperick

Merge branch 'testing'

parents 8b61dbf8 ea2a3356
...@@ -128,16 +128,14 @@ ...@@ -128,16 +128,14 @@
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getUrlFor({command: "change", options: {"page": "ojs_add_document"}}), gadget.getUrlFor({command: "change", options: {"page": "ojs_add_document"}}),
gadget.getSetting('document_title_plural'), gadget.getSetting('document_title_plural')
gadget.getUrlFor({command: "change", options: {"page": "ojs_see_history"}})
]); ]);
}) })
.push(function (result) { .push(function (result) {
return gadget.updateHeader({ return gadget.updateHeader({
page_title: result[1], page_title: result[1],
filter_action: true, filter_action: true,
add_url: result[0], add_url: result[0]
see_history: result[2]
}); });
}); });
}); });
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.63193.3444.40072</string> </value> <value> <string>969.18805.18330.41284</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1532440204.49</float> <float>1533116145.35</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.44293.58168.6690</string> </value> <value> <string>969.18811.39108.45789</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1511565609.05</float> <float>1533116016.94</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.61646.7207.32238</string> </value> <value> <string>969.19202.56498.49408</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1531748492.08</float> <float>1533136512.61</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -14,17 +14,33 @@ ...@@ -14,17 +14,33 @@
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_toggleRevisionOption", .declareAcquiredMethod("jio_toggleRevisionOption",
"jio_toggleRevisionOption") "jio_toggleRevisionOption")
//.declareAcquiredMethod("getId")
.setState({jio_key: undefined})
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.allowPublicAcquisition("jio_allDocs", function (param_list) { .allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this; var gadget = this,
jio_key,
result;
return gadget.jio_toggleRevisionOption(true) return gadget.jio_toggleRevisionOption(true)
.push(function () { .push(function () {
return gadget.jio_allDocs(param_list[0]); console.log(param_list[0]);
console.log(gadget.state.jio_key);
return gadget.jio_allDocs({query: "doc_id: " + gadget.state.jio_key);
}) })
.push(function (result) { .push(function (timestamps) {
console.log("timestamps: ", timestamps);
param_list[0].select_list.push(gadget.state.jio_key);
})
.push(function (res) {
result = res;
return gadget.jio_toggleRevisionOption(false);
})
.push(function () {
console.log(result);
var i, date, len = result.data.total_rows; var i, date, len = result.data.total_rows;
for (i = 0; i < len; i += 1) { for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("modification_date")) { if (result.data.rows[i].value.hasOwnProperty("modification_date")) {
...@@ -68,17 +84,19 @@ ...@@ -68,17 +84,19 @@
}); });
}) })
.declareMethod("render", function () { .declareMethod("render", function (options) {
var gadget = this; var gadget = this;
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget('form_list'), gadget.getDeclaredGadget('form_list'),
gadget.getSetting("portal_type") gadget.getSetting("portal_type"),
gadget.changeState({jio_key: options.jio_key})
]); ]);
}) })
.push(function (result) { .push(function (result) {
console.log("result 1: ", result[1]);
var column_list = [ var column_list = [
['title', 'Title'], ['title', 'Title'],
['reference', 'Reference'], ['reference', 'Reference'],
...@@ -121,7 +139,8 @@ ...@@ -121,7 +139,8 @@
"bottom", "bottom",
[["listbox"]] [["listbox"]]
]] ]]
} },
jio_key: options.jio_key
}); });
}) })
.push(function () { .push(function () {
......
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.63202.32840.27340</string> </value> <value> <string>969.21731.6944.62361</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1531923217.03</float> <float>1533285349.95</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.57151.51816.16622</string> </value> <value> <string>968.44071.55411.42615</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>1501251929.75</float> <float>1533135741.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
return this.changeState({ return this.changeState({
jio_key: options.jio_key, jio_key: options.jio_key,
...@@ -150,7 +149,8 @@ ...@@ -150,7 +149,8 @@
return RSVP.all([ return RSVP.all([
gadget.getUrlFor({command: 'history_previous'}), gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: 'selection_previous'}), gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'}) gadget.getUrlFor({command: 'selection_next'}),
gadget.getUrlFor({command: "change", options: {"page": "ojs_see_history"}})
]); ]);
}) })
.push(function (url_list) { .push(function (url_list) {
...@@ -159,7 +159,8 @@ ...@@ -159,7 +159,8 @@
save_action: true, save_action: true,
selection_url: url_list[0], selection_url: url_list[0],
previous_url: url_list[1], previous_url: url_list[1],
next_url: url_list[2] next_url: url_list[2],
see_history: url_list[3]
}); });
}); });
}); });
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>vincent</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>964.48513.5538.10342</string> </value> <value> <string>969.19249.10625.64000</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>1515766909.33</float> <float>1533136525.71</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -153,6 +153,8 @@ gadget_erp5_page_ojs_controller.html\n ...@@ -153,6 +153,8 @@ gadget_erp5_page_ojs_controller.html\n
gadget_erp5_page_ojs_controller.js\n gadget_erp5_page_ojs_controller.js\n
gadget_erp5_page_ojs_add_document.html\n gadget_erp5_page_ojs_add_document.html\n
gadget_erp5_page_ojs_add_document.js\n gadget_erp5_page_ojs_add_document.js\n
gadget_erp5_page_ojs_see_history.html\n
gadget_erp5_page_ojs_see_history.js\n
gadget_erp5_page_ojs_configurator.html\n gadget_erp5_page_ojs_configurator.html\n
gadget_erp5_page_ojs_configurator.js\n gadget_erp5_page_ojs_configurator.js\n
gadget_erp5_page_ojs_dav_configurator.html\n gadget_erp5_page_ojs_dav_configurator.html\n
...@@ -685,7 +687,7 @@ NETWORK:\n ...@@ -685,7 +687,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>vincent</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -699,7 +701,7 @@ NETWORK:\n ...@@ -699,7 +701,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>964.48519.41997.58350</string> </value> <value> <string>969.16222.16646.56320</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -717,7 +719,7 @@ NETWORK:\n ...@@ -717,7 +719,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1515675473.77</float> <float>1532954835.43</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