Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/clinic.corals.io/resources/assets/js/roles/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/clinic.corals.io/resources/assets/js/roles/create-edit.js
'use strict';

$(document).ready(function () {
    let totalPermissionsCount = totalPermissions - 1;
    let checkAllLength = $('.permission:checked').length;
    if (isEdit == true) {
        if (checkAllLength === totalPermissionsCount) {
            $('#checkAllPermission').prop('checked', true);
        } else {
            $('#checkAllPermission').prop('checked', false);
        }
    }
});

$(document).on('click', '#checkAllPermission', function () {
    if ($('#checkAllPermission').is(':checked')) {
        $('.permission').each(function () {
            $(this).prop('checked', true);
        });
    } else {
        $('.permission').each(function () {
            $(this).prop('checked', false);
        });
    }
});

$(document).on('click', '.permission', function () {
    let checkAllLength = $('.permission:checked').length;
    let totalPermissionsCount = totalPermissions - 1;
    if (checkAllLength === totalPermissionsCount) {
        $('#checkAllPermission').prop('checked', true);
    } else {
        $('#checkAllPermission').prop('checked', false);
    }
});

Spamworldpro Mini