|
Lines 7-12
Link Here
|
| 7 |
<script type="text/javascript"> |
7 |
<script type="text/javascript"> |
| 8 |
$(document).ready(function() { |
8 |
$(document).ready(function() { |
| 9 |
$("#permissionstree").treeview({animated: "fast", collapsed: true}); |
9 |
$("#permissionstree").treeview({animated: "fast", collapsed: true}); |
|
|
10 |
|
| 11 |
// Enforce Superlibrarian Privilege Mutual Exclusivity |
| 12 |
if($('input[id="flag-0"]:checked').length){ |
| 13 |
if ($('input[name="flag"]:checked').length > 1){ |
| 14 |
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.'); |
| 15 |
} |
| 16 |
|
| 17 |
$('input[name="flag"]').each(function() { |
| 18 |
if($(this).attr('id') != "flag-0"){ |
| 19 |
$(this).attr('disabled', 'disabled'); |
| 20 |
$(this).removeAttr('checked', 'checked'); |
| 21 |
} |
| 22 |
}); |
| 23 |
} |
| 24 |
|
| 25 |
$('input#flag-0').click(function() { |
| 26 |
if($('input[id="flag-0"]:checked').length){ |
| 27 |
$('input[name="flag"]').each(function() { |
| 28 |
if($(this).attr('id') != "flag-0"){ |
| 29 |
$(this).attr('disabled', 'disabled'); |
| 30 |
$(this).removeAttr('checked', 'checked'); |
| 31 |
} |
| 32 |
}); |
| 33 |
} |
| 34 |
else { |
| 35 |
$('input[name="flag"]').each(function() { |
| 36 |
$(this).removeAttr('disabled', 'disabled'); |
| 37 |
}); |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 10 |
}); |
41 |
}); |
| 11 |
</script> |
42 |
</script> |
| 12 |
<!-- manage checking/unchecking parent permissions --> |
43 |
<!-- manage checking/unchecking parent permissions --> |
| 13 |
- |
|
|