Changeset 9237


Ignore:
Timestamp:
Jun 7, 2011, 3:47:37 PM (13 years ago)
Author:
rick
Message:

Disabled some code to show example filters.

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  
    1515// set filter values
    1616$(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/",
    1820    function(json) {
    1921      $.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");
    2124        $.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");
    2326          $.each(meetrondje.nodes, function(n, nodes){
    24             $("<option>" + nodes + "</option>").appendTo("#select_node");
     27            $("<option>" + nodes + "</option>").appendTo("#model");
    2528          });
    26           $("<option>" + meetrondje.datum + "</option>").appendTo("#select_date");
     29//          $("<option>" + meetrondje.datum + "</option>").appendTo("#select_date");
    2730        });
    2831      });
     32// Initiate the chain
     33    $("#series").chained("#mark");
     34    $("#model").chained("#series");
    2935    }
    3036  );
  • src/django_gheat/website/static/style.css

    r9214 r9237  
    6060#filter{
    6161  width:100%-10px;
    62   display:none;
     62/* display:none; */
    6363  padding:5px;
    6464}
  • src/django_gheat/website/templates/home.html

    r9234 r9237  
    33  <link href="{{ STATIC_URL }}style.css" rel="stylesheet" type="text/css" media="screen" />
    44  <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  <!--
    57  <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> 
    79  <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>
    812  <script type="text/javascript" language="Javascript" src="{{ STATIC_URL }}heatmap_extensions_test.js"></script>
    913  <script language="javascript" type="text/javascript">
     
    2024  </script>
    2125</head>
    22 <body onload="init(), get_filters()">
     26<body>
    2327  <div id="heatmap"></div>
    2428  <div id="container">
     
    3842      <p>Create your custom layer by choosing the desired filter options on the right and adding it the layer to the list.</p>
    3943      <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>
    4168      <div id="filter_list">
    4269      </div>
     70
    4371    </div>
    4472  </div>
Note: See TracChangeset for help on using the changeset viewer.