diff options
author | Andrew Dolgov <[email protected]> | 2010-11-16 14:52:09 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-16 14:52:09 +0300 |
commit | e3387e2d10f9b30af36002c8f058ece94597aaff (patch) | |
tree | c1d9232cfa094c099783f4efcbe9c0908011bce1 | |
parent | 6f3976c9a3a0409b16d1125802b88651213b0aae (diff) |
misc tab fixes
-rw-r--r-- | functions.php | 2 | ||||
-rw-r--r-- | viewfeed.js | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 08d3edfcf..7f2fdd1a0 100644 --- a/functions.php +++ b/functions.php @@ -4635,7 +4635,7 @@ print "<img src=\"".theme_image($link, 'images/digest_checkbox.png')."\" class='tagsPic' style=\"cursor : pointer\" - onclick=\"closeArticlePanel()\" + onclick=\"closeArticlePanel($id)\" alt='Zoom' title='".__('Close this panel')."'>"; } else { diff --git a/viewfeed.js b/viewfeed.js index 2b0b81506..cdb09864f 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1724,11 +1724,15 @@ function zoomToArticle(id) { var cached_article = cache_find(id); + if (dijit.byId("ATAB-" + id)) + return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id)); + if (cached_article) { var article_pane = new dijit.layout.ContentPane({ title: __("Loading...") , content: cached_article, style: 'padding : 0px;', + id: 'ATAB-' + id, closable: true }); dijit.byId("content-tabs").addChild(article_pane); @@ -1757,6 +1761,7 @@ function zoomToArticle(id) { var article_pane = new dijit.layout.ContentPane({ title: "article-" + id , content: content, style: 'padding : 0px;', + id: 'ATAB-' + id, closable: true }); dijit.byId("content-tabs").addChild(article_pane); @@ -2232,7 +2237,12 @@ function headlineActionsChange(elem) { } } -function closeArticlePanel() { +function closeArticlePanel(id) { + + if (id) + if (dijit.byId("ATAB-" + id)) + return dijit.byId("content-tabs").removeChild(dijit.byId("ATAB-" + id)); + if (dijit.byId("content-insert")) dijit.byId("headlines-wrap-inner").removeChild( dijit.byId("content-insert")); |