indicate whether stop has_point

This commit is contained in:
Sanj 2012-02-20 22:27:47 +05:30
parent e33f55730b
commit 0c0017bb98
2 changed files with 13 additions and 0 deletions

View File

@ -51,3 +51,11 @@ html, body {
.clear {
clear: both;
}
.has_point {
color: #222;
}
.no_has_point {
color: #666;
}

View File

@ -94,6 +94,7 @@ function getStopsList(stops) {
var props = v.properties;
var geom = v.geometry;
var $li = $('<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");
});
return $ul;
}
@ -106,3 +107,7 @@ function getStopForm(stop) {
// var $form = $('<form />').apendTo($div);
return $div;
}
function isEmpty(obj) {
return ($.toJSON(obj) == "{}")
}