Yeah, I know i had been posting the same issue again and again, but i am not clear yet..
I have done following steps to add a custom library
1)
$this->grocery_crud->add_action('Approve', 'http://localhost/project3/images/approve.jpeg', 'admin/approve_deal');
2)In.
grocery-crud / assets / grocery_crud / themes / flexigrid / js / flexigrid.js
I have had added following code in flexigrid.js
$('.crud-action').live('click', function(){
var approve_url = $(this).attr('href');
if( confirm( message_alert_delete ) )
{
$.ajax({
url: approve_url,
dataType: 'json',
success: function(data)
{
if(data.success)
{
$('#ajax_refresh_and_loading').trigger('click');
$('#report-success').html( data.success_message ).slideUp('fast').slideDown('slow');
$('#report-error').html('').slideUp('fast');
}
else
{
$('#report-error').html( data.error_message ).slideUp('fast').slideDown('slow');
$('#report-success').html('').slideUp('fast');
}
}
});
}
return false;
});
Here's the problem.
The function admin/approve_deal is called after that,
THE CONTENT IS NOT REFRESHED.
Like , the messages "Your deal has been deleted" and all the UI are not seen.
I just to implement a custom action , just like Delete Action , and all the UI after that action is executed
Can you tell me where i am going wrong ?
If you need more information on this query , please PM me, i will be very happy to reply.
Thank You.