Bugfix load metadata

Bugfix xchange author and title
Better handling of incompatible iso-639 module on python3.12
This commit is contained in:
Ozzie Isaacs
2024-08-18 18:52:13 +02:00
parent 6717683ac3
commit 1be0ff9620
6 changed files with 20 additions and 15 deletions

View File

@@ -93,7 +93,7 @@ var authors = new Bloodhound({
},
});
$(".form-group #bookAuthor").typeahead(
$(".form-group #authors").typeahead(
{
highlight: true,
minLength: 1,
@@ -262,7 +262,7 @@ $("#btn-upload-cover").on("change", function () {
$("#xchange").click(function () {
this.blur();
var title = $("#title").val();
$("#title").val($("#bookAuthor").val());
$("#bookAuthor").val(title);
$("#title").val($("#authors").val());
$("#authors").val(title);
});

View File

@@ -38,11 +38,11 @@ $(function () {
}
function populateForm (book) {
tinymce.get("comments").setContent(book.comments);
tinymce.get("comments").setContent(book.description);
var uniqueTags = getUniqueValues('tags', book)
var uniqueLanguages = getUniqueValues('languages', book)
var ampSeparatedAuthors = (book.authors || []).join(" & ");
$("#bookAuthor").val(ampSeparatedAuthors);
$("#authors").val(ampSeparatedAuthors);
$("#title").val(book.title);
$("#tags").val(uniqueTags.join(", "));
$("#languages").val(uniqueLanguages.join(", "));