diff --git a/backend.php b/backend.php
index bb4180449..6a3f7ecf3 100644
--- a/backend.php
+++ b/backend.php
@@ -1426,27 +1426,10 @@
print "
Category: | ";
print "";
- print " | ";
+ print "";
print "
";
}
@@ -1455,8 +1438,6 @@
# $row_class = toggleEvenOdd($row_class);
print "Update Interval: | ";
-// print " |
";
print "";
@@ -2008,24 +1989,7 @@
print " | ";
- $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories
- WHERE owner_uid = ".$_SESSION["uid"]."
- ORDER BY title");
-
- print "";
+ print_feed_cat_select($link, "sfeed_set_fcat", "", "disabled");
print " ";
@@ -2047,8 +2011,6 @@
print "Edit Categories";
- // print "Categories";
-
print "
- ";
-
- print_select("fadd_match", "Title", $filter_types);
-
- print " ";
-
- print " Action: ";
-
- print " ";
-
-/* print " "; */
-
-/* print ""; */
-
print "";
-// print " ";
-
$result = db_query($link, "SELECT
ttrss_filters.id AS id,reg_exp,
ttrss_filter_types.name AS filter_type_name,
@@ -2383,29 +2299,10 @@
print " | | ";
- print "";
- print " | ";
-
+ print "";
+ print_feed_select($link, "iedit_feed", $line["feed_id"]);
+ print " | ";
+
print "";
print_select("iedit_match", $line["filter_type_descr"], $filter_types);
print " | ";
@@ -2504,7 +2401,7 @@
if ($num_matches > 0) {
- print "Query returned $num_matches matches, first 5 follow:
";
+ print "Query returned $num_matches matches, showing first 15:
";
$result = db_query($link,
"SELECT title,
@@ -2513,11 +2410,16 @@
WHERE ($expr) AND
ttrss_user_entries.ref_id = ttrss_entries.id
AND owner_uid = " . $_SESSION["uid"] . "
- ORDER BY date_entered DESC LIMIT 5");
+ ORDER BY date_entered DESC LIMIT 15");
- print "";
+ print "";
+
+ $row_class = "even";
+
while ($line = db_fetch_assoc($result)) {
- print "- ".$line["title"].
+ $row_class = toggleEvenOdd($row_class);
+
+ print "
- ".$line["title"].
" (".$line["feed_title"].")
";
}
print "
";
@@ -2605,7 +2507,7 @@
";
print "
- |
+ |
SQL expression
(?)
|
@@ -2649,7 +2551,7 @@
if (!$line["description"]) $line["description"] = "[No description]";
- print " | ";
print "".$line["sql_exp"]." | ";
@@ -2657,7 +2559,7 @@
} else {
- print " | ";
+ print " | ";
print " | ";
@@ -2879,27 +2781,11 @@
print_select("fadd_match", "Title", $filter_types);
print "
";
- print "Feed: | |
";
+ print "Feed: | ";
+
+ print_feed_select($link, "fadd_feed");
+
+ print " |
";
print "Action: | ";
@@ -3700,113 +3586,6 @@
}
- if ($op == "feed-details") {
-
-// $feed_id = $_GET["id"];
-
- $feed_ids = split(",", db_escape_string($_GET["id"]));
-
- print "Feed details
";
- print "";
-
- foreach ($feed_ids as $feed_id) {
-
- $result = db_query($link,
- "SELECT
- title,feed_url,
- SUBSTRING(last_updated,1,16) as last_updated,
- icon_url,site_url,
- (SELECT COUNT(int_id) FROM ttrss_user_entries
- WHERE feed_id = id) AS total,
- (SELECT COUNT(int_id) FROM ttrss_user_entries
- WHERE feed_id = id AND unread = true) AS unread,
- (SELECT COUNT(int_id) FROM ttrss_user_entries
- WHERE feed_id = id AND marked = true) AS marked
- FROM ttrss_feeds
- WHERE id = '$feed_id' AND owner_uid = ".$_SESSION["uid"]);
-
- if (db_num_rows($result) == 0) return;
-
- $title = db_unescape_string(db_fetch_result($result, 0, "title"));
- $last_updated = date(get_pref($link, 'LONG_DATE_FORMAT'),
- strtotime(db_fetch_result($result, 0, "last_updated")));
- $feed_url = db_fetch_result($result, 0, "feed_url");
- $icon_url = db_fetch_result($result, 0, "icon_url");
- $total = db_fetch_result($result, 0, "total");
- $unread = db_fetch_result($result, 0, "unread");
- $marked = db_fetch_result($result, 0, "marked");
- $site_url = db_fetch_result($result, 0, "site_url");
-
- $result = db_query($link, "SELECT COUNT(id) AS subscribed
- FROM ttrss_feeds WHERE feed_url = '$feed_url' AND private = false");
-
- $subscribed = db_fetch_result($result, 0, "subscribed");
-
- $icon_file = ICONS_DIR . "/$feed_id.ico";
-
- if (file_exists($icon_file) && filesize($icon_file) > 0) {
- $feed_icon = "
";
- } else {
- $feed_icon = "";
- }
-
- print "
$feed_icon $title
";
-
- print "
";
-
- if ($site_url) {
- print "Link |
- $site_url
- (feed) |
-
";
- } else {
- print "Feed URL |
- $feed_url |
";
- }
- print "Last updated | $last_updated |
";
- print "Total articles | $total |
";
- print "Unread articles | $unread |
";
- print "Starred articles | $marked |
";
- print "Subscribed users | $subscribed |
";
-
- print "
";
-
-/* $result = db_query($link, "SELECT title,
- SUBSTRING(updated,1,16) AS updated,unread
- FROM ttrss_entries,ttrss_user_entries
- WHERE ref_id = id AND feed_id = '$feed_id'
- ORDER BY date_entered DESC LIMIT 5");
-
- if (db_num_rows($result) > 0) {
-
- print "
Latest headlines
";
-
- print "
";
-
- while ($line = db_fetch_assoc($result)) {
- if ($line["unread"] == "t" || $line["unread"] == "1") {
- $line["title"] = "" . $line["title"] . "";
- }
- print "- " . $line["title"].
- " (" .
- date(get_pref($link, 'SHORT_DATE_FORMAT'),
- strtotime($line["updated"])).
- ")
";
- }
-
- print "
";
-
- } */
- }
-
- print "
";
-
- print "
-
";
- }
-
if ($op == "pref-feed-browser") {
if (!ENABLE_FEED_BROWSER) {
diff --git a/functions.php b/functions.php
index 06b142d73..343315eb1 100644
--- a/functions.php
+++ b/functions.php
@@ -665,6 +665,20 @@
print "";
}
+ function print_select_hash($id, $values, $default, $attributes = "") {
+ print "";
+ }
+
function get_filter_name($title, $content, $link, $filters) {
if ($filters["title"]) {
@@ -1565,4 +1579,61 @@
}
}
+ function print_feed_select($link, $id, $default_id = "",
+ $attributes = "", $include_all_feeds = true) {
+
+ print "";
+ }
+
+ function print_feed_cat_select($link, $id, $default_id = "",
+ $attributes = "", $include_all_cats = true) {
+
+ print "";
+ }
+
?>
diff --git a/prefs.js b/prefs.js
index 04c5266b6..699095ba7 100644
--- a/prefs.js
+++ b/prefs.js
@@ -405,15 +405,8 @@ function editFeed(feed) {
active_feed = feed;
-/* xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=edit&id=" +
- param_escape(feed), true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null); */
-
+ // clean selection from all rows & select row being edited
selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-', 'FRCHK-', false);
-// selectTableRowsByIdPrefix('prefFeedList', 'FEEDR-'+feed, 'FRCHK-'+feed,
-// true, false);
-
selectTableRowById('FEEDR-'+feed, 'FRCHK-'+feed, true);
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=editfeed&id=" +
@@ -665,14 +658,9 @@ function feedEditCancel() {
closeInfoBox();
- active_feed = false;
-
-// notify("Operation cancelled.");
-
-/* xmlhttp.open("GET", "backend.php?op=pref-feeds", true);
- xmlhttp.onreadystatechange=feedlist_callback;
- xmlhttp.send(null); */
+ selectPrefRows('feed', false); // cleanup feed selection
+ active_feed = false;
}
function feedCatEditCancel() {
@@ -764,6 +752,8 @@ function feedEditSave() {
"&pfeed=" + param_escape(parent_feed_id) + "&pass=" + param_escape(auth_pass) +
"&is_pvt=" + param_escape(is_pvt) + "&is_rtl=" + param_escape(is_rtl);
+ selectPrefRows('feed', false); // cleanup feed selection
+
xmlhttp.open("POST", "backend.php", true);
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
@@ -1298,6 +1288,13 @@ function selectTab(id, noupdate) {
notify("Loading, please wait...", true);
+ // clean up all current selections, just in case
+ active_feed = false;
+ active_feed_cat = false;
+ active_filter = false;
+ active_label = false;
+ active_user = false;
+
if (id == "feedConfig") {
updateFeedList();
} else if (id == "filterConfig") {
diff --git a/tt-rss.css b/tt-rss.css
index 3c93b7ff6..43128a7ec 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -807,30 +807,6 @@ table.headlinesList tr td {
padding : 2px 0px 2px 0px;
}
-/*
-tr.even td.headlineContent, tr.evenUnread td.headlineContent {
- display : block;
- overflow : hidden;
- height : 1em;
- background-color : #f0f0f0;
-}
-
-tr.odd td.headlineContent, tr.oddUnread td.headlineContent {
- display : block;
- overflow : hidden;
- height : 1em;
-}
-
-tr.oddSelected td.headlineContent,
-tr.evenSelected td.headlineContent,
-tr.oddUnreadSelected td.headlineContent,
-tr.evenUnreadSelected td.headlineContent {
- display : block;
- overflow : hidden;
- height : 1em;
- background-color : #e0e0ff;
-} */
-
div.postHeader td.postDate {
font-size : x-small;
text-align : right;
@@ -952,6 +928,16 @@ ul.userFeedList {
-moz-border-radius : 5px;
} */
+ul.filterTestResults {
+ height : 300px;
+ overflow : auto;
+ list-style-type : none;
+ margin : 0px 0px 5px 0px;
+ padding : 0px;
+ border : 1px solid #88b0f0;
+ background-color : white;
+}
+
ul.browseFeedList {
height : 300px;
overflow : auto;