]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc tab fixes
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 16 Nov 2010 11:52:09 +0000 (14:52 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 16 Nov 2010 11:52:09 +0000 (14:52 +0300)
functions.php
viewfeed.js

index 08d3edfcf83f5c4e0deeec05579d4fd8464248e6..7f2fdd1a0cc661430d26d5a74b93a4f1efdc9e6c 100644 (file)
 
                                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 {
index 2b0b815066ecd18423baa538bb89ce5b4a90b418..cdb09864f0f44d730ac5092feb38e741ef5c2fc7 100644 (file)
@@ -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"));