mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-29 06:17:40 +00:00
Undo check of read checkbox in case of error
Display error message in details modal dialog Bugfix set archive bit in booktable Translate error message readstatus change
This commit is contained in:
@@ -28,14 +28,24 @@ $("#have_read_cb").on("change", function() {
|
||||
data: $(this).closest("form").serialize(),
|
||||
error: function(response) {
|
||||
var data = [{type:"danger", message:response.responseText}]
|
||||
$("#flash_success").remove();
|
||||
// $("#flash_success").parent().remove();
|
||||
$("#flash_danger").remove();
|
||||
$(".row-fluid.text-center").remove();
|
||||
if (!jQuery.isEmptyObject(data)) {
|
||||
data.forEach(function (item) {
|
||||
$(".navbar").after('<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_' + item.type + '" class="alert alert-' + item.type + '">' + item.message + '</div>' +
|
||||
'</div>');
|
||||
});
|
||||
$("#have_read_cb").prop("checked", !$("#have_read_cb").prop("checked"));
|
||||
if($("#bookDetailsModal").is(":visible")) {
|
||||
data.forEach(function (item) {
|
||||
$(".modal-header").after('<div id="flash_' + item.type +
|
||||
'" class="text-center alert alert-' + item.type + '">' + item.message + '</div>');
|
||||
});
|
||||
} else
|
||||
{
|
||||
data.forEach(function (item) {
|
||||
$(".navbar").after('<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_' + item.type + '" class="alert alert-' + item.type + '">' + item.message + '</div>' +
|
||||
'</div>');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user