Sha256: 3856df58284e9af201d9b7734464f1cff11a0a2d6b86500b66d6539e59b753fd

Contents?: true

Size: 983 Bytes

Versions: 9

Compression:

Stored size: 983 Bytes

Contents

# -----------------------------------------------------------------------------
# Author: Alexander Kravets <alex@slatestudio.com>,
#         Slate Studio (http://www.slatestudio.com)
#
# Coding Guide:
#   https://github.com/thoughtbot/guides/tree/master/style/coffeescript
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# INPUT SELECT 2
# -----------------------------------------------------------------------------
#
# Dependencies:
#= require vendor/select2
#
# -----------------------------------------------------------------------------

class @InputSelect2 extends InputSelect
  initialize: ->
    @config.beforeInitialize?(this)

    # https://select2.github.io/options.html
    options = @config.pluginOptions || { placeholder: @config.placeholder }
    @$input.select2(options)

    @config.onInitialize?(this)


chr.formInputs['select2'] = InputSelect2




Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
formagic-0.3.4 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.3.3 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.3.2 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.3.1 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.3.0 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.2.9 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.2.8 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.2.6 app/assets/javascripts/formagic/inputs/select2.coffee
formagic-0.2.5 app/assets/javascripts/formagic/inputs/select2.coffee