Skip to content

Instantly share code, notes, and snippets.

@joaohcrangel
Created September 29, 2015 23:32
Show Gist options
  • Save joaohcrangel/479861a1803cb9c61777 to your computer and use it in GitHub Desktop.
Save joaohcrangel/479861a1803cb9c61777 to your computer and use it in GitHub Desktop.
Confirmação com alertify antes de uma exclusão.
alertify
.confirm('Você deseja realmente excluir?')
.set('title', 'Confirmação')
.set('onok', function(closeEvent){
rest({
url:PATH+'/rest',
method:"DELETE",
success:function(r){
alertify.success('Excluído com sucesso.');
},
failure:function(r){
alertify.failure(r.error || "Falha ao excluir. Tente novamente mais tarde.");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment