Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("body").delegate( "a.sendfeedback", "click", function( event ) {
- event.preventDefault();
- var url = $(this).attr('href');
- // var parent = $('#doclist');
- // var error = $('.alert-danger', parent);
- // var success = $('.alert-success', parent);
- bootbox.confirm("Kirim email feedback ?", function(result) {
- if( result == true ){
- $.ajax({
- type: "POST",
- url: url,
- beforeSend: function (){
- },
- success: function( response ){
- response = $.parseJSON(response);
- if(response.message == 'error'){
- // success.hide();
- // error.empty();
- // error.html(response.data).fadeIn('fast');
- console.log(response.log);
- }else if(response.message == 'success'){
- // error.hide();
- // success.empty();
- // success.html(response.data).fadeIn('fast');
- Command: toastr.success("Berhasil mengirim email feedback", "Kirim Feedback");
- toastr.options = {
- "closeButton": true,
- "debug": false,
- "positionClass": "toast-bottom-right",
- "onclick": null,
- "showDuration": "1000",
- "hideDuration": "1000",
- "timeOut": "5000",
- "extendedTimeOut": "1000",
- "showEasing": "swing",
- "hideEasing": "linear",
- "showMethod": "fadeIn",
- "hideMethod": "fadeOut"
- }
- }
- }
- });
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement