Changeset 9266 for src/django_gheat/website/templates/home.html
- Timestamp:
- Jun 17, 2011, 12:58:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/templates/home.html
r9264 r9266 13 13 <script language="javascript" type="text/javascript"> 14 14 $(function(){ 15 $( '#colour').colorPicker();16 $( '#start_date').datepicker({17 dateFormat: 'dd/mm/yy',15 $("#colour").colorPicker(); 16 $("#start_date").datepicker({ 17 dateFormat: "dd/mm/yy", 18 18 onSelect: function(dateValue, inst){ 19 $( '#end_date').datepicker('option', 'minDate', dateValue);19 $("#end_date").datepicker("option", "minDate", dateValue); 20 20 } 21 21 }); 22 23 $('#end_date').datepicker({ 24 dateFormat: 'dd/mm/yy', 22 var signallayer = ''; 23 $("#slider").slider({ 24 range: true, 25 min: 0, 26 max: 100, 27 values: [0, 100], 28 slide: function(event, sig){ 29 $("#sig_value").text("Signal strength: " + sig.values[0] + " - " + sig.values[1]); 30 }, 31 stop: function(event, sig){ 32 if(signallayer){ 33 map.removeLayer(signallayer); 34 } 35 OpenLayers.Layer.OSM.Overlay = OpenLayers.Class(OpenLayers.Layer.OSM, { 36 initialize: function(name, options) { 37 var url = [ 38 "/website/tile/${z}/${x},${y}.png?colour=0,255,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1] 39 ]; 40 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 41 var newArguments = [name, url, options]; 42 OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments); 43 }, 44 CLASS_NAME: "OpenLayers.Layer.Overlay" 45 }); 46 signallayer = new OpenLayers.Layer.OSM.Overlay("Signal strength: " + sig.values[0] + " - " + sig.values[1], {isBaseLayer: false, visibility: true}); 47 map.addLayer(signallayer); 48 }, 25 49 }); 26 50 27 $('#menu_filter').click(function(){ 28 $('#filter').slideToggle('fast'); 29 $('#info').slideUp('fast'); 51 $("#end_date").datepicker({ 52 dateFormat: "dd/mm/yy", 30 53 }); 31 $('#menu_info').click(function(){ 32 $('#filter').slideUp('fast'); 33 $('#info').slideToggle('fast'); 54 55 $("#menu_filter").click(function(){ 56 $("#filter").slideToggle("fast"); 57 $("#info").slideUp("fast"); 58 }); 59 $("#menu_info").click(function(){ 60 $("#filter").slideUp("fast"); 61 $("#info").slideToggle("fast"); 34 62 }); 35 63 }); … … 71 99 </div> 72 100 </div> 73 <div id= 'node_list'>101 <div id="node_list"> 74 102 Click on map to display Wireless Leiden nodes. 103 </div> 104 <div id="sig_slider"> 105 <font id='sig_value'>Signal strength: 0 - 100</font> 106 <div id="slider"></div> 75 107 </div> 76 108 </body>
Note:
See TracChangeset
for help on using the changeset viewer.