code cleanups, show selected feed in feedlist, tell magpie to use UTF-8

This commit is contained in:
Andrew Dolgov 2005-08-26 02:13:22 +01:00
parent 2d84262b14
commit a3ee2a382f
4 changed files with 22 additions and 6 deletions

View File

@ -30,7 +30,7 @@
WHERE feed_id = ttrss_feeds.id AND unread = true) as unread
FROM ttrss_feeds ORDER BY title");
print "<table width=\"100%\" class=\"feeds\">";
print "<table width=\"100%\" class=\"feeds\" id=\"feedsList\">";
$lnum = 0;
@ -302,7 +302,8 @@
print "<td id='FUPDPIC-$id' valign='center' class='headlineUpdateMark'>$update_pic</td>";
print "<td class='headlineUpdated'>".$line["updated"]."</td>";
print "<td class='headlineUpdated'>
<a href=\"javascript:view($id,$feed_id);\">".$line["updated"]."</a></td>";
print "<td class='headlineTitle'>$content_link</td>";
print "</tr>";

View File

@ -1,6 +1,8 @@
<?
require_once 'config.php';
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
function purge_old_posts() {
if (PURGE_OLD_DAYS) {
$result = pg_query("DELETE FROM ttrss_entries WHERE

View File

@ -237,6 +237,17 @@ table.prefFeedList tr.title td {
border-style : solid;
}
.evenUnreadSelected, .evenSelectedUnread {
background-color : #e0e0ff;
font-weight : bold;
}
.oddUnreadSelected, .oddSelectedUnread {
background-color : #e0e0ff;
font-weight : bold;
}
.evenSelected {
background-color : #e0e0ff;
}

View File

@ -97,10 +97,12 @@ function viewfeed_callback() {
feedr.className = feedr.className.replace("Unread", "");
}
cleanSelected("feedsList");
feedr.className = feedr.className + "Selected";
}
var searchbox = document.getElementById("searchbox");
searchbox.value = search_query;
notify("");
@ -277,8 +279,8 @@ function viewfeed(feed, skip, subop) {
}
function cleanSelectedHeadlines() {
var content = document.getElementById("headlinesList");
function cleanSelected(element) {
var content = document.getElementById(element);
var rows = new Array();
@ -312,7 +314,7 @@ function view(id,feed_id) {
total_unread--;
}
cleanSelectedHeadlines();
cleanSelected("headlinesList");
crow.className = crow.className + "Selected";