From dde0c4329c770c94d55c58327504e9792432a274 Mon Sep 17 00:00:00 2001 From: Ecio Virgilio Eloi Silva Date: Fri, 25 Jul 2014 00:42:41 -0300 Subject: [PATCH] [FIX] Exclusao de registros em listagens via DataTable --- .gitignore | 4 ++++ composer.phar | Bin 1010238 -> 0 bytes src/Cacic/CommonBundle/Resources/public/js/System.js | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1adc0d3..439e5d4 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,7 @@ web/app.php # Ignora arquivo do importador src/Cacic/CommonBundle/Resources/data/importacao.zip + +# Ignore IDE Files +.idea +cacic.iml diff --git a/composer.phar b/composer.phar index 0f07ece..95b67d0 100755 Binary files a/composer.phar and b/composer.phar differ diff --git a/src/Cacic/CommonBundle/Resources/public/js/System.js b/src/Cacic/CommonBundle/Resources/public/js/System.js index 728fee8..f0ca979 100644 --- a/src/Cacic/CommonBundle/Resources/public/js/System.js +++ b/src/Cacic/CommonBundle/Resources/public/js/System.js @@ -5,15 +5,15 @@ var System = { Grid : { // Comportamentos relacionados a itens de grids de listagens de itens excluir : function(){ // Método executado ao acionar a funcionalidade de exclusão - $( "a.bt-excluir" ).bind( 'click', function(e){ + $( 'body' ).delegate( 'a.bt-excluir', 'click', function(e){ e.preventDefault(); var url = $( this ).attr( 'href' ); var id = $( this ).parent().parent().attr( 'id' ).replace( /.*?(\d+)$/, '$1' ); var callback = $( this ).attr( 'data-callback' ); $( "#System_Excluir" ).data( 'params', { 'url': url, 'id': id, 'callback': callback } ).dialog( "open" ); }); - - $( "a.bt-excluir-compositekey" ).bind( 'click', function(e){ // Exclusão de itens com CHAVE COMPOSTA + + $( 'body' ).delegate( 'a.bt-excluir-compositekey', 'click', function(e){ // Exclusão de itens com CHAVE COMPOSTA e.preventDefault(); var url = $( this ).attr( 'href' ); var id = $( this ).parent().parent().attr( 'id' ).replace( /^item_(.*?)$/, '$1' ); // Utilizado para REMOÇÃO do item da GRID -- libgit2 0.21.2