feature #378, bug fixed on draw() call

The oTable javascript variable is built with jQuery('#userList').dataTable(),
which returns a jQuery object, while jQuery(...).Datatable() would directly
return a DataTables API object. So now, to access the draw() function, we need
to get the api() first from the jQuery object.

https://datatables.net/manual/api#Accessing-the-API
This commit is contained in:
plegall
2016-12-09 15:04:48 +01:00
parent a4bb90c2e4
commit 806a3b7ae7
+3 -3
View File
@@ -93,7 +93,7 @@ jQuery(document).ready(function() {
jQuery("#addUserForm .loading").show();
},
success:function(data) {
oTable.draw();
oTable.api().draw();
jQuery("#addUserForm .loading").hide();
var data = jQuery.parseJSON(data);
@@ -584,7 +584,7 @@ jQuery(document).on('click', '.close-user-details', function(e) {
title:"{/literal}{'Edit user'|translate}{literal}",
href:".user_form_popin",
onClosed: function() {
oTable.draw();
oTable.api().draw();
}
});
@@ -825,7 +825,7 @@ jQuery(document).on('click', '.close-user-details', function(e) {
jQuery("#applyActionLoading").show();
},
success:function(data) {
oTable.draw();
oTable.api().draw();
jQuery("#applyActionLoading").hide();
jQuery("#applyActionBlock .infos").show();