Submit
Path:
~
/
/
opt
/
psa
/
admin
/
htdocs
/
modules
/
revisium-antivirus
/
js
/
File Content:
ra_users.js
function switchUserSettings(button, event, client_id, type) { event.preventDefault(); if (button.readAttribute('disabled') !== null) return; disableButton(button); var value = button.readAttribute('value'); new Ajax.Request(switch_url, { method: 'post', parameters: {client_id: client_id, current_value: value, type: type}, onFailure: function() { enableButton(button); }, onSuccess: function (transport) { var data = transport.responseText.evalJSON(); if (typeof data.new_value === 'undefined') { enableButton(button); return; } if (data.redirect !== undefined) { window.location.href = data.redirect; } button.writeAttribute('value', data.new_value); switchClassForControls(button, data.new_value); button.innerHTML = data.text; enableButton(button); } }); } function switchAllUserSettings(button, event, type, value) { event.preventDefault(); if (button.readAttribute('disabled') !== null) return; disableButton(button); new Ajax.Request(switch_all_url, { method: 'post', parameters: {value: value, type: type}, onFailure: function() { enableButton(button); }, onSuccess: function (transport) { var data = transport.responseText.evalJSON(); if (data.refresh !== undefined && data.refresh) { window.location.reload(); } else if (data.no_refresh !== undefined && data.no_refresh) { enableButton(button); } } }); } function scanAll(sendButton, event, client_id) { client_id = (typeof client_id == 'undefined') ? 0 : client_id; event.preventDefault(); if (sendButton.disabled) return; sendButton.writeAttribute('disabled', ''); sendButton.addClassName('disabled'); scanAllDisable(); new Ajax.Request(scan_all_url, { method: 'post', parameters: {start: 1, client_id: client_id}, onFailure: function() { sendButton.disabled = false; sendButton.removeClassName('disabled'); scanAllEnable(); }, onSuccess: function (transport) { var data = transport.responseText.evalJSON(); window.location.href = domains_url + (client_id > 0 ? '?client_id=' + client_id : ''); } }); } function disableButton(button) { $('img_progress').show(); button.disabled = true; button.addClassName('disabled'); } function enableButton(button) { $('img_progress').hide(); button.disabled = false; button.removeClassName('disabled'); } function switchClassForControls(button, value) { if(value === 1) { button.removeClassName('switch_off'); button.addClassName('switch_on'); } else { button.removeClassName('switch_on'); button.addClassName('switch_off'); } } function scanAllDisable() { $('btn_scan_all').disabled = true; $('btn_scan_all').up().addClassName('disabled'); } function scanAllEnable() { $('btn_scan_all').disabled = false; $('btn_scan_all').up().removeClassName('disabled'); }
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
ra_domain.js
8176 bytes
0644
ra_main.js
507 bytes
0644
ra_users.js
3323 bytes
0644
N4ST4R_ID | Naxtarrr