From 911a6a31453519e0280ad6537d41afcaa6dca16f Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 6 Oct 2023 14:41:55 +0200 Subject: [PATCH] Update template blocklist ids + cbxblocklist option val --- app/js/custom.js | 5 +++-- templates/adblock/general.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index c18ea8ce..baa34c7a 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -441,7 +441,8 @@ function setHardwareModeTooltip() { * Interface elements are updated to indicate current progress, status. */ function updateBlocklist() { - var blocklist_id = $('#cbxblocklist').val(); + var opt = $('#cbxblocklist option:selected'); + var blocklist_id = opt.val(); var csrfToken = $('meta[name=csrf_token]').attr('content'); if (blocklist_id == '') { return; } $('#cbxblocklist-status').find('i').removeClass('fas fa-check').addClass('fas fa-cog fa-spin'); @@ -451,7 +452,7 @@ function updateBlocklist() { if (jsonData['return'] == '0') { $('#cbxblocklist-status').find('i').removeClass('fas fa-cog fa-spin').addClass('fas fa-check'); $('#cbxblocklist-status').removeClass('check-progress').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700); - $('#'+blocklist_id).text("Just now"); + $('#blocklist-'+jsonData['list']).text("Just now"); } }) } diff --git a/templates/adblock/general.php b/templates/adblock/general.php index 22845e66..a6d14439 100644 --- a/templates/adblock/general.php +++ b/templates/adblock/general.php @@ -19,9 +19,9 @@

-

: +
:
-
: +
: