Commit c0646ca8 authored by Sven Franck's avatar Sven Franck

app: add generic way of wrapping gadgets

parent 91167a7d
...@@ -6276,20 +6276,30 @@ ...@@ -6276,20 +6276,30 @@
quirk_dict.no_show = quirk_dict.no_items || {}; quirk_dict.no_show = quirk_dict.no_items || {};
} }
} }
// set up fragment and child_selector // set up fragment and child_selector
if (quirk_dict.update !== true) { if (quirk_dict.update !== true) {
if (!quirk_dict.no_content) { if (!quirk_dict.no_content) {
// set reference for children in need // set reference for children in need
quirk_dict.reference = "dyno_" + util.uuid(); quirk_dict.reference = "dyno_" + util.uuid();
dyno = factory.element({
// setup fragment and child_selector
wrapper.fragment.appendChild(factory.element({
"type": "div", "type": "div",
"direct": { "direct": {
"id": quirk_dict.reference, "id": quirk_dict.reference,
"className": "dyno" "className": "dyno"
} }
})); });
// setup fragment and child_selector
if (quirk_dict.wrap_gadget) {
container = factory.element({
"type": "div",
"direct": {
"className": "span_" + quirk_dict.wrap_gadget
}
});
container.appendChild(dyno);
}
wrapper.fragment.appendChild(container || dyno);
wrapper.child_selector = wrapper.fragment.querySelector( wrapper.child_selector = wrapper.fragment.querySelector(
"#" + quirk_dict.reference "#" + quirk_dict.reference
); );
......
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