Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18214 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.1.0
@@ -16,12 +16,12 @@ | |||
<label><%=l(:label_role)%>: | |||
<%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %> | |||
</label> | |||
<a href="#" data-expands="#role_id"><span class="toggle-multiselect"></span></a> | |||
<a href="#" data-expands="#role_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></span></a> | |||
<label><%=l(:label_tracker)%>: | |||
<%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %> | |||
</label> | |||
<a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></span></a> | |||
<a href="#" data-expands="#tracker_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></span></a> | |||
<%= submit_tag l(:button_edit), :name => nil %> | |||
@@ -64,9 +64,11 @@ $("a[data-expands]").click(function(e){ | |||
e.preventDefault(); | |||
var target = $($(this).attr("data-expands")); | |||
if (target.attr("multiple")) { | |||
$(event.target).switchClass('icon-toggle-minus', 'icon-toggle-plus'); | |||
target.attr("multiple", false); | |||
target.find("option[value=all]").show(); | |||
} else { | |||
$(event.target).switchClass('icon-toggle-plus', 'icon-toggle-minus'); | |||
target.attr("multiple", true); | |||
target.find("option[value=all]").attr("selected", false).hide(); | |||
} |
@@ -16,12 +16,12 @@ | |||
<label><%=l(:label_role)%>: | |||
<%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %> | |||
</label> | |||
<a href="#" data-expands="#role_id"><span class="toggle-multiselect"></a> | |||
<a href="#" data-expands="#role_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></a> | |||
<label><%=l(:label_tracker)%>: | |||
<%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %> | |||
</label> | |||
<a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></a> | |||
<a href="#" data-expands="#tracker_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></a> | |||
<%= submit_tag l(:button_edit), :name => nil %> | |||
@@ -121,7 +121,8 @@ function initFilters() { | |||
toggleFilter($(this).val()); | |||
}); | |||
$('#filters-table').on('click', '.toggle-multiselect', function() { | |||
toggleMultiSelect($(this).siblings('select')); | |||
toggleMultiSelect($(this).siblings('select')) | |||
$(this).toggleClass('icon-toggle-plus icon-toggle-minus') | |||
}); | |||
$('#filters-table').on('keypress', 'input[type=text]', function(e) { | |||
if (e.keyCode == 13) $(this).closest('form').submit(); | |||
@@ -188,7 +189,7 @@ function buildFilterRow(field, operator, values) { | |||
case "list_subprojects": | |||
tr.find('td.values').append( | |||
'<span style="display:none;"><select class="value" id="values_'+fieldId+'_1" name="v['+field+'][]"></select>' + | |||
' <span class="toggle-multiselect"> </span></span>' | |||
' <span class="toggle-multiselect icon-only icon-toggle-plus"> </span></span>' | |||
); | |||
select = tr.find('td.values select'); | |||
if (values.length > 1) { select.attr('multiple', true); } |
@@ -531,7 +531,7 @@ fieldset#filters td.values select {min-width:130px;} | |||
.add-filter {width:35%; float:right; text-align: right; vertical-align: top;} | |||
#issue_is_private_wrap {float:right; margin-right:1em;} | |||
.toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;} | |||
.toggle-multiselect { no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;} | |||
.buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; } | |||
div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;} | |||
@@ -1502,6 +1502,8 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { | |||
.icon-bookmark-off { background-image: url(../images/tag_blue_add.png); } | |||
.icon-sorted-asc { background-image: url(../images/arrow_down.png); } | |||
.icon-sorted-desc { background-image: url(../images/arrow_up.png); } | |||
.icon-toggle-plus { background: url(../images/bullet_toggle_plus.png) } | |||
.icon-toggle-minus { background: url(../images/bullet_toggle_minus.png) } | |||
.icon-file { background-image: url(../images/files/default.png); } | |||
.icon-file.text-plain { background-image: url(../images/files/text.png); } |