From 4220b0bddbff8ee0ded072f75442a9e8d9a1313f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 May 2006 05:35:20 +0100 Subject: [PATCH] rework filter editor/add infobox layout, misc fixes --- backend.php | 36 ++++++++++++++++-------------------- functions.js | 5 +++++ prefs.js | 10 +++++++++- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/backend.php b/backend.php index a3ba821d..dd94a93b 100644 --- a/backend.php +++ b/backend.php @@ -2132,12 +2132,14 @@ print "Match:  "; + name=\"reg_exp\" class=\"iedit\" value=\"$reg_exp\">"; - print_select_hash("filter_type", $filter_type, $filter_types); + print ""; + + print_select_hash("filter_type", $filter_type, $filter_types, "class=\"iedit\""); print ""; - print "Feed:"; + print "Feed:"; print_feed_select($link, "feed_id", $feed_id); @@ -2145,7 +2147,7 @@ print "Action:"; - print ""; $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions ORDER BY name"); @@ -2254,6 +2256,7 @@ print ""; $result = db_query($link, "SELECT @@ -2346,22 +2349,14 @@ print "

"; - if ($subop == "edit") { - print "Edit filter: - - "; - - } else { - - print " + print " Selection: "; - } + + print "

"; } else { @@ -2793,12 +2788,13 @@ print "Match:  "; - - print_select_hash("filter_type", 1, $filter_types); + name=\"reg_exp\" class=\"iedit\">"; + print ""; + + print_select_hash("filter_type", 1, $filter_types, "class=\"iedit\""); print ""; - print "Feed:"; + print "Feed:"; print_feed_select($link, "feed_id"); @@ -2806,7 +2802,7 @@ print "Action:"; - print ""; $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions ORDER BY name"); diff --git a/functions.js b/functions.js index 89924fed..46c812ed 100644 --- a/functions.js +++ b/functions.js @@ -364,6 +364,11 @@ function disableContainerChildren(id, disable, doc) { var container = doc.getElementById(id); + if (!container) { + //alert("disableContainerChildren: element " + id + " not found"); + return; + } + for (var i = 0; i < container.childNodes.length; i++) { var child = container.childNodes[i]; diff --git a/prefs.js b/prefs.js index d7a616f3..53abc650 100644 --- a/prefs.js +++ b/prefs.js @@ -338,6 +338,8 @@ function editFilter(id) { return } + document.getElementById("create_filter_btn").disabled = true; + selectTableRowsByIdPrefix('prefFilterList', 'FILRR-', 'FICHK-', false); selectTableRowById('FILRR-'+id, 'FICHK-'+id, true); @@ -705,6 +707,8 @@ function filterEditCancel() { printLockingError(); return } + + document.getElementById("create_filter_btn").disabled = false; selectPrefRows('filter', false); // cleanup feed selection closeInfoBox(); @@ -760,7 +764,9 @@ function userEditSave() { } notify("Saving user..."); - + + closeInfoBox(); + var query = Form.serialize("user_edit_form"); xmlhttp.open("GET", "backend.php?" + query, true); @@ -789,6 +795,8 @@ function filterEditSave() { closeInfoBox(); + document.getElementById("create_filter_btn").disabled = false; + xmlhttp.open("GET", "backend.php?" + query, true); xmlhttp.onreadystatechange=filterlist_callback; xmlhttp.send(null); -- 2.39.5