mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
add list download progress indicator
This commit is contained in:
@@ -298,16 +298,19 @@ function loadChannelSelect(selected) {
|
||||
function updateBlocklist() {
|
||||
var blocklist_id = $('#cbxblocklist').val();
|
||||
if (blocklist_id == '') { return; }
|
||||
$('#cbxblocklist-status').find('i').removeClass('fas fa-check').addClass('fas fa-cog fa-spin');
|
||||
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-progress');
|
||||
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id },function(data){
|
||||
var jsonData = JSON.parse(data);
|
||||
if (jsonData['return'] == '0') {
|
||||
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
|
||||
$('#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);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function clearBlocklistStatus() {
|
||||
$('#cbxblocklist-status').addClass('check-hidden');
|
||||
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
||||
}
|
||||
// Static Array method
|
||||
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
||||
|
Reference in New Issue
Block a user