]> git.wh0rd.org Git - tt-rss.git/commitdiff
code cleanups, show selected feed in feedlist, tell magpie to use UTF-8
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 26 Aug 2005 01:13:22 +0000 (02:13 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 26 Aug 2005 01:13:22 +0000 (02:13 +0100)
backend.php
functions.php
tt-rss.css
tt-rss.js

index cc9b6b492846eccf9614619c9f25bb59f1d2d57f..6dd80a41497eec798731bfb81d72af8264fa4e72 100644 (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;
 
 
                        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>";
index 305c8425e7da4e449cf8405f4b8f2c6eaeec8ea1..f3ff6a1f997b4d19d00e3b68a12cb35948c6a3fa 100644 (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
index 9e7d9eb92374ed8c3a4d258de4c44a7d5f779e03..8b4e69ebb84335e998458748b9d7819c4b6ba925 100644 (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;
 }
index cfc6b0d94b231e28de8f02c8f9a047f46b6e736e..e1a4f3857a193a7ccfdb117b735cc63f57dbb8a3 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -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";