From e016100a29ad6ebd13bab6cabaeabb2a421be46f Mon Sep 17 00:00:00 2001 From: JP Rodrigues Date: Wed, 18 May 2016 14:30:03 -0300 Subject: [PATCH] =?UTF-8?q?Corrige=20fun=C3=A7=C3=A3o=20askDelete=20(#4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #3 --- build/js/gainTime.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/js/gainTime.js b/build/js/gainTime.js index b88bfe3..8df20aa 100644 --- a/build/js/gainTime.js +++ b/build/js/gainTime.js @@ -16,8 +16,11 @@ $(document).on('click', function(e) { //Ask Delete -function askDelete(name, entity) { - if(confirm("Deseja deletar "+ entity +" \""+ name +"\" do sistema?")){ +function askDelete(name, entity, url = '') { + if(confirm("Deseja deletar "+ entity +" \""+ name +"\" do sistema?")) { + if (url != '') { + window.location.href = url; + } return true; } return false; @@ -29,7 +32,7 @@ setTimeout(function(){ $('.msg').fadeOut(); }, 3000); -// Inputs and Labels +// Inputs and Labels $('document').ready(function() { $('input').each(function() {