]> git.wh0rd.org Git - tt-rss.git/commitdiff
closeArticlePanel: fix
authorAndrew Dolgov <fox@fakecake.org>
Tue, 16 Nov 2010 15:55:39 +0000 (18:55 +0300)
committerAndrew Dolgov <fox@fakecake.org>
Tue, 16 Nov 2010 15:55:39 +0000 (18:55 +0300)
viewfeed.js

index 0eb7ff23b2baa152dea0ecff74c12cfbda01bfb1..5a8e929ab080c117d53380c25a9f86cec3383b7f 100644 (file)
@@ -2243,13 +2243,26 @@ function headlineActionsChange(elem) {
        }
 }
 
-function closeArticlePanel(id) {
+function closeArticlePanel() {
 
-       if (id)
+       var tabs = dijit.byId("content-tabs");
+       var child = tabs.selectedChildWidget;
+
+       if (child && tabs.getIndexOfChild(child) > 0) {
+               tabs.removeChild(child);
+               child.destroy();
+       } else {
+               if (dijit.byId("content-insert"))
+                       dijit.byId("headlines-wrap-inner").removeChild(
+                               dijit.byId("content-insert"));
+       }
+
+
+/*     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"));
+                       dijit.byId("content-insert")); */
 }