From: Andrew Dolgov Date: Fri, 5 Sep 2008 07:36:57 +0000 (+0100) Subject: add function to open article summary in a popup window X-Git-Tag: 1.2.27~25 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eedfb635ddde041201c6b5cd683c60cd6ba2ad12;p=tt-rss.git add function to open article summary in a popup window --- diff --git a/backend.php b/backend.php index 116b04b5..a632fafa 100644 --- a/backend.php +++ b/backend.php @@ -227,6 +227,8 @@ if ($mode == "") { outputArticleXML($link, $id, $feed_id); + } else if ($mode == "zoom") { + outputArticleXML($link, $id, $feed_id, true, true); } else { catchupArticleById($link, $id, 0); } diff --git a/functions.php b/functions.php index 0e34af34..701d3ec5 100644 --- a/functions.php +++ b/functions.php @@ -4533,7 +4533,8 @@ return vsprintf(__(array_shift($args)), $args); } - function outputArticleXML($link, $id, $feed_id, $mark_as_read = true) { + function outputArticleXML($link, $id, $feed_id, $mark_as_read = true, + $zoom_mode = false) { /* we can figure out feed_id from article id anyway, why do we * pass feed_id here? */ @@ -4543,7 +4544,7 @@ $feed_id = db_fetch_result($result, 0, "feed_id"); - print "
+ Tiny Tiny RSS - ".$line["title"]." + + "; + } + + print "
"; print "
'; + if (!$tags_nolinks_str) $tags_nolinks_str = ''.__('no tags').''; print "
- Tags - $tags_str - (+)
-
$entry_comments
"; + Tags"; + + if (!$zoom_mode) { + print "$tags_str + (+) + Zoom"; + } else { + print "$tags_nolinks_str"; + } + print "
"; + print "
$entry_comments
"; print "
"; @@ -4750,7 +4775,16 @@ } - print "]]>
"; + if (!$zoom_mode) { + print "]]>"; + } else { + print " +
+
"; + print ""; + + } } @@ -5258,6 +5292,11 @@ print "$marked_pic "; print "$published_pic "; + print "Zoom"; $tags = get_article_tags($link, $id); diff --git a/images/art-zoom.png b/images/art-zoom.png new file mode 100644 index 00000000..5f7c8095 Binary files /dev/null and b/images/art-zoom.png differ diff --git a/viewfeed.js b/viewfeed.js index e14911a2..5813f413 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1892,3 +1892,14 @@ function invertHeadlineSelection() { function getArticleUnderPointer() { return post_under_pointer; } + +function zoomToArticle(id) { + try { + var w = window.open("backend.php?op=view&mode=zoom&id=" + param_escape(id), + "ttrss_zoom_" + id, + "status=0,toolbar=0,location=0,width=450,height=300,scrollbars=1,menubar=0"); + + } catch (e) { + exception_error("zoomToArticle", e); + } +}