Skip to content

Commit

Permalink
Thanks @joeytakeda for bug fix relating to order of initialization in…
Browse files Browse the repository at this point in the history
… StaticSearch object properties.
  • Loading branch information
martindholmes committed Jul 12, 2024
1 parent 6247c5b commit b336567
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions js/StaticSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ class StaticSearch{
this.searchButton2.addEventListener('click', function(){this.doSearch(); return false;}.bind(this));
}

//Optional case-sensitivity checkbox for phrasal searches.
this.chkCaseSensitivePhrasal = document.querySelector("input#ssChkCaseSensitivePhrasal");
if (this.allowPhrasal && this.chkCaseSensitivePhrasal){
let fn = function(){this.showHideCaseSensitivityControl(); return false;}.bind(this);
this.queryBox.addEventListener('input', fn);
}


//Clear button will be there if there are filter controls.
this.clearButton = document.querySelector("button#ssClear");
if (this.clearButton){
Expand Down Expand Up @@ -242,6 +234,15 @@ class StaticSearch{
//Configuration for phrasal searches if found. Default true.
this.allowPhrasal = this.getConfigBool('allowphrasal', true);


//Optional case-sensitivity checkbox for phrasal searches.
this.chkCaseSensitivePhrasal = document.querySelector("input#ssChkCaseSensitivePhrasal");
if (this.allowPhrasal && this.chkCaseSensitivePhrasal){
let fn = function(){this.showHideCaseSensitivityControl(); return false;}.bind(this);
this.queryBox.addEventListener('input', fn);
}


//Configuration for use of wildcards. Default false.
this.allowWildcards = this.getConfigBool('allowwildcards', false);

Expand Down

0 comments on commit b336567

Please sign in to comment.