Commit 85879a14 authored by Sven Franck's avatar Sven Franck

app: enhance elements added/updated dynamically

parent 38ef83bb
...@@ -2725,17 +2725,16 @@ ...@@ -2725,17 +2725,16 @@
"attributes": { "attributes": {
"data-action": "search", "data-action": "search",
"data-enhanced": "true", "data-enhanced": "true",
"placeholder": spec.text,
"data-icon": "search", "data-icon": "search",
"data-action-btn": "true", "data-action-btn": "true",
"data-type": "search", "data-type": "search",
"type": "search" "type": "search",
"data-i18n": "[placeholder]" + spec.text_i18n || ""
}, },
"logic": { "logic": {
"clear": "true", "clear": "true",
"action": "search", "action": "search",
"data-i18n": spec.text_i18n ? "add_label": false
("[placeholder]" + spec.text_i18n) : null
} }
}; };
}; };
...@@ -2763,7 +2762,7 @@ ...@@ -2763,7 +2762,7 @@
} }
return { return {
"config": { "config": spec.no_wrap ? element_list[0] : {
"generate": "widget", "generate": "widget",
"type": "controlbar", "type": "controlbar",
"property_dict": props, "property_dict": props,
...@@ -2929,7 +2928,7 @@ ...@@ -2929,7 +2928,7 @@
element.appendChild(content); element.appendChild(content);
}) })
.then(function () { .then(function () {
$el = $(element); $el = $(element).enhanceWithin();
// TODO: un-jQuery eventually... // TODO: un-jQuery eventually...
switch ($el.data("role")) { switch ($el.data("role")) {
...@@ -2937,8 +2936,8 @@ ...@@ -2937,8 +2936,8 @@
$el.popup("reposition", {"positionto": "window"}); $el.popup("reposition", {"positionto": "window"});
break; break;
} }
$el.enhanceWithin();
}) })
.then(app.setPageBindings)
.fail(app.util.error); .fail(app.util.error);
} }
} }
...@@ -6881,6 +6880,8 @@ ...@@ -6881,6 +6880,8 @@
util.deleteChildren(update_target); util.deleteChildren(update_target);
update_target.appendChild(wrapper.fragment); update_target.appendChild(wrapper.fragment);
update_target.appendChild(detach); update_target.appendChild(detach);
// NOTE: must JQM stuff that has been added
$(update_target).enhanceWithin();
// CREATE // CREATE
} else { } else {
......
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