Commit 3d3228e0 authored by Roque Porchetto's avatar Roque Porchetto

erp5_wendelin_telecom_UI: fixing wrong urls in list items

parent f7bc26a3
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
//.declareAcquiredMethod("updateHeader", "updateHeader") //.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlForList", "getUrlForList")
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
...@@ -17,11 +17,21 @@ ...@@ -17,11 +17,21 @@
/*.allowPublicAcquisition('updateHeader', function () { /*.allowPublicAcquisition('updateHeader', function () {
return; return;
})*/ })*/
.allowPublicAcquisition('getUrlFor', function (argument_list) { .allowPublicAcquisition('getUrlForList', function (argument_list) {
if (argument_list[0].command === 'index') { var i,
return this.getUrlFor({command: 'index', options: {jio_key: argument_list[0].options.jio_key, page: "data_set"}}); options_list = argument_list[0],
result_list = [];
for (i = 0; i < options_list.length; i += 1) {
if (options_list[i].command === 'index') {
result_list.push({
command: 'display_stored_state',
options: {jio_key: options_list[i].options.jio_key, page: "data_set"}
});
} else {
result_list.push(options_list[i]);
}
} }
return this.getUrlFor.apply(this, argument_list); return this.getUrlForList.apply(this, [result_list]);
}) })
.declareMethod("triggerSubmit", function () { .declareMethod("triggerSubmit", function () {
var argument_list = arguments; var argument_list = arguments;
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.23886.41625.38894</string> </value> <value> <string>969.9069.22873.24849</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1529569007.15</float> <float>1532525611.57</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getUrlParameter", "getUrlParameter") .declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlForList", "getUrlForList")
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
...@@ -16,27 +16,22 @@ ...@@ -16,27 +16,22 @@
.allowPublicAcquisition('updateHeader', function () { .allowPublicAcquisition('updateHeader', function () {
return; return;
}) })
.allowPublicAcquisition('getUrlFor', function (argument_list) { .allowPublicAcquisition('getUrlForList', function (argument_list) {
if (argument_list[0].command === 'index') { var i,
return this.getUrlFor({command: 'index', options: {jio_key: argument_list[0].options.jio_key, page: "file_fif"}}); options_list = argument_list[0],
} result_list = [];
return this.getUrlFor.apply(this, argument_list); for (i = 0; i < options_list.length; i += 1) {
}) if (options_list[i].command === 'index') {
/*.allowPublicAcquisition('getUrlFor', function (argument_list) { result_list.push({
if (argument_list[0].command === 'index') { command: 'display_stored_state',
return this.getUrlFor({command: 'display_stored_state', options: {jio_key: argument_list[0].options.jio_key}}); options: {jio_key: options_list[i].options.jio_key, page: "file_fif"}
});
} else {
result_list.push(options_list[i]);
}
} }
return this.getUrlFor.apply(this, argument_list); return this.getUrlForList.apply(this, [result_list]);
}) })
.allowPublicAcquisition('getUrlParameter', function (argument_list) {
return this.getUrlParameter(argument_list)
.push(function (result) {
if ((result === undefined) && (argument_list[0] === 'field_listbox_sort_list:json')) {
return [['title', 'ascending']];
}
return result;
});
})*/
.declareMethod("triggerSubmit", function () { .declareMethod("triggerSubmit", function () {
var argument_list = arguments; var argument_list = arguments;
return this.getDeclaredGadget('form_list') return this.getDeclaredGadget('form_list')
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>968.55613.28819.51438</string> </value> <value> <string>969.6188.36317.22374</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1531386424.82</float> <float>1532525619.7</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