From 806a3b7ae775a4db5d1933cd8becc7c1ce7ee5d6 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 9 Dec 2016 15:04:48 +0100 Subject: [PATCH] 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 --- admin/themes/default/template/user_list.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl index 47d272d59..9f4b949ce 100644 --- a/admin/themes/default/template/user_list.tpl +++ b/admin/themes/default/template/user_list.tpl @@ -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();