?
Current Path : /home1/savoy/public_html/savoyglobal.net/rms/application/views/settings/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/rms/application/views/settings/settingsfunctions.php |
<script type="text/javascript"> function check_module_view(prefix, module) { var welements = document.getElementsByName(prefix+module+"[]"); for (var i = 0; i < welements.length; i++) { if(document.getElementById(prefix+ module).checked==true) welements[i].checked=true; else welements[i].checked=false; } } function check_all_view(status,prefix,prefix1) { //alert(prefix+'__'+prefix1); var Length = document.getElementById('ViewCount').value; var Permision=0; var PrivatePermission =""; //var homepage_Permision=""; var FinalPermission=""; for(var i=0; i <Length; i++) { if(prefix!="") document.getElementById(prefix +""+ i).checked=status.checked; //if edit checked then view also checked if(prefix1=="view_all_") { if(document.getElementById("view_all_"+ i).checked) { document.getElementById('view_'+i ).checked = true; document.getElementById('edit_'+i ).checked = true; document.getElementById('delete_'+i ).checked = true; } if(document.getElementById("view_all_"+ i).checked==false) { document.getElementById('view_'+i ).checked = false; document.getElementById('edit_'+i ).checked = false; document.getElementById('delete_'+i ).checked = false; } } if(prefix1=="edit_") { if(document.getElementById("edit_"+ i).checked) document.getElementById('view_'+i ).checked = true; if(document.getElementById("edit_"+ i).checked==false) document.getElementById('edit_check_all').checked = false; } //if delete checked then view automatically checked if(prefix1=="delete_") { if(document.getElementById("delete_"+ i).checked) document.getElementById('view_'+i ).checked = true; if(document.getElementById("delete_"+ i).checked==false) document.getElementById('delete_check_all').checked = false; } if(prefix1=="view_") { if(document.getElementById('view_'+i).checked == false) { document.getElementById('edit_'+i ).checked = false; document.getElementById('delete_'+i ).checked = false; } if(document.getElementById("view_"+ i).checked==false) { document.getElementById('delete_check_all').checked = false; document.getElementById('edit_check_all').checked = false; document.getElementById('view_check_all').checked = false; } } if(document.getElementById("homepage_"+ i).checked) PrivatePermission = PrivatePermission + "1,"; else PrivatePermission = PrivatePermission + "0,"; //Calculate the Permission Value According to the user select Permission=0; if(document.getElementById("view_"+ i).checked) Permission+=4; if(document.getElementById("edit_"+ i).checked) Permission+=2; if(document.getElementById("delete_"+ i).checked) Permission+=1; FinalPermission = FinalPermission + "" + Permission + ","; } document.getElementById('TxtPermissionList').value = FinalPermission; document.getElementById('home_page_list').value = PrivatePermission; } function check_all_view2(status,prefix,prefix1) { var Length = document.getElementById('ViewCount').value; for(var i=0; i <Length; i++) { if(prefix!="") document.getElementById(prefix +""+ i).checked=status.checked; if(prefix1=="view_all_") { if(document.getElementById("view_all_"+ i).checked) { document.getElementById('view_'+i ).checked = true; } if(document.getElementById("view_all_"+ i).checked==false) { document.getElementById('view_'+i ).checked = false; } } if(prefix1=="view_") { if(document.getElementById("view_"+ i).checked==false) { document.getElementById('view_check_all').checked = false; } } } } function check_module_view2(module) { var welements = document.getElementsByClass(module); for (var i = 0; i < welements.length; i++) { if(document.getElementById(prefix+ module).checked==true) welements[i].checked=true; else welements[i].checked=false; } } </script>