From b336567411c359c5d363de68ed64f86efe9ef052 Mon Sep 17 00:00:00 2001 From: martindholmes Date: Fri, 12 Jul 2024 10:24:32 -0700 Subject: [PATCH] Thanks @joeytakeda for bug fix relating to order of initialization in StaticSearch object properties. --- js/StaticSearch.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/StaticSearch.js b/js/StaticSearch.js index 14d8050..2157dc3 100644 --- a/js/StaticSearch.js +++ b/js/StaticSearch.js @@ -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){ @@ -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);