Sha256: dba173cb6b7e841786bb4f1aa59007a231f19abcb82434260405fadeb1e964ba

Contents?: true

Size: 786 Bytes

Versions: 2

Compression:

Stored size: 786 Bytes

Contents

# Copyright (c) 2008-2014 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------

# Any select box with 'select2' class will be transformed
(($) ->

  window.crm ||= {}

  crm.make_select2 = ->
    $(".select2").each ->
      $(this).select2 'width':'resolve'

    $(".select2_tag").each ->
      $(this).select2
        'width':'resolve'
        tags: $(this).data("tags")
        placeholder: $(this).data("placeholder")
        multiple: $(this).data("multiple")

  $(document).ready ->
    crm.make_select2()

  $(document).ajaxComplete ->
    crm.make_select2()

) jQuery

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fat_free_crm-0.13.4 app/assets/javascripts/crm_select2.js.coffee
fat_free_crm-0.13.3 app/assets/javascripts/crm_select2.js.coffee