citra-emu
/
citra-web
Archived
1
0
Fork 0

Fix dynamic headers function

This commit is contained in:
BynariStar 2017-07-19 02:23:33 +03:00
parent bff7ea6a19
commit c0f5b922a6
1 changed files with 19 additions and 5 deletions

View File

@ -107,18 +107,32 @@
list.sort("title", {order: "asc"});
list.on("updated", function(){
$("#compatibility-list tbody tr.key").removeClass("key");
if ($("#compatibility-list thead").find("th.asc[data-sort='title'], th.desc[data-sort='title']").length){
$("#compatibility-list tbody tr[data-key]").each(function(){
list.on("updated", function(list){
var $list = $(list.list);
var $items = $list.children();
$items.removeClass("key");
if ('title' == getLastSorted(list)){
$items.each(function(){
var key = $(this).attr("data-key")
if ($("tr[data-key='" + key + "']:first").is($(this))){
if (
$list
.children("[data-key='" + key + "']")
.first()
.is( $(this) )
){
$(this).addClass("key");
}
})
}
})
function getLastSorted(list){
var currentSorted = $(list.listContainer).find(".asc, .desc").attr("data-sort");
if ('undefined' !== typeof currentSorted)
list.lastSorted = currentSorted;
return list.lastSorted;
}
function filterTable(_) {
var rating = this.name;
var index = this.index;