From 0809965edf29767abc1ae35d614b36f6a4452b6b Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Oct 2017 18:20:48 +0630 Subject: [PATCH] update loguou --- app/assets/javascripts/application.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1ed96cea..4cdc357e 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -139,11 +139,9 @@ $(function(){ $('.delete').click(function(){ var method = $(this).attr('data-method'); var url = $(this).attr('data-ref'); - var html = $(this).siblings.html(); - console.log(html); swal({ title: "Confirmation", - text: $(this).children().children('#delete_text').html(), + text: $('#delete_text').html(), type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", @@ -153,9 +151,9 @@ $(function(){ $.ajax({ type: method, url: url , - success: function(data) { + success: function(data) { } - }); + }); } else { swal("Cancelled", "Your imaginary file is safe :)", "error"); }