Project

General

Profile

Defect #31496 » 0001-Icon-classes-for-toggle-select.patch

Marius BĂLTEANU, 2019-06-02 10:33

View differences:

app/views/workflows/edit.html.erb
16 16
  <label><%=l(:label_role)%>:
17 17
  <%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %>
18 18
  </label>
19
  <a href="#" data-expands="#role_id"><span class="toggle-multiselect"></span></a>
19
  <a href="#" data-expands="#role_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></span></a>
20 20

  
21 21
  <label><%=l(:label_tracker)%>:
22 22
  <%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %>
23 23
  </label>
24
  <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></span></a>
24
  <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></span></a>
25 25

  
26 26
  <%= submit_tag l(:button_edit), :name => nil %>
27 27

  
......
64 64
  e.preventDefault();
65 65
  var target = $($(this).attr("data-expands"));
66 66
  if (target.attr("multiple")) {
67
    $(event.target).switchClass('icon-toggle-minus', 'icon-toggle-plus');
67 68
    target.attr("multiple", false);
68 69
    target.find("option[value=all]").show();
69 70
  } else {
71
    $(event.target).switchClass('icon-toggle-plus', 'icon-toggle-minus');
70 72
    target.attr("multiple", true);
71 73
    target.find("option[value=all]").attr("selected", false).hide();
72 74
  }
app/views/workflows/permissions.html.erb
16 16
  <label><%=l(:label_role)%>:
17 17
  <%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %>
18 18
  </label>
19
  <a href="#" data-expands="#role_id"><span class="toggle-multiselect"></a>
19
  <a href="#" data-expands="#role_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></a>
20 20

  
21 21
  <label><%=l(:label_tracker)%>:
22 22
  <%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %>
23 23
  </label>
24
  <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></a>
24
  <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect icon-only icon-toggle-plus"></a>
25 25

  
26 26
  <%= submit_tag l(:button_edit), :name => nil %>
27 27

  
public/javascripts/application.js
121 121
    toggleFilter($(this).val());
122 122
  });
123 123
  $('#filters-table').on('click', '.toggle-multiselect', function() {
124
    toggleMultiSelect($(this).siblings('select'));
124
    toggleMultiSelect($(this).siblings('select'))
125
    $(this).toggleClass('icon-toggle-plus icon-toggle-minus')
125 126
  });
126 127
  $('#filters-table').on('keypress', 'input[type=text]', function(e) {
127 128
    if (e.keyCode == 13) $(this).closest('form').submit();
......
188 189
  case "list_subprojects":
189 190
    tr.find('td.values').append(
190 191
      '<span style="display:none;"><select class="value" id="values_'+fieldId+'_1" name="v['+field+'][]"></select>' +
191
      ' <span class="toggle-multiselect">&nbsp;</span></span>'
192
      ' <span class="toggle-multiselect icon-only icon-toggle-plus">&nbsp;</span></span>'
192 193
    );
193 194
    select = tr.find('td.values select');
194 195
    if (values.length > 1) { select.attr('multiple', true); }
public/stylesheets/application.css
531 531
.add-filter {width:35%; float:right; text-align: right; vertical-align: top;}
532 532

  
533 533
#issue_is_private_wrap {float:right; margin-right:1em;}
534
.toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;}
534
.toggle-multiselect { no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;}
535 535
.buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }
536 536

  
537 537
div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
......
1502 1502
.icon-bookmark-off { background-image: url(../images/tag_blue_add.png); }
1503 1503
.icon-sorted-asc { background-image: url(../images/arrow_down.png); }
1504 1504
.icon-sorted-desc { background-image: url(../images/arrow_up.png); }
1505
.icon-toggle-plus { background: url(../images/bullet_toggle_plus.png) }
1506
.icon-toggle-minus { background: url(../images/bullet_toggle_minus.png) }
1505 1507

  
1506 1508
.icon-file { background-image: url(../images/files/default.png); }
1507 1509
.icon-file.text-plain { background-image: url(../images/files/text.png); }
(1-1/4)