Mercurial > hg > mpiwg_geobrowser
diff plugins/content_types/mpiwg_geobrowser_plot.inc @ 1:ea066ce001bd
bug fixes, works now without admin rights
author | Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 29 May 2015 13:59:32 +0200 |
parents | b57c7821382f |
children |
line wrap: on
line diff
--- a/plugins/content_types/mpiwg_geobrowser_plot.inc Thu May 28 10:28:12 2015 +0200 +++ b/plugins/content_types/mpiwg_geobrowser_plot.inc Fri May 29 13:59:32 2015 +0200 @@ -22,11 +22,20 @@ $block->content .= ' <div id="plotContainerDiv" style="position:relative;"></div> <script type="text/javascript"> + + if (typeof FuzzyTimelineWidget_l=="undefined") + { + + var timeDiv = document.getElementById("plotContainerDiv"); var time = new WidgetWrapper(); var timeWidget = new FuzzyTimelineWidget(time,timeDiv,{timeTitle: "Publication Date"}); var mpiwg_geobrowser_plotInitialized = false; - mpiwg_geobrowser_widgetsCount++; + mpiwg_geobrowser_widgetsCount++; + + + + jq1110(document).ready(function() { if (mpiwg_geobrowser_plotInitialized == false) { if (timeDiv) { @@ -36,6 +45,10 @@ document.dispatchEvent(widgetLoadedEvent); } }); + FuzzyTimelineWidget_l = true; + } + + </script> ';