Add 'Customize' link next to 'Disabled' list title

Rel: #189
pull/647/merge
Thibaut Courouble 8 years ago
parent d852bde5f3
commit 6de748ebc2

@ -52,7 +52,7 @@ templates.sidebarVersionedDoc = (doc, versions, options = {}) ->
html + """" tabindex="0">#{arrow}#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""
templates.sidebarDisabled = (options) ->
"""<h6 class="_list-title">#{arrow}Disabled (#{options.count})</h6>"""
"""<h6 class="_list-title">#{arrow}Disabled (#{options.count}) <a href="/settings" class="_list-title-link" tabindex="-1">Customize</a></h6>"""
templates.sidebarDisabledList = (html) ->
"""<div class="_disabled-list">#{html}</div>"""

@ -164,7 +164,7 @@ class app.views.DocList extends app.View
return
onClick: (event) =>
if @disabledTitle and $.hasChild(@disabledTitle, event.target)
if @disabledTitle and $.hasChild(@disabledTitle, event.target) and event.target.tagName isnt 'A'
$.stopEvent(event)
@toggleDisabled()
else if slug = event.target.getAttribute('data-enable')

@ -75,7 +75,7 @@
._list-title {
position: relative;
margin: .5rem 0 0;
padding-left: 2.25rem;
padding: 0 .75rem 0 2.25rem;
line-height: 2rem;
font-size: .75rem;
color: $textColorLight;
@ -83,6 +83,15 @@
cursor: default;
}
._list-title-link {
display: none;
float: right;
font-weight: normal;
text-transform: none;
._list-title:hover > & { display: block; }
}
._list-item {
display: block;
position: relative;

Loading…
Cancel
Save