Compare commits
3 commits
a5bf12d77c
...
77ffee921c
Author | SHA1 | Date | |
---|---|---|---|
|
77ffee921c | ||
|
922648a9ac | ||
|
3c34f79930 |
2 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
$( document ).ready(function() {
|
||||
$('#abv-select-lang').on('input', function() {
|
||||
let $selected = $(this).children('option:selected');
|
||||
let url = `../api/languages/${$selected.attr('value')}`;
|
||||
let url = `./api/languages/${$selected.attr('value')}`;
|
||||
|
||||
fetch(url)
|
||||
.then(res => res.json())
|
||||
|
@ -21,7 +21,7 @@ $( document ).ready(function() {
|
|||
let $selected = $(this).children('option:selected');
|
||||
let wordid = $selected.attr('value');
|
||||
let lang = $('#abv-select-lang').children('option:selected').attr('value');
|
||||
let url = `../api/languages/${lang}/words/${wordid}`;
|
||||
let url = `./api/languages/${lang}/words/${wordid}`;
|
||||
|
||||
fetch(url)
|
||||
.then(res => res.json())
|
||||
|
@ -29,7 +29,7 @@ $( document ).ready(function() {
|
|||
let $select_entry = $('#abv-select-entry');
|
||||
$select_entry.empty();
|
||||
for (e of out.entries) {
|
||||
url_entry = `../api/entries/${e.id}`;
|
||||
url_entry = `./api/entries/${e.id}`;
|
||||
fetch(url_entry)
|
||||
.then(res => res.json())
|
||||
.then(out => {
|
||||
|
@ -56,6 +56,6 @@ $( 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);
|
||||
window.location.replace('./dict/' + $entry);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -185,6 +185,7 @@ return
|
|||
let $mlang-id := $mlang/code/text()
|
||||
let $mlang-name := if ($lang = 'ru') then $mlang/ru/text() else $mlang/en/text()
|
||||
where $mlang-name != ''
|
||||
order by $mlang-name
|
||||
return
|
||||
<option value="{$mlang-id}">
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue