1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-24 11:57:40 +00:00

Remove relate to referrer for tag/custom column allow / deny dialog

This commit is contained in:
Ozzieisaacs
2020-12-31 15:08:56 +01:00
parent 2d3ae71a3d
commit 7849f2fb4b
3 changed files with 46 additions and 48 deletions

View File

@@ -253,14 +253,14 @@ $(function() {
$("#h3").addClass("hidden");
$("#h4").addClass("hidden");
});
function startTable(type) {
function startTable(type, user_id) {
var pathname = document.getElementsByTagName("script"), src = pathname[pathname.length - 1].src;
var path = src.substring(0, src.lastIndexOf("/"));
$("#restrict-elements-table").bootstrapTable({
formatNoMatches: function () {
return "";
},
url: path + "/../../ajax/listrestriction/" + type,
url: path + "/../../ajax/listrestriction/" + type + "/" + user_id,
rowStyle: function(row) {
// console.log('Reihe :' + row + " Index :" + index);
if (row.id.charAt(0) === "a") {
@@ -274,13 +274,13 @@ $(function() {
$.ajax ({
type: "Post",
data: "id=" + row.id + "&type=" + row.type + "&Element=" + encodeURIComponent(row.Element),
url: path + "/../../ajax/deleterestriction/" + type,
url: path + "/../../ajax/deleterestriction/" + type + "/" + user_id,
async: true,
timeout: 900,
success:function() {
$.ajax({
method:"get",
url: path + "/../../ajax/listrestriction/" + type,
url: path + "/../../ajax/listrestriction/" + type + "/" + user_id,
async: true,
timeout: 900,
success:function(data) {
@@ -296,7 +296,7 @@ $(function() {
$("#restrict-elements-table").removeClass("table-hover");
$("#restrict-elements-table").on("editable-save.bs.table", function (e, field, row) {
$.ajax({
url: path + "/../../ajax/editrestriction/" + type,
url: path + "/../../ajax/editrestriction/" + type + "/" + user_id,
type: "Post",
data: row
});
@@ -304,13 +304,13 @@ $(function() {
$("[id^=submit_]").click(function() {
$(this)[0].blur();
$.ajax({
url: path + "/../../ajax/addrestriction/" + type,
url: path + "/../../ajax/addrestriction/" + type + "/" + user_id,
type: "Post",
data: $(this).closest("form").serialize() + "&" + $(this)[0].name + "=",
success: function () {
$.ajax ({
method:"get",
url: path + "/../../ajax/listrestriction/" + type,
url: path + "/../../ajax/listrestriction/" + type + "/" + user_id,
async: true,
timeout: 900,
success:function(data) {
@@ -323,21 +323,21 @@ $(function() {
});
}
$("#get_column_values").on("click", function() {
startTable(1);
startTable(1, 0);
$("#h2").removeClass("hidden");
});
$("#get_tags").on("click", function() {
startTable(0);
startTable(0, 0);
$("#h1").removeClass("hidden");
});
$("#get_user_column_values").on("click", function() {
startTable(3);
startTable(3, $(this).data('id'));
$("#h4").removeClass("hidden");
});
$("#get_user_tags").on("click", function() {
startTable(2);
startTable(2, $(this).data('id'));
$(this)[0].blur();
$("#h3").removeClass("hidden");
});