|
|
@ -30,6 +30,9 @@ class app.views.Search extends app.View
|
|
|
|
.on 'results', @onResults
|
|
|
|
.on 'results', @onResults
|
|
|
|
.on 'end', @onEnd
|
|
|
|
.on 'end', @onEnd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@scope
|
|
|
|
|
|
|
|
.on 'change', @onScopeChange
|
|
|
|
|
|
|
|
|
|
|
|
app.on 'ready', @onReady
|
|
|
|
app.on 'ready', @onReady
|
|
|
|
$.on window, 'hashchange', @searchUrl
|
|
|
|
$.on window, 'hashchange', @searchUrl
|
|
|
|
$.on window, 'focus', @onWindowFocus
|
|
|
|
$.on window, 'focus', @onWindowFocus
|
|
|
@ -138,6 +141,11 @@ class app.views.Search extends app.View
|
|
|
|
$.stopEvent(event)
|
|
|
|
$.stopEvent(event)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onScopeChange: =>
|
|
|
|
|
|
|
|
@value = ''
|
|
|
|
|
|
|
|
@onInput()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
afterRoute: (name, context) =>
|
|
|
|
afterRoute: (name, context) =>
|
|
|
|
return if app.shortcuts.eventInProgress?.name is 'escape'
|
|
|
|
return if app.shortcuts.eventInProgress?.name is 'escape'
|
|
|
|
@reset(true) if not context.init and app.router.isIndex()
|
|
|
|
@reset(true) if not context.init and app.router.isIndex()
|
|
|
|