]> git.wh0rd.org - tt-rss.git/commitdiff
preselect active feed cat on edit
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 4 Oct 2006 05:44:47 +0000 (06:44 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 4 Oct 2006 05:44:47 +0000 (06:44 +0100)
modules/pref-feeds.php
prefs.js

index 46b03e8913593466c712bcbc6e542433929d6cc8..7e5868aed504c1d0147c4867ecad1f5d84054fc9 100644 (file)
                                        $cat_id = $line["id"];
                
                                        $edit_cat_id = $_GET["id"];
-               
-                                       if ($action == "edit" && $cat_id != $edit_cat_id) {
-                                                       $class .= "Grayed";
-                                                       $this_row_id = "";
+
+                                       if ($action == "edit" && $cat_id == $edit_cat_id) {
+                                               $class .= "Selected";
+                                               $this_row_id = "";
+                                       } else if ($action == "edit" && $cat_id != $edit_cat_id) {
+                                               $class .= "Grayed";
+                                               $this_row_id = "";
                                        } else {
                                                $this_row_id = "id=\"FCATR-$cat_id\"";
                                        }
index d9c10d692bf43608f0dc044d0511d9b20ec7290a..e2cdd1126d751ecaebf4700f25175971153337d6 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -31,20 +31,6 @@ function feedlist_callback() {
                        var container = document.getElementById('prefContent'); 
                        container.innerHTML=xmlhttp.responseText;
                        selectTab("feedConfig", true);
-
-                       if (active_feed_cat) {
-                               var row = document.getElementById("FCATR-" + active_feed_cat);
-                               if (row) {
-                                       if (!row.className.match("Selected")) {
-                                               row.className = row.className + "Selected";
-                                       }               
-                               }
-                               var checkbox = document.getElementById("FCCHK-" + active_feed_cat);
-                               if (checkbox) {
-                                       checkbox.checked = true;
-                               }
-                       }
-
                        notify("");
                } catch (e) {
                        exception_error("feedlist_callback", e);