Changeset 9253 for src/django_gheat/website
- Timestamp:
- Jun 14, 2011, 12:21:51 PM (13 years ago)
- Location:
- src/django_gheat/website
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions.js
r9251 r9253 42 42 dataset = $('#select_dataset option:selected').text(); 43 43 wlnode = $('#select_node option:selected').text(); 44 // enc = $('#select_enc option:selected').text();45 // date = $('#select_date option:selected').text();46 44 start_date = $('#start_date').val(); 47 45 end_date = $('#end_date').val(); … … 56 54 if (dataset != ''){dataset='&meetrondje__naam='+dataset;} 57 55 if (wlnode != ''){wlnode='&accespoint__ssid='+wlnode;} 58 // if (enc != ''){enc='&accespoint__encryptie='+enc;}59 // if (date != ''){date='&meetrondje__datum='+date;}60 56 if (start_date && end_date){ 61 57 sd_d=start_date.substr(0,2); … … 68 64 69 65 start_date='&meetrondje__datum__gte=' + sd_y +'-'+ sd_m +'-'+ sd_d; 66 end_date='&meetrondje__datum__lte=' + ed_y +'-'+ ed_m +'-'+ ed_d; 67 } 68 if (start_date && !end_date){ 69 sd_d=start_date.substr(0,2); 70 sd_m=start_date.substr(3,2); 71 sd_y=start_date.substr(6,4); 72 start_date='&meetrondje__datum__gte=' + sd_y +'-'+ sd_m +'-'+ sd_d; 73 end_date=''; 74 } 75 if (!start_date && end_date){ 76 ed_d=end_date.substr(0,2); 77 ed_m=end_date.substr(3,2); 78 ed_y=end_date.substr(6,4); 79 start_date=''; 70 80 end_date='&meetrondje__datum__lte=' + ed_y +'-'+ ed_m +'-'+ ed_d; 71 81 } -
src/django_gheat/website/templates/home.html
r9251 r9253 2 2 <head> 3 3 <link href="{{ STATIC_URL }}style.css" rel="stylesheet" type="text/css" media="screen" /> 4 <link type="text/css" href="{{ STATIC_URL }}jquery-ui-1.8.13.custom.css" rel="Stylesheet" /> 4 5 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}jquery-1.6.1.min.js"></script> 5 6 6 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}OpenLayers.js"></script> 7 7 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}OpenStreetMap.js"></script> 8 8 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}heatmap.js"></script> 9 10 9 <script type="text/javascript" language="javascript" src="{{ STATIC_URL }}jquery.chained.js"></script> 11 10 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}heatmap_extensions.js"></script> 12 11 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}colorpicker.js"></script> 13 14 <!-- jquery UI datapicker --> 15 <link type="text/css" href="{{ STATIC_URL }}jquery-ui-1.8.13.custom.css" rel="Stylesheet" /> 16 <script type="text/javascript" src="{{ STATIC_URL }}jquery-ui-1.8.13.custom.min.js"></script> 17 18 12 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}jquery-ui-1.8.13.custom.min.js"></script> 19 13 <script language="javascript" type="text/javascript"> 20 14 $(function(){ 21 15 $('#colour').colorPicker(); 22 $('#start_date , #end_date').datepicker({16 $('#start_date').datepicker({ 23 17 dateFormat: 'dd/mm/yy', 24 beforeShow: setEnd, 18 onSelect: function(dateValue, inst){ 19 $('#end_date').datepicker('option', 'minDate', dateValue); 20 } 25 21 }); 26 22 27 function setEnd(element){ 28 if (element.id=='end_date'){ 29 var start_date = new Date($('#start_date').val()); 30 start_date.setDate(start_date.getDate()) 31 return { 32 minDate: start_date 33 }; 34 } 35 return {} 36 } 37 38 $('#start_date').change(function(){ 39 $('#end_date').val('').text(''); 23 $('#end_date').datepicker({ 24 dateFormat: 'dd/mm/yy', 40 25 }); 41 26
Note:
See TracChangeset
for help on using the changeset viewer.