2
0
Fork 0

Move title change out of a template function

This commit is contained in:
Alex Kotov 2023-03-25 21:05:34 +04:00
parent 0c03cb4b25
commit e681533b0b
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 4 additions and 3 deletions

View File

@ -14,7 +14,10 @@ window.leqsikoni = {
$.getJSON(
'http://localhost:4567/words/' + word_id,
window.leqsikoni.words_xxxxx_template,
function(data) {
document.title = window.leqsikoni.maybe_text(data.primary_form) || ''
window.leqsikoni.words_xxxxx_template(data)
},
)
},
@ -34,8 +37,6 @@ window.leqsikoni = {
var examples =
window.leqsikoni.words_xxxxx_examples_template(options.examples)
document.title = primary_form || ''
$('#primary-form').text(primary_form || '')
$('#part-of-speech').text(part_of_speech || '')
$('#commentary-data').text(commentary || '')