Changeset 9219
- Timestamp:
- May 30, 2011, 1:06:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions.js
r9218 r9219 58 58 var formstart = '<form method="get" action="">'; 59 59 var formend = '<input type="button" value="Add filter" onClick="addFilter()"/></form>'; 60 var layername = '<input type="text" id="lname" name="lname" size="10"/> Layername<br />'; 61 var colour = '<input type="text" id="colour" name="colour" size="10"/> Colour<br />'; 62 var user = '<select id="user" style="width:104px"><option></option></select> User<br />'; 63 var dataset = '<select id="dataset" style="width:104px"><option></option></select> Dataset<br />'; 64 var node = '<select id="node" style="width:104px"><option></option></select> Node<br />'; 60 65 61 66 document.getElementById('filter_list').innerHTML+=formstart; 62 63 var filters = new Array('user', 'dataset'); 67 document.getElementById('filter_list').innerHTML+=user; 68 69 var filters = new Array('user'); 64 70 for (var i=0; i<filters.length; i++) { 65 71 get_json(filters[i]); … … 80 86 function set_filter(filter, responseText) { 81 87 json=eval('(' + responseText + ')'); 82 var options = ' <select id=' + filter + ' style="width:104px"><option></option>';88 var options = ''; 83 89 for (var i=0; i<json.length; i++){ 84 90 options += '<option>' + json[i].fields.naam + '</option>'; 85 91 } 86 options += '</select> ' + filter + '<br />'; 87 document.getElementById('filter_list').innerHTML+=options; 92 document.getElementById('user').innerHTML+=options; 88 93 } 89 94
Note:
See TracChangeset
for help on using the changeset viewer.