Changeset 9779 for src/django_gheat/wlheatmap
- Timestamp:
- Dec 14, 2011, 7:50:53 PM (13 years ago)
- Location:
- src/django_gheat/wlheatmap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/static/heatmap_extensions.js
r9655 r9779 26 26 } 27 27 28 28 29 $(window).load(function() { 29 30 var signallayer = ''; … … 31 32 var nodelist = new Array(); 32 33 34 function update_raw_filter() { 35 $("#raw_filter").val(get_raw_filter()); 36 } 37 33 38 /** 34 39 * Adds colourpicker for layer colour. … … 45 50 onSelect: function(dateValue, inst){ 46 51 $("#end_date").datepicker("option", "minDate", dateValue); 52 update_raw_filter(); 47 53 } 48 54 }); 49 55 $("#end_date").datepicker({ 50 dateFormat: "dd/mm/yy" 56 dateFormat: "dd/mm/yy", 57 onSelect: function(dateValue, inst){ 58 update_raw_filter(); 59 } 51 60 }); 52 61 … … 62 71 function update_sig_slider(min,max) { 63 72 $("#select_sig_value").text("Signal Strength: " + min + " - " + max); 73 update_raw_filter(); 64 74 }; 65 75 … … 240 250 $("#select_user").change(function(){ 241 251 update_lname(); 252 update_raw_filter(); 242 253 }); 243 254 $("#select_dataset").change(function(){ 244 255 update_lname(); 256 update_raw_filter(); 245 257 }); 246 258 $("#select_node").change(function(){ 247 259 update_lname(); 260 update_raw_filter(); 261 }); 262 $("#colour").change(function(){ 263 update_raw_filter(); 248 264 }); 249 265 … … 316 332 }); 317 333 318 /** 319 * Adds a new layer when clicked. 320 * Filters set by user are used as layer parameters. 321 * Colour is either chosen or randomized. 322 * Blank parameters are ignored. 323 */ 324 $('#add_filter').click(function(){ 325 // get values from elements 334 function get_raw_filter() { 326 335 user = $('#select_user option:selected').text(); 327 336 dataset = $('#select_dataset option:selected').text(); … … 330 339 end_date = $('#end_date').val(); 331 340 colour = $("#colour").val(); 332 lname = $("#lname").val();333 341 334 342 /** … … 385 393 colour = Math.floor(Math.random()*256)+','+Math.floor (Math.random()*256)+','+Math.floor(Math.random()*256); 386 394 } 387 if (lname == ''){388 lname= 'Custom Filter';389 }390 395 391 396 var min = $("#select_sig_slider").slider("values")[0]; 392 397 var max = $("#select_sig_slider").slider("values")[1]; 393 398 signal = '&signaal__gte=' + min + '&signaal__lte=' + max; 399 400 var raw_filter = "colour=" + colour + user + dataset + wlnode + start_date + end_date + signal 401 return raw_filter; 402 } 403 404 /** 405 * Adds a new layer when clicked. 406 * Filters set by user are used as layer parameters. 407 * Colour is either chosen or randomized. 408 * Blank parameters are ignored. 409 */ 410 $('#add_filter').click(function(){ 411 // get values from elements 412 413 lname = $("#lname").val(); 414 if (lname == ''){ 415 lname= 'Custom Filter'; 416 } 394 417 395 418 // setting layer … … 397 420 initialize: function(name, options) { 398 421 var url = [ 399 "tile/${z}/${x},${y}.png? colour=" + colour + user + dataset + wlnode + start_date + end_date + signal422 "tile/${z}/${x},${y}.png?" + $("#raw_filter").val(), 400 423 ]; 401 424 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); -
src/django_gheat/wlheatmap/static/style.css
r9583 r9779 75 75 #filter_text{ 76 76 height:100%; 77 width: 570px;77 width:200px; 78 78 overflow:hidden; 79 79 float:left; … … 82 82 #filter_list{ 83 83 padding:5px; 84 width:200px;85 84 border-left: 1px solid #BA0000; 86 85 float:right; -
src/django_gheat/wlheatmap/templates/home.html
r9654 r9779 50 50 <div id="select_sig_slider"></div> 51 51 </div> 52 <input type="text" id="colour" name="colour"/> Colour<br /><br /> 53 <textarea rows="5" id="raw_filter" name="raw_filter" cols="50"></textarea><br /><br /> 52 54 <input type="text" id="lname" name="lname" size="10"/> Filtername<br /><br /> 53 <input type="text" id="colour" name="colour"/> Colour<br /><br /> 54 <input type="button" id="add_filter" value="Add filter"/><br /> 55 <input type="button" id="add_filter" value="Add filter" /><br /> 55 56 </form> 56 57 </div>
Note:
See TracChangeset
for help on using the changeset viewer.