|
|
@ -23,7 +23,7 @@ class app.views.Sidebar extends app.View
|
|
|
|
@docList = new app.views.DocList
|
|
|
|
@docList = new app.views.DocList
|
|
|
|
@docPicker = new app.views.DocPicker unless app.isSingleDoc()
|
|
|
|
@docPicker = new app.views.DocPicker unless app.isSingleDoc()
|
|
|
|
|
|
|
|
|
|
|
|
app.on 'ready', @showDocList
|
|
|
|
app.on 'ready', @onReady
|
|
|
|
$.on document, 'click', @onGlobalClick if @docPicker
|
|
|
|
$.on document, 'click', @onGlobalClick if @docPicker
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
@ -32,13 +32,18 @@ class app.views.Sidebar extends app.View
|
|
|
|
@hover?.hide()
|
|
|
|
@hover?.hide()
|
|
|
|
@saveScrollPosition()
|
|
|
|
@saveScrollPosition()
|
|
|
|
@view?.deactivate()
|
|
|
|
@view?.deactivate()
|
|
|
|
@html @view = view
|
|
|
|
@view = view
|
|
|
|
@append @tmpl('sidebarSettings') if @view is @docList and @docPicker
|
|
|
|
@render()
|
|
|
|
@view.activate()
|
|
|
|
@view.activate()
|
|
|
|
@restoreScrollPosition()
|
|
|
|
@restoreScrollPosition()
|
|
|
|
if view is @docPicker then @search.disable() else @search.enable()
|
|
|
|
if view is @docPicker then @search.disable() else @search.enable()
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render: ->
|
|
|
|
|
|
|
|
@html @view
|
|
|
|
|
|
|
|
@append @tmpl('sidebarSettings') if @view is @docList and @docPicker
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
showDocList: (reset) =>
|
|
|
|
showDocList: (reset) =>
|
|
|
|
@show @docList
|
|
|
|
@show @docList
|
|
|
|
if reset is true
|
|
|
|
if reset is true
|
|
|
@ -54,6 +59,11 @@ class app.views.Sidebar extends app.View
|
|
|
|
@show @results
|
|
|
|
@show @results
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onReady: =>
|
|
|
|
|
|
|
|
@view = @docList
|
|
|
|
|
|
|
|
@render()
|
|
|
|
|
|
|
|
@view.activate()
|
|
|
|
|
|
|
|
|
|
|
|
reset: ->
|
|
|
|
reset: ->
|
|
|
|
@showDocList true
|
|
|
|
@showDocList true
|
|
|
|
return
|
|
|
|
return
|
|
|
|