Sha256: 3b0a7481ab64b026e0259fe47c08debb5618aa61b2723e2c59ac04ddadfdb3db

Contents?: true

Size: 804 Bytes

Versions: 28

Compression:

Stored size: 804 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 class='icon icon-check'></i> <%= I18n.t('spina.modal.agree') %>")

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

              <footer>
                <a href="#" data-dismiss="modal"><%= I18n.t('spina.modal.cancel') %></a>
              </footer></div>
               """

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

  return false

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
spina-2.0.2 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-2.0.1 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-2.0.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-2.0.0.beta app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-2.0.0.alpha app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.2.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.1.4 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.1.3 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.1.2 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.1.1 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.1.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.0.3 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.0.2 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.0.1 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-1.0.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-0.12.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-0.11.1 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-0.11.0 app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
spina-0.10.0 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.9.0 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb