Compare commits
No commits in common. "1e83e0c8a884f9455f170ff9c3159fbb2ab6773c" and "7239995ce300dffa1fd5c2d909b3230dfe107344" have entirely different histories.
1e83e0c8a8
...
7239995ce3
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<div class="input-group search-field">
|
<div class="input-group search-field">
|
||||||
<input id="search-tasks"
|
<input id="search-tasks"
|
||||||
placeholder="Spielername (mehrere mit '&' trennen)"
|
placeholder="Spielername"
|
||||||
type="text" #query class="form-control"
|
type="text" #query class="form-control"
|
||||||
(keyup.enter)="filterPlayers()"
|
(keyup.enter)="filterPlayers()"
|
||||||
[formControl]="searchTerm">
|
[formControl]="searchTerm">
|
||||||
|
@ -58,7 +58,6 @@
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column [width]="valueColWidth" name="Tode" prop="death"></ngx-datatable-column>
|
<ngx-datatable-column [width]="valueColWidth" name="Tode" prop="death"></ngx-datatable-column>
|
||||||
</ngx-datatable>
|
</ngx-datatable>
|
||||||
|
|
||||||
<ngx-datatable
|
<ngx-datatable
|
||||||
[rows]="players.respawn"
|
[rows]="players.respawn"
|
||||||
[reorderable]="reorderable"
|
[reorderable]="reorderable"
|
||||||
|
|
|
@ -4,7 +4,6 @@ import {PlayerService} from "../../services/logs/player.service";
|
||||||
import {CampaignService} from "../../services/logs/campaign.service";
|
import {CampaignService} from "../../services/logs/campaign.service";
|
||||||
import {Fraction} from "../../utils/fraction.enum";
|
import {Fraction} from "../../utils/fraction.enum";
|
||||||
import {FormControl} from "@angular/forms";
|
import {FormControl} from "@angular/forms";
|
||||||
import {Observable} from "rxjs/Observable";
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -62,12 +61,6 @@ export class StatisticHighScoreComponent {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const searchTermStream = this.searchTerm.valueChanges.debounceTime(400);
|
|
||||||
|
|
||||||
Observable.merge(searchTermStream)
|
|
||||||
.distinctUntilChanged().map(query => this.filterPlayers())
|
|
||||||
.subscribe();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initData() {
|
initData() {
|
||||||
|
@ -96,16 +89,8 @@ export class StatisticHighScoreComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private filterPlayerAttribute(attribute) {
|
private filterPlayerAttribute(attribute) {
|
||||||
const query = this.searchTerm.value.toLowerCase().split('&');
|
const query = this.searchTerm.value.toLowerCase();
|
||||||
|
return this.playersStored[attribute].filter(p => p.name.toLowerCase().includes(query))
|
||||||
return this.playersStored[attribute].filter(player => {
|
|
||||||
for (let i = 0; i < query.length; i++) {
|
|
||||||
if (player.name.toLowerCase().includes(query[i].trim())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,9 +57,11 @@ ngx-datatable {
|
||||||
background: #4b4b4b;
|
background: #4b4b4b;
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.5);
|
-webkit-box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Table Scrollbar END */
|
/* Table Scrollbar END */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.in-table-btn {
|
.in-table-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
|
|
Loading…
Reference in New Issue