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
52 html + """" tabindex="0">#{arrow}#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""52 html + """" tabindex="0">#{arrow}#{doc.name}</div><div class="_list _list-sub">#{versions}</div>"""
53 53
54templates.sidebarDisabled = (options) ->54templates.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>"""
56 56
57templates.sidebarDisabledList = (html) ->57templates.sidebarDisabledList = (html) ->
58 """<div class="_disabled-list">#{html}</div>"""58 """<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
164 return164 return
165 165
166 onClick: (event) =>166 onClick: (event) =>
167 if @disabledTitle and $.hasChild(@disabledTitle, event.target)167 if @disabledTitle and $.hasChild(@disabledTitle, event.target) and event.target.tagName isnt 'A'
168 $.stopEvent(event)168 $.stopEvent(event)
169 @toggleDisabled()169 @toggleDisabled()
170 else if slug = event.target.getAttribute('data-enable')170 else if slug = event.target.getAttribute('data-enable')
assets/stylesheets/components/_sidebar.scss+10−1
@@ -75,7 +75,7 @@ · 74 unmodified lines
75._list-title {75._list-title {
76 position: relative;76 position: relative;
77 margin: .5rem 0 0;77 margin: .5rem 0 0;
78 padding-left: 2.25rem;78 padding: 0 .75rem 0 2.25rem;
79 line-height: 2rem;79 line-height: 2rem;
80 font-size: .75rem;80 font-size: .75rem;
81 color: $textColorLight;81 color: $textColorLight;
@@ -83,6 +83,15 @@ · 1 unmodified line
83 cursor: default;83 cursor: default;
84}84}
85 85
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
86._list-item {95._list-item {
87 display: block;96 display: block;
88 position: relative;97 position: relative;