Skip to content

Commit

Permalink
Fix ladder prefix search to search by ID
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibo committed Jul 19, 2019
1 parent 80aaab1 commit 787a799
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/client-ladder.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,16 @@
} else {
var format = this.curFormat;
var self = this;
var prefix = this.curSearchVal && toID(this.curSearchVal);
this.$el.html('<div class="ladder pad"><p><button name="selectFormat"><i class="fa fa-chevron-left"></i> Format List</button></p><p><em>Loading...</em></p></div>');
if (app.localLadder) {
app.send('/cmd laddertop ' + format + (this.curSearchVal ? ' ,' + this.curSearchVal : ''));
app.send('/cmd laddertop ' + format + (prefix ? ' ,' + prefix : ''));
} else {
$.get('/ladder.php', {
format: format,
server: Config.server.id.split(':')[0],
output: 'html',
prefix: this.curSearchVal
prefix: prefix
}, function (data) {
if (self.curFormat !== format) return;
var buf = '<div class="ladder pad"><p><button name="selectFormat"><i class="fa fa-chevron-left"></i> Format List</button></p><p><button class="button" name="refresh"><i class="fa fa-refresh"></i> Refresh</button>';
Expand Down

0 comments on commit 787a799

Please sign in to comment.