Commit 11804cdf authored by Sven Franck's avatar Sven Franck

bugfix: wrong object reference and query parameter

parent ef03d483
......@@ -2,7 +2,7 @@
"portal_type_source": "Application Categories",
"portal_type_title": "category",
"portal_type_fields": "category_fieldlist",
"initial_query": {"include_documents": true, "limit":[]},
"initial_query": {"include_docs": true, "limit":[]},
"form": null,
"property_dict": {},
"children": [{
......
......@@ -3279,15 +3279,15 @@
pointer,
zero_no_show,
select_counter,
no_limit,
no_items,
info_field_list = element.querySelectorAll(".info"),
info = "";
// TODO: ..... crap
// TODO: ..... redo
// on updates, info_field_list may be empty, because only part of the
// gadget is updated. Need to find info_fields by hand
if (info_field_list.length === 0) {
// switch from NodeList to array
info_field_list = [];
selection = document.querySelectorAll(".info");
for (i = 0; i < selection.length; i += 1) {
......@@ -3296,7 +3296,6 @@
info_field_list.push(selection[i]);
}
}
}
for (j = 0; j < info_field_list.length; j += 1) {
......@@ -3304,8 +3303,10 @@
switch (info_field.getAttribute("data-info")) {
case "records":
if (total !== undefined) {
zero_no_show = ((options.limit[0] || 0 === 0) && total !== 0) ? 1 : (options.limit[0] || 0);
min = Math.min(total, (zero_no_show + (options.limit[1] || 0)));
no_limit = options.limit[0] || 0;
no_items = options.limit[1] || 0;
zero_no_show = (no_limit === 0 && total !== 0) ? 1 : no_limit;
min = Math.min(total, (no_limit + no_items));
info = zero_no_show + "-" + min + "/" + total + " Records";
}
break;
......@@ -3583,7 +3584,7 @@
init.timer = window.setTimeout(function () {
// update gadgets
init.setPageElements(
{}, [{"children": [{"id": action_dict.id}]}], false
{}, [{"children": [{"id": config.id}]}], false
);
init.timer = 0;
}, 500);
......@@ -3883,7 +3884,7 @@
// update gadget
init.setPageElements(
{}, [{"children": [{"id": action_dict.id}]}], false
{}, [{"children": [{"id": config.id}]}], false
);
} else {
util.errorHandler({
......@@ -3916,9 +3917,7 @@
.then(function (reply) {
if (!page.querySelectorAll("div.ui-content")[0]
.getAttribute("data-bound")) {
return init.setPageElements({
"id": page.id
}, reply, undefined);
return init.setPageElements({"id": page.id}, reply, undefined);
}
})
.fail(util.errorHandler);
......@@ -4089,11 +4088,7 @@
init.fetchPageLayouts("settings", destination)
.then(function (reply) {
return init.setPageElements(
config,
reply,
create
);
return init.setPageElements(config, reply, create);
})
.then(init.setPageBindings)
.fail(util.errorHandler);
......
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