]> git.wh0rd.org - tt-rss.git/blobdiff - prefs.js
display help_text in prefs editor
[tt-rss.git] / prefs.js
index b9973fd2e6925c7cc3ad8b4ed2e8bcc4d12c805f..3e8b6b18102b0fc15f3b72e3dc14531788f4414f 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -94,6 +94,28 @@ function labellist_callback() {
                p_notify("");
        }
 }
+
+function prefslist_callback() {
+       var container = document.getElementById('prefContent');
+       if (xmlhttp.readyState == 4) {
+
+               container.innerHTML=xmlhttp.responseText;
+
+               p_notify("");
+       }
+}
+
+function gethelp_callback() {
+       var container = document.getElementById('prefHelpBox');
+       if (xmlhttp.readyState == 4) {
+
+               container.innerHTML = xmlhttp.responseText;
+               container.style.display = "block";
+
+       }
+}
+
+
 function notify_callback() {
        var container = document.getElementById('notify');
        if (xmlhttp.readyState == 4) {
@@ -708,6 +730,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 +753,8 @@ function selectTab(id) {
                updateFilterList();
        } else if (id == "labelConfig") {
                updateLabelList();
+       } else if (id == "genConfig") {
+               updatePrefsList();
        }
 
        var tab = document.getElementById(active_tab + "Tab");
@@ -749,9 +788,33 @@ function init() {
                return;
        }
 
-       selectTab("feedConfig");
+       selectTab("genConfig");
 
        document.onkeydown = hotkey_handler;
        notify("");
 
 }
+
+/*
+var help_topic_id = false;
+
+function do_dispOptionHelp() {
+
+       if (!xmlhttp_ready(xmlhttp))
+               return;
+
+       xmlhttp.open("GET", "backend.php?op=pref-prefs&subop=getHelp&pn=" +
+               param_escape(help_topic_id), true);
+       xmlhttp.onreadystatechange=gethelp_callback;
+       xmlhttp.send(null);
+
+}
+
+function dispOptionHelp(event, sender) {
+
+       help_topic_id = sender.id;
+
+//     document.setTimeout("do_dispOptionHelp()", 100);
+
+} */
+