Commit 52fea96c authored by Sven Franck's avatar Sven Franck

app: update setParam to also fetch url params (from state not url - hasn't...

app: update setParam to also fetch url params (from state not url - hasn't changed at time of query)
parent e42ef3ad
......@@ -6518,8 +6518,6 @@
// we don't need is_dynamic!
is_dynamic = kid.property_dict && kid.property_dict.dynamic;
is_html = kid.direct;
is_parameter = (kid.logic || {}).setParam;
// inherit item id to child elements (see above)
if (is_id) {
......@@ -6619,8 +6617,8 @@
return RSVP.all(promise_list)
.then(function (response_list) {
var k, l, done_target, wrapper_selector, response, content,
content_target;
var k, l, m, len, done_target, wrapper_selector, response, content,
content_target, last_child, detach, child_list;
for (k = 0, l = response_list.length; k < l; k += 1) {
response = response_list[k];
......@@ -6802,13 +6800,17 @@
* @param {object} wrapper Wrapping document
* @returns {object} kid
*/
// TODO: change setParam into scheme like structure to use same handler?
// TODO: change setParams into scheme like structure to use same handler?
app.util.setSubordinate = function (element, wrapper) {
var i, len, param_list, param, promise_list, field, pass;
var i, len, param_list, param, promise_list, field, pass, data;
param_list = element.logic.setParam;
promise_list = [];
data = wrapper.property_dict.data;
// NOTE: data may be undefined - no records because of missing link
// NOTE: throw?
if (data) {
for (i = 0, len = param_list.length; i < len; i += 1) {
param = param_list[i];
......@@ -6816,11 +6818,12 @@
field = param[1];
pass = {
"field": field,
"relation": wrapper.property_dict.data.doc[field],
"relation": data.doc[field],
"subordinate": field.split("subordinate_")[1]
};
promise_list[i] = storage.subordinate(pass);
}
}
return RSVP.all(promise_list)
.then(function (response_list) {
......
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