mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 17:58:22 +01:00
fix
This commit is contained in:
parent
f5d4e87828
commit
662c3f87d0
@ -49,10 +49,14 @@
|
||||
term = new RegExp t, "i"
|
||||
for k, v of _OS.setting.system.packages when v.app
|
||||
if (v.name.match term) or (v.description and v.description.match term)
|
||||
ar.push v
|
||||
v1 = {}
|
||||
v1[k1] = e for k1, e of v when k1 isnt "selected"
|
||||
ar.push v1
|
||||
else if v.mimes
|
||||
for m in v.mimes
|
||||
if t.match (new RegExp m, "g")
|
||||
ar.push v
|
||||
v1 = {}
|
||||
v1[k1] = v[k1] for k1, e of v when k1 isnt "selected"
|
||||
ar.push v1
|
||||
break
|
||||
return ar
|
@ -9,7 +9,6 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
me = @
|
||||
@height = ($ @scheme).css("height")
|
||||
@container = @find "container"
|
||||
@container.set "selected", -1
|
||||
console.log "new dia"
|
||||
($ @scheme).css("height", "45px")
|
||||
#fn = (e) ->
|
||||
@ -17,7 +16,14 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
# ($ document).unbind "keyup", fn
|
||||
# me.handler(e) if me.handler
|
||||
#($ document).keyup fn
|
||||
($ document).click @clickHandler
|
||||
|
||||
@fn1 = (e) ->
|
||||
if not $(e.target).closest(me.scheme).length
|
||||
($ document).unbind "click", me.fn1
|
||||
me.handler(e) if me.handler
|
||||
me.quit()
|
||||
|
||||
($ document).click @fn1
|
||||
@searchbox = @find "searchbox"
|
||||
($ @searchbox).focus()
|
||||
($ @searchbox).keyup (e) ->
|
||||
@ -26,15 +32,10 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
return if e.data.dataid and e.data.dataid is "header"
|
||||
me.handler(e) if me.handler
|
||||
me._gui.openWith e.data
|
||||
($ document).unbind "click", me.clickHandler
|
||||
($ document).unbind "click", me.fn1
|
||||
me.quit()
|
||||
|
||||
clickHandler: (e) ->
|
||||
me = @
|
||||
if not $(e.target).closest(me.scheme).length
|
||||
($ document).unbind "click", me.clickHandler
|
||||
me.handler(e) if me.handler
|
||||
me.quit()
|
||||
|
||||
|
||||
search: (e) ->
|
||||
switch e.which
|
||||
@ -55,7 +56,7 @@ class SpotlightDialog extends this.OS.GUI.BaseDialog
|
||||
return if sel.dataid and sel.dataid is "header"
|
||||
@.handler(e) if @.handler
|
||||
@._gui.openWith sel
|
||||
($ document).unbind "click", @clickHandler
|
||||
($ document).unbind "click", @fn1
|
||||
@.quit()
|
||||
else
|
||||
text = @searchbox.value
|
||||
|
Loading…
Reference in New Issue
Block a user