diff --git a/cps/static/js/edit_books.js b/cps/static/js/edit_books.js index dbacdfdb..7c812ae9 100644 --- a/cps/static/js/edit_books.js +++ b/cps/static/js/edit_books.js @@ -263,3 +263,9 @@ $("#btn-upload-cover").on("change", function () { $("#upload-cover").html(filename); }); +$("#xchange").click(function () { + this.blur(); + var title = $("#book_title").val(); + $("#book_title").val($("#bookAuthor").val()); + $("#bookAuthor").val(title); +}); diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 42e9801c..8ad88675 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -53,6 +53,10 @@ +
+ +
+