Fix id outputting in fuzzystops template
Eliminate Save button
This commit is contained in:
parent
bc2b00b769
commit
36cf1cc2c4
|
@ -113,7 +113,7 @@ def fuzzystops(request):
|
|||
end = int(request.GET.get("end", start + 50))
|
||||
show_checked = request.GET.get("show_checked", False)
|
||||
unrs = []
|
||||
for unr in UniqueRoute.objects.all():
|
||||
for unr in UniqueRoute.objects.all().order_by('route__code'):
|
||||
|
||||
if FuzzyStopMatch.objects.filter(unr=unr).filter(checked=True).count() > 0:
|
||||
if not show_checked:
|
||||
|
|
|
@ -40,11 +40,13 @@ $(function() {
|
|||
$('.fromStopSelect').change(function() {
|
||||
var firstOpt = $(this).children().first();
|
||||
firstOpt.attr("selected") ? $(this).removeClass("notfirstStop") : $(this).addClass("notfirstStop");
|
||||
$(this).parents('tr').find('.submitFuzzyEdit').click();
|
||||
});
|
||||
|
||||
$('.toStopSelect').change(function() {
|
||||
var lastOpt = $(this).children().last();
|
||||
lastOpt.attr("selected") ? $(this).removeClass("notlastStop") : $(this).addClass("notlastStop");
|
||||
$(this).parents('tr').find('.submitFuzzyEdit').click();
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -95,7 +97,7 @@ function saveUNR(elem, markChecked) {
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for u in unrs %}
|
||||
<tr data-id="{{ u.id }}">
|
||||
<tr data-id="{{ u.unr.id }}">
|
||||
<td>{{ u.unr.route.alias }}</td>
|
||||
<td>{{ u.unr.from_stop_txt }}</td>
|
||||
<td>
|
||||
|
@ -121,7 +123,7 @@ function saveUNR(elem, markChecked) {
|
|||
<td>
|
||||
<!-- Change all: <input type="checkbox" class="changeAll" /> -->
|
||||
|
||||
<button class="submitFuzzyEdit">Save</button>
|
||||
<button class="submitFuzzyEdit" style="display:none;">Save</button>
|
||||
<button class="markChecked">Checked</button>
|
||||
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user