diff --git a/GanjooRazor/Pages/AudioClip.cshtml b/GanjooRazor/Pages/AudioClip.cshtml index a77ef758..a546318b 100644 --- a/GanjooRazor/Pages/AudioClip.cshtml +++ b/GanjooRazor/Pages/AudioClip.cshtml @@ -150,7 +150,7 @@

- + diff --git a/GanjooRazor/Pages/Books.cshtml b/GanjooRazor/Pages/Books.cshtml index d07b84d1..8903b4a9 100644 --- a/GanjooRazor/Pages/Books.cshtml +++ b/GanjooRazor/Pages/Books.cshtml @@ -16,7 +16,7 @@ - + - + - + - + + diff --git a/GanjooRazor/Pages/Photos.cshtml b/GanjooRazor/Pages/Photos.cshtml index 51895dac..3aff6892 100644 --- a/GanjooRazor/Pages/Photos.cshtml +++ b/GanjooRazor/Pages/Photos.cshtml @@ -15,7 +15,7 @@ - + + diff --git a/GanjooRazor/Pages/Search.cshtml b/GanjooRazor/Pages/Search.cshtml index 530490cc..b4fc3b47 100644 --- a/GanjooRazor/Pages/Search.cshtml +++ b/GanjooRazor/Pages/Search.cshtml @@ -21,7 +21,7 @@ - + - + - + - + - + - diff --git a/GanjooRazor/wwwroot/js/bk.js b/GanjooRazor/wwwroot/js/bk.js index 698da0c4..8b82396b 100644 --- a/GanjooRazor/wwwroot/js/bk.js +++ b/GanjooRazor/wwwroot/js/bk.js @@ -1328,5 +1328,34 @@ function highlightCharacter(previousHighlightedString, charToHighlight) { return highlightedString; } +function inlineHighlight() { + var searchTerm = document.getElementById('inline-search').value; + if (searchTerm.trim().length == 0) { + inlineUnHighlight(); + return; + } + var context = document.getElementById('garticle'); + + $(context).unmark({ + done: function () { + $(context).mark(searchTerm, { + ignoreJoiners: true, + ignorePunctuation: 'ًٌٍَُّ.،!؟ٔ:؛;*)([]«»ْ'.split(''), + "exclude": [ + "#poet-image *", + "#page-hierarchy *", + "#utils-navbar *", + ] + }); + } + }); +} + +function inlineUnHighlight() { + document.getElementById('inline-search').value = ''; + var context = document.getElementById('garticle'); + $(context).unmark(); +} +