From ae87b507d36b87fcfd16248f996eedc934441ff9 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 22 Feb 2012 15:43:29 +0530 Subject: [PATCH] css --- chaloBEST/static/css/editstops.css | 36 +++++++++++++++++++++++++++--- chaloBEST/static/js/editstops.js | 24 ++++++++++++++++---- chaloBEST/templates/editstops.html | 4 ++++ 3 files changed, 57 insertions(+), 7 deletions(-) diff --git a/chaloBEST/static/css/editstops.css b/chaloBEST/static/css/editstops.css index c388a21..7d65385 100644 --- a/chaloBEST/static/css/editstops.css +++ b/chaloBEST/static/css/editstops.css @@ -1,6 +1,7 @@ html, body { width: 100%; height: 100%; + font-family: Arial, Helvetica, Verdana, sans-serif; } #wrapper { @@ -38,6 +39,7 @@ html, body { .listItem { cursor: pointer; + font-size: 13px; } .tabButton { @@ -49,12 +51,20 @@ html, body { padding: 4px; } + +.listItemText { + display: block; +} + .selectedListItem .listItemText { - color: blue; + background: #666; + color: #fff; } .selectedStop { - color: blue !important; + background: #ffff00; + color: #666 !important; + font-weight: bold; } .clear { @@ -71,10 +81,30 @@ html, body { ul { list-style-type: none; - padding-left: 4px; + padding: 4px; + font-size: 12px; } .highlightedStop { background-color: #FFFF00; } +#formCol { + font-size: 13px; +} + +#formCol div { + margin-bottom: 4px; +} + +.stopSlug { + font-style: italic; +} + +#stopForm label { + display: block; +} + +#stopForm input { + width: 90%; +} diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index 96d0336..c567b5d 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -43,10 +43,19 @@ var API_BASE = "/1.0/", if ($target.data("loading")) { return; } - $('.selectedListItem').find(".stopsList").hide(); + if ($target.hasClass("selectedListItem")) { + $target.find(".stopsList").hide().remove(); + $target.removeClass("selectedListItem"); + return; + } + $('.selectedListItem').find(".stopsList").hide().remove(); $('.selectedListItem').removeClass("selectedListItem"); $target.addClass("selectedListItem"); if ($target.data("hasList")) { + var $stopsList = $target.find(".stopsList"); + $stopsList.slideDown(); + return; + /* var $stopsList = $target.find(".stopsList"); if (!$stopsList.is(":visible")) { $stopsList.slideDown(); @@ -54,7 +63,8 @@ var API_BASE = "/1.0/", $stopsList.slideUp(); $target.removeClass("selectedListItem"); } - return; + return; + */ } var url = API_BASE + name + "/" + $target.find(".listItemText").text(); $target.data("loading", true); @@ -77,7 +87,7 @@ var API_BASE = "/1.0/", var maxExtent = jsonLayer.getDataExtent(); map.zoomToExtent(maxExtent); $target.append($stopsList); - $target.data("hasList", true); + // $target.data("hasList", true); $target.data("loading", false); }); }); @@ -149,8 +159,9 @@ var API_BASE = "/1.0/", var $displayName = $('
').text(stop.display_name).appendTo($div); var $slug = $('
').addClass("stopSlug").text(stop.slug).appendTo($div); var $routes = $('
').text("Routes: " + stop.routes).appendTo($div); +// var $formLabel = $("
").text("Edit:").appendTo($div); var $form = $('
').attr("id", "stopForm").appendTo($div); - + var $display_name_label = $('