Commit f16ff9a5 authored by Sven Franck's avatar Sven Franck

app: allow content loaded after page creation to pass content.set

parent 6be404ce
......@@ -2621,7 +2621,7 @@
popup.setAttribute("data-reference", reference);
if (reply.children) {
for (i = 0; i < reply.children.length; i += 1) {
promises[i] = app.content.set(reply.children[i], {}, false);
promises[i] = app.content.set(reply.children[i], {});
}
}
return RSVP.all(promises);
......@@ -5898,7 +5898,7 @@
app.content.make = function (reply) {
var pass, method, type, kids, promise_list, route,
search, search_id, kid, is_html, is_dynamic, is_id, i, j, last,
encoded, wrapper, active, selector, update_target,
encoded, wrapper, active, selector, update_target, target,
grant_child, quirk_dict, generator, pointer_results;
pass = reply.pass;
......@@ -6114,6 +6114,20 @@
}
}
// HACK for setParam in login window
if (kid.logic && kid.logic.setParam) {
kid.direct.href += kid.direct.href.indexOf("?") > 0 ? "&" : "?";
switch (kid.logic.setParam[1]) {
case "location":
target = window.location.origin +
window.location.pathname +
window.location.hash.split("?")[0];
break;
}
kid.direct.href += window.encodeURIComponent(kid.logic.setParam[0]) +
"=" + window.encodeURIComponent(target);
}
if (quirk_dict.update !== true || is_dynamic || quirk_dict.dynamic) {
// for content loaded via href, generate URL dict and undefine kid
// TODO: make sure this works and does not inherit to regular widgets
......
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