From 0666e120e8915920070dc18273cd67787484f103 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 20 May 2006 13:51:39 +0100 Subject: [PATCH] feed cat editor uses prototype --- backend.php | 30 ++++++++++++++++++++++-------- prefs.js | 8 ++++---- tt-rss.css | 6 +++++- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/backend.php b/backend.php index 267cc7dc9..d203af3fa 100644 --- a/backend.php +++ b/backend.php @@ -1982,6 +1982,8 @@ if (db_num_rows($result) != 0) { + print "
"; + print "

"; @@ -2005,9 +2007,13 @@ $edit_cat_id = $_GET["id"]; - if ($subop == "editCat" && $cat_id != $edit_cat_id) { - $class .= "Grayed"; - $this_row_id = ""; + if ($subop == "editCat") { + if ($cat_id != $edit_cat_id) { + $class .= "Grayed"; + $this_row_id = ""; + } else { + $class .= "Selected"; + } } else { $this_row_id = "id=\"FCATR-$cat_id\""; } @@ -2026,16 +2032,22 @@ } else if ($cat_id != $edit_cat_id) { - print ""; print ""; } else { - print ""; + print ""; - print ""; + print ""; } @@ -2045,15 +2057,17 @@ } print "
$edit_title"; + + print ""; + print ""; + print ""; + + print "
"; + + print "

"; print "

"; if ($subop == "editCat") { print "Edit category:  + onclick=\"javascript:feedCatEditSave()\" value=\"Save\"> "; + onclick=\"javascript:feedCatEditCancel()\" value=\"Cancel\">"; } else { print " diff --git a/prefs.js b/prefs.js index ec65e8399..c98dbcc8d 100644 --- a/prefs.js +++ b/prefs.js @@ -719,11 +719,11 @@ function feedCatEditSave() { notify("Saving category..."); - var cat_title = document.getElementById("iedit_title").value; +// var cat_title = document.getElementById("iedit_title").value; - xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=saveCat&id=" + - param_escape(active_feed_cat) + "&title=" + param_escape(cat_title), - true); + var query = Form.serialize("feed_cat_edit_form"); + + xmlhttp.open("GET", "backend.php?" + query, true); xmlhttp.onreadystatechange=feedlist_callback; xmlhttp.send(null); diff --git a/tt-rss.css b/tt-rss.css index f9e109df6..a59779737 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -287,11 +287,15 @@ a:hover { background-color : #f0fff0; } -.iedit { +input.iedit { width : 100%; padding-left : 2px; } +select.iedit { + width : 100%; +} + input.editbox { width : 200px; padding-left : 2px;