Changeset 9243 for src/django_gheat
- Timestamp:
- Jun 8, 2011, 4:12:31 PM (13 years ago)
- Location:
- src/django_gheat/website
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions.js
r9241 r9243 1 // Uses zoomlevel enmouseposition to call the nodelist.py view. View returns nodes in json format which is read and printed in document element.1 // Uses zoomlevel and mouseposition to call the nodelist.py view. View returns nodes in json format which is read and printed in document element. 2 2 function getNodeList(zoomlevel, mousepos) { 3 3 $.getJSON("/website/nodelist/" + zoomlevel + "," + mousepos.lat + "," + mousepos.lon, … … 20 20 function(json) { 21 21 $.each(json, function(i,json){ 22 // $("<option value='" + json.gebruiker + "'>" + json.gebruiker + "</option>").appendTo("#select_user");23 22 $("#select_user").append($("<option/>").attr("value",json.gebruiker).text(json.gebruiker)); 24 23 $.each(json.meetrondje, function(m, meetrondje){ 25 $(" <option class='" + json.gebruiker + "' value='" + meetrondje.naam + "'>"+ meetrondje.naam + "</option>").appendTo("#select_dataset");24 $("#select_dataset").append($("<option/>").attr({"class":json.gebruiker, "value":meetrondje.naam}).text(meetrondje.naam)); 26 25 $.each(meetrondje.nodes, function(n, nodes){ 27 $(" <option class='" + meetrondje.naam + "' value='" + nodes + "'>" + nodes + "</option>").appendTo("#select_node");26 $("#select_node").append($("<option/>").attr({"class":meetrondje.naam, "value":nodes}).text(nodes)); 28 27 }); 29 // $("<option>" + meetrondje.datum + "</option>").appendTo("#select_date");30 28 }); 31 29 }); 32 // Initiate the chain30 // Initiate the chain 33 31 $("#select_dataset").chained("#select_user"); 34 32 $("#select_node").chained("#select_dataset"); … … 44 42 dataset = $('#select_dataset option:selected').text(); 45 43 wlnode = $('#select_node option:selected').text(); 46 enc = $('#select_enc option:selected').text();47 date = $('#select_date option:selected').text();44 // enc = $('#select_enc option:selected').text(); 45 // date = $('#select_date option:selected').text(); 48 46 colour = encodeURIComponent(document.getElementById("colour").value); 49 47 lname = encodeURIComponent(document.getElementById("lname").value); 50 48 51 49 if (user != ''){user='&meetrondje__gebruiker__naam='+user;} 52 else{user='';}53 50 if (dataset != ''){dataset='&meetrondje__naam='+dataset;} 54 else{dataset='';} 55 if (wlnode != ''){wlnode='&accespoint__ssid='+wlnode;} 56 else{wlnode='';} 57 if (enc != ''){enc='&accespoint__encryptie='+enc;} 58 if (date != ''){date='&meetrondje__datum='+date;} 59 else{date='';} 51 if (wlnode != 'All'){wlnode='&accespoint__ssid='+wlnode;} 52 // if (enc != ''){enc='&accespoint__encryptie='+enc;} 53 // if (date != ''){date='&meetrondje__datum='+date;} 60 54 if (colour != ''){colour='colour='+colour;} 61 55 else {colour = '&colour='+Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256);} … … 68 62 initialize: function(name, options) { 69 63 var url = [ 70 baseurl + colour + user + dataset + wlnode + enc + date64 baseurl + colour + user + dataset + wlnode /* + enc + date */ 71 65 ]; 72 66 document.getElementById('filter_text').innerHTML+="<br />Added: " + url; -
src/django_gheat/website/templates/home.html
r9242 r9243 42 42 <div id="filter_list"> 43 43 <form method="get" action=""> 44 <select id="select_date" style="width:104px"></select> Date<br />45 44 <select id="select_user" style="width:104px"></select> User<br /> 46 45 <select id="select_dataset" style="width:104px"></select> Dataset<br /> 47 46 <select id="select_node" style="width:104px"></select> Node<br /> 48 <select id="select_encryption" style="width:104px"></select> Encryption<br />49 47 <input type="text" id="lname" name="lname" size="10"/> Layername<br /> 50 48 <input type="text" id="colour" name="colour" size="10"/> Colour<br />
Note:
See TracChangeset
for help on using the changeset viewer.