summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-03 09:59:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-03 09:59:03 +0000
commit49fcec80b7eb42debb749b7eef27b315c137d19f (patch)
tree36c336301429ef1eadd6d47e6031932b8a1a1a00
parent826e978806bbe80d266c1ebdda64fd84b0f5208a (diff)
downloadredmine-49fcec80b7eb42debb749b7eef27b315c137d19f.tar.gz
redmine-49fcec80b7eb42debb749b7eef27b315c137d19f.zip
Reverts r16051 and r16050 for now (#15361).
git-svn-id: http://svn.redmine.org/redmine/trunk@16052 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/admin/info.html.erb2
-rw-r--r--app/views/admin/plugins.html.erb2
-rw-r--r--app/views/admin/projects.html.erb2
-rw-r--r--app/views/auth_sources/index.html.erb2
-rw-r--r--app/views/boards/index.html.erb2
-rw-r--r--app/views/boards/show.html.erb2
-rw-r--r--app/views/custom_fields/_index.html.erb4
-rw-r--r--app/views/email_addresses/_index.html.erb2
-rw-r--r--app/views/enumerations/index.html.erb3
-rw-r--r--app/views/files/index.html.erb5
-rw-r--r--app/views/groups/_users.html.erb2
-rw-r--r--app/views/groups/index.html.erb2
-rw-r--r--app/views/issue_statuses/index.html.erb2
-rw-r--r--app/views/issues/_changesets.html.erb2
-rw-r--r--app/views/issues/_list.html.erb3
-rw-r--r--app/views/issues/_list_simple.html.erb2
-rw-r--r--app/views/principal_memberships/_index.html.erb4
-rw-r--r--app/views/projects/settings/_activities.html.erb2
-rw-r--r--app/views/projects/settings/_boards.html.erb2
-rw-r--r--app/views/projects/settings/_issue_categories.html.erb2
-rw-r--r--app/views/projects/settings/_members.html.erb4
-rw-r--r--app/views/projects/settings/_repositories.html.erb4
-rw-r--r--app/views/projects/settings/_versions.html.erb4
-rw-r--r--app/views/projects/show.html.erb2
-rw-r--r--app/views/queries/index.html.erb2
-rw-r--r--app/views/reports/_details.html.erb5
-rw-r--r--app/views/reports/_simple.html.erb5
-rw-r--r--app/views/repositories/_revisions.html.erb2
-rw-r--r--app/views/repositories/committers.html.erb2
-rw-r--r--app/views/roles/_form.html.erb2
-rw-r--r--app/views/roles/index.html.erb2
-rw-r--r--app/views/roles/permissions.html.erb2
-rw-r--r--app/views/timelog/_list.html.erb3
-rw-r--r--app/views/timelog/_report_criteria.html.erb2
-rw-r--r--app/views/trackers/fields.html.erb4
-rw-r--r--app/views/trackers/index.html.erb2
-rw-r--r--app/views/users/index.html.erb2
-rw-r--r--app/views/wiki/history.html.erb2
-rw-r--r--app/views/workflows/_form.html.erb2
-rw-r--r--app/views/workflows/index.html.erb2
-rw-r--r--app/views/workflows/permissions.html.erb4
-rw-r--r--public/javascripts/application.js4
-rw-r--r--public/stylesheets/application.css8
43 files changed, 64 insertions, 56 deletions
diff --git a/app/views/admin/info.html.erb b/app/views/admin/info.html.erb
index c56d14eb6..2be1d28fd 100644
--- a/app/views/admin/info.html.erb
+++ b/app/views/admin/info.html.erb
@@ -4,7 +4,7 @@
<table class="list">
<% @checklist.each do |label, result| %>
- <tr>
+ <tr class="<%= cycle 'odd', 'even' %>">
<td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
<td class="tick"><span class="icon-only <%= (result ? 'icon-ok' : 'icon-error') %>"></span></td>
</tr>
diff --git a/app/views/admin/plugins.html.erb b/app/views/admin/plugins.html.erb
index e04e06a7b..020dbc818 100644
--- a/app/views/admin/plugins.html.erb
+++ b/app/views/admin/plugins.html.erb
@@ -3,7 +3,7 @@
<% if @plugins.any? %>
<table class="list plugins">
<% @plugins.each do |plugin| %>
- <tr id="plugin-<%= plugin.id %>">
+ <tr id="plugin-<%= plugin.id %>" class="<%= cycle('odd', 'even') %>">
<td class="name"><span class="name"><%= plugin.name %></span>
<%= content_tag('span', plugin.description, :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(plugin.url, plugin.url), :class => 'url') unless plugin.url.blank? %>
diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb
index a5667f272..d9c32280d 100644
--- a/app/views/admin/projects.html.erb
+++ b/app/views/admin/projects.html.erb
@@ -27,7 +27,7 @@
</tr></thead>
<tbody>
<% project_tree(@projects, :init_level => true) do |project, level| %>
- <tr class="<%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
+ <tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name"><span><%= link_to_project_settings(project, {}, :title => project.short_description) %></span></td>
<td><%= checked_image project.is_public? %></td>
<td><%= format_date(project.created_on) %></td>
diff --git a/app/views/auth_sources/index.html.erb b/app/views/auth_sources/index.html.erb
index 7a0ffa59d..ecde2bf95 100644
--- a/app/views/auth_sources/index.html.erb
+++ b/app/views/auth_sources/index.html.erb
@@ -14,7 +14,7 @@
</tr></thead>
<tbody>
<% for source in @auth_sources %>
- <tr id="auth-source-<%= source.id %>">
+ <tr id="auth-source-<%= source.id %>" class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to(source.name, :action => 'edit', :id => source)%></td>
<td><%= source.auth_method_name %></td>
<td><%= source.host %></td>
diff --git a/app/views/boards/index.html.erb b/app/views/boards/index.html.erb
index 21280e1af..29074130b 100644
--- a/app/views/boards/index.html.erb
+++ b/app/views/boards/index.html.erb
@@ -9,7 +9,7 @@
</tr></thead>
<tbody>
<% Board.board_tree(@boards) do |board, level| %>
- <tr>
+ <tr class="<%= cycle 'odd', 'even' %>">
<td class="name" style="padding-left: <%= level * 18 %>px;">
<%= link_to board.name, project_board_path(board.project, board), :class => "board" %><br />
<%=h board.description %>
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 4a0a588e9..1f58acdc8 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -35,7 +35,7 @@
</tr></thead>
<tbody>
<% @topics.each do |topic| %>
- <tr id="message-<%= topic.id %>" class="message <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
+ <tr id="message-<%= topic.id %>" class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
<td class="subject icon <%= 'icon-sticky' if topic.sticky? %> <%= 'icon-locked' if topic.locked? %>"><%= link_to topic.subject, board_message_path(@board, topic) %></td>
<td class="author"><%= link_to_user(topic.author) %></td>
<td class="created_on"><%= format_time(topic.created_on) %></td>
diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb
index 1a4caa4b9..7a5d37283 100644
--- a/app/views/custom_fields/_index.html.erb
+++ b/app/views/custom_fields/_index.html.erb
@@ -12,7 +12,7 @@
<tbody>
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<% back_url = custom_fields_path(:tab => tab[:name]) %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
<td><%= l(custom_field.format.label) %></td>
<td><%= checked_image custom_field.is_required? %></td>
@@ -25,6 +25,6 @@
<%= delete_link custom_field_path(custom_field) %>
</td>
</tr>
- <% end %>
+ <% end; reset_cycle %>
</tbody>
</table>
diff --git a/app/views/email_addresses/_index.html.erb b/app/views/email_addresses/_index.html.erb
index 2fcf0b496..644cd759b 100644
--- a/app/views/email_addresses/_index.html.erb
+++ b/app/views/email_addresses/_index.html.erb
@@ -1,7 +1,7 @@
<% if @addresses.present? %>
<table class="list email_addresses">
<% @addresses.each do |address| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="email"><%= address.address %></td>
<td class="buttons">
<%= toggle_email_address_notify_link(address) %>
diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb
index 01e943e61..5f1d2eafb 100644
--- a/app/views/enumerations/index.html.erb
+++ b/app/views/enumerations/index.html.erb
@@ -13,7 +13,7 @@
<th></th>
</tr></thead>
<% enumerations.each do |enumeration| %>
-<tr>
+<tr class="<%= cycle('odd', 'even') %>">
<td class="name"><%= link_to enumeration, edit_enumeration_path(enumeration) %></td>
<td class="tick"><%= checked_image enumeration.is_default? %></td>
<td class="tick"><%= checked_image enumeration.active? %></td>
@@ -24,6 +24,7 @@
</tr>
<% end %>
</table>
+<% reset_cycle %>
<% end %>
<p><%= link_to l(:label_enumeration_new), new_enumeration_path(:type => klass.name) %></p>
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 50e7bd966..decc7314e 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -26,7 +26,7 @@
</tr>
<% end -%>
<% container.attachments.each do |file| %>
- <tr class="file">
+ <tr class="file <%= cycle("odd", "even") %>">
<td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
<td class="created_on"><%= format_time(file.created_on) %></td>
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
@@ -37,7 +37,8 @@
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
</td>
</tr>
- <% end %>
+ <% end
+ reset_cycle %>
<% end %>
</tbody>
</table>
diff --git a/app/views/groups/_users.html.erb b/app/views/groups/_users.html.erb
index 8c2ab7e4b..391edf4d8 100644
--- a/app/views/groups/_users.html.erb
+++ b/app/views/groups/_users.html.erb
@@ -8,7 +8,7 @@
</tr></thead>
<tbody>
<% @group.users.sort.each do |user| %>
- <tr id="user-<%= user.id %>">
+ <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="name"><%= link_to_user user %></td>
<td class="buttons">
<%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
diff --git a/app/views/groups/index.html.erb b/app/views/groups/index.html.erb
index 7b77fec22..a8886d0d8 100644
--- a/app/views/groups/index.html.erb
+++ b/app/views/groups/index.html.erb
@@ -24,7 +24,7 @@
</tr></thead>
<tbody>
<% @groups.each do |group| %>
- <tr id="group-<%= group.id %>" class="<%= "builtin" if group.builtin? %>">
+ <tr id="group-<%= group.id %>" class="<%= cycle 'odd', 'even' %> <%= "builtin" if group.builtin? %>">
<td class="name"><%= link_to group, edit_group_path(group) %></td>
<td class="user_count"><%= (@user_count_by_group_id[group.id] || 0) unless group.builtin? %></td>
<td class="buttons"><%= delete_link group unless group.builtin? %></td>
diff --git a/app/views/issue_statuses/index.html.erb b/app/views/issue_statuses/index.html.erb
index f5e6538c2..8608402ca 100644
--- a/app/views/issue_statuses/index.html.erb
+++ b/app/views/issue_statuses/index.html.erb
@@ -16,7 +16,7 @@
</tr></thead>
<tbody>
<% for status in @issue_statuses %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to status.name, edit_issue_status_path(status) %></td>
<% if Issue.use_status_for_done_ratio? %>
<td><%= status.default_done_ratio %></td>
diff --git a/app/views/issues/_changesets.html.erb b/app/views/issues/_changesets.html.erb
index 0751e79ff..f4b47c617 100644
--- a/app/views/issues/_changesets.html.erb
+++ b/app/views/issues/_changesets.html.erb
@@ -1,5 +1,5 @@
<% changesets.each do |changeset| %>
- <div class="changeset">
+ <div class="changeset <%= cycle('odd', 'even') %>">
<p><%= link_to_revision(changeset, changeset.repository,
:text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
<% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 0313f2efa..851fca1a3 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -16,6 +16,7 @@
<tbody>
<% grouped_issue_list(issues, @query, @issue_count_by_group) do |issue, level, group_name, group_count, group_totals| -%>
<% if group_name %>
+ <% reset_cycle %>
<tr class="group open">
<td colspan="<%= query.inline_columns.size + 1 %>">
<span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
@@ -25,7 +26,7 @@
</td>
</tr>
<% end %>
- <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
+ <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
<%= raw query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, issue)}</td>"}.join %>
</tr>
diff --git a/app/views/issues/_list_simple.html.erb b/app/views/issues/_list_simple.html.erb
index 1e23b161b..0d2850cd0 100644
--- a/app/views/issues/_list_simple.html.erb
+++ b/app/views/issues/_list_simple.html.erb
@@ -9,7 +9,7 @@
</tr></thead>
<tbody>
<% for issue in issues %>
- <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= issue.css_classes %>">
+ <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
<%= link_to("#{issue.tracker} ##{issue.id}", issue_path(issue)) %>
diff --git a/app/views/principal_memberships/_index.html.erb b/app/views/principal_memberships/_index.html.erb
index 8f959583b..76a629f95 100644
--- a/app/views/principal_memberships/_index.html.erb
+++ b/app/views/principal_memberships/_index.html.erb
@@ -13,7 +13,7 @@
<tbody>
<% principal.memberships.preload(:member_roles => :role).each do |membership| %>
<% next if membership.new_record? %>
- <tr id="member-<%= membership.id %>" class="class">
+ <tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project name">
<%= link_to_project membership.project %>
</td>
@@ -44,7 +44,7 @@
</td>
<%= call_table_row_hook principal, membership %>
</tr>
- <% end %>
+ <% end; reset_cycle %>
</tbody>
</table>
<% else %>
diff --git a/app/views/projects/settings/_activities.html.erb b/app/views/projects/settings/_activities.html.erb
index 27a27de5d..db1a3c286 100644
--- a/app/views/projects/settings/_activities.html.erb
+++ b/app/views/projects/settings/_activities.html.erb
@@ -12,7 +12,7 @@
<% @project.activities(true).each do |enumeration| %>
<%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
- <tr>
+ <tr class="<%= cycle('odd', 'even') %>">
<td class="name">
<%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
<%= enumeration %>
diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb
index 186a25b2a..16506c889 100644
--- a/app/views/projects/settings/_boards.html.erb
+++ b/app/views/projects/settings/_boards.html.erb
@@ -4,7 +4,7 @@
<div class="table-list-cell"><%= l(:label_board) %></div>
</div>
<%= render_boards_tree(@project.boards) do |board, level| %>
- <div class="table-list-row">
+ <div class="table-list-row <%= cycle 'odd', 'even' %>">
<div class="table-list-cell name" style="padding-left: <%= 2 + level * 16 %>px">
<%= link_to board.name, project_board_path(@project, board) %>
</div>
diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb
index 2eb416c12..8a04f2555 100644
--- a/app/views/projects/settings/_issue_categories.html.erb
+++ b/app/views/projects/settings/_issue_categories.html.erb
@@ -8,7 +8,7 @@
<tbody>
<% for category in @project.issue_categories %>
<% unless category.new_record? %>
- <tr>
+ <tr class="<%= cycle 'odd', 'even' %>">
<td class="name"><%= category.name %></td>
<td><%= category.assigned_to.name if category.assigned_to %></td>
<td class="buttons">
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index 471532266..05707fe78 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -16,7 +16,7 @@
<tbody>
<% members.each do |member| %>
<% next if member.new_record? %>
- <tr id="member-<%= member.id %>" class="member">
+ <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
<td class="name icon icon-<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles"><%= member.roles.sort.collect(&:to_s).join(', ') %></span>
@@ -54,7 +54,7 @@
</td>
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</tr>
-<% end %>
+<% end; reset_cycle %>
</tbody>
</table>
<% else %>
diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb
index d0756742a..e60164caa 100644
--- a/app/views/projects/settings/_repositories.html.erb
+++ b/app/views/projects/settings/_repositories.html.erb
@@ -11,9 +11,9 @@
</thead>
<tbody>
<% @project.repositories.sort.each do |repository| %>
- <tr>
+ <tr class="<%= cycle 'odd', 'even' %>">
<td class="name">
- <%= link_to repository.identifier,
+ <%= link_to repository.identifier,
{:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
</td>
<td><%= checked_image repository.is_default? %></td>
diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb
index 0c1714446..8173433f6 100644
--- a/app/views/projects/settings/_versions.html.erb
+++ b/app/views/projects/settings/_versions.html.erb
@@ -22,7 +22,7 @@
</tr></thead>
<tbody>
<% @versions.sort.each do |version| %>
- <tr class="version <%=h version.status %> <%= 'shared' if version.project != @project %>">
+ <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
<td class="name <%= 'icon icon-shared' if version.project != @project %>"><%= link_to_version version %></td>
<td class="date"><%= format_date(version.effective_date) %></td>
<td class="description"><%= version.description %></td>
@@ -36,7 +36,7 @@
<% end %>
</td>
</tr>
-<% end %>
+<% end; reset_cycle %>
</tbody>
</table>
<% else %>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 7de31023c..87e398ee4 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -49,7 +49,7 @@
</thead>
<tbody>
<% @trackers.each do |tracker| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
</td>
diff --git a/app/views/queries/index.html.erb b/app/views/queries/index.html.erb
index c36c0ca1a..b0dbc05be 100644
--- a/app/views/queries/index.html.erb
+++ b/app/views/queries/index.html.erb
@@ -9,7 +9,7 @@
<% else %>
<table class="list">
<% @queries.each do |query| %>
- <tr>
+ <tr class="<%= cycle('odd', 'even') %>">
<td class="name">
<%= link_to query.name, :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query %>
</td>
diff --git a/app/views/reports/_details.html.erb b/app/views/reports/_details.html.erb
index 998089caf..ab7fe3620 100644
--- a/app/views/reports/_details.html.erb
+++ b/app/views/reports/_details.html.erb
@@ -13,7 +13,7 @@
</tr></thead>
<tbody>
<% for row in rows %>
-<tr>
+<tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
<% for status in @statuses %>
<td><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, aggregate_path(@project, field_name, row, :status_id => status.id) %></td>
@@ -25,4 +25,5 @@
<% end %>
</tbody>
</table>
-<% end %>
+<% end
+ reset_cycle %>
diff --git a/app/views/reports/_simple.html.erb b/app/views/reports/_simple.html.erb
index d6f51ad19..9dca3554c 100644
--- a/app/views/reports/_simple.html.erb
+++ b/app/views/reports/_simple.html.erb
@@ -10,7 +10,7 @@
</tr></thead>
<tbody>
<% for row in rows %>
-<tr>
+<tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to row.name, aggregate_path(@project, field_name, row) %></td>
<td><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, aggregate_path(@project, field_name, row, :status_id => "o") %></td>
<td><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, aggregate_path(@project, field_name, row, :status_id => "c") %></td>
@@ -19,4 +19,5 @@
<% end %>
</tbody>
</table>
-<% end %>
+<% end
+ reset_cycle %>
diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb
index 84ef2cdd5..9c72204fa 100644
--- a/app/views/repositories/_revisions.html.erb
+++ b/app/views/repositories/_revisions.html.erb
@@ -33,7 +33,7 @@ end %>
<% show_diff = revisions.size > 1 %>
<% line_num = 1 %>
<% revisions.each do |changeset| %>
-<tr class="changeset">
+<tr class="changeset <%= cycle 'odd', 'even' %>">
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
<%= link_to_revision(changeset, @repository) %>
diff --git a/app/views/repositories/committers.html.erb b/app/views/repositories/committers.html.erb
index f23e10252..b942e4b82 100644
--- a/app/views/repositories/committers.html.erb
+++ b/app/views/repositories/committers.html.erb
@@ -17,7 +17,7 @@
<tbody>
<% i = 0 -%>
<% @committers.each do |committer, user_id| -%>
- <tr>
+ <tr class="<%= cycle 'odd', 'even' %>">
<td><%= committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer, :id => nil %>
diff --git a/app/views/roles/_form.html.erb b/app/views/roles/_form.html.erb
index 5f095e7b2..39acc34a4 100644
--- a/app/views/roles/_form.html.erb
+++ b/app/views/roles/_form.html.erb
@@ -91,7 +91,7 @@
<% end %>
</tr>
<% Tracker.sorted.all.each do |tracker| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= tracker.name %></td>
<% permissions.each do |permission| %>
<td class="<%= "#{permission}_shown" %>"><%= check_box_tag "role[permissions_tracker_ids][#{permission}][]",
diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb
index ab0bbe8da..8f059648b 100644
--- a/app/views/roles/index.html.erb
+++ b/app/views/roles/index.html.erb
@@ -12,7 +12,7 @@
</tr></thead>
<tbody>
<% for role in @roles %>
- <tr class="<%= role.builtin? ? "builtin" : "givable" %>">
+ <tr class="<%= cycle("odd", "even") %> <%= role.builtin? ? "builtin" : "givable" %>">
<td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
<td class="buttons">
<%= reorder_handle(role) unless role.builtin? %>
diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb
index ccaa95058..b403cffe1 100644
--- a/app/views/roles/permissions.html.erb
+++ b/app/views/roles/permissions.html.erb
@@ -33,7 +33,7 @@
</tr>
<% end %>
<% perms_by_module[mod].each do |permission| %>
- <tr class="permission-<%= permission.name %>">
+ <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
<td class="name">
<%= link_to_function('',
"toggleCheckboxesBySelector('.permission-#{permission.name} input')",
diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb
index 19966920b..3721df274 100644
--- a/app/views/timelog/_list.html.erb
+++ b/app/views/timelog/_list.html.erb
@@ -17,6 +17,7 @@
<tbody>
<% grouped_query_results(entries, @query, @entry_count_by_group) do |entry, group_name, group_count, group_totals| -%>
<% if group_name %>
+ <% reset_cycle %>
<tr class="group open">
<td colspan="<%= @query.inline_columns.size + 2 %>">
<span class="expander" onclick="toggleRowGroup(this);">&nbsp;</span>
@@ -30,7 +31,7 @@
</td>
</tr>
<% end %>
- <tr id="time-entry-<%= entry.id %>" class="time-entry hascontextmenu">
+ <tr id="time-entry-<%= entry.id %>" class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
<%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
<td class="buttons">
diff --git a/app/views/timelog/_report_criteria.html.erb b/app/views/timelog/_report_criteria.html.erb
index 6af122ec4..f4181172f 100644
--- a/app/views/timelog/_report_criteria.html.erb
+++ b/app/views/timelog/_report_criteria.html.erb
@@ -1,7 +1,7 @@
<% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
<% hours_for_value = select_hours(hours, criterias[level], value) -%>
<% next if hours_for_value.empty? -%>
-<tr class="<%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
+<tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
<%= ("<td></td>" * level).html_safe %>
<td class="name"><%= format_criteria_value(@report.available_criteria[criterias[level]], value) %></td>
<%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
diff --git a/app/views/trackers/fields.html.erb b/app/views/trackers/fields.html.erb
index 61d1da46a..b53f1fa0f 100644
--- a/app/views/trackers/fields.html.erb
+++ b/app/views/trackers/fields.html.erb
@@ -25,7 +25,7 @@
</td>
</tr>
<% Tracker::CORE_FIELDS.each do |field| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
@@ -48,7 +48,7 @@
</td>
</tr>
<% @custom_fields.each do |field| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb
index 8f6c210b7..5f40cf0ee 100644
--- a/app/views/trackers/index.html.erb
+++ b/app/views/trackers/index.html.erb
@@ -13,7 +13,7 @@
</tr></thead>
<tbody>
<% for tracker in @trackers %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
<td>
<% unless tracker.workflow_rules.count > 0 %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 3fc82b640..60e42c603 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -37,7 +37,7 @@
</tr></thead>
<tbody>
<% for user in @users -%>
- <tr class="<%= user.css_classes %>">
+ <tr class="<%= user.css_classes %> <%= cycle("odd", "even") %>">
<td class="username"><%= avatar(user, :size => "14") %><%= link_to user.login, edit_user_path(user) %></td>
<td class="firstname"><%= user.firstname %></td>
<td class="lastname"><%= user.lastname %></td>
diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb
index e5e72b102..136923460 100644
--- a/app/views/wiki/history.html.erb
+++ b/app/views/wiki/history.html.erb
@@ -19,7 +19,7 @@
<% show_diff = @versions.size > 1 %>
<% line_num = 1 %>
<% @versions.each do |ver| %>
-<tr class="wiki-page-version">
+<tr class="wiki-page-version <%= cycle("odd", "even") %>">
<td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
<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>
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb
index def117b3f..9fb2705e7 100644
--- a/app/views/workflows/_form.html.erb
+++ b/app/views/workflows/_form.html.erb
@@ -24,7 +24,7 @@
<tbody>
<% for old_status in [nil] + @statuses %>
<% next if old_status.nil? && name != 'always' %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
diff --git a/app/views/workflows/index.html.erb b/app/views/workflows/index.html.erb
index 66785a40c..1a0780532 100644
--- a/app/views/workflows/index.html.erb
+++ b/app/views/workflows/index.html.erb
@@ -17,7 +17,7 @@
</thead>
<tbody>
<% @trackers.each do |tracker| -%>
-<tr>
+<tr class="<%= cycle('odd', 'even') %>">
<td class="name"><%= tracker.name %></td>
<% @roles.each do |role| -%>
<% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb
index fc886e0d4..0fb4c8bb6 100644
--- a/app/views/workflows/permissions.html.erb
+++ b/app/views/workflows/permissions.html.erb
@@ -60,7 +60,7 @@
</td>
</tr>
<% @fields.each do |field, name| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
@@ -80,7 +80,7 @@
</td>
</tr>
<% @custom_fields.each do |field| %>
- <tr>
+ <tr class="<%= cycle("odd", "even") %>">
<td class="name">
<%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
</td>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 8d703ade1..f38b69b3c 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -685,6 +685,10 @@ function beforeShowDatePicker(input, inst) {
type: 'put',
dataType: 'script',
data: data,
+ success: function(data){
+ sortable.children(":even").removeClass("even").addClass("odd");
+ sortable.children(":odd").removeClass("odd").addClass("even");
+ },
error: function(jqXHR, textStatus, errorThrown){
alert(jqXHR.status);
sortable.sortable("cancel");
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 4ed40bcb1..bb2b0b888 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -317,8 +317,6 @@ table.permissions td.role {color:#999;font-size:90%;font-weight:normal !importan
tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;}
-div.mypage-box table.time-entries tr.time-entry { background-color: #fff; }
-div.mypage-box table.time-entries tr.odd { background-color:#f6f7f8; }
tr.time-entry { text-align: center; white-space: nowrap; }
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; }
td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
@@ -332,7 +330,7 @@ table.plugins span.url { display: block; font-size: 0.9em; }
table.list.enumerations {table-layout: fixed;}
-tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; background-color: #fff;}
+tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; }
tr.group span.name {font-weight:bold;}
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;}
tr.group span.totals {color: #aaa; font-size: 80%;}
@@ -345,8 +343,8 @@ table.list tbody tr:hover { background-color:#ffffdd; }
table.list tbody tr.group:hover { background-color:inherit; }
table td {padding:2px;}
table p {margin:0;}
-table.list tbody tr:nth-child(odd), #issue-changesets div.changeset:nth-child(odd) {background-color:#f6f7f8;}
-table.list tbody tr:nth-child(even), #issue-changesets div.changeset:nth-child(even) {background-color: #fff;}
+.odd {background-color:#f6f7f8;}
+.even {background-color: #fff;}
tr.builtin td.name {font-style:italic;}