use jquery isEmptyObject
This commit is contained in:
parent
3c36a2730f
commit
7829f6828b
|
@ -41,9 +41,11 @@ html, body {
|
||||||
|
|
||||||
.tabButton {
|
.tabButton {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 150px;
|
width: 50px;
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
float: left;
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectedListItem .listItemText {
|
.selectedListItem .listItemText {
|
||||||
|
|
|
@ -94,7 +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");
|
$.isEmptyObject(geom) ? $li.addClass("no_has_point") : $li.addClass("has_point");
|
||||||
});
|
});
|
||||||
return $ul;
|
return $ul;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,3 @@ function getStopForm(stop) {
|
||||||
return $div;
|
return $div;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isEmpty(obj) {
|
|
||||||
return (JSON.stringify(obj) == "{}")
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user