]> git.wh0rd.org Git - tt-rss.git/commitdiff
mobile: interface tweaks
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 08:59:48 +0000 (09:59 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 08:59:48 +0000 (09:59 +0100)
mobile/functions.php
mobile/mobile.css
mobile/tt-rss.php

index 642055d9f1d98494ab7dab314a3af5293af70141..a251433a1cb7aab77555e2c06458a0bdd08bafc4 100644 (file)
 
                print "<div id=\"heading\">";
                if (!$cat_view && file_exists("../icons/$feed.ico") && filesize("../icons/$feed.ico") > 0) {
-                       print "<img class=\"tinyFeedIcon\" src=\"../icons/$feed.ico\">";
+                       print "<img class=\"feedIcon\" src=\"../icons/$feed.ico\">";
                }
                
                print "$feed_title <span id=\"headingAddon\">(";
-               print "<a href=\"tt-rss.php\">View feeds</a>, ";
+               print "<a href=\"tt-rss.php\">Back</a>, ";
+               print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">Update</a>, ";
                print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Mark as read</a>";
                print ")</span>";
                
        
                if (db_num_rows($result) > 0) {
 
-//                     print "<table class=\"headlines\" cellspacing=\"0\" width=\"100%\">";
-
                        print "<ul class=\"headlines\">";
 
                        $lnum = 0;
                                }
        
                                if ($line["marked"] == "t" || $line["marked"] == "1") {
-                                       $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"../images/mark_set.png\">";
+                                       $marked_pic = "<img class='marked' src=\"../images/mark_set.png\">";
                                } else {
-                                       $marked_pic = "<img id=\"FMARKPIC-$id\" src=\"../images/mark_unset.png\">";
+                                       $marked_pic = "<img class='marked' src=\"../images/mark_unset.png\">";
                                }
        
                                $content_link = "<a href=\"?go=view&id=$id&feed=$feed_id\">" .
                                
                                print "<li class='$class'>";
 
+                               print "<a href=\"?go=vf&id=$feed_id&ts=$id\">$marked_pic</a>";
+
                                print $content_link;
        
                                if ($line["feed_title"]) {                      
 
                        $tags_str = preg_replace("/, $/", "", $tags_str);
 
-                       $parsed_updated = date(get_pref($link, 'LONG_DATE_FORMAT'), 
+                       $parsed_updated = date(get_pref($link, 'SHORT_DATE_FORMAT'), 
                                strtotime($line["updated"]));
 
                        print "<div id=\"heading\">";
-                       print $line["title"] . " <span id=\"headingAddon\">($parsed_updated)</span>";
+
+                       if (file_exists("../icons/$feed_id.ico") && filesize("../icons/$feed_id.ico") > 0) {
+                               print "<img class=\"feedIcon\" src=\"../icons/$feed_id.ico\">";
+                       }
+
+                       $feed_link = "<a href=\"tt-rss.php?go=vf&id=$feed_id\">Feed</a>";
+                       
+                       print truncate_string($line["title"], 30);
+                       print " <span id=\"headingAddon\">$parsed_updated ($feed_link)</span>";
                        print "</div>";
 
                        if ($num_tags > 0) {
                                print "<div class=\"postTags\">Tags: $tags_str</div>";
                        }
-                       
+
                        print $line["content"]; 
                
                }
index 04fedbe87385ca029647c558da49e35c410fa63f..d89f1fefa4b0be284c2bbcbf6eb2f3577563a692 100644 (file)
@@ -171,11 +171,14 @@ ul.headlines span.hlUpdated {
        color : gray;
 }
 
-ul.headlines img {
+ul.headlines img.feedIcon {
        width : 25px;
        text-align : center;
 }
 
+ul.headlines img.marked {
+       border-width : 0px;
+}
 div.postTags {
        color : gray;
 }
@@ -183,3 +186,5 @@ div.postTags {
 #headingAddon {
        font-weight : normal;
 }
+
+
index eb212be0d1ce91df730267f62195487062a5907e..bd799dc6503fd43a2f38d55dfc74cac59cf03765 100644 (file)
                return;
        }
 
+       $ts_id = db_escape_string($_GET["ts"]);
+
+       if ($go == "vf" && $ts_id) {
+               $result = db_query($link, "UPDATE ttrss_user_entries SET marked = NOT marked
+                       WHERE ref_id = '$ts_id' AND owner_uid = " . $_SESSION["uid"]);
+               $query_string = preg_replace("/&ts=[0-9]*/", "", $_SERVER["QUERY_STRING"]);
+               header("Location: tt-rss.php?$query_string");
+               return;
+       }
 ?>
 <html>
 <head>