Sha256: f0474aa7e63c648b9f5c69450840dbf8528aa3ec31a887b1bde7705d1daa5f6b

Contents?: true

Size: 770 Bytes

Versions: 15

Compression:

Stored size: 770 Bytes

Contents

$.rails.allowAction = (element) ->

  message = element.data('confirm')
  return true unless message

  $link = element.clone().removeAttr('data-confirm').removeAttr('data-icon').removeAttr('class')
  $link.addClass('primary')
  $link.html("<i data-icon=\"j\"></i> Ja, dat weet ik zeker")

  modal_html = """
              <div id="modal" class="modal"><header class="big-header">
                <a href="#" class="close_modal" data-dismiss="modal"><i class="icon-only" data-icon="m"></i></a>
                <h3>#{message}</h3>
              </header>

              <footer>
                <a href="#" data-dismiss="modal">Nee, annuleren</a>
              </footer></div>
               """

  $(modal_html).modal()
  $('#modal footer').append($link)

  return false

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
spina-0.6.25 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.24 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.23 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.22 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.21 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.20 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.19 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.18 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.17 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.16 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.15 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.14 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.13 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.12 app/assets/javascripts/spina/admin/confirm_delete.js.coffee
spina-0.6.11 app/assets/javascripts/spina/admin/confirm_delete.js.coffee