]> git.wh0rd.org Git - tt-rss.git/commitdiff
opening articles in new tab tweaks
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 18:14:36 +0000 (21:14 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 18:14:36 +0000 (21:14 +0300)
functions.php
viewfeed.js

index da1171a01f3afb634aaedcbbe8c9f11574de55e4..dd42ea4fc3939912dee50a2c4484852fdafbbe4e 100644 (file)
 
                                print "<img src=\"".theme_image($link, 'images/art-zoom.png')."\" 
                                                class='tagsPic' style=\"cursor : pointer\"
-                                               onclick=\"zoomToArticle(event, $id)\"
+                                               onclick=\"postOpenInNewTab(event, $id)\"
                                                alt='Zoom' title='".__('Open article in new tab')."'>";
 
                                $note_escaped = htmlspecialchars($line['note'], ENT_QUOTES);
index dbcbaa29ef3d80cfbc05b942e3b47c1405722eeb..dadbe94852fd021e8234a4b18abdb93a5bba8953 100644 (file)
@@ -210,13 +210,13 @@ function render_article(article) {
                dijit.byId("headlines-wrap-inner").addChild(
                                dijit.byId("content-insert"));
 
-               var c = $("content-insert");
+               var c = dijit.byId("content-insert");
 
                try {
-                       c.scrollTop = 0;
+                       c.domNode.scrollTop = 0;
                } catch (e) { };
                
-               c.innerHTML = article;
+               c.attr('content', article);
 
                correctHeadlinesOffset(getActiveArticleId());           
 
@@ -2073,7 +2073,7 @@ function postClicked(event, id) {
                if (!event.ctrlKey) {
                        return true;
                } else {
-                       zoomToArticle(event, id);
+                       postOpenInNewTab(event, id);
                        return false;
                }
 
@@ -2087,6 +2087,11 @@ function hlOpenInNewTab(event, id) {
        zoomToArticle(event, id);
 }
 
+function postOpenInNewTab(event, id) {
+       closeArticlePanel(id);
+       zoomToArticle(event, id);
+}
+
 function hlClicked(event, id) {
        try {