implemented full-text search
This commit is contained in:
parent
947fe623da
commit
9b42996cef
6 changed files with 203 additions and 15 deletions
|
@ -45,7 +45,7 @@ $( document ).ready(function() {
|
|||
if(glosses.length > 0) {
|
||||
entrystring = `${glosses.join('; ')}: `
|
||||
}
|
||||
opt = $(`<option value="${out.xmlid}">${entrystring}<i>${out.form}</i>
|
||||
opt = $(`<option value="${out.xmlid}" data-abv-xpath="${e.refs[0].path}">${entrystring}<i>${out.form}</i>
|
||||
${out.glosses.map(g => `‘${g}’`).join(', ')}</option>`);
|
||||
$select_entry.append(opt)
|
||||
})
|
||||
|
@ -57,7 +57,8 @@ $( document ).ready(function() {
|
|||
|
||||
$('#abv-select-entry').on("dblclick", function() {
|
||||
let $selected = $(this).children('option:selected');
|
||||
let $entry = $selected.attr('value');
|
||||
window.location.replace('./dict/' + $entry);
|
||||
let entry = $selected.attr('value');
|
||||
let path = $selected.attr('data-abv-xpath');
|
||||
window.location.replace('./dict/' + entry + `?entry=${entry}&xpath=${path}`);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue