~erobererunc/sahana-eden/tropo_xforms

« back to all changes in this revision

Viewing changes to static/scripts/S3/S3.min.js

  • Committer: Fran Boon
  • Date: 2010-11-25 23:22:24 UTC
  • Revision ID: fran@aidiq.com-20101125232224-gg91eac2qpq4mxv0
A little more progress on the new Location Selector (still disabled)

Show diffs side-by-side

added added

removed removed

Lines of Context:
399
399
$('#gis_location_L'+level).removeClass('hidden').show();$('#gis_location_label_L'+level).removeClass('hidden').show();var this_url=gis_url+'&value=L'+level+'&parent='+new_id;var gis_load_locations=function(data,status){var options;var v='';if(data.length==0){options=gis_empty_set;}else{options=gis_select_location;for(var i=0;i<data.length;i++){v=data[i].id;options+='<option value="'+data[i].id+'">'+data[i].name+'</option>';}}
400
400
$('#gis_location_L'+level).html(options);if(level==gis_maxlevel&&options==gis_empty_set){$('#gis_location_L'+level).hide();$('#gis_location_label_L'+level).hide();}}
401
401
$.getJSONS3(this_url,gis_load_locations,false);for(l=level+1;l<=5;l=l+1){$('#gis_location_L'+l).hide().html(gis_loading_locations);$('#gis_location_label_L'+l).hide();}}
402
 
$(function(){$('#gis_location_L0').change(function(){gis_dropdown_select(1);});$('#gis_location_L1').change(function(){gis_dropdown_select(2);});$('#gis_location_L2').change(function(){gis_dropdown_select(3);});$('#gis_location_L3').change(function(){gis_dropdown_select(4);});$('#gis_location_L4').change(function(){gis_dropdown_select(5);});});var S3MultiselectWidgetFileCounter=0;function S3MultiselectWidgetAddClick(Args)
 
402
$(function(){$('#gis_location_L0').change(function(){gis_dropdown_select(1);});$('#gis_location_L1').change(function(){gis_dropdown_select(2);});$('#gis_location_L2').change(function(){gis_dropdown_select(3);});$('#gis_location_L3').change(function(){gis_dropdown_select(4);});$('#gis_location_L4').change(function(){gis_dropdown_select(5);});$('gis_location_add-btn').click(function(){$('gis_location_geolocate-btn').removeClass('hidden').show();$('gis_location_map-btn').removeClass('hidden').show();$('gis_location_name_label').removeClass('hidden').show();$('gis_location_name').removeClass('hidden').show();$('gis_location_addr_street_label').removeClass('hidden').show();$('gis_location_addr_street').removeClass('hidden').show();$('gis_location_advanced_div').removeClass('hidden').show();});$('gis_location_advanced_checkbox').change(function(){$('gis_location_lat_label').removeClass('hidden').show();$('gis_location_lat_row').removeClass('hidden').show();$('gis_location_lon_label').removeClass('hidden').show();$('gis_location_lon_row').removeClass('hidden').show();});});var S3MultiselectWidgetFileCounter=0;function S3MultiselectWidgetAddClick(Args)
403
403
{var WidgetID=Args.WidgetID;var DummyDisplayValues=[/DummyDisplay0/g,/DummyDisplay1/g,/DummyDisplay2/g,/DummyDisplay3/g,/DummyDisplay4/g]
404
404
var DummyJSONValues=[/DummyJSON0/g,/DummyJSON1/g,/DummyJSON2/g,/DummyJSON3/g,/DummyJSON4/g]
405
405
var JSONInputValue=$("#"+WidgetID+"_json").val();var newJSONInputValue="{";var JSONValue;var InputBlank=true;var NewRow=Args.NewRow;var FileInputID="";var NewFileInputID="";for(i=0;i<Args.ColumnFields.length;i++)