}
}
+ $sort = db_escape_string($_GET["sort"]);
+
+ if (!$sort || $sort == "undefined") {
+ $sort = "description";
+ }
+
print "<div class=\"prefGenericAddBox\">";
print"<input type=\"submit\" class=\"button\"
ttrss_labels
WHERE
owner_uid = ".$_SESSION["uid"]."
- ORDER by description");
+ ORDER BY $sort");
// print "<div id=\"infoBoxShadow\"><div id=\"infoBox\">PLACEHOLDER</div></div>";
print "<tr class=\"title\">
<td width=\"5%\"> </td>
- <td width=\"30%\">Caption</td>
- <td width=\"50%\">SQL Expression
+ <td width=\"30%\"><a href=\"javascript:updateLabelList('description')\">Caption</a></td>
+ <td width=\"50%\"><a href=\"javascript:updateLabelList('sql_exp')\">SQL Expression</a>
<a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a>
</td>
</tr>";
// 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();
// 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);
}