Adds links on the issue list to collapse/expang all groups (#7236).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5174 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-03-20 16:01:25 +00:00
parent e53c8cfc1b
commit 85462261ac
47 changed files with 123 additions and 0 deletions
+31
View File
@@ -40,6 +40,37 @@ function toggleRowGroup(el) {
}
}
function collapseAllRowGroups(el) {
var tbody = Element.up(el, 'tbody');
tbody.childElements('tr').each(function(tr) {
if (tr.hasClassName('group')) {
tr.removeClassName('open');
} else {
tr.hide();
}
})
}
function expandAllRowGroups(el) {
var tbody = Element.up(el, 'tbody');
tbody.childElements('tr').each(function(tr) {
if (tr.hasClassName('group')) {
tr.addClassName('open');
} else {
tr.show();
}
})
}
function toggleAllRowGroups(el) {
var tr = Element.up(el, 'tr');
if (tr.hasClassName('open')) {
collapseAllRowGroups(el);
} else {
expandAllRowGroups(el);
}
}
function toggleFieldset(el) {
var fieldset = Element.up(el, 'fieldset');
fieldset.toggleClassName('collapsed');