summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-19 21:14:36 +0300
committerAndrew Dolgov <[email protected]>2010-11-19 21:14:36 +0300
commitca07f49ee0b746b763228dcb27e58ebbef1ddc7a (patch)
tree58bfd6eb84f1c5831131b8e35496623a8f321284
parentb509d64e960fd527a35366f44ee022ce831ae9f8 (diff)
opening articles in new tab tweaks
-rw-r--r--functions.php2
-rw-r--r--viewfeed.js13
2 files changed, 10 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index da1171a01..dd42ea4fc 100644
--- a/functions.php
+++ b/functions.php
@@ -4660,7 +4660,7 @@
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);
diff --git a/viewfeed.js b/viewfeed.js
index dbcbaa29e..dadbe9485 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -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 {