diff options
author | Andrew Dolgov <[email protected]> | 2006-03-27 09:59:48 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-03-27 09:59:48 +0100 |
commit | 24ac67762bd554f6585c6b1b873575828b0ad6ca (patch) | |
tree | ce4d2aa1e2d57ba9084a7c5d9b7a561a8ab63fc6 /mobile | |
parent | 0d6b26ba729b3e3b246f1bfcef2b55d99801ef0e (diff) |
mobile: interface tweaks
Diffstat (limited to 'mobile')
-rw-r--r-- | mobile/functions.php | 27 | ||||
-rw-r--r-- | mobile/mobile.css | 7 | ||||
-rw-r--r-- | mobile/tt-rss.php | 9 |
3 files changed, 33 insertions, 10 deletions
diff --git a/mobile/functions.php b/mobile/functions.php index 642055d9f..a251433a1 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -571,11 +571,12 @@ 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>"; @@ -583,8 +584,6 @@ if (db_num_rows($result) > 0) { -// print "<table class=\"headlines\" cellspacing=\"0\" width=\"100%\">"; - print "<ul class=\"headlines\">"; $lnum = 0; @@ -619,9 +618,9 @@ } 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\">" . @@ -636,6 +635,8 @@ print "<li class='$class'>"; + print "<a href=\"?go=vf&id=$feed_id&ts=$id\">$marked_pic</a>"; + print $content_link; if ($line["feed_title"]) { @@ -731,17 +732,25 @@ $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"]; } diff --git a/mobile/mobile.css b/mobile/mobile.css index 04fedbe87..d89f1fefa 100644 --- a/mobile/mobile.css +++ b/mobile/mobile.css @@ -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; } + + diff --git a/mobile/tt-rss.php b/mobile/tt-rss.php index eb212be0d..bd799dc65 100644 --- a/mobile/tt-rss.php +++ b/mobile/tt-rss.php @@ -39,6 +39,15 @@ 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> |