mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Update ajax handler + indicate status
This commit is contained in:
@@ -291,6 +291,24 @@ function loadChannelSelect(selected) {
|
||||
});
|
||||
}
|
||||
|
||||
/* Updates the selected ad blocklist
|
||||
* Request is passed to an ajax handler to download the associated list
|
||||
*
|
||||
*/
|
||||
function updateBlocklist() {
|
||||
var blocklist_id = $('#cbxblocklist').val();
|
||||
if (blocklist_id == '') { return; }
|
||||
$.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);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function clearBlocklistStatus() {
|
||||
$('#cbxblocklist-status').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