mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Use "icon icon-*" classes for expandable elements (#31433).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18209 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5a9485489f
commit
53e2cf16bb
@ -24,7 +24,7 @@
|
|||||||
<% reset_cycle %>
|
<% reset_cycle %>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= query.inline_columns.size + 2 %>">
|
<td colspan="<%= query.inline_columns.size + 2 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<span class="name"><%= group_name %></span> <span class="badge badge-count count"><%= group_count %></span> <span class="totals"><%= group_totals %></span>
|
<span class="name"><%= group_name %></span> <span class="badge badge-count count"><%= group_count %></span> <span class="totals"><%= group_totals %></span>
|
||||||
<%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
|
<%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
|
||||||
"toggleAllRowGroups(this)", :class => 'toggle-all') %>
|
"toggleAllRowGroups(this)", :class => 'toggle-all') %>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<td style="padding-left: <%=18 * depth%>px;" class="<%=
|
<td style="padding-left: <%=18 * depth%>px;" class="<%=
|
||||||
@repository.report_last_commit ? "filename" : "filename_no_report" %>">
|
@repository.report_last_commit ? "filename" : "filename_no_report" %>">
|
||||||
<% if entry.is_dir? %>
|
<% if entry.is_dir? %>
|
||||||
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
<span class="expander icon icon-collapsed" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||||
:action => 'show',
|
:action => 'show',
|
||||||
:id => @project,
|
:id => @project,
|
||||||
:repository_id => @repository.identifier_param,
|
:repository_id => @repository.identifier_param,
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<% reset_cycle %>
|
<% reset_cycle %>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= @query.inline_columns.size + 2 %>">
|
<td colspan="<%= @query.inline_columns.size + 2 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<span class="name"><%= group_name %></span>
|
<span class="name"><%= group_name %></span>
|
||||||
<% if group_count %>
|
<% if group_count %>
|
||||||
<span class="badge badge-count count"><%= group_count %></span>
|
<span class="badge badge-count count"><%= group_count %></span>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= @trackers.size + 1 %>">
|
<td colspan="<%= @trackers.size + 1 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<%= l(:field_core_fields) %>
|
<%= l(:field_core_fields) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<% if @custom_fields.any? %>
|
<% if @custom_fields.any? %>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= @trackers.size + 1 %>">
|
<td colspan="<%= @trackers.size + 1 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<%= l(:label_custom_field_plural) %>
|
<%= l(:label_custom_field_plural) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= @statuses.size + 1 %>">
|
<td colspan="<%= @statuses.size + 1 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<%= l(:field_core_fields) %>
|
<%= l(:field_core_fields) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
<% if @custom_fields.any? %>
|
<% if @custom_fields.any? %>
|
||||||
<tr class="group open">
|
<tr class="group open">
|
||||||
<td colspan="<%= @statuses.size + 1 %>">
|
<td colspan="<%= @statuses.size + 1 %>">
|
||||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
<span class="expander icon icon-expended" onclick="toggleRowGroup(this);"> </span>
|
||||||
<%= l(:label_custom_field_plural) %>
|
<%= l(:label_custom_field_plural) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -742,7 +742,7 @@ module Redmine
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
if has_children
|
if has_children
|
||||||
content = view.content_tag(:span, nil, :class => :expander) + content
|
content = view.content_tag(:span, nil, :class => 'icon icon-expended expander') + content
|
||||||
tag_options[:class] += ' open'
|
tag_options[:class] += ' open'
|
||||||
else
|
else
|
||||||
if params[:indent]
|
if params[:indent]
|
||||||
|
|||||||
@ -32,6 +32,7 @@ function toggleRowGroup(el) {
|
|||||||
var tr = $(el).parents('tr').first();
|
var tr = $(el).parents('tr').first();
|
||||||
var n = tr.next();
|
var n = tr.next();
|
||||||
tr.toggleClass('open');
|
tr.toggleClass('open');
|
||||||
|
$(el).toggleClass('icon-expended icon-collapsed');
|
||||||
while (n.length && !n.hasClass('group')) {
|
while (n.length && !n.hasClass('group')) {
|
||||||
n.toggle();
|
n.toggle();
|
||||||
n = n.next('tr');
|
n = n.next('tr');
|
||||||
@ -43,6 +44,7 @@ function collapseAllRowGroups(el) {
|
|||||||
tbody.children('tr').each(function(index) {
|
tbody.children('tr').each(function(index) {
|
||||||
if ($(this).hasClass('group')) {
|
if ($(this).hasClass('group')) {
|
||||||
$(this).removeClass('open');
|
$(this).removeClass('open');
|
||||||
|
$(this).find('.expander').switchClass('icon-expended', 'icon-collapsed');
|
||||||
} else {
|
} else {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
@ -54,6 +56,7 @@ function expandAllRowGroups(el) {
|
|||||||
tbody.children('tr').each(function(index) {
|
tbody.children('tr').each(function(index) {
|
||||||
if ($(this).hasClass('group')) {
|
if ($(this).hasClass('group')) {
|
||||||
$(this).addClass('open');
|
$(this).addClass('open');
|
||||||
|
$(this).find('.expander').switchClass('icon-collapsed', 'icon-expended');
|
||||||
} else {
|
} else {
|
||||||
$(this).show();
|
$(this).show();
|
||||||
}
|
}
|
||||||
@ -477,10 +480,12 @@ function scmEntryClick(id, url) {
|
|||||||
var el = $('#'+id);
|
var el = $('#'+id);
|
||||||
if (el.hasClass('open')) {
|
if (el.hasClass('open')) {
|
||||||
collapseScmEntry(id);
|
collapseScmEntry(id);
|
||||||
|
el.find('.expander').switchClass('icon-expended', 'icon-collapsed');
|
||||||
el.addClass('collapsed');
|
el.addClass('collapsed');
|
||||||
return false;
|
return false;
|
||||||
} else if (el.hasClass('loaded')) {
|
} else if (el.hasClass('loaded')) {
|
||||||
expandScmEntry(id);
|
expandScmEntry(id);
|
||||||
|
el.find('.expander').switchClass('icon-collapsed', 'icon-expended');
|
||||||
el.removeClass('collapsed');
|
el.removeClass('collapsed');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -493,6 +498,7 @@ function scmEntryClick(id, url) {
|
|||||||
success: function(data) {
|
success: function(data) {
|
||||||
el.after(data);
|
el.after(data);
|
||||||
el.addClass('open').addClass('loaded').removeClass('loading');
|
el.addClass('open').addClass('loaded').removeClass('loading');
|
||||||
|
el.find('.expander').switchClass('icon-collapsed', 'icon-expended');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -240,10 +240,12 @@ ganttEntryClick = function(e){
|
|||||||
var iconChange = null;
|
var iconChange = null;
|
||||||
if(subject.hasClass('open'))
|
if(subject.hasClass('open'))
|
||||||
iconChange = function(element){
|
iconChange = function(element){
|
||||||
|
$(element).find('.expander').switchClass('icon-expended', 'icon-collapsed');
|
||||||
$(element).removeClass('open');
|
$(element).removeClass('open');
|
||||||
};
|
};
|
||||||
else
|
else
|
||||||
iconChange = function(element){
|
iconChange = function(element){
|
||||||
|
$(element).find('.expander').switchClass('icon-collapsed', 'icon-expended');
|
||||||
$(element).addClass('open');
|
$(element).addClass('open');
|
||||||
};
|
};
|
||||||
iconChange(subject);
|
iconChange(subject);
|
||||||
|
|||||||
@ -288,8 +288,7 @@ tr.entry td.age { text-align: right; }
|
|||||||
tr.entry.file td.filename a { margin-left: 16px; }
|
tr.entry.file td.filename a { margin-left: 16px; }
|
||||||
tr.entry.file td.filename_no_report a { margin-left: 16px; }
|
tr.entry.file td.filename_no_report a { margin-left: 16px; }
|
||||||
|
|
||||||
tr span.expander, .gantt_subjects div > span.expander {background: url(../images/arrow_right.png) no-repeat 2px 50%; padding-left: 8px; margin-left: 0; cursor: pointer;}
|
tr span.expander, .gantt_subjects div > span.expander {background-position: 2px 50%; padding-left: 8px; margin-left: 0; cursor: pointer;}
|
||||||
tr.open span.expander, .gantt_subjects div.open > span.expander {background-image: url(../images/arrow_down.png);}
|
|
||||||
.gantt_subjects div > span.expander {padding-left: 12px;}
|
.gantt_subjects div > span.expander {padding-left: 12px;}
|
||||||
.gantt_subjects div > span .icon-gravatar {float: none;}
|
.gantt_subjects div > span .icon-gravatar {float: none;}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user