1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-21 18:47:39 +00:00

Migration of view settings working in User database

Book Merge gives now feedback on what is done
This commit is contained in:
OzzieIsaacs
2020-08-22 10:27:09 +02:00
parent ad144922fb
commit f2add3f788
5 changed files with 50 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web)
* Copyright (C) 2018 OzzieIsaacs
* Copyright (C) 2020 OzzieIsaacs
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -63,7 +63,25 @@ $(function() {
url: window.location.pathname + "/../../ajax/mergebooks",
data: JSON.stringify({"Merge_books":selections}),
success: function success() {
// ToDo:
$('#books-table').bootstrapTable('refresh');
$("#books-table").bootstrapTable('uncheckAll');
}
});
});
$("#merge_books").click(function() {
$.ajax({
method:"post",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: window.location.pathname + "/../../ajax/simulatemerge",
data: JSON.stringify({"Merge_books":selections}),
success: function success(book_titles) {
$.each(book_titles.from, function(i, item) {
$("<span>- " + item + "</span>").appendTo("#merge_from");
});
$('#merge_to').text("- " + book_titles.to);
}
});
});