Widget:BcaSearch: Difference between revisions

From Bodhicitta
(Site search (preview): full text, grouped results, class filters, shareable URL)
 
(Start from the RLQ queue (jQuery/mw.util not loaded yet for inline scripts))
Line 40: Line 40:
</div>
</div>
<script>
<script>
(function () {
// Inline scripts run before ResourceLoader has loaded jQuery and mediawiki.util,
if (!window.mw || !window.jQuery) return;
// so the search starts from the RLQ queue once those modules are ready.
(window.RLQ = window.RLQ || []).push(function () { mw.loader.using(['mediawiki.util', 'jquery']).then(function () {
var $ = jQuery;
var $ = jQuery;
var API = mw.util.wikiScript('api');
var API = mw.util.wikiScript('api');
Line 245: Line 246:
if (state.q) run(); else $('#bcas-q').trigger('focus');
if (state.q) run(); else $('#bcas-q').trigger('focus');
});
});
}());
}); });
</script></includeonly>
</script></includeonly>

Revision as of 18:59, 2 October 2026

Site search for the Bodhicitta wiki (preview). Used on Advanced Search/Preview. Full-text search through CirrusSearch, results grouped (library, passages in the aligned texts, essays, topics, people), class filters with counts, the library's bibliographic rows, and the search kept in the page address so it can be shared.