From: Andrew Dolgov Date: Tue, 16 Nov 2010 15:55:39 +0000 (+0300) Subject: closeArticlePanel: fix X-Git-Tag: 1.5.0~186 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0b461ed5f05cbd91ac14209316090c7ac4772ae5;p=tt-rss.git closeArticlePanel: fix --- diff --git a/viewfeed.js b/viewfeed.js index 0eb7ff23..5a8e929a 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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")); */ }