Commit c0646ca8 authored by Sven Franck's avatar Sven Franck

app: add generic way of wrapping gadgets

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