From: Andrew Dolgov Date: Sun, 20 Aug 2006 13:43:58 +0000 (+0100) Subject: sortable label editor X-Git-Tag: schema_freeze_for_1.2.2_(take_2)~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e161a2cc343e7b9dc098036f296ad0f5842a8cb9;p=tt-rss.git sortable label editor --- diff --git a/backend.php b/backend.php index d9a4fe72..5a372586 100644 --- a/backend.php +++ b/backend.php @@ -2414,6 +2414,12 @@ } } + $sort = db_escape_string($_GET["sort"]); + + if (!$sort || $sort == "undefined") { + $sort = "description"; + } + print "
"; print"
PLACEHOLDER
"; @@ -2446,8 +2452,8 @@ print "   - Caption - SQL Expression + Caption + SQL Expression (?) "; diff --git a/prefs.js b/prefs.js index 626d216a..a91d430c 100644 --- a/prefs.js +++ b/prefs.js @@ -1083,13 +1083,14 @@ function updateFilterList(sort_key) { // p_notify("Loading, please wait..."); - xmlhttp.open("GET", "backend.php?op=pref-filters&sort=" + param_escape(sort_key), true); + xmlhttp.open("GET", "backend.php?op=pref-filters&sort=" + + param_escape(sort_key), true); xmlhttp.onreadystatechange=filterlist_callback; xmlhttp.send(null); } -function updateLabelList() { +function updateLabelList(sort_key) { if (!xmlhttp_ready(xmlhttp)) { printLockingError(); @@ -1100,7 +1101,8 @@ function updateLabelList() { // document.getElementById("prefContent").innerHTML = "Loading labels, please wait..."; - xmlhttp.open("GET", "backend.php?op=pref-labels", true); + xmlhttp.open("GET", "backend.php?op=pref-labels&sort=" + + param_escape(sort_key), true); xmlhttp.onreadystatechange=labellist_callback; xmlhttp.send(null); }