|
|
|
@ -460,8 +460,7 @@ $(function() {
|
|
|
|
|
$("input[data-name='passwd_role'][data-pk='"+guest.data("pk")+"']").prop("disabled", true);
|
|
|
|
|
$("input[data-name='edit_shelf_role'][data-pk='"+guest.data("pk")+"']").prop("disabled", true);
|
|
|
|
|
$("input[data-name='sidebar_read_and_unread'][data-pk='"+guest.data("pk")+"']").prop("disabled", true);
|
|
|
|
|
// ToDo: Disable delete
|
|
|
|
|
|
|
|
|
|
$(".user-remove[data-pk='"+guest.data("pk")+"']").prop("disabled", true);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
@ -604,7 +603,7 @@ function EbookActions (value, row) {
|
|
|
|
|
/* Function for deleting books */
|
|
|
|
|
function UserActions (value, row) {
|
|
|
|
|
return [
|
|
|
|
|
"<div class=\"user-remove\" data-target=\"#GeneralDeleteModal\" title=\"Remove\">",
|
|
|
|
|
"<div class=\"user-remove\" data-pk=\"" + row.id + "\" data-target=\"#GeneralDeleteModal\" title=\"Remove\">",
|
|
|
|
|
"<i class=\"glyphicon glyphicon-trash\"></i>",
|
|
|
|
|
"</div>"
|
|
|
|
|
].join("");
|
|
|
|
@ -624,9 +623,9 @@ function singleUserFormatter(value, row) {
|
|
|
|
|
|
|
|
|
|
function checkboxFormatter(value, row, index){
|
|
|
|
|
if(value & this.column)
|
|
|
|
|
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.name + '" checked onchange="checkboxChange(this, ' + row.id + ', \'' + this.field + '\', ' + 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.name + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.field + '\', ' + this.column + ')">';
|
|
|
|
|
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', ' + this.column + ')">';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkboxChange(checkbox, userId, field, field_index) {
|
|
|
|
@ -733,6 +732,11 @@ function user_handle (userId) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkboxSorter(a, b, c, d)
|
|
|
|
|
{
|
|
|
|
|
return a - b
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function test(){
|
|
|
|
|
console.log("hello");
|
|
|
|
|
}
|
|
|
|
|