From 067b1a8514498bbe39df0eb0e20a5eb75a091a97 Mon Sep 17 00:00:00 2001 From: Nigel Osborne Date: Tue, 1 Nov 2011 02:14:59 +0000 Subject: Fix list filter buttons not working on pages with multiple lists http://webtrees.net/en/forums/23-help-for-ver-12-latest-release/16546-re-v-124-clicking-on-buttons-does-nothing --- includes/functions/functions_print_lists.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'includes') diff --git a/includes/functions/functions_print_lists.php b/includes/functions/functions_print_lists.php index 48d40f1a9a..e55244d277 100644 --- a/includes/functions/functions_print_lists.php +++ b/includes/functions/functions_print_lists.php @@ -51,7 +51,7 @@ function print_indi_table($datalist, $legend='', $option='') { jQuery(document).ready(function(){ /* Initialise datatables */ oTable = jQuery('#').dataTable( { - "sDom": '<"H"<"filtersH"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF">>', + "sDom": '<"H"<"filtersH_"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_">>', "oLanguage": { "sLengthMenu": ''); ?>', "sZeroRecords": '', @@ -82,7 +82,7 @@ function print_indi_table($datalist, $legend='', $option='') { "sPaginationType": "full_numbers" }); - jQuery("div.filtersH").html('").html(' '.WT_Person::sexImage('M', 'small').' '. ''. ''. @@ -98,7 +98,7 @@ function print_indi_table($datalist, $legend='', $option='') { "'"); ?>'); - jQuery("div.filtersF").html('").html(''.WT_I18N::translate('Sort by given names').''. ''. '', @@ -461,7 +461,6 @@ function print_indi_table($datalist, $legend='', $option='') { } echo ''; echo ''; - echo ''; // Close "indi-list" //-- charts echo "
"; echo ""; @@ -473,6 +472,7 @@ function print_indi_table($datalist, $legend='', $option='') { print_chart_by_age($deat_by_age, WT_I18N::translate('Age related to death year')); echo "
"; echo "
"; + echo ''; // Close "indi-list" echo ""; } @@ -494,7 +494,7 @@ function print_fam_table($datalist, $legend='', $option='') { jQuery(document).ready(function(){ /* Initialise datatables */ oTable = jQuery('#').dataTable( { - "sDom": '<"H"<"filtersH"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF">>', + "sDom": '<"H"<"filtersH_"><"dt-clear">pf<"dt-clear">irl>t<"F"pl<"dt-clear"><"filtersF_">>', "oLanguage": { "sLengthMenu": ''); ?>', "sZeroRecords": '', @@ -525,11 +525,14 @@ function print_fam_table($datalist, $legend='', $option='') { "sPaginationType": "full_numbers" }); - jQuery("div.filtersH").html('.fnSortListener('#GIVEN_SORT_M_',1); + oTable.fnSortListener('#GIVEN_SORT_F_',5); + + jQuery("div.filtersH_").html(''.WT_I18N::translate('Both alive ').''. ''. ''. - ''. + ''. ''. ''. ''. @@ -539,15 +542,13 @@ function print_fam_table($datalist, $legend='', $option='') { '', "'"); ?>'); - jQuery("div.filtersF").html('").html(''.WT_I18N::translate('Sort by given names').''. ''. ''. '', "'"); ?>'); - oTable.fnSortListener('#GIVEN_SORT_M_',1); - oTable.fnSortListener('#GIVEN_SORT_F_',5); /* Add event listeners for filtering inputs */ jQuery('#DEAT_N_').click( function() { oTable.fnFilter( 'N', 14 );}); @@ -858,7 +859,6 @@ function print_fam_table($datalist, $legend='', $option='') { } echo ''; echo ''; - echo ''; // Close "fam-list" //-- charts echo "
"; // echo ''; + echo '
'; // Close "fam-list" echo ''; } -- cgit v1.3