Bug 26098: Fix JS error on the fund list view when no fund displayed

TypeError: this.data(...) is undefined
in jquery.treetable.js

Test plan:
Go to the fund list view
Select a filter that will return no result
=> With this patch applied there is no JS error in the console

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2020-07-30 10:51:26 +02:00
parent 1ae7efa3bb
commit b6cb3c2ba5

View file

@ -620,6 +620,7 @@
//<![CDATA[ //<![CDATA[
// //
$(document).ready(function() { $(document).ready(function() {
[% IF budgets %]
var oTable = $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, { var oTable = $("#budgeth").dataTable($.extend(true, {}, dataTablesDefaults, {
"fnDrawCallback": function ( oSettings ) { "fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 ) if ( oSettings.aiDisplay.length == 0 )
@ -687,6 +688,7 @@
$("#hide_inactive").click(); $("#hide_inactive").click();
[% END %] [% END %]
oTable.fnAddFilters("filter", 750); oTable.fnAddFilters("filter", 750);
[% END %]
$("#filterbutton").click(function() { $("#filterbutton").click(function() {
$("#fundfilters").slideToggle(0); $("#fundfilters").slideToggle(0);