Sha256: 53203333c6275f6bf03c6dd591ece612710357892775d82eaea1d3d7e62a3f9e

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery_ujs
//= require_tree .

$.rails.sweetConfirm = function(element) {
  var message = element.data('confirm');
  swal({
    title: "Are you sure?",
    text: message,
    type: "warning",
    showCancelButton: true,
    confirmButtonColor: "#DD6B55",
    confirmButtonText: "Yes, delete it!",
    closeOnConfirm: true
  }, function() {
    element.removeAttr('data-confirm');
    element.trigger('click.rails');
  });
};

$.rails.allowAction = function(element) {
  if (!element.attr('data-confirm')) return true;
  $.rails.sweetConfirm(element);
  return false;
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise_users-0.0.1 app/assets/javascripts/devise_users/application.js