use jquery isEmptyObject

This commit is contained in:
Sanj 2012-02-20 23:27:29 +05:30
parent 3c36a2730f
commit 7829f6828b
2 changed files with 4 additions and 5 deletions

View File

@ -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 {

View File

@ -94,7 +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");
$.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) == "{}")
}