mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
add list download progress indicator
This commit is contained in:
parent
3552a4b101
commit
ff14e64bf9
5 changed files with 38 additions and 3 deletions
|
@ -230,3 +230,8 @@ canvas#divDBChartBandwidthhourly {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
color: #1cc88a;
|
color: #1cc88a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check-progress {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,3 +245,17 @@ canvas#divDBChartBandwidthhourly {
|
||||||
.table {
|
.table {
|
||||||
margin-bottom: 0rem;
|
margin-bottom: 0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check-hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-updated {
|
||||||
|
opacity: 0;
|
||||||
|
color: #1cc88a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-progress {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -434,3 +434,17 @@ canvas#divDBChartBandwidthhourly {
|
||||||
.figure, .authors {
|
.figure, .authors {
|
||||||
filter: brightness(70%) !important;
|
filter: brightness(70%) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check-hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-updated {
|
||||||
|
opacity: 0;
|
||||||
|
color: #1cc88a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-progress {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,16 +298,19 @@ function loadChannelSelect(selected) {
|
||||||
function updateBlocklist() {
|
function updateBlocklist() {
|
||||||
var blocklist_id = $('#cbxblocklist').val();
|
var blocklist_id = $('#cbxblocklist').val();
|
||||||
if (blocklist_id == '') { return; }
|
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){
|
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id },function(data){
|
||||||
var jsonData = JSON.parse(data);
|
var jsonData = JSON.parse(data);
|
||||||
if (jsonData['return'] == '0') {
|
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() {
|
function clearBlocklistStatus() {
|
||||||
$('#cbxblocklist-status').addClass('check-hidden');
|
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
|
||||||
}
|
}
|
||||||
// Static Array method
|
// Static Array method
|
||||||
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="nav-item"><a class="nav-link active" id="clienttab" href="#adblocklistsettings" data-toggle="tab"><?php echo _("Blocklist settings"); ?></a></li>
|
<li class="nav-item"><a class="nav-link active" id="clienttab" href="#adblocklistsettings" data-toggle="tab"><?php echo _("Blocklist settings"); ?></a></li>
|
||||||
<li class="nav-item"><a class="nav-link" id="clienttab" href="#adblockstats" data-toggle="tab"><?php echo _("Statistics"); ?></a></li>
|
|
||||||
<li class="nav-item"><a class="nav-link" id="logoutputtab" href="#adblocklogfileoutput" data-toggle="tab"><?php echo _("Logging"); ?></a></li>
|
<li class="nav-item"><a class="nav-link" id="logoutputtab" href="#adblocklogfileoutput" data-toggle="tab"><?php echo _("Logging"); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue