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.
gitea_sortt/README.md
2019-08-27 14:12:42 +02:00

632 B

gitea_sortt

Java Script for https://github.com/go-gitea/gitea/pull/7980 (Sortable Tables) .. by header click

Routine Idear

  1. if table head colum class has attribute sort="xy" -> colum header klickable
  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