@@ -10948,11 +10948,26 @@ $(function() {
1094810948 filter3 : new Set ( )
1094910949 } ;
1095010950
10951+ var searchQuery = '' ;
10952+
1095110953 function updateConfList ( ) {
1095210954 $ ( ".conf" ) . each ( function ( ) {
1095310955 let conf = $ ( this ) ;
1095410956 let show = true ;
1095510957
10958+ // Check search query against name, description, date, and place
10959+ if ( searchQuery ) {
10960+ let text = (
10961+ conf . find ( '.conf-title' ) . text ( ) + ' ' +
10962+ conf . find ( '.meta' ) . first ( ) . text ( ) + ' ' +
10963+ conf . find ( '.conf-date' ) . text ( ) + ' ' +
10964+ conf . find ( '.conf-place' ) . text ( )
10965+ ) . toLowerCase ( ) ;
10966+ if ( text . indexOf ( searchQuery ) === - 1 ) {
10967+ show = false ;
10968+ }
10969+ }
10970+
1095610971 // Check each filter group
1095710972 Object . keys ( selectedFilters ) . forEach ( filterGroup => {
1095810973 if ( selectedFilters [ filterGroup ] . size > 0 ) {
@@ -10968,7 +10983,6 @@ $(function() {
1096810983 }
1096910984 } ) ;
1097010985
10971- // Show or hide based on filter matching
1097210986 if ( show ) {
1097310987 conf . show ( ) ;
1097410988 } else {
@@ -10993,16 +11007,27 @@ $(function() {
1099311007
1099411008 // Handle "Clear Filters" button click
1099511009 $ ( "#clear-filters" ) . click ( function ( ) {
10996- // Uncheck all checkboxes
1099711010 $ ( ".filter-checkbox" ) . prop ( "checked" , false ) ;
10998-
10999- // Reset the selected filters
1100011011 selectedFilters = {
1100111012 filter1 : new Set ( ) ,
1100211013 filter2 : new Set ( ) ,
1100311014 filter3 : new Set ( )
1100411015 } ;
11016+ searchQuery = '' ;
11017+ $ ( '#search-input' ) . val ( '' ) ;
11018+ updateConfList ( ) ;
11019+ } ) ;
11020+
11021+ // Search input handler
11022+ $ ( '#search-input' ) . on ( 'input' , function ( ) {
11023+ searchQuery = $ ( this ) . val ( ) . toLowerCase ( ) . trim ( ) ;
11024+ updateConfList ( ) ;
11025+ } ) ;
1100511026
11027+ // Clear search button
11028+ $ ( '#clear-search' ) . click ( function ( ) {
11029+ searchQuery = '' ;
11030+ $ ( '#search-input' ) . val ( '' ) . focus ( ) ;
1100611031 updateConfList ( ) ;
1100711032 } ) ;
1100811033
0 commit comments