History

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

Thibaut Courouble committed 9 years ago

Commit 6de748e1 parent d852bde3 files · +12 −3Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/sidebar_tmpl.coffee +1 −1
  2. assets/javascripts/views/sidebar/doc_list.coffee +1 −1
  3. assets/stylesheets/components/_sidebar.scss +10 −1
assets/javascripts/templates/sidebar_tmpl.coffee+1−1
@@ -52,7 +52,7 @@ templates.sidebarVersionedDoc = (doc, versions, options = {}) -> · 51 unmodified lines
5252 html + """" tabindex="0">#{arrow}#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""
5353
5454 templates.sidebarDisabled = (options) ->
55− """<h6 class="_list-title">#{arrow}Disabled (#{options.count})</h6>"""
55+ """<h6 class="_list-title">#{arrow}Disabled (#{options.count}) <a href="/settings" class="_list-title-link" tabindex="-1">Customize</a></h6>"""
5656
5757 templates.sidebarDisabledList = (html) ->
5858 """<div class="_disabled-list">#{html}</div>"""
assets/javascripts/views/sidebar/doc_list.coffee+1−1
@@ -164,7 +164,7 @@ class app.views.DocList extends app.View · 163 unmodified lines
164164 return
165165
166166 onClick: (event) =>
167− if @disabledTitle and $.hasChild(@disabledTitle, event.target)
167+ if @disabledTitle and $.hasChild(@disabledTitle, event.target) and event.target.tagName isnt 'A'
168168 $.stopEvent(event)
169169 @toggleDisabled()
170170 else if slug = event.target.getAttribute('data-enable')
assets/stylesheets/components/_sidebar.scss+10−1
@@ -75,7 +75,7 @@ · 74 unmodified lines
7575 ._list-title {
7676 position: relative;
7777 margin: .5rem 0 0;
78− padding-left: 2.25rem;
78+ padding: 0 .75rem 0 2.25rem;
7979 line-height: 2rem;
8080 font-size: .75rem;
8181 color: $textColorLight;
@@ -83,6 +83,15 @@ · 1 unmodified line
8383 cursor: default;
8484 }
8585
86+._list-title-link {
87+ display: none;
88+ float: right;
89+ font-weight: normal;
90+ text-transform: none;
91+
92+ ._list-title:hover > & { display: block; }
93+}
94+
8695 ._list-item {
8796 display: block;
8897 position: relative;