indicate whether stop has_point
This commit is contained in:
parent
e33f55730b
commit
0c0017bb98
|
@ -51,3 +51,11 @@ html, body {
|
||||||
.clear {
|
.clear {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.has_point {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no_has_point {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
|
@ -94,6 +94,7 @@ function getStopsList(stops) {
|
||||||
var props = v.properties;
|
var props = v.properties;
|
||||||
var geom = v.geometry;
|
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);
|
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;
|
return $ul;
|
||||||
}
|
}
|
||||||
|
@ -106,3 +107,7 @@ function getStopForm(stop) {
|
||||||
// var $form = $('<form />').apendTo($div);
|
// var $form = $('<form />').apendTo($div);
|
||||||
return $div;
|
return $div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isEmpty(obj) {
|
||||||
|
return ($.toJSON(obj) == "{}")
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user