summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-20 16:01:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-20 16:01:25 +0000
commit85462261aca8aa78a51c8152578a067044b0c532 (patch)
treee0f768d95cb43b31947d654bfaf3eaf00cf461b5 /public
parente53c8cfc1baa299f9c1e2dab1c7b4a764115c010 (diff)
downloadredmine-85462261aca8aa78a51c8152578a067044b0c532.tar.gz
redmine-85462261aca8aa78a51c8152578a067044b0c532.zip
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
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/application.js31
-rw-r--r--public/stylesheets/application.css3
2 files changed, 34 insertions, 0 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 3996404bb..7e307b61f 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -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');
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index e45863417..333fbc65f 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -194,6 +194,9 @@ table.plugins span.url { display: block; font-size: 0.9em; }
table.list tbody tr.group td { padding: 0.8em 0 0.5em 0.3em; font-weight: bold; border-bottom: 1px solid #ccc; }
table.list tbody tr.group span.count { color: #aaa; font-size: 80%; }
+tr.group a.toggle-all { color: #aaa; font-size: 80%; font-weight: normal; display:none;}
+tr.group:hover a.toggle-all { display:inline;}
+a.toggle-all:hover {text-decoration:none;}
table.list tbody tr:hover { background-color:#ffffdd; }
table.list tbody tr.group:hover { background-color:inherit; }