Created
September 29, 2015 23:32
-
-
Save joaohcrangel/479861a1803cb9c61777 to your computer and use it in GitHub Desktop.
Confirmação com alertify antes de uma exclusão.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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