From 08946256bda1ebfdc9e0281075bae849d94852c6 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 28 Feb 2012 20:33:18 +0530 Subject: [PATCH] silly error - changed route to foreignkey, updated admin --- chaloBEST/mumbai/admin.py | 2 +- chaloBEST/static/js/editstops.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chaloBEST/mumbai/admin.py b/chaloBEST/mumbai/admin.py index 72ef894..6de00be 100644 --- a/chaloBEST/mumbai/admin.py +++ b/chaloBEST/mumbai/admin.py @@ -51,7 +51,7 @@ class FareAdmin(admin.ModelAdmin): class UniqueRouteAdmin(admin.ModelAdmin): list_display = ("route","from_stop", "to_stop","distance","is_full") readonly_fields = ("route","from_stop", "to_stop","distance","is_full") - search_fields = ("route", "from_stop__name", "to_stop__name") + search_fields = ("route__alias", "from_stop__name", "to_stop__name") ordering = ('route',) list_per_page = 50 diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index 278d2a5..9b67392 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -23,7 +23,7 @@ var API_BASE = "/1.0/", var $li = $('
') .addClass("listItem") .appendTo($list); - var $txt = $('').addClass("listItemText").text(v).appendTo($li); + var $txt = $('').addClass("listItemText").text(v).appendTo($li); }); }); } @@ -51,6 +51,7 @@ var API_BASE = "/1.0/", $('.selectedListItem').find(".stopsList").hide().remove(); $('.selectedListItem').removeClass("selectedListItem"); $target.addClass("selectedListItem"); + if ($target.data("hasList")) { var $stopsList = $target.find(".stopsList"); $stopsList.slideDown();