Sha256: 73fc5eb0bb70b6c155996a876d5741065c048be2470c8664c66333d02b5ffec3

Contents?: true

Size: 682 Bytes

Versions: 19

Compression:

Stored size: 682 Bytes

Contents

Backbone.Poised.List ||= {}
class Backbone.Poised.List.Searchfield extends Backbone.Poised.View
  tagName: 'li'
  className: 'search-box'

  template: _.template("<input type='search' placeholder='<%= placeholder %>'>")

  initialize: (options = {}) ->
    super

    @options = _.chain(options)
      .pick('placeholder')
      .value()

  events:
    'input input': 'filterList'

  filterList: (e) =>
    clearTimeout @filterInputTimeout
    @filterInputTimeout = delay 250, =>
      @trigger('filter', $(e.target).val() or '', {})

  render: =>
    placeholder = @options.placeholder or @loadLocale('search.placeholder')
    @$el.html @template placeholder: placeholder
    this

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ela-4.1.6 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.5 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.4 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.3 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.2 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.1 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.1.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-4.0.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.4.3 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.4.2 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.4.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.3.1 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.3.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.2.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.1.1 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.1.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-3.0.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-2.0.0 app/js/vendor/backbone.poised/list/searchfield.coffee
ela-1.1.0 app/js/vendor/backbone.poised/list/searchfield.coffee