Java Script wich make gitea table colums sortable by click https://gitea.com/6543/gitea_sortt
This repository has been archived on 2020-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
6543 ce51b467c4
use URL object insten of String operations
thanks to davydov-vyacheslav
2019-08-28 02:34:37 +02:00
LICENSE Improfe meta infos 2019-08-27 14:11:42 +02:00
README.md changes for onclick 2019-08-27 16:35:45 +02:00
sortt.js use URL object insten of String operations 2019-08-28 02:34:37 +02:00

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

  1. add to table head colum onclick="sortt('sort parameters')"
  2. 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