]> git.wh0rd.org Git - tt-rss.git/commitdiff
highlight selected feed in preferences
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 26 Aug 2005 06:09:12 +0000 (07:09 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 26 Aug 2005 06:09:12 +0000 (07:09 +0100)
prefs.js

index e133867c70abecc1155ebcd442ec056125d6c69d..92bbd67d838c816fdacd38a0372e3392d70eac38 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -5,6 +5,8 @@
 
 var xmlhttp = false;
 
+var active_feed = false;
+
 /*@cc_on @*/
 /*@if (@_jscript_version >= 5)
 // JScript gives us Conditional compilation, we can cope with old IE versions.
@@ -29,6 +31,19 @@ function feedlist_callback() {
        var container = document.getElementById('feeds');
        if (xmlhttp.readyState == 4) {
                container.innerHTML=xmlhttp.responseText;
+
+               if (active_feed) {
+                       var row = document.getElementById("FEEDR-" + active_feed);
+                       if (row) {
+                               if (!row.className.match("Selected")) {
+                                       row.className = row.className + "Selected";
+                               }               
+                       }
+                       var checkbox = document.getElementById("FRCHK-" + active_feed);
+                       if (checkbox) {
+                               checkbox.checked = true;
+                       }
+               }
        }
 }
 
@@ -103,6 +118,8 @@ function editFeed(feed) {
                return
        }
 
+       active_feed = feed;
+
        xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=edit&id=" +
                param_escape(feed), true);
        xmlhttp.onreadystatechange=feedlist_callback;
@@ -209,6 +226,8 @@ function feedEditCancel() {
                return
        }
 
+       active_feed = false;
+
        notify("Operation cancelled.");
 
        xmlhttp.open("GET", "backend.php?op=pref-feeds", true);