         e.preventDefault()
         @modal.data('target', this)
         fn = =>
-          @modal.modal()
+          @runModal()
         $.get $el.attr('href'), {modal: true}, fn, 'script'
 
   buildOptions: ->


  initAjaxInput: ->
    if @el.data('image')
      @buildimageOptions()
    if @el.data('result')
      @options.formatResult = (item) => fetchTemplate(@el.data('result'))(item)
    if @el.data('selection')

      @initCreateChoiceOnce()
      @initCreateChoice()
    @options

  runModal: ->
    @el.trigger('select2.modal_open')
    @modal.modal()

  initSortable: ->
    @el.select2('container').find('ul.select2-choices').sortable
