Sha256: 026c69623d48c282638dda939fbbc8c72d8ac2db244f137784dc9a9a45257c9f

Contents?: true

Size: 558 Bytes

Versions: 11

Compression:

Stored size: 558 Bytes

Contents

$(window).ready ->
  el = $('._search-box')
  box = new decko.searchBox el
  el.data "searchBox", box
  box.init()

class decko.searchBox
  constructor: (el) ->
    @box = el
    @sourcepath = @box.data "completepath"
    @originalpath = @sourcepath
    @config =
      source: @sourcepath
      select: @select

  init: -> @box.autocomplete @config, html: true

  select: (_event, ui) ->
    url = ui.item.url
    window.location = url if url

  form: -> @box.closest "form"
  keyword: -> @keywordBox().val()
  keywordBox: -> @form().find "#query_keyword"

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
card-mod-search-0.18.1 assets/script/search_box.js.coffee
card-mod-search-0.18.0 assets/script/search_box.js.coffee
card-mod-search-0.17.0 assets/script/search_box.js.coffee
card-mod-search-0.16.0 assets/script/search_box.js.coffee
card-mod-search-0.15.6 assets/script/search_box.js.coffee
card-mod-search-0.15.5 assets/script/search_box.js.coffee
card-mod-search-0.15.4 assets/script/search_box.js.coffee
card-mod-search-0.15.3 assets/script/search_box.js.coffee
card-mod-search-0.15.2.pre1 assets/script/search_box.js.coffee
card-mod-search-0.15.1.1 assets/script/search_box.js.coffee
card-mod-search-0.15.1 assets/script/search_box.js.coffee