From 4255b24ccfe9cb813b82df0e150b141d60712593 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 Nov 2005 18:53:50 +0100 Subject: [PATCH] add preferences tab --- prefs.js | 30 ++++++++++++++++++++++++++++++ prefs.php | 3 +++ 2 files changed, 33 insertions(+) diff --git a/prefs.js b/prefs.js index b9973fd2..17042342 100644 --- a/prefs.js +++ b/prefs.js @@ -94,6 +94,19 @@ function labellist_callback() { p_notify(""); } } + +function prefslist_callback() { + var container = document.getElementById('prefContent'); + if (xmlhttp.readyState == 4) { + + container.innerHTML=xmlhttp.responseText; + + p_notify(""); + } +} + + + function notify_callback() { var container = document.getElementById('notify'); if (xmlhttp.readyState == 4) { @@ -708,6 +721,21 @@ function updateLabelList() { xmlhttp.send(null); } +function updatePrefsList() { + + if (!xmlhttp_ready(xmlhttp)) { + printLockingError(); + return + } + + p_notify("Loading, please wait..."); + + xmlhttp.open("GET", "backend.php?op=pref-prefs", true); + xmlhttp.onreadystatechange=prefslist_callback; + xmlhttp.send(null); + +} + function selectTab(id) { if (id == "feedConfig") { @@ -716,6 +744,8 @@ function selectTab(id) { updateFilterList(); } else if (id == "labelConfig") { updateLabelList(); + } else if (id == "genConfig") { + updatePrefsList(); } var tab = document.getElementById(active_tab + "Tab"); diff --git a/prefs.php b/prefs.php index 09fbc9e5..1c4b5e2d 100644 --- a/prefs.php +++ b/prefs.php @@ -45,6 +45,9 @@ + + -- 2.39.5