Changeset 9237
- Timestamp:
- Jun 7, 2011, 3:47:37 PM (13 years ago)
- Location:
- src/django_gheat/website
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions_test.js
r9235 r9237 15 15 // set filter values 16 16 $(document).ready(function() { 17 $.getJSON("/website/foofilter", 17 18 // Fastest?: http://stackoverflow.com/questions/170986/what-is-the-best-way-to-add-options-to-a-select-from-an-array-with-jquery 19 $.getJSON("/website/foofilter/", 18 20 function(json) { 19 21 $.each(json, function(i,json){ 20 $("<option>" + json.gebruiker + "</option>").appendTo("#select_user"); 22 gebruiker_class = json.gebruiker; 23 $("<option value='" + json.gebruiker + "'>" + json.gebruiker + "</option>").appendTo("#mark"); 21 24 $.each(json.meetrondje, function(m, meetrondje){ 22 $("<option >" + meetrondje.naam + "</option>").appendTo("#select_dataset");25 $("<option class='" + gebruiker_class + "' value='" + meetrondje.naam + "'>"+ meetrondje.naam + "</option>").appendTo("#series"); 23 26 $.each(meetrondje.nodes, function(n, nodes){ 24 $("<option>" + nodes + "</option>").appendTo("# select_node");27 $("<option>" + nodes + "</option>").appendTo("#model"); 25 28 }); 26 $("<option>" + meetrondje.datum + "</option>").appendTo("#select_date");29 // $("<option>" + meetrondje.datum + "</option>").appendTo("#select_date"); 27 30 }); 28 31 }); 32 // Initiate the chain 33 $("#series").chained("#mark"); 34 $("#model").chained("#series"); 29 35 } 30 36 ); -
src/django_gheat/website/static/style.css
r9214 r9237 60 60 #filter{ 61 61 width:100%-10px; 62 display:none; 62 /* display:none; */ 63 63 padding:5px; 64 64 } -
src/django_gheat/website/templates/home.html
r9234 r9237 3 3 <link href="{{ STATIC_URL }}style.css" rel="stylesheet" type="text/css" media="screen" /> 4 4 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 5 <!-- Disable during debugging, if you do not need the map to be displayed --> 6 <!-- 5 7 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}OpenLayers.js"></script> 6 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}OpenStreetMap.js"></script> 8 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}OpenStreetMap.js"></script> 7 9 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}heatmap.js"></script> 10 --> 11 <script type="text/javascript" language="javascript" src="{{ STATIC_URL }}jquery.chained.mini.js"></script> 8 12 <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}heatmap_extensions_test.js"></script> 9 13 <script language="javascript" type="text/javascript"> … … 20 24 </script> 21 25 </head> 22 <body onload="init(), get_filters()">26 <body> 23 27 <div id="heatmap"></div> 24 28 <div id="container"> … … 38 42 <p>Create your custom layer by choosing the desired filter options on the right and adding it the layer to the list.</p> 39 43 <p>For instance, you can choose to create a layer with data measured only by yourself, or with a certain node from Wireless Leiden only.</p> 40 </div> 44 <select id="mark"> 45 <option value="">--</option> 46 <option value="bmw">BMW</option> 47 <option value="audi">Audi</option> 48 </select> 49 <select id="series"> 50 <option value="">--</option> 51 <option value="series-3" class="bmw">3 series</option> 52 <option value="series-5" class="bmw">5 series</option> 53 <option value="series-6" class="bmw">6 series</option> 54 <option value="a3" class="audi">A3</option> 55 <option value="a4" class="audi">A4</option> 56 <option value="a5" class="audi">A5</option> 57 </select> 58 <select id="model"> 59 <option value="">--</option> 60 <option value="coupe" class="series-3 series-6 a5">Coupe</option> 61 <option value="cabrio" class="series-3 series-6 a3 a5">Cabrio</option> 62 <option value="sedan" class="series-3 series-5 a3 a4">Sedan</option> 63 <option value="sportback" class="a3 a5">Sportback</option> 64 </select> 65 66 67 </div> 41 68 <div id="filter_list"> 42 69 </div> 70 43 71 </div> 44 72 </div>
Note:
See TracChangeset
for help on using the changeset viewer.