Commit 06446df4 authored by Ivan Tyagov's avatar Ivan Tyagov

Allow to control bootstrap process as sometimes it's not mandatory

render gadget immediately.
parent e35862e0
...@@ -310,7 +310,7 @@ var RenderJs = (function () { ...@@ -310,7 +310,7 @@ var RenderJs = (function () {
}, },
addGadget: function (dom_id, gadget_id, gadget, gadget_data_handler, addGadget: function (dom_id, gadget_id, gadget, gadget_data_handler,
gadget_data_source) { gadget_data_source, bootstrap) {
/* /*
* add new gadget and render it * add new gadget and render it
*/ */
...@@ -328,7 +328,9 @@ var RenderJs = (function () { ...@@ -328,7 +328,9 @@ var RenderJs = (function () {
tab_gadget = tab_container.find('#' + gadget_id); tab_gadget = tab_container.find('#' + gadget_id);
// render new gadget // render new gadget
RenderJs.bootstrap(tab_container); if (bootstrap !== false) {
RenderJs.bootstrap(tab_container);
}
return tab_gadget; return tab_gadget;
}, },
...@@ -493,13 +495,13 @@ var RenderJs = (function () { ...@@ -493,13 +495,13 @@ var RenderJs = (function () {
}, },
addNewTabGadget: function (dom_id, gadget_id, gadget, gadget_data_handler, addNewTabGadget: function (dom_id, gadget_id, gadget, gadget_data_handler,
gadget_data_source) { gadget_data_source, bootstrap) {
/* /*
* add new gadget and render it * add new gadget and render it
*/ */
var tab_gadget; var tab_gadget;
tab_gadget = RenderJs.addGadget( tab_gadget = RenderJs.addGadget(
dom_id, gadget_id, gadget, gadget_data_handler, gadget_data_source dom_id, gadget_id, gadget, gadget_data_handler, gadget_data_source, bootstrap
); );
// we should unregister all gadgets part of this TabbularGadget // we should unregister all gadgets part of this TabbularGadget
......
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