Changes between Version 12 and Version 13 of BluePrint/GIS/LocationSelector


Ignore:
Timestamp:
12/10/10 16:14:45 (14 years ago)
Author:
Fran Boon
Comment:

Works with Components now

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/GIS/LocationSelector

    v12 v13  
    3232   * Work has started on this: {{{map_selector()}}} in {{{controllers/gis.py}}}
    3333 * Increase Robustness (currently there are many bugs)
    34  * Make it work with components (see below)
    3534 * Add an HTML5 !GeoLocation option ('Current Location')
    3635  * we should use a 'nearby' algorithm (like gis.get_features_in_radius()) to re-use existing locations rather than adding a new one each time.
     
    5150This happens when you for example create a new hospital record without creating a new location, but just selecting one (just select a country, for example). When you submit, then a new location record is created with the same name as the selected one - this seems wrong. You can make it visible by uncommenting the show_status line. The reason for this behaviour is that S3.gis.uuid is empty in case there is no old_location, which triggers the creation of a new record. Thus, this does not happen in update, and not either when you create a new location (which creates a new location anyway :D).
    5251
    53 ==== Use in Component Forms ====
    54 To be able to apply the location selector to components (e.g. person/presence, where it would be *very* useful), we need to go away from the 'request.controller + "_" + request_function' construction and instead use jr.
    55 
    56 Perhaps this way:
    57 {{{
    58  {{try:}}
    59    var location_id = '{{=jr.prefix + "_" + jr.target()[1] + "_location_id"}}';
    60  {{except:}}
    61    var location_id = '{{=request.controller + "_" + request.function + "_location_id"}}';
    62  {{pass}}
    63 }}}
    64 
    6552----
    6653PakistanDevelopers#LocationsSelector