{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/129","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/129/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/129/events","html_url":"https://github.com/sphinx-doc/testing2/issues/129","id":53254059,"number":129,"title":"extension to make TOC easier to manipulate with js/css","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/extensions","name":"extensions","color":"FFFFFF"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/proposal","name":"proposal","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-02T14:04:53Z","updated_at":"2015-01-02T14:04:58Z","closed_at":"2015-01-02T14:04:54Z","body":"An alternative toctree directive that wraps the HTML TOC in a containing element - a div with class 'toc-holder'. An implementation is here:\n\nhttps://bitbucket.org/djerdo/musette/src/tip/musette/html/sphinxtoctree2.py\n\nThe specific motivation for this is the need to convert a TOC to a YUI TreeView (http://developer.yahoo.com/yui/treeview). With the above extension, the required javascript should is a bit neater than otherwise, eg. something like:\n\n    \n    \n    YAHOO.util.Event.onDOMReady( function() {\n        var holders = YAHOO.util.Dom.getElementsByClassName('toctree-holder', 'div');\n        var holder, tocs, toc, subtocs, tree;\n        for (i=0; i<holders.length; i++) {\n             holder = holders[i];\n              tocs = holder.getElementsByTagName('ul');\n              if (tocs.length) {\n                  toc = tocs[0];\n                  subtocs = toc.getElementsByTagName('ul');\n                  if (!subtocs.length) {\n                  //the TOC has no subtocs, don't want a treeview\n                      continue\n                  }\n                  else {\n                      tree = new YAHOO.widget.TreeView(holder);\n                      tree.render();\n                  }\n              }\n          }\n    })\n    \n    \n\nWithout the extension, it's not as easy to determine if a list is a TOC or not.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/129\n- Originally reported by: Anonymous\n- Originally created at: 2009-03-19T09:20:24.970\n"},"comment":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/comments/68528308","html_url":"https://github.com/sphinx-doc/testing2/issues/129#issuecomment-68528308","issue_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/129","id":68528308,"user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T14:04:58Z","updated_at":"2015-01-02T14:04:58Z","body":"_From Georg Brandl on 2011-09-22 10:14:38+00:00_\n\nRemoving milestone: 1.0 (automated comment)"}}