Fixed players table order #622

This commit is contained in:
Rsl1122 2018-07-18 12:03:09 +03:00
parent 2161e26a3f
commit 23e555ad1a
4 changed files with 12 additions and 2 deletions

View File

@ -52,7 +52,7 @@ public class TableContainer {
this.values.add(values);
}
public final String parseHtml() {
public String parseHtml() {
return getTableHeader() +
parseHeader() +
parseBody() +

View File

@ -42,6 +42,11 @@ public class PluginPlayersTable extends TableContainer {
}
}
@Override
public String parseHtml() {
return super.parseHtml().replace("player-table", "player-plugin-table");
}
private static String[] getHeaders(Set<String> columnNames) {
List<String> header = new ArrayList<>(columnNames);
Collections.sort(header);

View File

@ -291,7 +291,8 @@
$(function () {
$('.player-table').DataTable({
responsive: true
responsive: true,
"order": [[5, "desc"]]
});
var navButtons = document.getElementsByClassName("nav-button");

View File

@ -1422,6 +1422,10 @@
$(function () {
$('.player-table').DataTable({
responsive: true,
"order": [[5, "desc"]]
});
$('.player-plugin-table').DataTable({
responsive: true
});