Fix revealing disabled docs in the sidebar

pull/359/merge
Thibaut Courouble 9 years ago
parent cad624613c
commit 578ba0acab

@ -56,7 +56,7 @@ templates.sidebarDisabledList = (html) ->
"""<div class="_disabled-list">#{html}</div>""" """<div class="_disabled-list">#{html}</div>"""
templates.sidebarDisabledVersionedDoc = (doc, versions) -> templates.sidebarDisabledVersionedDoc = (doc, versions) ->
"""<a class="_list-item _list-dir _icon-#{doc.icon} _list-disabled"><span class="_list-arrow"></span>#{doc.name}</a><div class="_list _list-sub">#{versions}</div>""" """<a class="_list-item _list-dir _icon-#{doc.icon} _list-disabled" data-slug="#{doc.slug_without_version}"><span class="_list-arrow"></span>#{doc.name}</a><div class="_list _list-sub">#{versions}</div>"""
templates.sidebarPickerNote = """ templates.sidebarPickerNote = """
<div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div> <div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>

@ -130,6 +130,7 @@ class app.views.DocList extends app.View
return return
openDoc: (doc) -> openDoc: (doc) ->
@listFold.open @find("[data-slug='#{doc.slug_without_version}']") if app.disabledDocs.contains(doc) and doc.version
@listFold.open @find("[data-slug='#{doc.slug}']") @listFold.open @find("[data-slug='#{doc.slug}']")
return return

Loading…
Cancel
Save