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:
parent
7257266d32
commit
9b9c7ae91d
|
@ -20,6 +20,7 @@
|
||||||
<td colspan="<%= query.columns.size + 2 %>">
|
<td colspan="<%= query.columns.size + 2 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this); return false;"> </span>
|
<span class="expander" onclick="toggleRowGroup(this); return false;"> </span>
|
||||||
<%= group.blank? ? 'None' : column_content(@query.group_by_column, issue) %> <span class="count">(<%= @issue_count_by_group[group] %>)</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% previous_group = group %>
|
<% previous_group = group %>
|
||||||
|
|
|
@ -809,6 +809,8 @@ en:
|
||||||
button_save: Save
|
button_save: Save
|
||||||
button_check_all: Check all
|
button_check_all: Check all
|
||||||
button_uncheck_all: Uncheck all
|
button_uncheck_all: Uncheck all
|
||||||
|
button_collapse_all: Collapse all
|
||||||
|
button_expand_all: Expand all
|
||||||
button_delete: Delete
|
button_delete: Delete
|
||||||
button_create: Create
|
button_create: Create
|
||||||
button_create_and_continue: Create and continue
|
button_create_and_continue: Create and continue
|
||||||
|
|
|
@ -792,6 +792,8 @@ fr:
|
||||||
button_save: Sauvegarder
|
button_save: Sauvegarder
|
||||||
button_check_all: Tout cocher
|
button_check_all: Tout cocher
|
||||||
button_uncheck_all: Tout décocher
|
button_uncheck_all: Tout décocher
|
||||||
|
button_collapse_all: Plier tout
|
||||||
|
button_expand_all: Déplier tout
|
||||||
button_delete: Supprimer
|
button_delete: Supprimer
|
||||||
button_create: Créer
|
button_create: Créer
|
||||||
button_create_and_continue: Créer et continuer
|
button_create_and_continue: Créer et continuer
|
||||||
|
|
|
@ -923,3 +923,5 @@ nl:
|
||||||
text_warn_on_leaving_unsaved: De huidige pagina bevat tekst die niet is opgeslagen en dit zal verloren gaan als u deze pagina nu verlaat.
|
text_warn_on_leaving_unsaved: De huidige pagina bevat tekst die niet is opgeslagen en dit zal verloren gaan als u deze pagina nu verlaat.
|
||||||
label_my_queries: Mijn aangepaste zoekopdrachten
|
label_my_queries: Mijn aangepaste zoekopdrachten
|
||||||
label_news_comment_added: Commentaar toegevoegd aan een nieuwsitem
|
label_news_comment_added: Commentaar toegevoegd aan een nieuwsitem
|
||||||
|
button_expand_all: Expand all
|
||||||
|
button_collapse_all: Collapse all
|
||||||
|
|
|
@ -965,3 +965,5 @@ pt-BR:
|
||||||
label_my_queries: Minhas consultas personalizadas
|
label_my_queries: Minhas consultas personalizadas
|
||||||
text_journal_changed_no_detail: "%{label} atualizado(a)"
|
text_journal_changed_no_detail: "%{label} atualizado(a)"
|
||||||
label_news_comment_added: Notícia recebeu um comentário
|
label_news_comment_added: Notícia recebeu um comentário
|
||||||
|
button_expand_all: Expand all
|
||||||
|
button_collapse_all: Collapse all
|
||||||
|
|
|
@ -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) {
|
function toggleFieldset(el) {
|
||||||
var fieldset = Element.up(el, 'fieldset');
|
var fieldset = Element.up(el, 'fieldset');
|
||||||
fieldset.toggleClassName('collapsed');
|
fieldset.toggleClassName('collapsed');
|
||||||
|
|
|
@ -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 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%; }
|
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:hover { background-color:#ffffdd; }
|
||||||
table.list tbody tr.group:hover { background-color:inherit; }
|
table.list tbody tr.group:hover { background-color:inherit; }
|
||||||
|
|
Loading…
Reference in New Issue