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

21 lines
882 B
Markdown
Raw Permalink Normal View History

2019-09-18 20:46:16 +00:00
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
2019-09-18 22:33:04 +00:00
[![Release](https://img.shields.io/badge/Release-v1.3.0-brightgreen)](https://gitea.com/6543/gitea_sortt/releases)
2019-09-18 20:46:16 +00:00
2019-08-27 11:59:46 +00:00
# gitea_sortt
2019-08-27 12:03:01 +00:00
Java Script for https://github.com/go-gitea/gitea/pull/7980 (Sortable Tables) .. by header click
2019-08-27 14:35:45 +00:00
sortt( [normsort], (revsort), (isdefault) )
2019-08-27 12:03:01 +00:00
## 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=<default>
- YES: set URLsort variable
* script check if URLsort and sort attribute is same
- YES: check if reverse attribute exist
2019-08-27 12:12:42 +00:00
-> YES: generate URL with reverse sort param and open
- NO: generate URL with sort param and open