Sha256: 8cd0be1e625ce1157a83c7a36a3c8b3cac1efce80d5bc7f2ae176bb915acda38
Contents?: true
Size: 540 Bytes
Versions: 15
Compression:
Stored size: 540 Bytes
Contents
class IuguUI.Search extends IuguUI.Base layout: "iugu-ui-search" events: 'keypress input.search': 'searchCollection' searchCollection: (e) -> if e.keyCode == 13 @handleEvent "search" e.preventDefault() query = $(e.target).val() if query == "" @collection.removeFilter 'query' else @collection.configureFilter 'query', query @collection.fetch() initialize: -> _.bindAll @, 'searchCollection' super @ render: -> super @IuguUI.Search = IuguUI.Search
Version data entries
15 entries across 15 versions & 1 rubygems