wip: UI refactoring

* Possibility to search for domain aliases (domains listing page)
* Correct events binding.

see #204
This commit is contained in:
Antoine Nguyen
2012-04-27 19:21:42 +02:00
parent d817a69021
commit 32b3959f8e
2 changed files with 6 additions and 5 deletions
+3 -1
View File
@@ -32,7 +32,9 @@ def domains(request):
domains = request.user.get_domains()
squery = request.GET.get("searchquery", None)
if squery is not None:
domains = domains.filter(name__contains=squery)
q = Q(name__contains=squery)
q |= Q(domainalias__name__contains=squery)
domains = domains.filter(q).distinct()
return render_listing(request, "domains", "admin/domains.html",
objects=domains, squery=squery)
+3 -4
View File
@@ -16,9 +16,9 @@
},
listen: function() {
$(".next").one("click", $.proxy(this.next, this));
$(".prev").one("click", $.proxy(this.prev, this));
$(".submit").one("click", $.proxy(this.submit, this));
$(".next").on("click", $.proxy(this.next, this));
$(".prev").on("click", $.proxy(this.prev, this));
$(".submit").on("click", $.proxy(this.submit, this));
},
post: function(last) {
@@ -52,7 +52,6 @@
if (resp.respmsg) {
$(".modal-body").prepend(build_error_alert(resp.respmsg));
}
//this.listen();
}, this));
},