Java Script wich make gitea table colums sortable by click
https://gitea.com/6543/gitea_sortt
6543
7a48425d11
* window.sortt_url (contains url sort= argument) * window.sortt_f (main routine to reload page with new sort parameter) |
||
---|---|---|
LICENSE | ||
README.md | ||
sortt.js |
gitea_sortt
Java Script for https://github.com/go-gitea/gitea/pull/7980 (Sortable Tables) .. by header click
Routine Idear
- if table head colum class has attribute sort="xy" -> colum header klickable
- Klich at colum header for example
<ID>
- script check if url has already a sort= with
<ID>
- NO: if sort="" indikates default (with * prefix) set URLsort=
- YES: set URLsort variable
- script check if URLsort and sort attribute is same
- YES: check if reverse attribute exist -> YES: generate URL with reverse sort param and open
- NO: generate URL with sort param and open