diff options
author | Andrew Dolgov <[email protected]> | 2012-08-14 10:47:24 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-14 10:47:24 +0400 |
commit | 675b51e8ff6bf0e9a34dd4c774e2d619e27df505 (patch) | |
tree | 4f9f8b877de00e7d47a389d895746bf04a78c25c /js/tt-rss.js | |
parent | f5fdc4f4f1de5f078f0eb0c2f678f533c3734452 (diff) | |
parent | 854a2ace869b29f805d203bb74968ef1500eb54b (diff) |
Merge branch 'nested-cats'
Diffstat (limited to 'js/tt-rss.js')
-rw-r--r-- | js/tt-rss.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js index ef5d72e5b..8a82e4c7d 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -42,6 +42,9 @@ function setActiveFeedId(id, is_cat) { selectFeed(id, is_cat); + dijit.byId("include_children").attr("disabled", !(is_cat && id > 0)); + + } catch (e) { exception_error("setActiveFeedId", e); } @@ -61,12 +64,12 @@ function updateFeedList() { } var store = new dojo.data.ItemFileWriteStore({ - url: "backend.php?op=feeds"}); + url: "backend.php?op=pref_feeds&method=getfeedtree&mode=2"}); var treeModel = new fox.FeedStoreModel({ store: store, query: { - "type": "feed" + "type": getInitParam('enable_feed_cats') == 1 ? "category" : "feed" }, rootId: "root", rootLabel: "Feeds", @@ -105,6 +108,8 @@ function updateFeedList() { id: "feedTree", }, "feedTree"); + _force_scheduled_update = true; + /* var menu = new dijit.Menu({id: 'feedMenu'}); menu.addChild(new dijit.MenuItem({ @@ -324,6 +329,13 @@ function init_second_stage() { dijit.getEnclosingWidget(toolbar.order_by).attr('value', getInitParam("default_view_order_by")); + + if (getInitParam("enable_feed_cats") == 0) + Element.hide(dijit.byId("include_children").domNode); + + dijit.byId("include_children").attr("checked", + getInitParam("default_include_children")); + feeds_sort_by_unread = getInitParam("feeds_sort_by_unread") == 1; loading_set_progress(30); |