Merge pull request #1110 from pi-hole/var

Switch back to var
This commit is contained in:
Adam Warner
2020-01-02 17:28:08 +00:00
committed by GitHub
4 changed files with 20 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
var table;
var groups = [];
const token = $("#token").html();
var token = $("#token").html();
var info = null;
function showAlert(type, icon, title, message) {
let opts = {};
var opts = {};
title = "&nbsp;<strong>" + title + "</strong><br>";
switch (type) {
case "info":
@@ -110,7 +110,7 @@ function initTable() {
$(".deleteAdlist").on("click", deleteAdlist);
},
rowCallback: function(row, data) {
const tooltip =
var tooltip =
"Added: " +
datetime(data.date_added) +
"\nLast modified: " +
@@ -121,7 +121,7 @@ function initTable() {
'<code id="address" title="' + tooltip + '">' + data.address + "</code>"
);
const disabled = data.enabled === 0;
var disabled = data.enabled === 0;
$("td:eq(1)", row).html(
'<input type="checkbox" id="status"' +
(disabled ? "" : " checked") +
@@ -169,7 +169,7 @@ function initTable() {
sel.multiselect({ includeSelectAllOption: true });
sel.on("change", editAdlist);
let button =
var button =
'<button class="btn btn-danger btn-xs deleteAdlist" type="button" data-id="' +
data.id +
'">' +

View File

@@ -1,10 +1,10 @@
var table;
var groups = [];
const token = $("#token").html();
var token = $("#token").html();
var info = null;
function showAlert(type, icon, title, message) {
let opts = {};
var opts = {};
title = "&nbsp;<strong>" + title + "</strong><br>";
switch (type) {
case "info":
@@ -136,7 +136,7 @@ function initTable() {
$(".deleteClient").on("click", deleteClient);
},
rowCallback: function(row, data) {
const tooltip = "Database ID: " + data.id;
var tooltip = "Database ID: " + data.id;
var ip_name =
'<code id="ip" title="' +
tooltip +
@@ -177,7 +177,7 @@ function initTable() {
sel.multiselect({ includeSelectAllOption: true });
sel.on("change", editClient);
let button =
var button =
'<button class="btn btn-danger btn-xs deleteClient" type="button" data-id="' +
data.id +
'">' +

View File

@@ -1,10 +1,10 @@
var table;
var groups = [];
const token = $("#token").html();
var token = $("#token").html();
var info = null;
function showAlert(type, icon, title, message) {
let opts = {};
var opts = {};
title = "&nbsp;<strong>" + title + "</strong><br>";
switch (type) {
case "info":
@@ -111,7 +111,7 @@ function initTable() {
$(".deleteDomain").on("click", deleteDomain);
},
rowCallback: function(row, data) {
const tooltip =
var tooltip =
"Added: " +
datetime(data.date_added) +
"\nLast modified: " +
@@ -140,7 +140,7 @@ function initTable() {
);
$("#type", row).on("change", editDomain);
const disabled = data.enabled === 0;
var disabled = data.enabled === 0;
$("td:eq(2)", row).html(
'<input type="checkbox" id="status"' +
(disabled ? "" : " checked") +
@@ -186,7 +186,7 @@ function initTable() {
sel.multiselect({ includeSelectAllOption: true });
sel.on("change", editDomain);
let button =
var button =
'<button class="btn btn-danger btn-xs deleteDomain" type="button" data-id="' +
data.id +
'">' +

View File

@@ -1,9 +1,9 @@
var table;
const token = $("#token").html();
var token = $("#token").html();
var info = null;
function showAlert(type, icon, title, message) {
let opts = {};
var opts = {};
title = "&nbsp;<strong>" + title + "</strong><br>";
switch (type) {
case "info":
@@ -84,7 +84,7 @@ $(document).ready(function() {
$(".deleteGroup").on("click", deleteGroup);
},
rowCallback: function(row, data) {
const tooltip =
var tooltip =
"Added: " +
datetime(data.date_added) +
"\nLast modified: " +
@@ -102,7 +102,7 @@ $(document).ready(function() {
name.val(data.name);
name.on("change", editGroup);
const disabled = data.enabled === 0;
var disabled = data.enabled === 0;
$("td:eq(1)", row).html(
'<input type="checkbox" id="status"' +
(disabled ? "" : " checked") +
@@ -119,13 +119,13 @@ $(document).ready(function() {
status.on("change", editGroup);
$("td:eq(2)", row).html('<input id="desc" class="form-control">');
const desc = data.description !== null ? data.description : "";
var desc = data.description !== null ? data.description : "";
$("#desc", row).val(desc);
$("#desc", row).on("change", editGroup);
$("td:eq(3)", row).empty();
if (data.id !== 0) {
let button =
var button =
" &nbsp;" +
'<button class="btn btn-danger btn-xs deleteGroup" type="button" data-id="' +
data.id +