Disable search input while showing doc picker

Closes #196.
pull/337/merge
Thibaut Courouble 9 years ago
parent 7a20f7fd54
commit b14fc9438a

@ -49,6 +49,14 @@ class app.views.Search extends app.View
@autoFocus()
return
disable: ->
@input.setAttribute('disabled', 'disabled')
return
enable: ->
@input.removeAttribute('disabled')
return
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()
return
showDocList: (reset) =>

@ -126,6 +126,11 @@
box-shadow: 0 0 1px $inputFocusBorder;
}
}
&[disabled] {
background: $sidebarBackground;
cursor: not-allowed;
}
}
._search-clear {

Loading…
Cancel
Save