Skip to content

Commit

Permalink
Use the regular "icon icon-*" classes for collapsible fields (#31433).
Browse files Browse the repository at this point in the history
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18204 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
vividtone committed May 27, 2019
1 parent 5b29b2b commit 580e2f6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/views/queries/_query_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<div id="query_form_with_buttons" class="hide-when-print">
<div id="query_form_content">
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
<legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expended" : "collapsed" %>"><%= l(:label_filter_plural) %></legend>
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
</div>
</fieldset>

<fieldset id="options" class="collapsible collapsed">
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_options) %></legend>
<div style="display: none;">
<table>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions app/views/versions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
<% if @completed_versions.present? %>
<p>
<%= link_to_function l(:label_completed_versions),
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %>
'$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
<ul id = "completed-versions" style = "display:none;">
<% @completed_versions.each do |version| %>
<li><%= link_to_version version %></li>
Expand Down
1 change: 1 addition & 0 deletions public/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function toggleAllRowGroups(el) {
function toggleFieldset(el) {
var fieldset = $(el).parents('fieldset').first();
fieldset.toggleClass('collapsed');
fieldset.children('legend').toggleClass('icon-expended icon-collapsed');
fieldset.children('div').toggle();
}

Expand Down
8 changes: 4 additions & 4 deletions public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ a.user.locked, a.user.locked:link, a.user.locked:visited {color: #999;}
#admin-menu a {line-height:1.7em;}
#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}

a.collapsible {padding-left: 12px; background: url(../images/arrow_down.png) no-repeat 0px 50%;}
a.collapsible.collapsed {background-image: url(../images/arrow_right.png);}
a.collapsible {padding-left: 12px; }

a#toggle-completed-versions {color:#999;}

Expand Down Expand Up @@ -519,8 +518,7 @@ div.issue.overdue .due-date .value { color: #c22; }
#trackers_description dd {margin: 0; padding: 0 0 1em 0;}

fieldset.collapsible {border-width: 1px 0 0 0;}
fieldset.collapsible>legend { padding-left: 18px; background: url(../images/arrow_down.png) no-repeat 4px 40%; cursor:pointer; }
fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_right.png); }
fieldset.collapsible>legend { cursor:pointer; padding-left: 18px; background-position: 4px;}

fieldset#date-range p { margin: 2px 0 2px 0; }
fieldset#filters table { border-collapse: collapse; }
Expand Down Expand Up @@ -1501,6 +1499,8 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container {
.icon-shared { background-image: url(../images/link.png); }
.icon-actions { background-image: url(../images/3_bullets.png); }
.icon-sort-handle { background-image: url(../images/reorder.png); }
.icon-expended { background-image: url(../images/arrow_down.png); }
.icon-collapsed { background-image: url(../images/arrow_right.png); }
.icon-bookmark { background-image: url(../images/tag_blue_delete.png); }
.icon-bookmark-off { background-image: url(../images/tag_blue_add.png); }

Expand Down

0 comments on commit 580e2f6

Please sign in to comment.