From 81780e8f4f8667c71f2c8bfca3c6a024bb51a849 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Oct 2006 06:44:47 +0100 Subject: [PATCH] preselect active feed cat on edit --- modules/pref-feeds.php | 11 +++++++---- prefs.js | 14 -------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 46b03e891..7e5868aed 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -660,10 +660,13 @@ $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\""; } diff --git a/prefs.js b/prefs.js index d9c10d692..e2cdd1126 100644 --- 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);