From 7829f6828ba544e7e8bd406172f2228b8af20a0c Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 20 Feb 2012 23:27:29 +0530 Subject: [PATCH] use jquery isEmptyObject --- chaloBEST/static/css/editstops.css | 4 +++- chaloBEST/static/js/editstops.js | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chaloBEST/static/css/editstops.css b/chaloBEST/static/css/editstops.css index be086fe..6181a81 100644 --- a/chaloBEST/static/css/editstops.css +++ b/chaloBEST/static/css/editstops.css @@ -41,9 +41,11 @@ html, body { .tabButton { cursor: pointer; - width: 150px; + width: 50px; border: 1px solid #000; float: left; + text-align: center; + padding: 4px; } .selectedListItem .listItemText { diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index dab3616..872b65c 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -94,7 +94,7 @@ function getStopsList(stops) { var props = v.properties; var geom = v.geometry; var $li = $('
  • ').addClass("stopItem").data("slug", props.slug).data("properties", props).data("geometry", geom).text(props.display_name).appendTo($ul); - isEmpty(geom) ? $li.addClass("no_has_point") : $li.addClass("has_point"); + $.isEmptyObject(geom) ? $li.addClass("no_has_point") : $li.addClass("has_point"); }); return $ul; } @@ -108,6 +108,3 @@ function getStopForm(stop) { return $div; } -function isEmpty(obj) { - return (JSON.stringify(obj) == "{}") -}