Permalink
Browse files

Fix problems with ALD due to code broken by some formatting tool

References: #28
  • Loading branch information...
futurumclix committed Mar 24, 2018
1 parent ea3d07b commit ca8bdf766586892040e941d6cc7d76a55ae044ab
Showing with 6 additions and 12 deletions.
  1. +6 −12 app/View/Themed/Fresh/Plugin/AccurateLocationDatabase/Elements/selector.ctp
@@ -89,28 +89,24 @@ var alds_rows = $max;
function regionChange() {
row = $(this).closest('span');
city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City');
all = $('
<option>').text('All').attr('value', '*');
all = $('<option>').text('All').attr('value', '*');
$.getJSON('$dataURL/' + $(this).val(), function(json) {
city.empty();
city.append(all);
$.each(json, function(i, obj) {
city.append($('
<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
city.append($('<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
});
});
}
function countryChange() {
row = $(this).closest('span');
region = row.find('#AccurateTargettedLocations' + row.data('row') + 'Region');
all = $('
<option>').text('All').attr('value', '*');
all = $('<option>').text('All').attr('value', '*');
$.getJSON('$dataURL/' + $(this).val(), function(json) {
region.empty();
region.append(all);
$.each(json, function(i, obj) {
region.append($('
<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
region.append($('<option>').text(obj.AccurateLocationDatabaseLocation.name).attr('value', obj.AccurateLocationDatabaseLocation.name));
});
city = row.find('#AccurateTargettedLocations' + row.data('row') + 'City');
city.empty();
@@ -132,10 +128,8 @@ all = $('
regionSelect = $('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'Region');
regionSelect.on('change', regionChange);
regionSelect.empty();
regionSelect.append($('
<option>').text('All').attr('value', '*'));
$('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'City').empty().append($('
<option>').text('All').attr('value', '*'));
regionSelect.append($('<option>').text('All').attr('value', '*'));
$('#SelectorContainer').children().last().find('#AccurateTargettedLocations' + alds_rows + 'City').empty().append($('<option>').text('All').attr('value', '*'));
alds_rows++;
});
$('.RemoveButton[data-row]').on('click', function(e) {

0 comments on commit ca8bdf7

Please sign in to comment.