You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 years ago | |
---|---|---|
LICENSE | 3 years ago | |
README.md | 3 years ago | |
sortt.js | 3 years ago |
README.md
gitea_sortt
Java Script for https://github.com/go-gitea/gitea/pull/7980 (Sortable Tables) .. by header click
sortt( [normsort], (revsort), (isdefault) )
Routine Idear
- add to table head colum onclick="sortt('sort parameters')"
- 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