Commit 283886f1 authored by Sven Franck's avatar Sven Franck

app: added configuratble action button (default search)

parent 88a661d3
...@@ -483,21 +483,25 @@ ...@@ -483,21 +483,25 @@
} }
// add action button // add action button
// TODO: should this be a submit via option?
if (spec.logic.action) { if (spec.logic.action) {
container.appendChild(factory.element({ container.appendChild(factory.element({
"type": "a", "type": "a",
"direct": { "direct": {
"title": "Search", "title": spec.logic.action.text || "Search",
"className": "action ui-input-action ui-btn ui-icon-search " + "className": "ui-input-action ui-btn ui-icon-" +
"ui-btn-icon-notext ui-corner-all translate ", (spec.logic.action.icon || "search") +
" ui-btn-icon-notext ui-corner-all translate ",
"href": "#" "href": "#"
}, },
"attributes": { "attributes": {
"data-i18n": "global_dict.search", "data-i18n": ("[title]" + spec.logic.action.text_i18n + ";" +
spec.logic.action.text_i18n) ||
"[title]global_dict.search;global_dict.search",
"tabindex": "-1", "tabindex": "-1",
"data-action": "search" "data-action": spec.logic.action.action || "search"
}, },
"logic": {"text": "Search"} "logic": {"text": spec.logic.action.text || "Search"}
})); }));
} }
......
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