Widget:indexSorterGrouper: Difference between revisions
Jump to navigation
Jump to search
Added reverse sorting and some name bugfix |
m Fixed a sort order bug |
||
Line 234: | Line 234: | ||
function tdollSorterActiveButton(butt) { | function tdollSorterActiveButton(butt) { | ||
$('[data-tdollsortbutton="true"]').removeClass("enabled"); | var isAscending = $(butt).is('.ascending') | ||
$('[data-tdollsortbutton="true"]').removeClass("enabled").removeClass("ascending"); | |||
$(butt).addClass("enabled"); | $(butt).addClass("enabled"); | ||
if ( | if (isAscending) { | ||
return -1; | |||
return 1; | |||
} else { | } else { | ||
$(butt).addClass('ascending'); | $(butt).addClass('ascending'); | ||
return | return 1; | ||
} | } | ||
} | } |
Revision as of 18:25, 1 May 2018
Released on this server: