Commit a473fce9 authored by Sven Franck's avatar Sven Franck

app: override filter generation in widget if filter exist in page

parent 5383329b
......@@ -1845,7 +1845,7 @@
// TODO: dividers? will not be in spec, so can only be listview option!
// TODO: find better way to set mapper/widget
factory.widget.listview = function (spec) {
var fragment, has_filter, generator;
var fragment, has_filter, generator, filter_id;
// generate list item
generator = function (generator_spec) {
......@@ -1934,17 +1934,18 @@
// search filter
if (spec.update !== true) {
// NOTE: if input provided, the filter is already there!
// THIS MAKES B
if (spec.filter && !spec.input) {
if (spec.filter) {
has_filter = true;
fragment.appendChild(factory.widget.formElement(
factory.util.searchBarTemplate({
"search_id": spec.id || "search",
"text": spec.text || "",
"text_i18n": spec.text_i18n || null
})
));
filter_id = spec.input || spec.id || "search";
if (!spec.input) {
fragment.appendChild(factory.widget.formElement(
factory.util.searchBarTemplate({
"search_id": filter_id,
"text": spec.text || "",
"text_i18n": spec.text_i18n || null
})
));
}
}
fragment.appendChild(factory.element({
......
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