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
18 """<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>"""18 """<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>"""
19 19
20templates.sidebarNoResults = ->20templates.sidebarNoResults = ->
21 info = if app.isSingleDoc() or app.disabledDocs.isEmpty() then '' else """21 html = """ <div class="_list-note">No results.</div> """
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>22 html += """
23 """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 """ <div class="_list-noresults">No results. #{info}</div> """24 """ unless app.isSingleDoc() or app.disabledDocs.isEmpty()
25 html
25 26
26templates.sidebarPageLink = (count) ->27templates.sidebarPageLink = (count) ->
27 """<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""28 """<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""
@@ -39,7 +40,10 @@ templates.sidebarDisabledList = (options) -> · 11 unmodified lines
39templates.sidebarDisabled = (options) ->40templates.sidebarDisabled = (options) ->
40 """<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>"""41 """<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>"""
41 42
42templates.sidebarVote = '<a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>'43templates.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 """
43 47
44sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""48sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""
45 49
assets/javascripts/views/sidebar/doc_picker.coffee+1−1
@@ -28,7 +28,7 @@ class app.views.DocPicker extends app.View · 27 unmodified lines
28 render: ->28 render: ->
29 @html @tmpl('sidebarLabel', app.docs.all(), checked: true) +29 @html @tmpl('sidebarLabel', app.docs.all(), checked: true) +
30 @tmpl('sidebarLabel', app.disabledDocs.all()) +30 @tmpl('sidebarLabel', app.disabledDocs.all()) +
31 @tmpl('sidebarVote') +31 @tmpl('sidebarPickerNote') +
32 @tmpl('sidebarSave')32 @tmpl('sidebarSave')
33 33
34 @refreshElements()34 @refreshElements()
assets/stylesheets/components/_sidebar.scss+8−7
@@ -214,19 +214,20 @@ · 213 unmodified lines
214 }214 }
215}215}
216 216
217._list-noresults {217//
218 padding: .5rem .75rem;218// List note
219//
220
221._list-note {
222 margin: .5rem .75rem;
219 line-height: 1.25rem;223 line-height: 1.25rem;
220 font-size: .8125rem;224 font-size: .8125rem;
221 color: $textColorLight;225 color: $textColorLight;
222}
223 226
224._list-noresults-note {227 & + & { margin-top: .25rem; }
225 display: block;
226 margin-top: .25rem;
227}228}
228 229
229._list-noresults-link { cursor: pointer; }230._list-note-link { cursor: pointer; }
230 231
231//232//
232// List hover clone233// List hover clone