]> git.wh0rd.org - tt-rss.git/commitdiff
add (disabled) function to show original article inline in the content pane
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 22 Oct 2008 07:54:38 +0000 (08:54 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 22 Oct 2008 07:54:38 +0000 (08:54 +0100)
feedlist.js
functions.php
images/art-inline.png [new file with mode: 0644]
tt-rss.css
viewfeed.js

index 22b8aeab3b434e5d1b0f81d3d003677c11e70d31..ff4ab7c5afb298851746f2fc2b74d70cc111a291 100644 (file)
@@ -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");
 
index 8ecf737d7f47205c78fb96e2154a465a3881a4e0..b57087c00ee05d2696285afc437b66b6bd6be7b9 100644 (file)
                        if (!$zoom_mode) {
                                print "$tags_str 
                                        <a title=\"".__('Edit tags for this article')."\" 
-                                               href=\"javascript:editArticleTags($id, $feed_id)\">(+)</a>                              
-                                       <img src=\"images/art-zoom.png\" class='tagsPic' 
+                                       href=\"javascript:editArticleTags($id, $feed_id)\">(+)</a>";
+
+                               if (defined('_ENABLE_INLINE_VIEW')) {
+
+                                       print "<img src=\"images/art-inline.png\" class='tagsPic' 
+                                                       onclick=\"showOriginalArticleInline($id)\"
+                                                       alt='Inline' title='".__('Display original article content')."'>";
+
+                               }
+
+                               print "<img src=\"images/art-zoom.png\" class='tagsPic' 
+                                               style=\"cursor : pointer\"
                                                style=\"cursor : pointer\"
                                                onclick=\"zoomToArticle($id)\"
                                                alt='Zoom' title='".__('Show article summary in new window')."'>";
diff --git a/images/art-inline.png b/images/art-inline.png
new file mode 100644 (file)
index 0000000..e18101f
Binary files /dev/null and b/images/art-inline.png differ
index 5b5d40292cd82b43270064f758538cf028211870..129a8446f04990bc2829f216526902be4219ecb7 100644 (file)
@@ -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");
index 3810aed20a5db3d99b8a6a1d9c9766ee5ccd7e2a..ba9b13e06fabc95b556dbf7256d36149ab786fb5 100644 (file)
@@ -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 = "<iframe id=\"inline_orig_article\" width=\""+ci.offsetWidth+"\" height=\""+ci.offsetHeight+"\" style=\"border-width : 0px;\" src=\""+link+"\"></iframe>";
+
+                                               render_article(tmp);
+
+                                       }
+                               }
+                       } });
+
+       } catch (e) {
+               exception_error("showOriginalArticleInline", e);
+       }
+}
+
+
 function scrollArticle(offset) {
        try {
                if (!isCdmMode()) {