Widget:BcaSearch: Difference between revisions

From Bodhicitta
(Search: example links look like links)
(Search: clearing the box returns to the browse panels)
Line 303: Line 303:
$('#bcas-q').val(params.get('q') || '');
$('#bcas-q').val(params.get('q') || '');
$('#bcas-form').on('submit', function (e) { e.preventDefault(); state.cls = ''; run(); });
$('#bcas-form').on('submit', function (e) { e.preventDefault(); state.cls = ''; run(); });
// Clearing the box (its x, or deleting the text) returns to the browse panels.
$('#bcas-q').on('input search', function () { if (!this.value.trim() && state.q) { state.cls = ''; state.tab = 'library'; run(); } });
$('.bcas__tips').on('click', 'a[data-q]', function () { $('#bcas-q').val($(this).attr('data-q')); state.cls = ''; run(); });
$('.bcas__tips').on('click', 'a[data-q]', function () { $('#bcas-q').val($(this).attr('data-q')); state.cls = ''; run(); });
$('#bcas-hint').on('click', 'a[data-q]', function () { $('#bcas-q').val($(this).attr('data-q')); state.cls = ''; run(); });
$('#bcas-hint').on('click', 'a[data-q]', function () { $('#bcas-q').val($(this).attr('data-q')); state.cls = ''; run(); });

Revision as of 19:57, 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.