Adds checkboxes toggle links on permissions report.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1770 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-08-26 16:05:02 +00:00
parent 5c6bee7f85
commit 6ad989f828
2 changed files with 20 additions and 5 deletions

View File

@@ -10,6 +10,13 @@ function checkAll (id, checked) {
}
}
function toggleCheckboxesBySelector(selector) {
boxes = $$(selector);
var all_checked = true;
for (i = 0; i < boxes.length; i++) { if (boxes[i].checked == false) { all_checked = false; } }
for (i = 0; i < boxes.length; i++) { boxes[i].checked = !all_checked; }
}
function showAndScrollTo(id, focus) {
Element.show(id);
if (focus!=null) { Form.Element.focus(focus); }