Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
make showAll stops working
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Dec 18, 2013
1 parent 2d34bdf commit d09478c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions shuttle-stop-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
query: '',
mode: 0,
update: function() {
this.query = '';
this.showAll = true;
this.search();
if (this.selectedItem) {
this.scrollToStop(this.selectedItem);
Expand Down Expand Up @@ -197,6 +197,7 @@
}
},
queryChanged: function() {
this.showAll = false;
this.mode = this.query ? 1 : 0;
this.asyncSearch();
},
Expand All @@ -209,9 +210,10 @@
var t = g.stops.length;
var gh = g.name.toLowerCase().indexOf(q) < 0;
g.stops.forEach(function(s) {
s.hidden = s.name.toLowerCase().indexOf(q) < 0 && gh;
});
});
s.hidden = !this.showAll &&
s.name.toLowerCase().indexOf(q) < 0 && gh;
}.bind(this));
}.bind(this));
this.fire('shuttle-stops-search');
},
hideKeyboard: function() {
Expand Down

0 comments on commit d09478c

Please sign in to comment.