Skip to content

Commit

Permalink
Fix problems with ALD due to code broken by some formatting tool
Browse files Browse the repository at this point in the history
References: #28
  • Loading branch information
futurumclix committed Mar 24, 2018
1 parent ea3d07b commit ca8bdf7
Showing 1 changed file with 6 additions and 12 deletions.
Expand Up @@ -89,28 +89,24 @@ var alds_rows = $max;
function regionChange() { function regionChange() {
row = $(this).closest('span'); row = $(this).closest('span');
city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City'); city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City');
all = $(' all = $('<option>').text('All').attr('value', '*');
<option>').text('All').attr('value', '*');
$.getJSON('$dataURL/' + $(this).val(), function(json) { $.getJSON('$dataURL/' + $(this).val(), function(json) {
city.empty(); city.empty();
city.append(all); city.append(all);
$.each(json, function(i, obj) { $.each(json, function(i, obj) {
city.append($(' city.append($('<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
}); });
}); });
} }
function countryChange() { function countryChange() {
row = $(this).closest('span'); row = $(this).closest('span');
region = row.find('#AccurateTargettedLocations' + row.data('row') + 'Region'); region = row.find('#AccurateTargettedLocations' + row.data('row') + 'Region');
all = $(' all = $('<option>').text('All').attr('value', '*');
<option>').text('All').attr('value', '*');
$.getJSON('$dataURL/' + $(this).val(), function(json) { $.getJSON('$dataURL/' + $(this).val(), function(json) {
region.empty(); region.empty();
region.append(all); region.append(all);
$.each(json, function(i, obj) { $.each(json, function(i, obj) {
region.append($(' region.append($('<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
}); });
city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City'); city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City');
city.empty(); city.empty();
Expand All @@ -132,10 +128,8 @@ all = $('
regionSelect = $('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'Region'); regionSelect = $('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'Region');
regionSelect.on('change', regionChange); regionSelect.on('change', regionChange);
regionSelect.empty(); regionSelect.empty();
regionSelect.append($(' regionSelect.append($('<option>').text('All').attr('value', '*'));
<option>').text('All').attr('value', '*')); $('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'City').empty().append($('<option>').text('All').attr('value', '*'));
$('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'City').empty().append($('
<option>').text('All').attr('value', '*'));
alds_rows++; alds_rows++;
}); });
$('.RemoveButton[data-row]').on('click', function(e) { $('.RemoveButton[data-row]').on('click', function(e) {
Expand Down

0 comments on commit ca8bdf7

Please sign in to comment.