mobile: interface tweaks

This commit is contained in:
Andrew Dolgov 2006-03-27 09:59:48 +01:00
parent 0d6b26ba72
commit 24ac67762b
3 changed files with 33 additions and 10 deletions

View file

@ -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"];
}

View 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;
}

View file

@ -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>