mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 17:59:21 +02:00
refactoring
This commit is contained in:
parent
e3a917b7e6
commit
534c8048d4
1 changed files with 16 additions and 8 deletions
|
@ -125,15 +125,23 @@ function SubmitForm(id, e) {
|
||||||
*/
|
*/
|
||||||
function list_switchAccountSelection() {
|
function list_switchAccountSelection() {
|
||||||
// set checkbox selection
|
// set checkbox selection
|
||||||
jQuery('input.accountBoxUnchecked').prop('checked', true);
|
document.querySelectorAll('input.accountBoxUnchecked').forEach(item => {
|
||||||
jQuery('input.accountBoxChecked').prop('checked', false);
|
item.checked = true;
|
||||||
|
});
|
||||||
|
document.querySelectorAll('input.accountBoxChecked').forEach(item => {
|
||||||
|
item.checked = false;
|
||||||
|
});
|
||||||
// switch CSS class
|
// switch CSS class
|
||||||
var nowChecked = jQuery('.accountBoxUnchecked');
|
const nowChecked = document.querySelectorAll('input.accountBoxUnchecked');
|
||||||
var nowUnchecked = jQuery('.accountBoxChecked');
|
const nowUnchecked = document.querySelectorAll('input.accountBoxChecked');
|
||||||
nowChecked.addClass('accountBoxChecked');
|
nowChecked.forEach(item => {
|
||||||
nowChecked.removeClass('accountBoxUnchecked');
|
item.classList.add('accountBoxChecked');
|
||||||
nowUnchecked.addClass('accountBoxUnchecked');
|
item.classList.remove('accountBoxUnchecked');
|
||||||
nowUnchecked.removeClass('accountBoxChecked');
|
});
|
||||||
|
nowUnchecked.forEach(item => {
|
||||||
|
item.classList.remove('accountBoxChecked');
|
||||||
|
item.classList.add('accountBoxUnchecked');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue