update delete click

This commit is contained in:
Aung Myo
2017-10-19 18:25:39 +06:30
parent 575d1b0638
commit 1958d9de67
2 changed files with 11 additions and 9 deletions

View File

@@ -16,7 +16,6 @@
//= require bootstrap/js/popper.min
//= require bootstrap/js/bootstrap-material-design.min
//= require jquery_ujs
//= require jquery-confirm
//= require turbolinks
//= require cable
//= require settings/processing_items
@@ -140,9 +139,11 @@ $(function(){
$('.delete').click(function(){
var method = $(this).attr('data-method');
var url = $(this).attr('data-ref');
var html = $( this ).siblings( "#delete_text" ).html();
console.log(html);
swal({
title: "Confirmation",
text: $('#delete_text').html(),
text: html,
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
@@ -151,8 +152,8 @@ $(function(){
if (isConfirm) {
$.ajax({
type: method,
url: url ,
success: function(data) {
url: url ,
success: function(data) {
}
});
} else {