Merge branch 'bug_9439' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-02-01 11:30:47 -05:00
commit 80a1aca1ec

View file

@ -7,6 +7,37 @@
<script type="text/javascript">
$(document).ready(function() {
$("#permissionstree").treeview({animated: "fast", collapsed: true});
// Enforce Superlibrarian Privilege Mutual Exclusivity
if($('input[id="flag-0"]:checked').length){
if ($('input[name="flag"]:checked').length > 1){
alert('Inconsistency Detected!\n\nThe superlibrarian privilege is mutually exclusive of other privileges, as it includes them all.\n\nThis patron\'s privileges will now be reset to include only superlibrarian.');
}
$('input[name="flag"]').each(function() {
if($(this).attr('id') != "flag-0"){
$(this).attr('disabled', 'disabled');
$(this).removeAttr('checked', 'checked');
}
});
}
$('input#flag-0').click(function() {
if($('input[id="flag-0"]:checked').length){
$('input[name="flag"]').each(function() {
if($(this).attr('id') != "flag-0"){
$(this).attr('disabled', 'disabled');
$(this).removeAttr('checked', 'checked');
}
});
}
else {
$('input[name="flag"]').each(function() {
$(this).removeAttr('disabled', 'disabled');
});
}
});
});
</script>
<!-- manage checking/unchecking parent permissions -->