mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-21 18:47:39 +00:00
Read and archive bit visible in book table
This commit is contained in:
@@ -631,14 +631,21 @@ function singleUserFormatter(value, row) {
|
||||
}
|
||||
|
||||
function checkboxFormatter(value, row){
|
||||
if(value & this.column)
|
||||
if (value & this.column)
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" checked onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', ' + this.column + ')">';
|
||||
else
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', ' + this.column + ')">';
|
||||
}
|
||||
function bookCheckboxFormatter(value, row){
|
||||
if (value)
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" checked onchange="BookCheckboxChange(this, ' + row.id + ', \'' + this.name + '\')">';
|
||||
else
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="BookCheckboxChange(this, ' + row.id + ', \'' + this.name + '\')">';
|
||||
}
|
||||
|
||||
|
||||
function singlecheckboxFormatter(value, row){
|
||||
if(value)
|
||||
if (value)
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" checked onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', 0)">';
|
||||
else
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', 0)">';
|
||||
@@ -790,7 +797,7 @@ function handleListServerResponse (data) {
|
||||
function checkboxChange(checkbox, userId, field, field_index) {
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: window.location.pathname + "/../../ajax/editlistusers/" + field,
|
||||
url: getPath() + "/ajax/editlistusers/" + field,
|
||||
data: {"pk": userId, "field_index": field_index, "value": checkbox.checked},
|
||||
error: function(data) {
|
||||
handleListServerResponse([{type:"danger", message:data.responseText}])
|
||||
@@ -799,6 +806,19 @@ function checkboxChange(checkbox, userId, field, field_index) {
|
||||
});
|
||||
}
|
||||
|
||||
function BookCheckboxChange(checkbox, userId, field) {
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: getPath() + "/ajax/editbooks/" + field,
|
||||
data: {"pk": userId, "value": checkbox.checked},
|
||||
error: function(data) {
|
||||
handleListServerResponse([{type:"danger", message:data.responseText}])
|
||||
},
|
||||
success: handleListServerResponse
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function selectHeader(element, field) {
|
||||
if (element.value !== "None") {
|
||||
confirmDialog(element.id, "GeneralChangeModal", 0, function () {
|
||||
|
Reference in New Issue
Block a user