Use DexSearch for the teambuilder search engine

This will prevent us from needing to maintain two search engines in
the future.

The new DexSearch doesn't have too much in the way of new features so
far, but it does show filtered things in categories, and list illegal
results in-filter even after sorting.

These are really minor differences, though; the main thing is just that
its architecture should make it much easier to maintain, and in
particular, to add more filters.
This commit is contained in:
Guangcong Luo 2020-05-04 19:09:11 -07:00
parent 27f04e48ce
commit 6c38107fbe
4 changed files with 46 additions and 1148 deletions

View File

@ -151,6 +151,7 @@ ga('send', 'pageview');
<script src="//play.pokemonshowdown.com/data/search-index.js?"></script>
<script src="//play.pokemonshowdown.com/data/teambuilder-tables.js?"></script>
<script src="//play.pokemonshowdown.com/js/battle-dex-search.js?"></script>
<script src="//play.pokemonshowdown.com/js/search.js?"></script>
<script src="//play.pokemonshowdown.com/data/aliases.js?" async="async"></script>

View File

@ -1826,7 +1826,7 @@
this.$chart.scrollTop(0);
}
this.search.$inputEl = $inputEl;
this.search.setType(type, this.curTeam.format, this.curSet, cur);
this.search.setType(type, this.curTeam.format || 'gen8', this.curSet, cur);
this.qInitial = q;
this.search.qName = this.curChartName;
if (wasIncomplete) {

File diff suppressed because it is too large Load Diff

View File

@ -118,6 +118,7 @@
<script src="data/search-index.js" onerror="loadRemoteData(this.src)"></script>
<script src="data/teambuilder-tables.js" onerror="loadRemoteData(this.src)"></script>
<script src="js/battle-dex-search.js"></script>
<script src="js/search.js"></script>
<script src="data/aliases.js" async="async" onerror="loadRemoteData(this.src)"></script>