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

Commit

Permalink
fix so update() will show all the stops
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Jan 8, 2014
1 parent d09478c commit d3e7808
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions shuttle-stop-picker.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,19 @@
},
queryChanged: function() {
this.showAll = false;
this.mode = this.query ? 1 : 0;
this.asyncSearch();
},
asyncSearch: function() {
this.searchJob = this.job(this.searchJob, this.search, 300);
},
search: function() {
var q = this.query && this.query.toLowerCase();
var q = this.showAll ? '' : (this.query && this.query.toLowerCase());
this.mode = q ? 1 : 0;
this.groups.forEach(function(g) {
var t = g.stops.length;
var gh = g.name.toLowerCase().indexOf(q) < 0;
g.stops.forEach(function(s) {
s.hidden = !this.showAll &&
s.name.toLowerCase().indexOf(q) < 0 && gh;
s.hidden = s.name.toLowerCase().indexOf(q) < 0 && gh;
}.bind(this));
}.bind(this));
this.fire('shuttle-stops-search');
Expand Down

0 comments on commit d3e7808

Please sign in to comment.