Skip to content

Commit 1d53a58

Browse files
authored
fixed delete translation confirmation (#371)
1 parent 7fdf3a9 commit 1d53a58

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

resources/views/index.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,17 @@
5050
}
5151
});
5252

53-
$("a.delete-key").click(function(event){
54-
event.preventDefault();
55-
var row = $(this).closest('tr');
56-
var url = $(this).attr('href');
57-
var id = row.attr('id');
58-
$.post( url, {id: id}, function(){
59-
row.remove();
60-
} );
53+
$("a.delete-key").on('confirm:complete',function(event,result){
54+
if(result)
55+
{
56+
var row = $(this).closest('tr');
57+
var url = $(this).attr('href');
58+
var id = row.attr('id');
59+
$.post( url, {id: id}, function(){
60+
row.remove();
61+
} );
62+
}
63+
return false;
6164
});
6265

6366
$('.form-import').on('ajax:success', function (e, data) {

0 commit comments

Comments
 (0)