Commit 91db0a4a authored by Sven Franck's avatar Sven Franck

removed dependency on $(body). Can be checked externally

parent 587e7e3e
...@@ -149,12 +149,6 @@ var RenderJs = (function () { ...@@ -149,12 +149,6 @@ var RenderJs = (function () {
gadget_js = new RenderJs.Gadget(gadget_id, gadget); gadget_js = new RenderJs.Gadget(gadget_id, gadget);
RenderJs.GadgetIndex.registerGadget(gadget_js); RenderJs.GadgetIndex.registerGadget(gadget_js);
} }
// update gadget.dom if it's contents are not in the document
if (!gadget_js.dom.closest("body").length) {
gadget_js.dom = gadget;
}
if (gadget_js.isReady()) { if (gadget_js.isReady()) {
// avoid loading again gadget which was loaded before in same page // avoid loading again gadget which was loaded before in same page
return ; return ;
...@@ -611,11 +605,9 @@ var RenderJs = (function () { ...@@ -611,11 +605,9 @@ var RenderJs = (function () {
$(this.getGadgetList()).each( $(this.getGadgetList()).each(
function (index, value) { function (index, value) {
if (value.isReady() === false) { if (value.isReady() === false) {
if(value.dom.closest("body").length) {
result = false; result = false;
} }
} }
}
); );
return result; return result;
} }
......
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