]> source.dussan.org Git - redmine.git/commitdiff
Adds links on the issue list to collapse/expang all groups (#7236).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Mar 2011 16:01:25 +0000 (16:01 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Mar 2011 16:01:25 +0000 (16:01 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5174 e93f8b46-1217-0410-a6f0-8f06a7374b81

47 files changed:
app/views/issues/_list.rhtml
config/locales/bg.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/da.yml
config/locales/de.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/es.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hu.yml
config/locales/id.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ko.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/mn.yml
config/locales/nl.yml
config/locales/no.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sr-YU.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/th.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-TW.yml
config/locales/zh.yml
public/javascripts/application.js
public/stylesheets/application.css

index 1a2953bf5d184be45bdc23091f7d99a692efb366..7d3a03c2ef2c47b2e9c52a39cf5d4b083bd5edfb 100644 (file)
@@ -20,6 +20,7 @@
        <td colspan="<%= query.columns.size + 2 %>">
                <span class="expander" onclick="toggleRowGroup(this); return false;">&nbsp;</span>
        <%= group.blank? ? 'None' : column_content(@query.group_by_column, issue) %> <span class="count">(<%= @issue_count_by_group[group] %>)</span>
+        <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", "toggleAllRowGroups(this)", :class => 'toggle-all') %>
        </td>
                </tr>
                <% previous_group = group %>
index 1e789dd916ff32d5d28460a7ea4c99362de47669..1e9402eb727457362998ed4f380bf4d6789ce537 100644 (file)
@@ -941,3 +941,5 @@ bg:
   enumeration_activities: Дейности (time tracking)
   enumeration_system_activity: Системна активност
 
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 24bde916070292a0ee7bff7654bca65d74b62094..00df00aca2f77eb2edfe0ad361067f43c8c2a4f8 100644 (file)
@@ -955,3 +955,5 @@ bs:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 452c25a47698cb8e52e605d88a506268ec1846c7..acd8dbe8397327eed128553c79300005fd4f0ee3 100644 (file)
@@ -944,3 +944,5 @@ ca:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index dae695cf8127ed9d7f358b342cf184de66f7ec21..cc76d1f39a7fd5df1893b08ea90fd68f8b891e1a 100644 (file)
@@ -945,3 +945,5 @@ cs:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 2b9370e60469ce9b0e17e78ca50bb9d04023a105..115ffe58252554d2de9ec66ba89401205777fc53 100644 (file)
@@ -957,3 +957,5 @@ da:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index b856c22f4c392a780c11fb03e8785d2fb5edb7d6..8917a776a7c136c85d7a7145eeb93e04c3081f52 100644 (file)
@@ -958,3 +958,5 @@ de:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 77ab14aae0eb371bb948686e130ccf499a073efe..0cd930708ee8cc85e8ab8971239e8b1738015dec 100644 (file)
@@ -941,3 +941,5 @@ el:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 7883395bd2474eef0e39d53dc1db4557b1fba205..8753e7ec40ae33124d01c95dff5db00e5337b29b 100644 (file)
@@ -945,3 +945,5 @@ en-GB:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index c4126061ccedc0e62fb0a37de766d1a6cff5ac89..277a461005cf811fc1487b3845f5c2b68303c173 100644 (file)
@@ -802,6 +802,8 @@ en:
   button_save: Save
   button_check_all: Check all
   button_uncheck_all: Uncheck all
+  button_collapse_all: Collapse all
+  button_expand_all: Expand all
   button_delete: Delete
   button_create: Create
   button_create_and_continue: Create and continue
index 97ecaea71e12f3591796c64331e4bb48f493cdf0..0a1081ca3d8f52afa49c88e24f0c67cd298c2e19 100644 (file)
@@ -978,3 +978,5 @@ es:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index cfdb81380ecbcb8fc3f8b11dcc07f7fd106b41e6..e7bc80c1c9cba4d82b0d7f03a8671228affb17ef 100644 (file)
@@ -945,3 +945,5 @@ eu:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index b4dea53443a3cea60d2e4e4276525d3ab31e2a62..3f06a9e550b5a593d95f137f164b75d89b5a339d 100644 (file)
@@ -944,3 +944,5 @@ fa:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 50b2d6d7007d8bb51de9ade356fc7989878ff0ed..e1df44f53a6251b54605209ad8041cba052421c1 100644 (file)
@@ -962,3 +962,5 @@ fi:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 86c04af382e22655a176136d16c82531574b7353..5e02bd351cb783f6c7d99b2418d9450c56072de6 100644 (file)
@@ -793,6 +793,8 @@ fr:
   button_save: Sauvegarder
   button_check_all: Tout cocher
   button_uncheck_all: Tout décocher
+  button_collapse_all: Plier tout
+  button_expand_all: Déplier tout
   button_delete: Supprimer
   button_create: Créer
   button_create_and_continue: Créer et continuer
index e4bc11e1e2e080bbc03234d6ba4410efc4027eff..ed18b088b8d224e1df7402a09df00a065702fb82 100644 (file)
@@ -953,3 +953,5 @@ gl:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index c99e1a2ea0b5c1fdb63f184c60fb9a567e75218a..d4018b8b3fd5da4a3f51216e6bd8e3ce5753ff2f 100644 (file)
@@ -946,3 +946,5 @@ he:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index c2c49aa0e3312380f91ac1b68bb324c22e5d7e1b..dfdfe9d69c023ae0a1694fc89e44f74b3d98ef00 100644 (file)
@@ -948,3 +948,5 @@ hr:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index c979c834fe40bc4b3408aa3cdc19eba3a7ecff62..450b2a4cfc7070a39a5126c7532e8b73dbc4356b 100644 (file)
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 9e9566f0e3e876afa04605703d80167168c71ce2..0b3f8af8d680a3ed99f76ffaed75ecc6ab94ca90 100644 (file)
@@ -949,3 +949,5 @@ id:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 8175b86d99a58fb993e7c3a40ddca75ed30e52b3..b5a13ee7a196fa5b1573d00da6f291084eb2af09 100644 (file)
@@ -942,3 +942,5 @@ it:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 10b76fafdba8bb52904e8af633ea5c9d20d34a66..d137bd79feb2afc4144dcb73030f9fae64c10d1b 100644 (file)
@@ -962,3 +962,5 @@ ja:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 104ac7cfab73aa741bf5cd0ac4d169b67083184b..a394708fb49b2f3c4225cef8c11a7c9a18998168 100644 (file)
@@ -993,3 +993,5 @@ ko:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 158d226ea865d3273c710a6305dea0bceece96ec..2100266d9f8d04bcbde93493529a59dd660d724e 100644 (file)
@@ -1001,3 +1001,5 @@ lt:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 944087b758e316cfbf2ea7db72743161382ece55..be481cc17ab50aaa03ff8600be94ac478dd72767 100644 (file)
@@ -936,3 +936,5 @@ lv:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index 812b3366453f4a8f05f8bbac527f563704448154..3dfdfe38df0bdf50335b009ba0a526008988fbcc 100644 (file)
@@ -941,3 +941,5 @@ mk:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index 49ef7b4664ccf13ed779fc5e5f404ce747ba6803..9aa6876c18dad8d9bead13410630b78e7a141e08 100644 (file)
@@ -942,3 +942,5 @@ mn:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index 2dbe4f2e977f68d6d490fd456851fd1ec8d28807..72ab538a2e4812fea3e238d3f34d8b1d3ba2db9a 100644 (file)
@@ -923,3 +923,5 @@ nl:
   label_my_queries: Mijn aangepaste zoekopdrachten
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Commentaar toegevoegd aan een nieuwsitem
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 429c026a055c77f2286b6f10bc96c378b40ba684..903ddddabcf79d2d97f4c176f37d94a4d2235037 100644 (file)
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index bc8a43817d360b9aca6914df4e51813ce4d411eb..9867f048270e91a999b7e04f0662997ffa0ff621 100644 (file)
@@ -958,3 +958,5 @@ pl:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index eed076320d8628db5c818d08bd5e537520644cd2..a8c2b8593d50969f5ad5c6980f680d9d48636f26 100644 (file)
@@ -964,3 +964,5 @@ pt-BR:
   label_my_queries: Minhas consultas personalizadas
   text_journal_changed_no_detail: "%{label} atualizado(a)"
   label_news_comment_added: Notícia recebeu um comentário
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 3819dcd0a14c8581f18778418c113e79805bf3b2..ec58345eee2d45052f82d5f3365e1aa5e4825d6a 100644 (file)
@@ -945,3 +945,5 @@ pt:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index bc267f896cf9c236563220a2e2b05fae1196ce80..21713e7f3210dd70c175820fe8167bd6116d08de 100644 (file)
@@ -934,3 +934,5 @@ ro:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 9a2b2239a08c68a2ffcad19c0f2de5a24133034c..91c5cd2c48d07e3ede4450315879e72a4d1edbb1 100644 (file)
@@ -1054,3 +1054,5 @@ ru:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 90f7cee8ab50443f9867ac812789345dd4e7229d..40fde4271a03000141d437c933692bf3ee1c3975 100644 (file)
@@ -936,3 +936,5 @@ sk:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index bfb5b5c09239d8e258d0813fc72e9b8377d7b470..bc9e02964e23da3bbbc523ae48b09b4455e247dd 100644 (file)
@@ -937,3 +937,5 @@ sl:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 25ade4402889d08f8b2606591e3e2f4cce20fad7..afbbf19f67c131c86edef489db9a475f7ab7e34a 100644 (file)
@@ -941,3 +941,5 @@ sr-YU:
   label_my_queries: My custom queries\r
   text_journal_changed_no_detail: "%{label} updated"\r
   label_news_comment_added: Comment added to a news\r
+  button_expand_all: Expand all\r
+  button_collapse_all: Collapse all\r
index 87868ab1e8615c13677f265dd2e211d575ae739b..733c96b0463bcf759da6cbe06e3402456c34503d 100644 (file)
@@ -942,3 +942,5 @@ sr:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index c265ea6591e700dd77fae4c259704706c47e1541..2c30f56722ff61c113bd43256d9375119630ec5a 100644 (file)
@@ -982,3 +982,5 @@ sv:
   enumeration_activities: Aktiviteter (tidsuppföljning)
   enumeration_system_activity: Systemaktivitet
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 3e1a02434e08c1375a78f3bde7d606d8b12abc16..5a72100e5a0caba0e2819e31fa05838fd4745aeb 100644 (file)
@@ -938,3 +938,5 @@ th:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 67707176dec2ce1c4cde966b598b984f57da6bf2..55ba92b041236c83af0899a325933bbaed26d0d5 100644 (file)
@@ -960,3 +960,5 @@ tr:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index e58373f7ad8b4f3885a979e8fde93eeb867d7bcb..4da5cdf1baadd83614f34d91ec6ebf725f5b2b22 100644 (file)
@@ -937,3 +937,5 @@ uk:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 74d434684486c1395d707805953f4b666962a2dd..5caee5e607e51ed1f3b0ed988b5bb004614c22fa 100644 (file)
@@ -992,3 +992,5 @@ vi:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 0de64ac6186c899845273b9e7775ed6c2989332a..20a2414589c9050566abd862ce5a21c9b14e44eb 100644 (file)
   enumeration_system_activity: 系統活動
 
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 08264a9d2bfca4d21a0b079800e8e2a76b5ed9ad..4700cb9473bda1585b90c617e9abf2e8284319cd 100644 (file)
@@ -955,3 +955,5 @@ zh:
   label_my_queries: My custom queries
   text_journal_changed_no_detail: "%{label} updated"
   label_news_comment_added: Comment added to a news
+  button_expand_all: Expand all
+  button_collapse_all: Collapse all
index 3996404bbd1b7b0b018444f0e5f36bd16f02bd0f..7e307b61fe380ccb26cc63b092f46e68ba3adb88 100644 (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');
index e458634178cd2dd1d8739c15f9b4238fa8e58bba..333fbc65f14a4b3fe777dde8a9bd4292a89ca664 100644 (file)
@@ -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; }