Commit 4a48f6ee authored by Sven Franck's avatar Sven Franck

app: fixed allow_new and loading pages without title

parent 7ea73355
...@@ -3292,9 +3292,7 @@ ...@@ -3292,9 +3292,7 @@
**/ **/
// TODO: allow to run multiple mappers eg formItem + tableRow // TODO: allow to run multiple mappers eg formItem + tableRow
map.element = function (element, wrapper, i) { map.element = function (element, wrapper, i) {
console.log(element)
if (wrapper.child_mapper) { if (wrapper.child_mapper) {
console.log("Child mapper...");
if (element.scheme) { if (element.scheme) {
// NOTE: chaining allows the mapper to make additional async requests! // NOTE: chaining allows the mapper to make additional async requests!
return map[wrapper.child_mapper]({ return map[wrapper.child_mapper]({
...@@ -3318,7 +3316,7 @@ ...@@ -3318,7 +3316,7 @@
}) })
.fail(app.util.error); .fail(app.util.error);
} }
console.log("OUT")
return RSVP.resolve(wrapper.child_constructor({ return RSVP.resolve(wrapper.child_constructor({
"item": element, "item": element,
"wrapper": wrapper, "wrapper": wrapper,
...@@ -3403,8 +3401,6 @@ ...@@ -3403,8 +3401,6 @@
var quirk_dict, section, pos, label, j, k, field, setter, record, new_item, var quirk_dict, section, pos, label, j, k, field, setter, record, new_item,
id, key, obj, translation_fields, item; id, key, obj, translation_fields, item;
console.log("HELLO")
console.log(spec)
translation_fields = "titletextlabel"; translation_fields = "titletextlabel";
quirk_dict = spec.wrapper.property_dict; quirk_dict = spec.wrapper.property_dict;
item = spec.item; item = spec.item;
...@@ -5056,10 +5052,12 @@ ...@@ -5056,10 +5052,12 @@
if (util.testForString("ui-header", header.className)) { if (util.testForString("ui-header", header.className)) {
title = header.getElementsByTagName("h1")[0]; title = header.getElementsByTagName("h1")[0];
if (title) {
title.setAttribute("data-i18n", (page_i18n || "")); title.setAttribute("data-i18n", (page_i18n || ""));
title.removeChild(title.childNodes[0]); title.removeChild(title.childNodes[0]);
title.appendChild(document.createTextNode((value || "\u00A0"))); title.appendChild(document.createTextNode((value || "\u00A0")));
} }
}
// also set document title // also set document title
document.title = value; document.title = value;
}; };
...@@ -6149,7 +6147,7 @@ ...@@ -6149,7 +6147,7 @@
} }
// no items, need no show! (default to empty {} if none provided // no items, need no show! (default to empty {} if none provided
if (pointer_results.data.total_rows === 0) { if (pointer_results.data.total_rows === 0) {
if (quirk_dict.property_dict.allow_new) { if (quirk_dict.allow_new) {
pointer_results = {"data": {"total_rows": 1, "rows": [{"doc": {}}]}}; pointer_results = {"data": {"total_rows": 1, "rows": [{"doc": {}}]}};
} else { } else {
quirk_dict.no_show = quirk_dict.no_items || {}; quirk_dict.no_show = quirk_dict.no_items || {};
......
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