History

Add note about docs and search

Thibaut committed 11 years ago

Commit 26964021 parent 50662593 files · +18 −13Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/sidebar_tmpl.coffee +9 −5
  2. assets/javascripts/views/sidebar/doc_picker.coffee +1 −1
  3. assets/stylesheets/components/_sidebar.scss +8 −7
assets/javascripts/templates/sidebar_tmpl.coffee+9−5
@@ -18,10 +18,11 @@ templates.sidebarResult = (entry) -> · 17 unmodified lines
1818 """<a href="#{entry.fullPath()}" class="_list-item _list-hover _list-result _icon-#{entry.doc.slug}"><span class="_list-reveal" data-reset-list title="Reveal in list"></span>#{$.escape entry.name}</a>"""
1919
2020 templates.sidebarNoResults = ->
21− info = if app.isSingleDoc() or app.disabledDocs.isEmpty() then '' else """
22− <span class="_list-noresults-note">Note: documentations must be <a class="_list-noresults-link" data-pick-docs>enabled</a> to appear in the search.</span>
23− """
24− """ <div class="_list-noresults">No results. #{info}</div> """
21+ html = """ <div class="_list-note">No results.</div> """
22+ html += """
23+ <div class="_list-note">Note: documentations must be <a class="_list-note-link" data-pick-docs>enabled</a> to appear in the search.</div>
24+ """ unless app.isSingleDoc() or app.disabledDocs.isEmpty()
25+ html
2526
2627 templates.sidebarPageLink = (count) ->
2728 """<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""
@@ -39,7 +40,10 @@ templates.sidebarDisabledList = (options) -> · 11 unmodified lines
3940 templates.sidebarDisabled = (options) ->
4041 """<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>"""
4142
42−templates.sidebarVote = '<a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>'
43+templates.sidebarPickerNote = """
44+ <div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>
45+ <a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>
46+ """
4347
4448 sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""
4549
assets/javascripts/views/sidebar/doc_picker.coffee+1−1
@@ -28,7 +28,7 @@ class app.views.DocPicker extends app.View · 27 unmodified lines
2828 render: ->
2929 @html @tmpl('sidebarLabel', app.docs.all(), checked: true) +
3030 @tmpl('sidebarLabel', app.disabledDocs.all()) +
31− @tmpl('sidebarVote') +
31+ @tmpl('sidebarPickerNote') +
3232 @tmpl('sidebarSave')
3333
3434 @refreshElements()
assets/stylesheets/components/_sidebar.scss+8−7
@@ -214,19 +214,20 @@ · 213 unmodified lines
214214 }
215215 }
216216
217−._list-noresults {
218− padding: .5rem .75rem;
217+//
218+// List note
219+//
220+
221+._list-note {
222+ margin: .5rem .75rem;
219223 line-height: 1.25rem;
220224 font-size: .8125rem;
221225 color: $textColorLight;
222−}
223226
224−._list-noresults-note {
225− display: block;
226− margin-top: .25rem;
227+ & + & { margin-top: .25rem; }
227228 }
228229
229−._list-noresults-link { cursor: pointer; }
230+._list-note-link { cursor: pointer; }
230231
231232 //
232233 // List hover clone