Closes #196.
@@ -49,6 +49,14 @@ class app.views.Search extends app.View
@autoFocus()
return
+ disable: ->
+ @input.setAttribute('disabled', 'disabled')
+ return
+
+ enable: ->
+ @input.removeAttribute('disabled')
onReady: =>
@value = ''
@delay @onInput
@@ -34,6 +34,7 @@ class app.views.Sidebar extends app.View
@append @tmpl('sidebarSettings') if @view is @docList and @docPicker
@view.activate()
@restoreScrollPosition()
+ if view is @docPicker then @search.disable() else @search.enable()
showDocList: (reset) =>
@@ -126,6 +126,11 @@
box-shadow: 0 0 1px $inputFocusBorder;
}
+ &[disabled] {
+ background: $sidebarBackground;
+ cursor: not-allowed;
+ }
._search-clear {