diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 585d4980..f9661398 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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 { diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index d60e6892..027f96b8 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -21,10 +21,7 @@ Search Bar --> - +