puppetboard: Commit the current code.
This is all the code after a week and a bit hacking on this project. It's in a rather experimental state but should work with a little effort.
This commit is contained in:
17
puppetboard/static/coffeescript/lists.coffee
Normal file
17
puppetboard/static/coffeescript/lists.coffee
Normal file
@@ -0,0 +1,17 @@
|
||||
$ = jQuery
|
||||
$ ->
|
||||
$('input.filter-list').parent('div').removeClass('hide')
|
||||
$("input.filter-list").on "keyup", (e) ->
|
||||
rex = new RegExp($(this).val(), "i")
|
||||
|
||||
$(".searchable li").hide()
|
||||
$(".searchable li").filter( ->
|
||||
rex.test $(this).text()
|
||||
).show()
|
||||
|
||||
if e.keyCode is 27
|
||||
$(e.currentTarget).val ""
|
||||
ev = $.Event("keyup")
|
||||
ev.keyCode = 13
|
||||
$(e.currentTarget).trigger(ev)
|
||||
e.currentTarget.blur()
|
||||
Reference in New Issue
Block a user