Ignore:
Timestamp:
Jun 14, 2011, 12:21:51 PM (13 years ago)
Author:
dennisw
Message:

Fixed dateFormat bug with minDate.
Proper filtering on only start_date or end_date.

File:
1 edited

Legend:

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

    r9251 r9253  
    4242    dataset = $('#select_dataset option:selected').text();
    4343    wlnode = $('#select_node option:selected').text();
    44 //    enc = $('#select_enc option:selected').text();
    45 //    date = $('#select_date option:selected').text();
    4644    start_date = $('#start_date').val();
    4745    end_date = $('#end_date').val();
     
    5654    if (dataset != ''){dataset='&meetrondje__naam='+dataset;}
    5755    if (wlnode != ''){wlnode='&accespoint__ssid='+wlnode;}
    58 //    if (enc != ''){enc='&accespoint__encryptie='+enc;}
    59 //    if (date != ''){date='&meetrondje__datum='+date;}
    6056    if (start_date && end_date){
    6157      sd_d=start_date.substr(0,2);
     
    6864
    6965      start_date='&meetrondje__datum__gte=' + sd_y +'-'+ sd_m +'-'+ sd_d;
     66      end_date='&meetrondje__datum__lte=' + ed_y +'-'+ ed_m +'-'+ ed_d;
     67    }
     68    if (start_date && !end_date){
     69      sd_d=start_date.substr(0,2);
     70      sd_m=start_date.substr(3,2);
     71      sd_y=start_date.substr(6,4);
     72      start_date='&meetrondje__datum__gte=' + sd_y +'-'+ sd_m +'-'+ sd_d;
     73      end_date='';
     74    }
     75    if (!start_date && end_date){
     76      ed_d=end_date.substr(0,2);
     77      ed_m=end_date.substr(3,2);
     78      ed_y=end_date.substr(6,4);
     79      start_date='';
    7080      end_date='&meetrondje__datum__lte=' + ed_y +'-'+ ed_m +'-'+ ed_d;
    7181    }
Note: See TracChangeset for help on using the changeset viewer.