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-0.8.3 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.8.2 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.8.1 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.8.0 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.7.3 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.7.2 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.7.0 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb
spina-0.6.29 app/assets/javascripts/spina/admin/confirm_delete.js.coffee.erb