From 4710e3dc03ca8e03640d06fe0e2f0d28d31da32c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 22 Oct 2008 08:54:38 +0100 Subject: add (disabled) function to show original article inline in the content pane --- feedlist.js | 7 +++++++ functions.php | 14 ++++++++++++-- images/art-inline.png | Bin 0 -> 255 bytes tt-rss.css | 25 ------------------------- viewfeed.js | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 27 deletions(-) create mode 100644 images/art-inline.png diff --git a/feedlist.js b/feedlist.js index 22b8aeab3..ff4ab7c5a 100644 --- a/feedlist.js +++ b/feedlist.js @@ -428,6 +428,13 @@ function hide_footer_af(effect) { if (c) { c.style.bottom = "0px"; + + var ioa = document.getElementById("inline_orig_article"); + + if (ioa) { + ioa.height = c.offsetHeight; + } + } else { var h = document.getElementById("headlines-frame"); diff --git a/functions.php b/functions.php index 8ecf737d7..b57087c00 100644 --- a/functions.php +++ b/functions.php @@ -4712,8 +4712,18 @@ if (!$zoom_mode) { print "$tags_str (+) - (+)"; + + if (defined('_ENABLE_INLINE_VIEW')) { + + print "Inline"; + + } + + print "Zoom"; diff --git a/images/art-inline.png b/images/art-inline.png new file mode 100644 index 000000000..e18101f76 Binary files /dev/null and b/images/art-inline.png differ diff --git a/tt-rss.css b/tt-rss.css index 5b5d40292..129a8446f 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -316,31 +316,6 @@ div.expPane { margin : 15px; } -iframe { - border : 0px solid white; -} - -iframe.feedsFrameWithActions { - width : 100%; - height : 90%; - margin : 0px; - padding : 0px; -} - -iframe.feedsFrame { - width : 100%; - height : 100%; - margin : 0px; - padding : 0px; -} - -iframe.contentFrame, iframe.headlinesFrame { - width : 100%; - padding : 0px; - margin : 0px; - height : 100%; -} - /*.button { border : 1px solid #d0d0d0; background-image : url("images/button.png"); diff --git a/viewfeed.js b/viewfeed.js index 3810aed20..ba9b13e06 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1904,6 +1904,42 @@ function zoomToArticle(id) { } } +function showOriginalArticleInline(id) { + try { + + var query = "backend.php?op=rpc&subop=getArticleLink&id=" + id; + + notify_progress("Loading, please wait...", true); + + new Ajax.Request(query, { + onComplete: function(transport) { + + if (transport.responseXML) { + + var link = transport.responseXML.getElementsByTagName("link")[0]; + var id = transport.responseXML.getElementsByTagName("id")[0]; + + notify(""); + + if (link && id) { + link = link.firstChild.nodeValue; + + var ci = document.getElementById("content-insert"); + + var tmp = ""; + + render_article(tmp); + + } + } + } }); + + } catch (e) { + exception_error("showOriginalArticleInline", e); + } +} + + function scrollArticle(offset) { try { if (!isCdmMode()) { -- cgit v1.2.3-54-g00ecf