use_pseudo_classes.patch

Marius BALTEANU, 2016-05-31 00:47

Download (27.6 KB)

View differences:

app/views/admin/info.html.erb
4 4

  
5 5
<table class="list">
6 6
<% @checklist.each do |label, result| %>
7
  <tr class="<%= cycle 'odd', 'even' %>">
7
  <tr>
8 8
    <td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
9 9
    <td class="tick"><span class="icon-only <%= (result ? 'icon-ok' : 'icon-error') %>"></span></td>
10 10
  </tr>
app/views/admin/plugins.html.erb
3 3
<% if @plugins.any? %>
4 4
<table class="list plugins">
5 5
    <% @plugins.each do |plugin| %>
6
        <tr id="plugin-<%= plugin.id %>" class="<%= cycle('odd', 'even') %>">
6
        <tr id="plugin-<%= plugin.id %>">
7 7
        <td class="name"><span class="name"><%= plugin.name %></span>
8 8
            <%= content_tag('span', plugin.description, :class => 'description') unless plugin.description.blank? %>
9 9
            <%= content_tag('span', link_to(plugin.url, plugin.url), :class => 'url') unless plugin.url.blank? %>
app/views/admin/projects.html.erb
26 26
  </tr></thead>
27 27
  <tbody>
28 28
<% project_tree(@projects) do |project, level| %>
29
  <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
29
  <tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
30 30
  <td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
31 31
  <td><%= checked_image project.is_public? %></td>
32 32
  <td><%= format_date(project.created_on) %></td>
app/views/auth_sources/index.html.erb
14 14
  </tr></thead>
15 15
  <tbody>
16 16
<% for source in @auth_sources %>
17
  <tr id="auth-source-<%= source.id %>" class="<%= cycle("odd", "even") %>">
17
  <tr id="auth-source-<%= source.id %>">
18 18
    <td class="name"><%= link_to(source.name, :action => 'edit', :id => source)%></td>
19 19
    <td><%= source.auth_method_name %></td>
20 20
    <td><%= source.host %></td>
app/views/boards/index.html.erb
9 9
  </tr></thead>
10 10
  <tbody>
11 11
<% Board.board_tree(@boards) do |board, level| %>
12
  <tr class="<%= cycle 'odd', 'even' %>">
12
  <tr>
13 13
    <td class="name" style="padding-left: <%= level * 18 %>px;">
14 14
      <%= link_to board.name, project_board_path(board.project, board), :class => "board" %><br />
15 15
      <%=h board.description %>
app/views/boards/show.html.erb
35 35
  </tr></thead>
36 36
  <tbody>
37 37
  <% @topics.each do |topic| %>
38
    <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
38
    <tr class="message <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
39 39
      <td class="subject"><%= link_to topic.subject, board_message_path(@board, topic) %></td>
40 40
      <td class="author"><%= link_to_user(topic.author) %></td>
41 41
      <td class="created_on"><%= format_time(topic.created_on) %></td>
app/views/custom_fields/_index.html.erb
12 12
  <tbody>
13 13
  <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
14 14
    <% back_url = custom_fields_path(:tab => tab[:name]) %>
15
    <tr class="<%= cycle("odd", "even") %>">
15
    <tr>
16 16
      <td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
17 17
      <td><%= l(custom_field.format.label) %></td>
18 18
      <td><%= checked_image custom_field.is_required? %></td>
app/views/email_addresses/_index.html.erb
1 1
<% if @addresses.present? %>
2 2
  <table class="list email_addresses">
3 3
  <% @addresses.each do |address| %>
4
    <tr class="<%= cycle("odd", "even") %>">
4
    <tr>
5 5
      <td class="email"><%= address.address %></td>
6 6
      <td class="buttons">
7 7
        <%= toggle_email_address_notify_link(address) %>
app/views/enumerations/index.html.erb
13 13
    <th></th>
14 14
</tr></thead>
15 15
<% enumerations.each do |enumeration| %>
16
<tr class="<%= cycle('odd', 'even') %>">
16
<tr>
17 17
    <td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
18 18
    <td class="tick"><%= checked_image enumeration.is_default? %></td>
19 19
    <td class="tick"><%= checked_image enumeration.active? %></td>
app/views/files/index.html.erb
26 26
  </tr>
27 27
  <% end -%>
28 28
  <% container.attachments.each do |file| %>
29
  <tr class="file <%= cycle("odd", "even") %>">
29
  <tr class="file">
30 30
    <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
31 31
    <td class="created_on"><%= format_time(file.created_on) %></td>
32 32
    <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
app/views/groups/_users.html.erb
8 8
    </tr></thead>
9 9
    <tbody>
10 10
    <% @group.users.sort.each do |user| %>
11
      <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
11
      <tr id="user-<%= user.id %>">
12 12
        <td class="name"><%= link_to_user user %></td>
13 13
        <td class="buttons">
14 14
          <%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
app/views/groups/index.html.erb
12 12
  </tr></thead>
13 13
  <tbody>
14 14
<% @groups.each do |group| %>
15
  <tr id="group-<%= group.id %>" class="<%= cycle 'odd', 'even' %> <%= "builtin" if group.builtin? %>">
15
  <tr id="group-<%= group.id %>" class="<%= "builtin" if group.builtin? %>">
16 16
    <td class="name"><%= link_to group, edit_group_path(group) %></td>
17 17
    <td class="user_count"><%= (@user_count_by_group_id[group.id] || 0) unless group.builtin? %></td>
18 18
    <td class="buttons"><%= delete_link group unless group.builtin? %></td>
app/views/issue_statuses/index.html.erb
16 16
  </tr></thead>
17 17
  <tbody>
18 18
<% for status in @issue_statuses %>
19
  <tr class="<%= cycle("odd", "even") %>">
19
  <tr>
20 20
  <td class="name"><%= link_to status.name, edit_issue_status_path(status) %></td>
21 21
  <% if Issue.use_status_for_done_ratio? %>
22 22
  <td><%= status.default_done_ratio %></td>
app/views/issues/_changesets.html.erb
1 1
<% changesets.each do |changeset| %>
2
    <div class="changeset <%= cycle('odd', 'even') %>">
2
    <div class="changeset">
3 3
    <p><%= link_to_revision(changeset, changeset.repository,
4 4
                            :text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
5 5
        <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
app/views/issues/_list.html.erb
26 26
      </td>
27 27
    </tr>
28 28
  <% end %>
29
  <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
29
  <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
30 30
    <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
31 31
    <%= raw query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"}.join %>
32 32
  </tr>
app/views/issues/_list_simple.html.erb
9 9
    </tr></thead>
10 10
    <tbody>
11 11
    <% for issue in issues %>
12
    <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
12
    <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= issue.css_classes %>">
13 13
      <td class="id">
14 14
        <%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
15 15
        <%= link_to(issue.id, issue_path(issue)) %>
app/views/principal_memberships/_index.html.erb
13 13
  <tbody>
14 14
  <% principal.memberships.preload(:member_roles => :role).each do |membership| %>
15 15
  <% next if membership.new_record? %>
16
  <tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
16
  <tr id="member-<%= membership.id %>" class="class">
17 17
  <td class="project name">
18 18
    <%= link_to_project membership.project %>
19 19
  </td>
app/views/projects/settings/_activities.html.erb
12 12

  
13 13
  <% @project.activities(true).each do |enumeration| %>
14 14
  <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
15
  <tr class="<%= cycle('odd', 'even') %>">
15
  <tr>
16 16
    <td class="name">
17 17
      <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
18 18
      <%= enumeration %>
app/views/projects/settings/_boards.html.erb
4 4
    <div class="table-list-cell"><%= l(:label_board) %></div>
5 5
  </div>
6 6
  <%= render_boards_tree(@project.boards) do |board, level| %>
7
  <div class="table-list-row <%= cycle 'odd', 'even' %>">
7
  <div class="table-list-row">
8 8
    <div class="table-list-cell name" style="padding-left: <%= 2 + level * 16 %>px">
9 9
      <%= link_to board.name, project_board_path(@project, board) %>
10 10
    </div>
app/views/projects/settings/_issue_categories.html.erb
8 8
  <tbody>
9 9
<% for category in @project.issue_categories %>
10 10
  <% unless category.new_record? %>
11
  <tr class="<%= cycle 'odd', 'even' %>">
11
  <tr>
12 12
    <td class="name"><%= category.name  %></td>
13 13
    <td><%= category.assigned_to.name if category.assigned_to %></td>
14 14
    <td class="buttons">
app/views/projects/settings/_members.html.erb
16 16
  <tbody>
17 17
  <% members.each do |member| %>
18 18
  <% next if member.new_record? %>
19
  <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
19
  <tr id="member-<%= member.id %>" class="member">
20 20
  <td class="name <%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
21 21
  <td class="roles">
22 22
    <span id="member-<%= member.id %>-roles"><%= member.roles.sort.collect(&:to_s).join(', ') %></span>
app/views/projects/settings/_repositories.html.erb
11 11
  </thead>
12 12
  <tbody>
13 13
  <% @project.repositories.sort.each do |repository| %>
14
    <tr class="<%= cycle 'odd', 'even' %>">
14
    <tr>
15 15
      <td class="name">
16
      <%= link_to repository.identifier, 
16
      <%= link_to repository.identifier,
17 17
            {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
18 18
      </td>
19 19
      <td><%= checked_image repository.is_default? %></td>
app/views/projects/settings/_versions.html.erb
11 11
    </tr></thead>
12 12
  <tbody>
13 13
<% for version in @project.shared_versions.sort %>
14
    <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
14
    <tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
15 15
    <td class="name"><%= link_to_version version %></td>
16 16
    <td class="date"><%= format_date(version.effective_date) %></td>
17 17
    <td class="description"><%= version.description %></td>
app/views/projects/show.html.erb
53 53
      </thead>
54 54
      <tbody>
55 55
      <% @trackers.each do |tracker| %>
56
        <tr class="<%= cycle("odd", "even") %>">
56
        <tr>
57 57
          <td class="name">
58 58
            <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
59 59
          </td>
app/views/queries/index.html.erb
9 9
<% else %>
10 10
  <table class="list">
11 11
  <% @queries.each do |query| %>
12
    <tr class="<%= cycle('odd', 'even') %>">
12
    <tr>
13 13
      <td class="name">
14 14
        <%= link_to query.name, :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query %>
15 15
      </td>
app/views/reports/_details.html.erb
13 13
</tr></thead>
14 14
<tbody>
15 15
<% for row in rows %>
16
<tr class="<%= cycle("odd", "even") %>">
16
<tr>
17 17
  <td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
18 18
  <% for status in @statuses %>
19 19
    <td><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, aggregate_path(@project, field_name, row, :status_id => status.id) %></td>
app/views/reports/_simple.html.erb
10 10
</tr></thead>
11 11
<tbody>
12 12
<% for row in rows %>
13
<tr class="<%= cycle("odd", "even") %>">
13
<tr>
14 14
  <td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
15 15
  <td><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %></td>
16 16
  <td><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %></td>
app/views/repositories/_revisions.html.erb
33 33
<% show_diff = revisions.size > 1 %>
34 34
<% line_num = 1 %>
35 35
<% revisions.each do |changeset| %>
36
<tr class="changeset <%= cycle 'odd', 'even' %>">
36
<tr class="changeset">
37 37
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
38 38
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
39 39
  <%= link_to_revision(changeset, @repository) %>
app/views/repositories/committers.html.erb
17 17
<tbody>
18 18
<% i = 0 -%>
19 19
<% @committers.each do |committer, user_id| -%>
20
  <tr class="<%= cycle 'odd', 'even' %>">
20
  <tr>
21 21
    <td><%= committer %></td>
22 22
    <td>
23 23
      <%= hidden_field_tag "committers[#{i}][]", committer, :id => nil %>
app/views/roles/index.html.erb
12 12
  </tr></thead>
13 13
  <tbody>
14 14
<% for role in @roles %>
15
  <tr class="<%= cycle("odd", "even") %> <%= role.builtin? ? "builtin" : "givable" %>">
15
  <tr class="<%= role.builtin? ? "builtin" : "givable" %>">
16 16
  <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
17 17
  <td class="buttons">
18 18
    <%= reorder_handle(role) unless role.builtin? %>
app/views/roles/permissions.html.erb
33 33
        </tr>
34 34
    <% end %>
35 35
    <% perms_by_module[mod].each do |permission| %>
36
        <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
36
        <tr class="permission-<%= permission.name %>">
37 37
        <td class="name">
38 38
            <%= link_to_function('',
39 39
                                 "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
app/views/timelog/_list.html.erb
16 16
</thead>
17 17
<tbody>
18 18
<% entries.each do |entry| -%>
19
  <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
19
  <tr class="time-entry hascontextmenu">
20 20
    <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
21 21
    <%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
22 22
    <td class="buttons">
app/views/timelog/_report_criteria.html.erb
1 1
<% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
2 2
<% hours_for_value = select_hours(hours, criterias[level], value) -%>
3 3
<% next if hours_for_value.empty? -%>
4
<tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
4
<tr class="<%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
5 5
<%= ("<td></td>" * level).html_safe %>
6 6
<td class="name"><%= format_criteria_value(@report.available_criteria[criterias[level]], value) %></td>
7 7
<%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
app/views/trackers/fields.html.erb
25 25
        </td>
26 26
      </tr>
27 27
      <% Tracker::CORE_FIELDS.each do |field| %>
28
      <tr class="<%= cycle("odd", "even") %>">
28
      <tr>
29 29
        <td class="name">
30 30
          <%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
31 31
                               :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
......
48 48
          </td>
49 49
        </tr>
50 50
        <% @custom_fields.each do |field| %>
51
        <tr class="<%= cycle("odd", "even") %>">
51
        <tr>
52 52
          <td class="name">
53 53
            <%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
54 54
                                 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
app/views/trackers/index.html.erb
13 13
  </tr></thead>
14 14
  <tbody>
15 15
<% for tracker in @trackers %>
16
  <tr class="<%= cycle("odd", "even") %>">
16
  <tr>
17 17
  <td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
18 18
  <td>
19 19
    <% unless tracker.workflow_rules.count > 0 %>
app/views/users/index.html.erb
36 36
  </tr></thead>
37 37
  <tbody>
38 38
<% for user in @users -%>
39
  <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
39
  <tr class="<%= user.css_classes %>">
40 40
  <td class="username"><%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %></td>
41 41
  <td class="firstname"><%= user.firstname %></td>
42 42
  <td class="lastname"><%= user.lastname %></td>
app/views/wiki/history.html.erb
19 19
<% show_diff = @versions.size > 1 %>
20 20
<% line_num = 1 %>
21 21
<% @versions.each do |ver| %>
22
<tr class="wiki-page-version <%= cycle("odd", "even") %>">
22
<tr class="wiki-page-version">
23 23
    <td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
24 24
    <td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked', true);") if show_diff && (line_num < @versions.size) %></td>
25 25
    <td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
app/views/workflows/_form.html.erb
24 24
<tbody>
25 25
  <% for old_status in [nil] + @statuses %>
26 26
  <% next if old_status.nil? && name != 'always' %>
27
  <tr class="<%= cycle("odd", "even") %>">
27
  <tr>
28 28
    <td class="name">
29 29
      <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
30 30
                           :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
app/views/workflows/index.html.erb
17 17
</thead>
18 18
<tbody>
19 19
<% @trackers.each do |tracker| -%>
20
<tr class="<%= cycle('odd', 'even') %>">
20
<tr>
21 21
  <td class="name"><%= tracker.name %></td>
22 22
  <% @roles.each do |role| -%>
23 23
  <% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
app/views/workflows/permissions.html.erb
60 60
        </td>
61 61
      </tr>
62 62
      <% @fields.each do |field, name| %>
63
      <tr class="<%= cycle("odd", "even") %>">
63
      <tr>
64 64
        <td class="name">
65 65
          <%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
66 66
        </td>
......
80 80
          </td>
81 81
        </tr>
82 82
        <% @custom_fields.each do |field| %>
83
        <tr class="<%= cycle("odd", "even") %>">
83
        <tr>
84 84
          <td class="name">
85 85
            <%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
86 86
          </td>
public/javascripts/application.js
616 616
          type: 'put',
617 617
          dataType: 'script',
618 618
          data: data,
619
          success: function(data){
620
            sortable.children(":even").removeClass("even").addClass("odd");
621
            sortable.children(":odd").removeClass("odd").addClass("even");
622
          },
623 619
          error: function(jqXHR, textStatus, errorThrown){
624 620
            alert(jqXHR.status);
625 621
            sortable.sortable("cancel");
public/stylesheets/application.css
238 238

  
239 239
tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;}
240 240

  
241
div.mypage-box table.time-entries tr.time-entry { background-color: #fff; }
242
div.mypage-box table.time-entries tr.odd { background-color:#f6f7f8; }
241 243
tr.time-entry { text-align: center; white-space: nowrap; }
242 244
tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity { text-align: left; white-space: normal; }
243 245
td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
......
249 251
table.plugins span.description { display: block; font-size: 0.9em; }
250 252
table.plugins span.url { display: block; font-size: 0.9em; }
251 253

  
252
tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; }
254
tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; background-color: #fff;}
253 255
tr.group span.name {font-weight:bold;}
254 256
tr.group span.count {font-weight:bold; position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;}
255 257
tr.group span.totals {color: #aaa; font-size: 80%;}
......
262 264
table.list tbody tr.group:hover { background-color:inherit; }
263 265
table td {padding:2px;}
264 266
table p {margin:0;}
265
.odd {background-color:#f6f7f8;}
266
.even {background-color: #fff;}
267
table.list tbody tr:nth-child(odd), #issue-changesets div.changeset:nth-child(odd) {background-color:#f6f7f8;}
268
table.list tbody tr:nth-child(even), #issue-changesets div.changeset:nth-child(even) {background-color: #fff;}
267 269

  
268 270
tr.builtin td.name {font-style:italic;}
269 271