Sha256: 29643ca3d83667720fefc316c64c5d200a70022885b67aa097a5cd32983ae3ab
Contents?: true
Size: 779 Bytes
Versions: 39
Compression:
Stored size: 779 Bytes
Contents
class IuguUI.SearchRange extends IuguUI.Base layout: "iugu-ui-search-range" defaults: fieldName: "created_at" events: 'click .search-range-submit': 'searchCollection' searchCollection: (e) -> e.preventDefault() from = $('.search-range-from').val() to = $('.search-range-to').val() if from == "" @collection.removeFilter @options.fieldName + '_from' else @collection.configureFilter @options.fieldName + '_from', from if to == "" @collection.removeFilter @options.fieldName + '_to' else @collection.configureFilter @options.fieldName + '_to', to @collection.fetch() initialize: -> _.bindAll @, 'searchCollection' super @ render: -> super @IuguUI.SearchRange = IuguUI.SearchRange
Version data entries
39 entries across 39 versions & 1 rubygems