rename gobal functin sortt_f to sortt and update Readme

This commit is contained in:
6543 2019-08-27 16:21:33 +02:00
parent 9dcc74c22f
commit d678f2bd02
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ Java Script for https://github.com/go-gitea/gitea/pull/7980 (Sortable Tables) ..




## Routine Idear ## Routine Idear
1. if table head colum class has attribute sort="xy" -> colum header klickable 1. add to table head colum onclick="sortt('sort parameters')"
2. Klich at colum header for example `<ID>` 2. Klich at colum header for example `<ID>`
* script check if url has already a sort= with `<ID>` * script check if url has already a sort= with `<ID>`
- NO: if sort="" indikates default (with * prefix) set URLsort=<default> - NO: if sort="" indikates default (with * prefix) set URLsort=<default>

View File

@ -17,7 +17,7 @@ if (window.sortt_url.indexOf("sort=") < 0) {
window.sortt_url=window.sortt_url.substr(0,window.sortt_url.indexOf("&")); window.sortt_url=window.sortt_url.substr(0,window.sortt_url.indexOf("&"));
} }
//creat global function with main routine //creat global function with main routine
window.sortt_f=function(sort_atr){ window.sortt=function(sort_atr){
//sortTable [sort attribute] //sortTable [sort attribute]


if (sort_atr.length = 0) return; if (sort_atr.length = 0) return;