Commit e71d0e55 authored by okhin's avatar okhin 🚴

Fixing the borked JS #26

parent 6e0bd7df
......@@ -145,7 +145,7 @@ class JSONMixin(object):
def get(self, request, *args, **kwargs):
qs = self.get_queryset()
if qs.count():
return HttpResponse(json.dumps(sorted([(x.object.id, x.object.resource_name) for x in qs])))
return HttpResponse(json.dumps(sorted([(x.id, x.resource_name) for x in qs])))
else:
return HttpResponse('')
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
jquery-1.11.3.min.js
\ No newline at end of file
jquery-1.12.0.min.js
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -44,11 +44,10 @@
<li><a {% block active_tab_start %}{% endblock %} href="{%root_url%}/start">{% trans "Start Monitoring" %}</a></li>
<li>
<form action="/search/" method="get">
{% csrf_token %}
<span>
<label for="quick_q" class="quick"></label>
<input name="q" id="quick_q" class="quick"></input></form>
<input type="submit" value="Search"></input>
<input name="q" id="quick_q" class="quick">
<input type="submit" value="Search">
</span>
</form>
</li>
......
......@@ -24,17 +24,17 @@
var country="{{country}}";
$(document).ready(function() {
$.tablesorter.addParser({
/ set a unique id
/// set a unique id
id: 'stateparser',
is: function(s) {
/ return false so this parser is not auto detected
// return false so this parser is not auto detected
return false;
},
format: function(s) {
/ format your data for normalization
// format your data for normalization
return s{% for s, translation in status %}.replace(/{{translation}}/,{{forloop.counter}}){% endfor %};
},
/ set type, either numeric or text
// set type, either numeric or text
type: 'numeric'
});
$("#sortedlist").tablesorter({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment