From 82d3be3129935501b11be79a7226708cd4e78216 Mon Sep 17 00:00:00 2001 From: Oleg Belyaev Date: Fri, 21 Mar 2025 15:48:44 +0300 Subject: [PATCH] more logical display of index entries --- static/abaev-index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/static/abaev-index.js b/static/abaev-index.js index fa94872..4a84004 100644 --- a/static/abaev-index.js +++ b/static/abaev-index.js @@ -33,19 +33,20 @@ $( document ).ready(function() { fetch(url_entry) .then(res => res.json()) .then(out => { - let entrystring = out.form; + let entrystring = ''; let glosses = []; for (r of e.refs) { if (r.glosses) { for(g of r.glosses){ - glosses.push(g); + glosses.push(`‘${g}’`); } } } if(glosses.length > 0) { - entrystring += ` (${glosses.join('; ')})` + entrystring = `${glosses.join('; ')}: ` } - $select_entry.append(new Option(entrystring,out.xmlid)) + opt = $(``); + $select_entry.append(opt) }) .catch(err => console.log(err)); }