summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--backend.php16
-rw-r--r--config.php-dist5
-rw-r--r--tt-rss.css8
-rw-r--r--tt-rss.js15
-rw-r--r--tt-rss.php4
6 files changed, 42 insertions, 8 deletions
diff --git a/TODO b/TODO
index d86acab7a..7459b5f8a 100644
--- a/TODO
+++ b/TODO
@@ -9,4 +9,4 @@ Mysterious Future
- Gmail-like labels for feed categories (needs UI thinking)
- support for "starred" posts (+ maybe Starred label)
- global search
-
+- optional three column layout
diff --git a/backend.php b/backend.php
index 03c7bb07a..89e517160 100644
--- a/backend.php
+++ b/backend.php
@@ -186,11 +186,23 @@
$result = pg_query("UPDATE ttrss_entries SET unread = false,last_read = NOW() WHERE id = '$id'");
+ $addheader = $_GET["addheader"];
+
$result = pg_query("SELECT title,link,content,feed_id,comments,
(SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url
FROM ttrss_entries
WHERE id = '$id'");
+ if ($addheader) {
+
+ print "<html>
+ <head>
+ <title>Tiny Tiny RSS : Article $id</title>
+ <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
+ <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
+ </head><body>";
+ }
+
if ($result) {
$line = pg_fetch_assoc($result);
@@ -226,6 +238,10 @@
print "</table>";
}
+
+ if ($addheader) {
+ print "</body></html>";
+ }
}
if ($op == "viewfeed") {
diff --git a/config.php-dist b/config.php-dist
index e441a94be..0860c8f7f 100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -22,6 +22,9 @@
define(ENABLE_PREFS_CATCHUP_UNCATCHUP, false);
// enable "Mark as read/unread" buttons in preferences dialog
-
+
+ define(ENABLE_CONTENT_IFRAME, true);
+ // show article in an iframe to mitigate scrolling UI issues
+
?>
diff --git a/tt-rss.css b/tt-rss.css
index f2c15c64c..3c3dae031 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -375,4 +375,10 @@ div.expPane {
margin : 15px;
}
-
+iframe.contentFrame {
+ width : 100%;
+ border-width : 0px;
+ padding : 0px;
+ margin : 0px;
+ height : 100%;
+}
diff --git a/tt-rss.js b/tt-rss.js
index 53360f813..de262f91c 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -423,11 +423,16 @@ function view(id,feed_id) {
active_post_id = id;
- xmlhttp_view.open("GET", "backend.php?op=view&id=" + param_escape(id), true);
- xmlhttp_view.onreadystatechange=view_callback;
- xmlhttp_view.send(null);
-
+ var content = document.getElementById("content-frame");
+ if (content) {
+ content.src = "backend.php?op=view&addheader=true&id=" + param_escape(id);
+ markHeadline(active_post_id);
+ } else {
+ xmlhttp_view.open("GET", "backend.php?op=view&id=" + param_escape(id), true);
+ xmlhttp_view.onreadystatechange=view_callback;
+ xmlhttp_view.send(null);
+ }
}
function timeout() {
@@ -615,4 +620,6 @@ function init() {
updateFeedList(false, false);
document.onkeydown = hotkey_handler;
setTimeout("timeout()", 1800*1000);
+
+ var content = document.getElementById("content");
}
diff --git a/tt-rss.php b/tt-rss.php
index 338b3efc8..e4efe330b 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -46,7 +46,9 @@
</td>
</tr>
<td class="content" id="content" valign="top">
- &nbsp;
+ <? if (ENABLE_CONTENT_IFRAME) { ?>
+ <iframe id="content-frame" class="contentFrame">
+ <? } ?>
</td>
</tr>
<tr>