comparison 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
comparison
equal deleted inserted replaced
0:b57c7821382f 1:ea066ce001bd
20 20
21 // Add in the content 21 // Add in the content
22 $block->content .= ' 22 $block->content .= '
23 <div id="plotContainerDiv" style="position:relative;"></div> 23 <div id="plotContainerDiv" style="position:relative;"></div>
24 <script type="text/javascript"> 24 <script type="text/javascript">
25
26 if (typeof FuzzyTimelineWidget_l=="undefined")
27 {
28
29
25 var timeDiv = document.getElementById("plotContainerDiv"); 30 var timeDiv = document.getElementById("plotContainerDiv");
26 var time = new WidgetWrapper(); 31 var time = new WidgetWrapper();
27 var timeWidget = new FuzzyTimelineWidget(time,timeDiv,{timeTitle: "Publication Date"}); 32 var timeWidget = new FuzzyTimelineWidget(time,timeDiv,{timeTitle: "Publication Date"});
28 var mpiwg_geobrowser_plotInitialized = false; 33 var mpiwg_geobrowser_plotInitialized = false;
29 mpiwg_geobrowser_widgetsCount++; 34 mpiwg_geobrowser_widgetsCount++;
35
36
37
38
30 jq1110(document).ready(function() { 39 jq1110(document).ready(function() {
31 if (mpiwg_geobrowser_plotInitialized == false) { 40 if (mpiwg_geobrowser_plotInitialized == false) {
32 if (timeDiv) { 41 if (timeDiv) {
33 time.display(); 42 time.display();
34 } 43 }
35 mpiwg_geobrowser_plotInitialized = true; 44 mpiwg_geobrowser_plotInitialized = true;
36 document.dispatchEvent(widgetLoadedEvent); 45 document.dispatchEvent(widgetLoadedEvent);
37 } 46 }
38 }); 47 });
48 FuzzyTimelineWidget_l = true;
49 }
50
51
39 </script> 52 </script>
40 '; 53 ';
41 54
42 return $block; 55 return $block;
43 } 56 }