diff --git a/static/js/moonstrap.js b/static/js/moonstrap.js
index 2046fd1..7293b95 100644
--- a/static/js/moonstrap.js
+++ b/static/js/moonstrap.js
@@ -74,6 +74,16 @@ function collapseRefresh(){
}
}
+function lazyLoad(cnt)
+{
+ if(!cnt) cnt = ".panel-collapse.in";
+ $(cnt + ' img.munin-graph').each(function()
+ {
+ var src = $(this).data('src');
+ if(src) this.src = src;
+ });
+}
+
$(document).ready(function() {
collapseRefresh();
@@ -103,9 +113,11 @@ $("a").on('click', function(e) {
if(this.pathname == location.pathname){
e.preventDefault();
var top = $(hash).offset().top - 5;
- var collapse = $("#body-" + hash.substring(1));
+ var slctr = "#body-" + hash.substring(1);
+ var collapse = $(slctr);
if(!$(this).attr("data-toggle") || !collapse || !collapse.hasClass("collapse") || (collapse.hasClass("collapse") && !collapse.hasClass("in"))){
collapse.collapse('show');
+ lazyLoad(slctr);
$('html, body').animate({
scrollTop: top
}, 500, function(){
@@ -121,12 +133,14 @@ $(document).ready(function() {
if (location.hash){
var hash = location.hash;
var top = $(hash).offset().top - 5;
- var collapse = $("#body-" + hash.substring(1));
+ var slctr = "#body-" + hash.substring(1);
+ var collapse = $(slctr);
if (collapse){
collapse.collapse('show');
+ lazyLoad(slctr);
}
$('html, body').animate({
scrollTop: top
}, 500);
}
-});
\ No newline at end of file
+});
diff --git a/templates/munin-categoryview.tmpl b/templates/munin-categoryview.tmpl
index 5a9e150..a54c2ef 100644
--- a/templates/munin-categoryview.tmpl
+++ b/templates/munin-categoryview.tmpl
@@ -38,16 +38,16 @@
">