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

View 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 %>

View File

@ -941,3 +941,5 @@ bg:
enumeration_activities: Дейности (time tracking)
enumeration_system_activity: Системна активност
button_expand_all: Expand all
button_collapse_all: Collapse all

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -945,3 +945,5 @@ en-GB:
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

View 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

View 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

View File

@ -945,3 +945,5 @@ eu:
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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -960,3 +960,5 @@
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

View 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

View 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

View 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

View 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

View 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

View File

@ -936,3 +936,5 @@ lv:
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

View File

@ -941,3 +941,5 @@ mk:
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

View File

@ -942,3 +942,5 @@ mn:
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

View 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

View File

@ -928,3 +928,5 @@
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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -941,3 +941,5 @@ sr-YU:
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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -1023,3 +1023,5 @@
enumeration_system_activity: 系統活動
label_news_comment_added: Comment added to a news
button_expand_all: Expand all
button_collapse_all: Collapse all

View 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

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');

View 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; }