Changeset 9297


Ignore:
Timestamp:
Jun 24, 2011, 1:21:52 PM (13 years ago)
Author:
dennisw
Message:

Fixed permalink visibility.
Fixed layer toggle by category.

Location:
src/django_gheat/website
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/website/static/heatmap_extensions.js

    r9276 r9297  
    5252      $("#signallayer font").text("Signal strength: " + sig.values[0] + " - " + sig.values[1]);
    5353    },
    54     // on slider stop, it tries to delete the old layer and creates a new layer with the slider values
     54    // on slider stop, it sets a new URL with updated values and redraws the layer
    5555    stop: function(event, sig){
    5656      signallayer = map.getLayersByName('signallayer');
     
    6262
    6363  // toggle layer visibility
    64   $("#togglelayer").live("click", function(){
     64  $("#togglelayer").live('click', function(){
    6565    status = $(this).attr("checked");
    6666    layername = $(this).parents('span').attr('id');
     
    6969  });
    7070
    71   // toggle layer visibility per categorie
    72   $("#togglecat").click(function(){
    73     layertype = $(this).closest('div').attr('id');
    74    
    75 
     71  // toggle layer visibility per category
     72  $("#togglecat").live("click", function(){
     73    if($(this).attr("checked")){
     74      status = true;
     75    }
     76    else{
     77      status = false;
     78    }   
     79    layertype = $(this).attr('class');
     80    layers = new Array();
     81    layers = $('#' + layertype).children('span');
     82    $.each(layers, function(l, layer){
     83      layer = map.getLayersByName(layer.id);
     84      layer[0].setVisibility(status);
     85      $(this).children('input').attr('checked', status);
     86    });
    7687  });
    7788
  • src/django_gheat/website/static/style.css

    r9276 r9297  
    178178}
    179179
     180.olControlPermalink a{
     181  color:#000;
     182}
     183
     184.olControlPermalink a:hover{
     185  color:#666;
     186}
    180187
    181188/* Colorpicker */
     
    217224  z-index:2;
    218225}
    219 
  • src/django_gheat/website/templates/home.html

    r9276 r9297  
    6060  <div id="layer_switcher">
    6161    <div id="layer_switcher_cat">
    62       <input type=checkbox id=togglecat checked />
     62      <input type=checkbox id=togglecat class=default checked />
    6363      Default layers
    6464    </div>
    6565    <p><span id="default"></span><p>
    6666    <div id="layer_switcher_cat">
    67       <input type=checkbox id=togglecat checked />
     67      <input type=checkbox id=togglecat class=node checked />
    6868      Nodes <a style="margin-top:4px;font-size:10px;float:right;" id="node_filter">(Add all nodes)</a>
    6969    </div>
    7070    <p><span id="node"></span><p>
    7171    <div id="layer_switcher_cat">
    72       <input type=checkbox id=togglecat checked />
     72      <input type=checkbox id=togglecat class=user checked />
    7373      Users <a style="margin-top:4px;font-size:10px;float:right;" id="user_filter">(Add all users)</a>
    7474    </div>
    7575    <p><span id="user"></span><P>
    7676    <div id="layer_switcher_cat">
    77       <input type=checkbox id=togglecat checked />
     77      <input type=checkbox id=togglecat class=custom checked />
    7878      Custom filters
    7979    </div><p><span id="custom"></span><p>
Note: See TracChangeset for help on using the changeset viewer.