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

Code cleaning

code cosmetics
deleted unused file caliBlur
fixed custom error page
This commit is contained in:
Ozzieisaacs
2019-01-08 07:58:22 +01:00
parent fa3426aa08
commit 3b40c83314
8 changed files with 142 additions and 2439 deletions

View File

@@ -1,6 +1,6 @@
$(function() {
$("#domain_submit").click(function(event){
$("#domain_submit").click(function(event) {
event.preventDefault();
$("#domain_add").ajaxForm();
$(this).closest("form").submit();
@@ -14,44 +14,45 @@ $(function() {
}
});
});
$('#domain-table').bootstrapTable({
formatNoMatches: function () {
return '';
},
striped: false
$("#domain-table").bootstrapTable({
formatNoMatches: function () {
return "";
},
striped: false
});
$("#btndeletedomain").click(function() {
//get data-id attribute of the clicked element
var domainId = $(this).data('domainId');
var domainId = $(this).data("domainId");
$.ajax({
method:"post",
url: window.location.pathname + "/../../ajax/deletedomain",
data: {"domainid":domainId}
});
$('#DeleteDomain').modal('hide');
$("#DeleteDomain").modal("hide");
$.ajax({
method:"get",
url: window.location.pathname + "/../../ajax/domainlist",
async: true,
timeout: 900,
success:function(data){
$('#domain-table').bootstrapTable("load", data);
$("#domain-table").bootstrapTable("load", data);
}
});
});
//triggered when modal is about to be shown
$('#DeleteDomain').on('show.bs.modal', function(e) {
$("#DeleteDomain").on("show.bs.modal" function(e) {
//get data-id attribute of the clicked element and store in button
var domainId = $(e.relatedTarget).data('domain-id');
$(e.currentTarget).find("#btndeletedomain").data('domainId',domainId);
var domainId = $(e.relatedTarget).data("domain-id");
$(e.currentTarget).find("#btndeletedomain").data("domainId", domainId);
});
});
function TableActions (value, row, index) {
return [
'<a class="danger remove" data-toggle="modal" data-target="#DeleteDomain" data-domain-id="'+row.id+'" title="Remove">',
'<i class="glyphicon glyphicon-trash"></i>',
'</a>'
].join('');
"<a class=\"danger remove\" data-toggle=\"modal\" data-target=\"#DeleteDomain\" data-domain-id=\"" + row.id
+ "\" title=\"Remove\">",
"<i class=\"glyphicon glyphicon-trash\"></i>",
"</a>"
].join("");
}