]> git.wh0rd.org Git - tt-rss.git/commitdiff
more digest page improvements
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 11 Sep 2010 07:33:47 +0000 (11:33 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 11 Sep 2010 07:33:47 +0000 (11:33 +0400)
digest.css
digest.js

index b0d17b4fc4206cfd2e116e0498135f8d96490d6b..b94044f98cf6a594bb7ada04c70ba07f3d8f5845 100644 (file)
@@ -116,6 +116,19 @@ a:hover {
 
 #feeds ul#feeds-content li {
        margin : 0px 0px 2px 0px;
+       padding : 2px;
+}
+
+#feeds ul#feeds-content li.selected {
+       background : #f0f0f0;
+}
+
+#feeds ul#feeds-content li.selected a {
+       color : #404040;
+}
+
+#feeds ul#feeds-content li.selected a:hover {
+       color : #659a4c;
 }
 
 #feeds ul#feeds-content {
@@ -148,7 +161,7 @@ a:hover {
        float : right;
 }
 
-#headlines ul#headlines-content img {
+#headlines ul#headlines-content img.icon {
        width : 16px;
        height : 16px;
        vertical-align : middle;
@@ -186,6 +199,10 @@ a:hover {
        color : #404040;
 }
 
+#headlines ul#headlines-content div.content img {
+       max-width : 75%;
+}
+
 #headlines ul#headlines-content div.body {
        margin-left : 21px;
        /*margin-left : 42px;*/
index 2a886a89bd243c55c7f39a61a45ad062873594e5..0e567193f18f36dbc718b6cfba10615843e5ce1b 100644 (file)
--- a/digest.js
+++ b/digest.js
@@ -4,6 +4,22 @@ var _active_feed_id = false;
 var _active_feed_offset = false;
 var _update_timeout = false;
 
+function mark_selected_feed(feed_id) {
+       try {
+               var feeds = $("feeds-content").getElementsByTagName("LI");
+
+               for (var i = 0; i < feeds.length; i++) {
+                       if (feeds[i].id == "F-" + feed_id)
+                               feeds[i].className = "selected";
+                       else
+                               feeds[i].className = "";
+               }
+
+       } catch (e) {
+               exception_error("mark_selected_feed", e);
+       }
+}
+
 function zoom(article_id) {
        try {
                var elem = $('A-' + article_id);
@@ -103,7 +119,8 @@ function viewfeed(feed_id, offset) {
                                digest_update(transport, feed_id);
                                _active_feed_id = feed_id;
                                _active_feed_offset = offset;
-                               } });
+                               mark_selected_feed(feed_id);
+                       } });
 
        } catch (e) {
                exception_error("view", e);
@@ -169,7 +186,7 @@ function add_feed_entry(feed) {
 
                icon_part = "<img src='" + get_feed_icon(feed) + "'/>";
 
-               var tmp_html = "<li>" + 
+               var tmp_html = "<li id=\"F-"+feed.id+"\">" + 
                        icon_part +
                        "<a href=\"#\" onclick=\"viewfeed("+feed.id+")\">" + feed.title +
                        "<div class='unread-ctr'>" + feed.unread + "</div>" +   
@@ -199,7 +216,7 @@ function add_headline_entry(article, feed) {
                var icon_part = "";
 
                if (article.has_icon) 
-                       icon_part = "<img src='icons/" + article.feed_id + ".ico'/>";
+                       icon_part = "<img class='icon' src='icons/" + article.feed_id + ".ico'/>";
 
                var tmp_html = "<li id=\"A-"+article.id+"\">" + 
                        icon_part +