Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mvnp
Created November 4, 2017 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvnp/fc096efe45bf90dfc23392264a7e76b3 to your computer and use it in GitHub Desktop.
Save mvnp/fc096efe45bf90dfc23392264a7e76b3 to your computer and use it in GitHub Desktop.
$(document).on('blur', '.edit_descr > span', function(event){
event.preventDefault();
var descricao = $(this).text();
var metodo_id = $(this).data("metodo_id");
if(descricao && metodo_id){
if(confirm("Deseja realmente atualizar a descrição desta função no sistema?") == true){
$.ajax({
url: '/permissoes/alterardescricao', type: 'POST', dataType: 'json',
data: {descricao: descricao, metodo_id: metodo_id},
success: function(ret){
console.log(ret);
}
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment