allow searching for bones
This commit is contained in:
parent
6e86c2bcf3
commit
cb00adae5f
@ -23,6 +23,7 @@ var SearchResult = {
|
||||
var description = obj.type;
|
||||
var type = obj.type;
|
||||
|
||||
// train-line result
|
||||
if (obj.type == "train"){
|
||||
description = [
|
||||
m("span", obj.attributes.station),
|
||||
@ -33,11 +34,19 @@ var SearchResult = {
|
||||
type = m("i", { class: "fa fa-subway" });
|
||||
}
|
||||
|
||||
// travelnet
|
||||
if (obj.type == "travelnet"){
|
||||
description = m("span", obj.attributes.station_name);
|
||||
type = m("img", { src: "pics/travelnet_inv.png" });
|
||||
}
|
||||
|
||||
// bones
|
||||
if (obj.type == "bones"){
|
||||
description = m("span", obj.attributes.owner);
|
||||
type = m("img", { src: "pics/bones_top.png" });
|
||||
}
|
||||
|
||||
// poi marker
|
||||
if (obj.type == "poi"){
|
||||
description = m("span", obj.attributes.name);
|
||||
|
||||
@ -49,6 +58,7 @@ var SearchResult = {
|
||||
]);
|
||||
}
|
||||
|
||||
//shop
|
||||
if (obj.type == "shop") {
|
||||
if (obj.attributes.stock == 0){
|
||||
row_classes += "table-warning";
|
||||
|
@ -29,12 +29,13 @@ var SearchService = {
|
||||
});
|
||||
}
|
||||
|
||||
var prom_list = [];
|
||||
|
||||
prom_list.push(searchFor("shop", "out_item", SearchStore.query));
|
||||
prom_list.push(searchFor("poi", "name", SearchStore.query));
|
||||
prom_list.push(searchFor("train", "station", SearchStore.query));
|
||||
prom_list.push(searchFor("travelnet", "station_name", SearchStore.query));
|
||||
var prom_list = [
|
||||
searchFor("shop", "out_item", SearchStore.query),
|
||||
searchFor("poi", "name", SearchStore.query),
|
||||
searchFor("train", "station", SearchStore.query),
|
||||
searchFor("travelnet", "station_name", SearchStore.query),
|
||||
searchFor("bones", "owner", SearchStore.query)
|
||||
];
|
||||
|
||||
Promise.all(prom_list)
|
||||
.then(function(results){
|
||||
|
Loading…
Reference in New Issue
Block a user