Commit 1e680499 authored by Sven Franck's avatar Sven Franck

bugfix: renderjs storing DOM of removed pages fails enhancement

parent be2f30fc
<!DOCTYPE html>
<head>
<style type="text/css">
.menu_analysis { text-align: center;}
</style>
</head>
<body>
<div class="menu_analysis">
<div class="method_menu" data-role="controlgroup" data-type="horizontal">
<a class="t" data-inline="true" href="providers.html" data-role="button" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.providers_info;gen.providers"></a>
<a class="t" data-inline="true" href="criteria.html" data-role="button" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.monitoring_info;gen.monitoring"></a>
</div>
</div>
</script>
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
// trigger enhancement
$(this).trigger("render_enhance", {gadget: gadget.dom});
});
//]]>
</script>
</body>
</html>
<html>
<head>
</head>
<body>
<div class="method_menu" data-role="controlgroup" datatype="horizontal">
<a href="providers.html" data-role="button" data-i18n="[title]gen.providers">bla</a>
<a href="criteria.html" data-role="button" data-i18n="[title]gen.monitoring">bla</a>
</div>
<script type="text/javascript" language="javascript">
//<![CDATA[
$('.method_menu').controlgroup({
create: function( event, ui ) {}
});
//]]>
</script>
</body>
</html>
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
/* move slider input to the right, add meter */
.ui-slider {float:left;}
.measure {float: right; line-height: 30px;padding: 7px 2px 5px 6px;}
......@@ -107,66 +107,30 @@
<tr>
<th class="t" data-i18n="feat.database"></th>
<td>
<input type="range" name="slider-step" id="slider-step" value="50" min="0" max="500" step="1" />
<input type="range" name="slider_dtb" id="slider_dtb" value="50" min="0" max="500" step="1" />
<div class="measure">GB</div>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" href="#database_info" data-rel="popup" data-role="button" data-theme="c" data-icon="info" data-inline="true" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.info;[html]gen.info"></a>
<div data-role="popup" id="database_info" data-overlay-theme="a" data-theme="c" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.database_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
<tr>
<th class="t" data-i18n="feat.archive"></th>
<td>
<input type="range" name="slider-step" id="slider-step" value="100" min="0" max="10000" step="50" />
<input type="range" name="slider_storage" id="slider_storage" value="100" min="0" max="10000" step="50" />
<div class="measure">GB</div>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" data-role="button" data-overlay-theme="a" data-theme="c" data-icon="info" data-inline="true" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.info;[html]gen.info" href="#archive_info" data-rel="popup"></a>
<div data-role="popup" id="archive_info" data-overlay-theme="a" data-theme="c" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.archive_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
<tr>
<th class="t" data-i18n="feat.ram"></th>
<td>
<input type="range" name="slider-step" id="slider-step" value="4" min="1" max="128" step="2" />
<input type="range" name="slider_ram" id="slider_ram" value="4" min="1" max="128" step="2" />
<div class="measure">GB</div>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" data-role="button" data-overlay-theme="a" data-theme="c" data-icon="info" data-inline="true" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.info;[html]gen.info" href="#ram_info" data-rel="popup"></a>
<div data-role="popup" id="ram_info" data-overlay-theme="a" data-theme="c" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.ram_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
<tr>
<th class="t" data-i18n="feat.cpu"></th>
<td>
<input type="range" name="slider-step" id="slider-step" value="4" min="1" max="64" step="1" />
<input type="range" name="slider_cpu" id="slider_cpu" min="1" max="64" step="1" />
<div class="measure">GHz</div>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" data-role="button" data-overlay-theme="a" data-theme="c" data-icon="info" data-inline="true" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.info;[html]gen.info" href="#cpu_info" data-rel="popup"></a>
<div data-role="popup" id="cpu_info" data-overlay-theme="a" data-theme="c" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.cpu_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
<tr>
<th class="t" data-i18n="feat.type"></th>
......@@ -178,15 +142,6 @@
<label for="type_vm">Virtual Machine</label>
</div>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" data-role="button" data-overlay-theme="a" data-theme="c" data-icon="info" data-inline="true" data-i18n-target=".ui-btn-text" data-i18n="[title]gen.info;[html]gen.info" href="#type_info" data-rel="popup"></a>
<div data-role="popup" id="type_info" data-overlay-theme="a" data-theme="c" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.type_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
<tr>
<th class="t" data-i18n="feat.architecture"></th>
......@@ -197,15 +152,6 @@
<option value="arm-32" class="t" data-i18n="config.architecture.arm_32">ARM 32 bit</option>
</select>
</td>
<td>
<a data-position-to="window" class="info_popup t scale-a" data-role="button" data-theme="c" data-icon="info" data-inline="true" href="#architecture_info" data-rel="popup">Info</a>
<div data-role="popup" id="architecture_info" data-theme="c" data-overlay-theme="a" class="ui-content">
<div data-role="header" data-theme="f" class="ui-header ui-body-f" role="banner">
<h1 class="ui-title t" role="heading" data-i18n="feat.architecture_info" aria-level="1"></h1>
</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</div>
</td>
</tr>
</tbody>
</table>
......@@ -219,9 +165,12 @@
</div>
</div>
<script type="text/javascript" language="javascript">
<script type="text/javascript">
//<![CDATA[
// initialize jio_config
(function(){
var ajaxObject;
// initialize item_configuration
if ($.fn.fauna.jio_item_config === undefined) {
$.fn.fauna.jio_item_config = jIO.newJio({
"type": "local",
......@@ -229,136 +178,106 @@
"application_name": "cloudquote"
});
// request configuration options -> this should be a query on the server on whats available
// should get the options available and dynamically add the configuration options
// request configuration options and machine names (> 2 files)
// if done inisde a remote jIO, the job could retry/persist
var ajaxObject = {
url: "../data/machine_config.json",
type: "GET",
target: "",
successHandler : function (data) {
var i;
//if ($.fn.fauna.jio_machine_config === undefined) {
$.fn.fauna.jio_machine_config = data;
$.fn.fauna.named_providers = [];
for (machine in data) {
m = data[machine];
$.fn.fauna.named_providers.push(m["alias"]);
}
/* DOES NOT WORK
* 1. Performance loss looking up values from localstorage
* 2. Impossible to loop and trigger async GET inside a loop
* 3. LEFT JOIN would be nice...
$.fn.fauna.jio_machine_config = jIO.newJio({
"type": "local",
"username": "mech_config",
"application_name": "cloudquote"
});
$.fn.fauna.machines_branded = [];
// build configuration options
for (machine in data) {
if (data.hasOwnProperty(machine)) {
m = data[machine];
// into config/pricing into arrays here - this should be a ram lookup table
// maybe already create the complexQuery object here, so it can be
// queried on vs creating a simple array of objects?
// lookup array
$.fn.fauna.machines_branded.push(m["name"]);
$.fn.fauna.jio_machine_config.put({
"_id": m["name"]
, "name": m["name"]
, "provider":m["provider"]
, "alias": m["alias"]
// add configuration and pricing
});
}
}
*/
//}
// build configuration sliders
var i, m;
$.fn.fauna.jio_machine_config = data;
// create lookUp array
$.fn.fauna.named_providers = [];
for (machine in data) {
m = data[machine];
$.fn.fauna.named_providers.push(m["alias"]);
}
// build sliders with values
},
errorHandler : function (XMLHttpRequest, textStatus, errorThrown) {
//
alert("error trying to retrieve machine configurations, please refresh page");
}
};
$.fn.util.ajaxContent(ajaxObject);
}
// retrieve data when a search is triggered.
// could also do this in the background
// allDocs should clean up, otherwise we need to GET here to check timestamp
// request apache-log and store in jIO
$(document)
.find(".menu_compare")
.filter(function() { return $(this).jqmData('bound') !== true; })
.jqmData('bound', true)
.on('click', 'a', function (e) {
var m, formdata, ajaxObject;
var formdata = $("form[name=compare]").serialize();
e.preventDefault();
// only pull once!
// ================= DO THIS ELSEWHERE ================
$.fn.util.spin('show');
// initialize item_loading
if ($.fn.fauna.items_loaded === undefined) {
$.fn.fauna.items_loaded = true;
formdata = $("form[name=compare]").serialize();
ajaxObject = {
url: "../data/stats.json",
type: "post",
returnformat: "JSON",
handleDataInResponse: "true",
formdata : formdata,
successHandler : function (data) {
var m, lookUp, provider, lookup;
$.fn.util.spin('show');
for (machine in data) {
if (data.hasOwnProperty(machine)) {
m = data[machine];
lookUp = $.fn.fauna.jio_machine_config[machine];
if (lookUp !== undefined) {
provider = lookUp["provider"];
alias = lookUp["alias"];
searchtext = lookUp["alias"].toLowerCase() +", "
+ lookUp["provider"].toLowerCase() + ", "
+ machine.toLowerCase();
} else {
provider = "";
alias = "";
searchtext = "";
}
$.fn.fauna.jio_item_config.put({
"_id": machine,
"searchtext": searchtext,
"alias": alias,
"provider": provider,
"init": m["init"],
"last": m["last"],
"downtime":m["machine_downtime"],
"totaltime":m["totaltime"],
"percentile":m["percentile"],
"ts":new Date()
});
url: "../data/stats.json",
type: "GET",
returnformat: "JSON",
handleDataInResponse: "true",
//formdata : formdata,
successHandler : function (data) {
var m, lookUp, provider, lookup;
for (machine in data) {
if (data.hasOwnProperty(machine)) {
m = data[machine];
lookUp = $.fn.fauna.jio_machine_config[machine];
if (lookUp !== undefined) {
provider = lookUp["provider"];
alias = lookUp["alias"];
searchtext = lookUp["alias"].toLowerCase() +", "
+ lookUp["provider"].toLowerCase() + ", "
+ machine.toLowerCase();
} else {
provider = "";
alias = "";
searchtext = "";
}
// this takes time...
$.fn.fauna.jio_item_config.put({
"_id": machine,
"searchtext": searchtext,
"alias": alias,
"provider": provider,
"init": m["init"],
"last": m["last"],
"downtime":m["machine_downtime"],
"totaltime":m["totaltime"],
"percentile":m["percentile"],
"ts":new Date()
});
}
$.fn.util.spin('hide');
// go to results page, this should be inside search callback
$.mobile.changePage('results.html', {transition: 'fade'});
},
errorHandler : function (XMLHttpRequest, textStatus, errorThrown) {
//
}
$.fn.util.spin('hide');
$.fn.fauna.items_loaded = true;
},
errorHandler : function (XMLHttpRequest, textStatus, errorThrown) {
$.fn.util.spin('hide');
alert("could not retrieve availability log - please refresh to try again");
}
};
// get records
$.fn.util.ajaxFormSubmit(ajaxObject);
} else {
// go to results page - inside a search callback!!!
}
// ================= DO THIS ELSEWHERE ================
// go to results page, this should be inside search callback
// run search
$.mobile.changePage('results.html', {transition: 'fade'});
}
});
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
// trigger enhancement
$(this).trigger("render_enhance", {gadget: gadget.dom});
});
})();
// trigger enhancement
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
$(this).trigger("render_enhance", {gadget: gadget.dom});
});
//]]>
</script>
......
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
/* header wrappers */
.ui-header { height: 41px;}
.headWrapLeft, .headWrapRight { height: inherit; margin-top: -4px; }
......@@ -21,7 +21,7 @@
</div>
</div>
<script type="text/javascript" language="javascript">
<script type="text/javascript">
//<![CDATA[
var gadget = RenderJs.getSelfGadget(),
recursive_gadgets = gadget.dom.find("[data-gadget]").not(".main-interactor"),
......
......@@ -6,21 +6,11 @@
<body>
<div id="index_configure" data-gadget="../gadgets/configure.html"></div>
<div id="index_social" data-gadget="../gadgets/social.html"></div>
<div id="index_analysis" data-gadget="../gadgets/analysis.html"></div>
<div id="index_nav" data-gadget="../gadgets/navigation.html"></div>
<p class="mini t" data-i18n="gen.disclaimer"></p>
<!-- interactions -->
<div data-gadget="" class="main-interactor"
data-gadget-connection="[]">
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
});
//]]>
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
/* simple menu */
.simple_menu {list-style: none; display: inline-block; padding: 0 !important;}
.simple_menu li {float: right; padding: 0 0.5em;}
......@@ -23,13 +23,12 @@
</p>
</section>
<script type="text/javascript" language="javascript">
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
// trigger enhancement
$(this).trigger("render_enhance", {gadget: gadget.dom});
$(this).trigger("render_enhance", {"gadget": gadget.dom, "time":"ready"});
});
//]]>
</script>
......
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
/* search_criteria */
#results_list .search_info {text-align: center;}
#results_list .search_criteria {font-weight: bold; }
......
......@@ -4,29 +4,11 @@
<body>
<div id="results_list" data-gadget="../gadgets/results.html"></div>
<div id="results_ad" data-gadget="../gadgets/ad.html"></div>
<div class="rwd">
<div class="ui-rwd-a">
<div id="results_social" data-gadget="../gadgets/social.html"></div>
</div>
<div class="ui-rwd-b">
<div id="results_analysis" data-gadget="../gadgets/analysis.html"></div>
</div>
</div>
<div id="results_social" data-gadget="../gadgets/social.html"></div>
<div id="results_nav" data-gadget="../gadgets/navigation.html"></div>
<p class="mini t" data-i18n="gen.disclaimer"></p>
<!-- interactions -->
<div data-gadget="" class="main-interactor"
data-gadget-connection="[]">
<script type="text/javascript" language="javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
});
//]]>
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
.menu_social {text-align: center;}
.action_menu {display: inline-block;}
.follow_us {display: inline-block; margin: 0; padding: 0 .5em 0 0;}
......@@ -18,7 +18,7 @@
</div>
</div>
<script type="text/javascript" language="javascript">
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var gadget = RenderJs.getSelfGadget();
......
<!DOCTYPE html>
<head>
<style type="text/css">
<style type="text/css" scoped>
/* custom icons - languages */
.ui-icon-lang { background-image: url(../img/custom-lang-18.png); }
......@@ -69,7 +69,7 @@
</ul>
</div>
<script type="text/javascript" language="javascript">
<script type="text/javascript">
//<![CDATA[
var gadget = RenderJs.getSelfGadget(),
i,
......
......@@ -88,12 +88,12 @@ define([], function () {
.removeClass('ui-btn-icon-left ui-btn-icon-right ui-btn-icon-top ui-btn-icon-bottom')
.attr('data-iconpos','notext')
.addClass('ui-btn-icon-notext');
/*
// reshuffle table
$('#configure tbody tr').each(function () {
var content = $(this).children('td, th').last().hide().find('.ui-btn');
content.addClass('relocate').appendTo($(this).children('td, th').first());
});
});*/
} else {
$(".scale-a, .scale-div .ui-btn").add( $(".scale-input").closest('.ui-btn') ).each(function() {
......@@ -102,11 +102,11 @@ define([], function () {
.removeAttr('data-iconpos')
.addClass('ui-btn-icon-'+($(this).jqmData('iconpos') || 'left'));
});
/*
// reshuffle table
$('#configure .relocate').each(function (i) {
$(this).appendTo($('#configure tbody tr').eq(i).find('td').show().last());
});
});*/
}
}
};
......@@ -176,14 +176,6 @@ define([], function () {
});
});
// because render_enhance does not work on external page gadgets...
//$(document).on('pageshow', 'div:jqmData(external-page="true")', function() {
// $(this)
// .filter(function() { return $(this).jqmData("pcm") !== true; })
// .jqmData("pcm", true)
// .trigger('pagecreate');
//});
// enhancing gadgets when everyone else is done
$(document).on('render_enhance', function(e, data) {
data.gadget.trigger("create");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -149,6 +149,10 @@ var RenderJs = (function () {
gadget_js = new RenderJs.Gadget(gadget_id, gadget);
RenderJs.GadgetIndex.registerGadget(gadget_js);
}
// not a nice check, improve if you can
if (!gadget_js.dom.closest("body").length) {
gadget_js.dom = gadget;
}
if (gadget_js.isReady()) {
// avoid loading again gadget which was loaded before in same page
return ;
......
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