diff --git a/assets/javascripts/views/search/search.coffee b/assets/javascripts/views/search/search.coffee index 39d7887c..2e802fdc 100644 --- a/assets/javascripts/views/search/search.coffee +++ b/assets/javascripts/views/search/search.coffee @@ -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 diff --git a/assets/javascripts/views/sidebar/sidebar.coffee b/assets/javascripts/views/sidebar/sidebar.coffee index 81c0b408..a9550160 100644 --- a/assets/javascripts/views/sidebar/sidebar.coffee +++ b/assets/javascripts/views/sidebar/sidebar.coffee @@ -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) => diff --git a/assets/stylesheets/components/_header.scss b/assets/stylesheets/components/_header.scss index 8aca9dd4..9d440ca6 100644 --- a/assets/stylesheets/components/_header.scss +++ b/assets/stylesheets/components/_header.scss @@ -126,6 +126,11 @@ box-shadow: 0 0 1px $inputFocusBorder; } } + + &[disabled] { + background: $sidebarBackground; + cursor: not-allowed; + } } ._search-clear {