Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 6 commits
  • 100 files changed
  • 0 commit comments
  • 1 contributor
Showing with 156 additions and 162 deletions.
  1. 0  {public → app/assets}/images/backgrounds/bar.gif
  2. 0  {public → app/assets}/images/backgrounds/bar_low.gif
  3. 0  {public → app/assets}/images/backgrounds/table_head.jpg
  4. 0  {public → app/assets}/images/buttons/background.jpg
  5. 0  {public → app/assets}/images/buttons/hover.jpg
  6. 0  {public → app/assets}/images/buttons/left_cap.jpg
  7. 0  {public → app/assets}/images/buttons/left_cap_hover.jpg
  8. 0  {public → app/assets}/images/buttons/left_cap_selected.jpg
  9. 0  {public → app/assets}/images/buttons/right_cap.jpg
  10. 0  {public → app/assets}/images/buttons/right_cap_hover.jpg
  11. 0  {public → app/assets}/images/buttons/right_cap_selected.jpg
  12. 0  {public → app/assets}/images/buttons/selected.jpg
  13. 0  {public → app/assets}/images/clear.gif
  14. 0  {public → app/assets}/images/icons/accept.png
  15. 0  {public → app/assets}/images/icons/add.png
  16. 0  {public → app/assets}/images/icons/bullet_green.png
  17. 0  {public → app/assets}/images/icons/bullet_toggle_minus.png
  18. 0  {public → app/assets}/images/icons/bullet_toggle_plus.png
  19. 0  {public → app/assets}/images/icons/cancel.png
  20. 0  {public → app/assets}/images/icons/decline.png
  21. 0  {public → app/assets}/images/icons/delete.png
  22. 0  {public → app/assets}/images/icons/disc_green.png
  23. 0  {public → app/assets}/images/icons/down_blue.png
  24. 0  {public → app/assets}/images/icons/email.png
  25. 0  {public → app/assets}/images/icons/email_add.png
  26. 0  {public → app/assets}/images/icons/error.png
  27. 0  {public → app/assets}/images/icons/exclamation.png
  28. 0  {public → app/assets}/images/icons/flag_checked.png
  29. 0  {public → app/assets}/images/icons/group.png
  30. 0  {public → app/assets}/images/icons/group_add.png
  31. 0  {public → app/assets}/images/icons/information.png
  32. 0  {public → app/assets}/images/icons/page_edit.png
  33. 0  {public → app/assets}/images/icons/page_go.png
  34. 0  {public → app/assets}/images/icons/page_white_world.png
  35. 0  {public → app/assets}/images/icons/play_blue.png
  36. 0  {public → app/assets}/images/icons/spinner.gif
  37. 0  {public → app/assets}/images/icons/star.png
  38. 0  {public → app/assets}/images/icons/star_green.png
  39. 0  {public → app/assets}/images/icons/table.png
  40. 0  {public → app/assets}/images/icons/table_edit.png
  41. 0  {public → app/assets}/images/icons/user.png
  42. 0  {public → app/assets}/images/icons/user_add.png
  43. 0  {public → app/assets}/images/icons/world_edit.png
  44. 0  {public → app/assets}/images/icons/world_go.png
  45. 0  {public → app/assets}/images/photos/404.jpg
  46. 0  {public → app/assets}/images/photos/422.jpg
  47. 0  {public → app/assets}/images/photos/500.jpg
  48. 0  {public → app/assets}/images/photos/503.jpg
  49. 0  {public → app/assets}/images/photos/maintenance.jpg
  50. 0  {public → app/assets}/images/rails.png
  51. 0  {public → app/assets}/images/widgets/tooltip_arrow.gif
  52. 0  {public → app/assets}/images/widgets/tooltip_image.gif
  53. +1 −1  app/assets/javascripts/{tabs.js → tabs.js.erb}
  54. +4 −4 app/assets/stylesheets/{application.css → application.css.erb}
  55. +2 −2 app/assets/stylesheets/{forms.css → forms.css.erb}
  56. +1 −1  app/assets/stylesheets/{grid.css → grid.css.erb}
  57. +13 −13 app/assets/stylesheets/{pages.css → pages.css.erb}
  58. +3 −3 app/assets/stylesheets/{tables.css → tables.css.erb}
  59. +3 −6 app/models/discipline.rb
  60. +1 −1  app/views/admin/aliases/destroy.js.erb
  61. +1 −1  app/views/admin/categories/_category.html.erb
  62. +3 −3 app/views/admin/events/_events.html.erb
  63. +2 −2 app/views/admin/events/_races.html.erb
  64. +4 −4 app/views/admin/events/destroy.js.erb
  65. +11 −10 app/views/admin/events/destroy_races.js.erb
  66. +1 −1  app/views/admin/people/_aliases_table.html.erb
  67. +3 −3 app/views/admin/people/_numbers.html.erb
  68. +1 −1  app/views/admin/people/index.html.erb
  69. +5 −4 app/views/admin/people/merge.js.erb
  70. +1 −1  app/views/admin/posts/index.html.erb
  71. +3 −2 app/views/admin/race_numbers/_new.html.erb
  72. +2 −2 app/views/admin/race_numbers/destroy.js.erb
  73. +2 −6 app/views/admin/race_numbers/new.js.erb
  74. +7 −6 app/views/admin/races/_race.html.erb
  75. +2 −2 app/views/admin/races/_result.html.erb
  76. +3 −3 app/views/admin/races/create.js.erb
  77. +3 −3 app/views/admin/races/create_result.js.erb
  78. +4 −4 app/views/admin/races/destroy.js.erb
  79. +2 −2 app/views/admin/races/destroy_result.js.erb
  80. +3 −3 app/views/admin/races/propagate.js.erb
  81. +2 −2 app/views/admin/results/_result.html.erb
  82. +1 −1  app/views/admin/results/add_score.js.erb
  83. +3 −3 app/views/admin/results/index.html.erb
  84. +5 −5 app/views/admin/results/index.js.erb
  85. +6 −6 app/views/admin/results/move.js.erb
  86. +1 −1  app/views/admin/teams/destroy_name.js.erb
  87. +2 −2 app/views/admin/teams/edit.html.erb
  88. +1 −1  app/views/admin/teams/index.html.erb
  89. +5 −4 app/views/admin/teams/merge.js.erb
  90. +4 −4 app/views/admin/teams/merge_confirm.js.erb
  91. +1 −1  app/views/admin/velodromes/index.html.erb
  92. +1 −1  app/views/redirect.js.erb
  93. +3 −3 app/views/shared/exception.js.erb
  94. +1 −1  app/views/table/_base.html.erb
  95. +5 −5 public/404.html
  96. +5 −5 public/422.html
  97. +5 −5 public/500.html
  98. +5 −5 public/503.html
  99. +5 −5 public/maintenance.html
  100. +4 −8 test/acceptance/admin/pages_test.rb
View
0  public/images/backgrounds/bar.gif → app/assets/images/backgrounds/bar.gif
File renamed without changes
View
0  public/images/backgrounds/bar_low.gif → app/assets/images/backgrounds/bar_low.gif
File renamed without changes
View
0  public/images/backgrounds/table_head.jpg → app/assets/images/backgrounds/table_head.jpg
File renamed without changes
View
0  public/images/buttons/background.jpg → app/assets/images/buttons/background.jpg
File renamed without changes
View
0  public/images/buttons/hover.jpg → app/assets/images/buttons/hover.jpg
File renamed without changes
View
0  public/images/buttons/left_cap.jpg → app/assets/images/buttons/left_cap.jpg
File renamed without changes
View
0  public/images/buttons/left_cap_hover.jpg → app/assets/images/buttons/left_cap_hover.jpg
File renamed without changes
View
0  public/images/buttons/left_cap_selected.jpg → ...sets/images/buttons/left_cap_selected.jpg
File renamed without changes
View
0  public/images/buttons/right_cap.jpg → app/assets/images/buttons/right_cap.jpg
File renamed without changes
View
0  public/images/buttons/right_cap_hover.jpg → ...assets/images/buttons/right_cap_hover.jpg
File renamed without changes
View
0  public/images/buttons/right_cap_selected.jpg → ...ets/images/buttons/right_cap_selected.jpg
File renamed without changes
View
0  public/images/buttons/selected.jpg → app/assets/images/buttons/selected.jpg
File renamed without changes
View
0  public/images/clear.gif → app/assets/images/clear.gif
File renamed without changes
View
0  public/images/icons/accept.png → app/assets/images/icons/accept.png
File renamed without changes
View
0  public/images/icons/add.png → app/assets/images/icons/add.png
File renamed without changes
View
0  public/images/icons/bullet_green.png → app/assets/images/icons/bullet_green.png
File renamed without changes
View
0  public/images/icons/bullet_toggle_minus.png → ...sets/images/icons/bullet_toggle_minus.png
File renamed without changes
View
0  public/images/icons/bullet_toggle_plus.png → ...ssets/images/icons/bullet_toggle_plus.png
File renamed without changes
View
0  public/images/icons/cancel.png → app/assets/images/icons/cancel.png
File renamed without changes
View
0  public/images/icons/decline.png → app/assets/images/icons/decline.png
File renamed without changes
View
0  public/images/icons/delete.png → app/assets/images/icons/delete.png
File renamed without changes
View
0  public/images/icons/disc_green.png → app/assets/images/icons/disc_green.png
File renamed without changes
View
0  public/images/icons/down_blue.png → app/assets/images/icons/down_blue.png
File renamed without changes
View
0  public/images/icons/email.png → app/assets/images/icons/email.png
File renamed without changes
View
0  public/images/icons/email_add.png → app/assets/images/icons/email_add.png
File renamed without changes
View
0  public/images/icons/error.png → app/assets/images/icons/error.png
Diff not rendered
View
0  public/images/icons/exclamation.png → app/assets/images/icons/exclamation.png
Diff not rendered
View
0  public/images/icons/flag_checked.png → app/assets/images/icons/flag_checked.png
Diff not rendered
View
0  public/images/icons/group.png → app/assets/images/icons/group.png
Diff not rendered
View
0  public/images/icons/group_add.png → app/assets/images/icons/group_add.png
Diff not rendered
View
0  public/images/icons/information.png → app/assets/images/icons/information.png
Diff not rendered
View
0  public/images/icons/page_edit.png → app/assets/images/icons/page_edit.png
Diff not rendered
View
0  public/images/icons/page_go.png → app/assets/images/icons/page_go.png
Diff not rendered
View
0  public/images/icons/page_white_world.png → app/assets/images/icons/page_white_world.png
Diff not rendered
View
0  public/images/icons/play_blue.png → app/assets/images/icons/play_blue.png
Diff not rendered
View
0  public/images/icons/spinner.gif → app/assets/images/icons/spinner.gif
Diff not rendered
View
0  public/images/icons/star.png → app/assets/images/icons/star.png
Diff not rendered
View
0  public/images/icons/star_green.png → app/assets/images/icons/star_green.png
Diff not rendered
View
0  public/images/icons/table.png → app/assets/images/icons/table.png
Diff not rendered
View
0  public/images/icons/table_edit.png → app/assets/images/icons/table_edit.png
Diff not rendered
View
0  public/images/icons/user.png → app/assets/images/icons/user.png
Diff not rendered
View
0  public/images/icons/user_add.png → app/assets/images/icons/user_add.png
Diff not rendered
View
0  public/images/icons/world_edit.png → app/assets/images/icons/world_edit.png
Diff not rendered
View
0  public/images/icons/world_go.png → app/assets/images/icons/world_go.png
Diff not rendered
View
0  public/images/photos/404.jpg → app/assets/images/photos/404.jpg
Diff not rendered
View
0  public/images/photos/422.jpg → app/assets/images/photos/422.jpg
Diff not rendered
View
0  public/images/photos/500.jpg → app/assets/images/photos/500.jpg
Diff not rendered
View
0  public/images/photos/503.jpg → app/assets/images/photos/503.jpg
Diff not rendered
View
0  public/images/photos/maintenance.jpg → app/assets/images/photos/maintenance.jpg
Diff not rendered
View
0  public/images/rails.png → app/assets/images/rails.png
Diff not rendered
View
0  public/images/widgets/tooltip_arrow.gif → app/assets/images/widgets/tooltip_arrow.gif
Diff not rendered
View
0  public/images/widgets/tooltip_image.gif → app/assets/images/widgets/tooltip_image.gif
Diff not rendered
View
2  app/assets/javascripts/tabs.js → app/assets/javascripts/tabs.js.erb
@@ -1,5 +1,5 @@
hoverImage = new Image(200, 24);
-hoverImage.src = '/images/buttons/hover.jpg';
+hoverImage.src = '<%= asset_path("buttons/hover.jpg") %>';
function hover(anchor) {
if (anchor.parentNode.parentNode.className == 'first') {
View
8 app/assets/stylesheets/application.css → app/assets/stylesheets/application.css.erb
@@ -138,7 +138,7 @@ p.flash_message, p.message, div.flash_message, div.message {
#notice_span, .notice, .notice_span
{
background-position: 0px 2px;
- background-image: url(/images/icons/information.png);
+ background-image: url(<%= asset_path("icons/information.png") %>);
background-repeat: no-repeat;
padding-bottom: 2px;
padding-left: 20px;
@@ -148,7 +148,7 @@ p.flash_message, p.message, div.flash_message, div.message {
#warn_span, .warn, .warn_span
{
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(<%= asset_path("icons/exclamation.png") %>);
background-repeat: no-repeat;
padding-bottom: 2px;
padding-left: 20px;
@@ -189,7 +189,7 @@ div.nav {
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(<%= asset_path("backgrounds/bar.gif") %>);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -198,7 +198,7 @@ div.nav#bottom {
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(<%= asset_path("backgrounds/bar_low.gif") %>);
border-top: 1px solid rgb(190, 190, 190);
}
View
4 app/assets/stylesheets/forms.css → app/assets/stylesheets/forms.css.erb
@@ -266,7 +266,7 @@ div.fieldWithErrors
margin-top: 6px;
margin-left: 32px;
padding-left: 20px;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(<%= asset_path("icons/exclamation.png") %>);
background-repeat: no-repeat;
background-position: 0 0.5px;
}
@@ -351,7 +351,7 @@ fieldset p {
input.editor_cancel_button {
position: relative;
top: 3px;
- background: url(/images/icons/decline.png);
+ background: url(<%= asset_path("icons/decline.png") %>);
border: none;
width: 15px;
height: 15px;
View
2  app/assets/stylesheets/grid.css → app/assets/stylesheets/grid.css.erb
@@ -128,7 +128,7 @@ hr.space {
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(<%= asset_path("backgrounds/grid.png") %>);
}
.no_top_margin {
View
26 app/assets/stylesheets/pages.css → app/assets/stylesheets/pages.css.erb
@@ -62,7 +62,7 @@ td.day div.event {
}
td.day div.beginner_friendly {
- background-image: url(/images/icons/star_green.png);
+ background-image: url(<%= asset_path("icons/star_green.png") %>);
background-repeat: no-repeat;
padding-left: 20px;
}
@@ -153,15 +153,15 @@ div.disclosure {
}
.collapsed {
- background-image: url(/images/icons/play_blue.png);
+ background-image: url(<%= asset_path("icons/play_blue.png") %>);
}
.loading {
- background-image: url(/images/icons/spinner.gif);
+ background-image: url(<%= asset_path("icons/spinner.gif") %>);
}
.expanded {
- background-image: url(/images/icons/down_blue.png);
+ background-image: url(<%= asset_path("icons/down_blue.png") %>);
}
.category_root .category {
@@ -175,7 +175,7 @@ div.disclosure {
float: left;
padding-left: 24px;
cursor: move;
- background-image: url(/images/icons/star.png);
+ background-image: url(<%= asset_path("icons/star.png") %>);
background-repeat: no-repeat;
background-position: 0px 2px;
line-height: 24px;
@@ -199,7 +199,7 @@ div.disclosure {
}
.ui-draggable-dragging.category {
- background-image: url(/images/icons/star.png);
+ background-image: url(<%= asset_path("icons/star.png") %>);
}
/* Results admin */
@@ -253,7 +253,7 @@ table.results td.result .event {
/* Pages */
table.base .title div.editable {
background-repeat: no-repeat;
- background-image: url(/images/icons/page_white_world.png);
+ background-image: url(<%= asset_path("icons/page_white_world.png") %>);
padding-left: 20px;
}
@@ -358,7 +358,7 @@ input.zip {
.current, .renewed {
padding-right: 20px;
- background-image: url(/images/icons/accept.png);
+ background-image: url(<%= asset_path("icons/accept.png") %>);
background-repeat: no-repeat;
background-position: center right;
}
@@ -382,7 +382,7 @@ form.cat4_womens_race_series td input#result_team_name {
/* Event */
table.event_nav td.race {
- background-image: url(/images/icons/star.png);
+ background-image: url(<%= asset_path("icons/star.png") %>);
background-repeat: no-repeat;
background-position: 8px 4px;
padding-top: 4px;
@@ -599,7 +599,7 @@ table.numbers label.inline {
}
.posts td.subject {
- background-image: url(/images/icons/email.png);
+ background-image: url(<%= asset_path("icons/email.png") %>);
background-repeat: no-repeat;
background-position: 12px center;
}
@@ -677,7 +677,7 @@ table#preview_import_table th {
}
#merge_form {
- background-image: url(/images/icons/error.png);
+ background-image: url(<%= asset_path("icons/error.png") %>);
background-position: 0px 2px;
background-repeat: no-repeat;
padding-left: 24px;
@@ -685,7 +685,7 @@ table#preview_import_table th {
}
.ui-draggable-dragging.person {
- background-image: url(/images/icons/user.png);
+ background-image: url(<%= asset_path("icons/user.png") %>);
}
/* Login */
@@ -701,5 +701,5 @@ table#preview_import_table th {
}
.ui-draggable-dragging.team {
- background-image: url(/images/icons/group.png);
+ background-image: url(<%= asset_path("icons/group.png") %>);
}
View
6 app/assets/stylesheets/tables.css → app/assets/stylesheets/tables.css.erb
@@ -35,7 +35,7 @@ div.table_container div.caption {
border-bottom-style: solid;
border-width: 1px;
border-color: rgb(204, 204, 204);
- background-image: url(/images/backgrounds/table_head.jpg);
+ background-image: url(<%= asset_path("backgrounds/table_head.jpg") %>);
font-weight: bold;
font-size: 0.8em;
line-height: 21px;
@@ -201,7 +201,7 @@ table.base div.editable.saving:hover {
}
table.base div.editable.saving input {
- background-image: url(/images/icons/spinner.gif);
+ background-image: url(<%= asset_path("icons/spinner.gif") %>);
background-position: center right;
background-repeat: no-repeat;
}
@@ -267,7 +267,7 @@ table.base tr.merging td {
table.show_grid {
background-position: 8px 0px;
- background-image: url(/images/backgrounds/table_grid.png);
+ background-image: url(<%= asset_path("backgrounds/table_grid.png") %>);
}
.table_container + div.buttons {
View
9 app/models/discipline.rb
@@ -6,7 +6,7 @@ class Discipline < ActiveRecord::Base
has_many :discipline_aliases
has_and_belongs_to_many :bar_categories, :class_name => "Category", :join_table => "discipline_bar_categories"
- NONE = Discipline.new(:name => "", :id => nil).freeze unless defined?(NONE)
+ NONE = Discipline.new(:name => "").freeze unless defined?(NONE)
@@all_aliases = nil
@@names = nil
@@ -25,7 +25,7 @@ def self.[](name)
end
def self.find_all_bar
- Discipline.all( :conditions => ["bar = true"])
+ Discipline.where(:bar => true)
end
def self.find_via_alias(name)
@@ -34,10 +34,7 @@ def self.find_via_alias(name)
def self.load_aliases
@@all_aliases = {}
- results = connection.select_all(
- "SELECT discipline_id, alias FROM discipline_aliases"
- )
- for result in results
+ connection.select_all("SELECT discipline_id, alias FROM discipline_aliases").each do |result|
@@all_aliases[result["alias"].underscore.gsub(' ', '_').to_sym] = Discipline.find(result["discipline_id"].to_i)
end
Discipline.all.each do |discipline|
View
2  app/views/admin/aliases/destroy.js.erb
@@ -1 +1 @@
-page.visual_effect :puff, "alias_#{@alias.id}", :duration => 2
+jQuery('#alias_<%= @alias.id %>').effect('puff', {}, 2000);
View
2  app/views/admin/categories/_category.html.erb
@@ -1,7 +1,7 @@
<div class="category" id="category_<%= category.id %>_row" data-id="<%= category.id %>">
<div class="disclosure<%= " collapsed" unless category.children.empty? %>" id="disclosure_<%= category.id %>" data-id="<%= category.id %>">&nbsp;</div>
<div class="category_name" id="category_<%= category.id %>" data-id="<%= category.id %>"><%= category.name %></div>
- <%= link_to(image_tag('/images/icons/table.png'),
+ <%= link_to(image_tag('icons/table.png'),
category_races_path(category),
:title => 'View races', :class => "image") unless category.races.empty? %>
<div class="children" id="category_<%= category.id %>_children"></div>
View
6 app/views/admin/events/_events.html.erb
@@ -1,7 +1,7 @@
<% nav_caption = %Q{
<div>Events</div>
<div class="right">
- #{link_to(image_tag('/images/icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
+ #{link_to(image_tag('icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
event_results_path(@event),
{ :class => "image" }) if @event.has_results_including_children? }
</div>
@@ -11,7 +11,7 @@
<tr id="event_<%= single_day_event.id %>_row">
<td class='nowrap'><%= link_to single_day_event.date.strftime('%A, %B %d'), edit_admin_event_path(single_day_event) %></td>
<td class='link'><%= link_to single_day_event.name, edit_admin_event_path(single_day_event) %></td>
- <td class="right"><%= link_to(image_tag('/images/icons/delete.png'),
+ <td class="right"><%= link_to(image_tag('icons/delete.png'),
admin_event_path(single_day_event),
:remote => true,
:class => "image",
@@ -29,7 +29,7 @@
</td>
<td class='link'></td>
<td class="right"><%= link_to(
- image_tag("/images/icons/add.png"),
+ image_tag("icons/add.png"),
new_admin_event_path(:event => { :parent_id => @event.id, :type => @event.is_a?(MultiDayEvent) ? "SingleDayEvent" : "Event" }),
:class => "image",
:id => "new_event"
View
4 app/views/admin/events/_races.html.erb
@@ -1,7 +1,7 @@
<% nav_caption = %Q{
<div>Races</div>
<div class="right">
- #{link_to(image_tag('/images/icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
+ #{link_to(image_tag('icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
event_results_path(@event),
{ :class => "image" }) if @event.has_results_including_children? }
</div>
@@ -46,7 +46,7 @@
<%= image_tag "icons/spinner.gif", :id => "destroy_races_progress", :style => "display: none" %>
</td>
<td class="right">
- <%= link_to(image_tag("/images/icons/add.png"),
+ <%= link_to(image_tag("icons/add.png"),
admin_event_races_path(@event),
:remote => true,
:method => :post,
View
8 app/views/admin/events/destroy.js.erb
@@ -1,4 +1,4 @@
-page.visual_effect(:puff, "event_#{@event.id}_row", :duration => 2)
-page.hide("warn")
-page.show("notice")
-page["notice_span"].replace_html "Deleted #{@event.name}"
+jQuery('#event_<%= @event.id %>_row').effect('puff', {}, 2000);
+jQuery.hide('#warn');
+jQuery.show('#notice');
+jQuery('notice_span').html('Deleted <%= event.name %>');
View
21 app/views/admin/events/destroy_races.js.erb
@@ -1,12 +1,13 @@
-@races.each do |race|
- page.visual_effect :puff, "race_#{race.id}_row", :duration => 0.2
-end
+<% @races.each do |race| %>
+ jQuery('#race_<%= race.id %>_row').effect('puff', {}, 200);
+<% end %>
-if @combined_results
- page.visual_effect :puff, "event_#{@combined_results.id}_row", :duration => 0.2
-end
+<% if @combined_results %>
+ jQuery('#event_<%= @combined_results.id %>_row').effect('puff', {}, 200);
+<% end %>
-page.visual_effect :fade, "destroy_races_progress", :duration => 0.1
-page.hide "warn"
-page.show "notice"
-page["notice_span"].replace_html "Deleted races"
+jQuery('#destroy_races_progress').fadeOut(100));
+jQuery("#warn").hide();
+jQuery('#notice').show();
+
+jQuery('#notice_span').html('Deleted races');
View
2  app/views/admin/people/_aliases_table.html.erb
@@ -3,7 +3,7 @@
<tr id="alias_<%= name_alias.id %>">
<td><%= name_alias.name %></td>
<td>
- <%= link_to(image_tag('/images/icons/delete.png'),
+ <%= link_to(image_tag('icons/delete.png'),
admin_person_alias_path(@person, name_alias),
:method => "delete",
:remote => true,
View
6 app/views/admin/people/_numbers.html.erb
@@ -32,7 +32,7 @@
</td>
<td class="right">
<%= link_to(
- image_tag('/images/icons/delete.png'),
+ image_tag('icons/delete.png'),
admin_person_race_number_path(person, number),
:remote => true,
:method => :delete,
@@ -47,12 +47,12 @@
</tr>
<% end %>
<% if @person.new_record? %>
- <%= render :partial => "/admin/race_numbers/new", :locals => { :discipline_id => Discipline[:road].id } %>
+ <%= render :partial => "/admin/race_numbers/new" %>
<% else %>
<tr id="new_number_button_row">
<td class="right">
<%= link_to(
- image_tag("/images/icons/add.png", :size => "16x16"),
+ image_tag("icons/add.png", :size => "16x16"),
new_admin_person_race_number_path(person),
:remote => true,
:class => "image") %>
View
2  app/views/admin/people/index.html.erb
@@ -27,7 +27,7 @@
<div class="buttons container">
<div class="updatedon">
- <%= link_to(image_tag('/images/icons/user_add.png'), new_admin_person_path, :class => "image new", :id => "new_person") %>
+ <%= link_to(image_tag('icons/user_add.png'), new_admin_person_path, :class => "image new", :id => "new_person") %>
</div>
<div class="right">
<%= link_to('Print Cards', cards_admin_people_path(:format => "pdf")) %>
View
9 app/views/admin/people/merge.js.erb
@@ -1,4 +1,5 @@
-page.remove "person_#{@other_person.id}_row"
-page.replace_html "person_#{@person.id}_aliases", render(:partial => 'aliases', :locals => { :person => @person })
-page.call :flash, "notice", "Merged #{@other_person.name} into #{@person.name}"
-page.call :restripeTable, :people_table
+jQuery('#person_<%= @other_person.id %>_row').remove();
+jQuery('#person_<%= @person.id %>_aliases').html("<%= escape_javascript(render(:partial => 'aliases', :locals => { :person => @person })) %>");
+
+flash("notice", "Merged <%= @other_person.name %> into <%= @person.name %>");
+restripeTable('#people_table');
View
2  app/views/admin/posts/index.html.erb
@@ -25,5 +25,5 @@
<%= will_paginate(@posts) if @posts.present? %>
<div class="buttons container">
- <%= link_to image_tag("/images/icons/email_add.png"), new_admin_mailing_list_post_path(@mailing_list) %>
+ <%= link_to image_tag("icons/email_add.png"), new_admin_mailing_list_post_path(@mailing_list) %>
</div>
View
5 app/views/admin/race_numbers/_new.html.erb
@@ -9,14 +9,15 @@
</td>
<td>
<select name='discipline_id[]' id='discipline_id_<%= row_id %>'>
- <%= options_for_select Discipline.numbers.collect { |discipline| [discipline.name, discipline.id] }, discipline_id %>
+ <%= options_for_select Discipline.numbers.collect { |discipline| [discipline.name, discipline.id] }, Discipline[:road].try(:id) %>
</select>
</td>
<td>
<%= text_field_tag 'number_value[]', '', :class => "number" %>
</td>
<td>
- <%= link_to_function(image_tag('/images/icons/decline.png'), "$('new_number_#{row_id}').remove()", :class => "image") %></td>
+ <%= link_to_function(image_tag('icons/decline.png'), "jQuery('#new_number_#{row_id}').remove()", :class => "image") %></td>
</td>
</table>
+ </td>
</tr>
View
4 app/views/admin/race_numbers/destroy.js.erb
@@ -1,2 +1,2 @@
-page.visual_effect(:puff, "number_#{@race_number.id}_row", :duration => 2)
-page.remove("number_#{@race_number.id}_value")
+jQuery('#number_<%= @race_number.id %>').effect('puff', {}, 2000);
+jQuery("#number_<%= race_number.id %>_value").remove();
View
8 app/views/admin/race_numbers/new.js.erb
@@ -1,6 +1,2 @@
-page.insert_html(
- :before, 'new_number_button_row',
- :partial => '/admin/race_numbers/new',
- :locals => { :discipline_id => Discipline[:road].id }
-)
-page['input.number'].select
+jQuery('<%= escape_javascript(render(:partial => "admin/race_numbers/new")) %>').insertBefore('#new_number_button_row');
+jQuery('input.number').focus();
View
13 app/views/admin/races/_race.html.erb
@@ -9,12 +9,13 @@
<%= link_to "Edit", edit_admin_race_path(race), :id => "edit_race_#{race.id}" %>
</td>
<td class="right delete">
- <%= link_to(image_tag('/images/icons/delete.png'),
- admin_race_url(race),
- :remote => true,
- :class => "image", :id => "destroy_race_#{race.id}", :title => "Delete race",
- :confirm => (Rails.env.acceptance? || !promoter?) ? nil : "Really delete #{race.name}?",
- :method => :delete)
+ <%= link_to(image_tag("icons/delete.png"),
+ admin_race_path(race),
+ :remote => true,
+ :class => "image", :id => "destroy_race_#{race.id}", :title => "Delete race",
+ :confirm => (Rails.env.acceptance? || !promoter?) ? nil : "Really delete #{race.name}?",
+ :method => :delete
+ )
%>
</td>
</tr>
View
4 app/views/admin/races/_result.html.erb
@@ -11,12 +11,12 @@
-%></td>
<% end %>
<td class="actions last">
- <%= link_to image_tag("/images/icons/add.png"),
+ <%= link_to image_tag("icons/add.png"),
create_result_admin_race_path(:before_result_id => result.id),
:remote => true,
:class => "image", :id => "result_#{result.id}_add",
:method => "post"
- %><%= link_to(image_tag("/images/icons/delete.png"),
+ %><%= link_to(image_tag("icons/delete.png"),
destroy_result_admin_race_path(result.race, :result_id => result.id),
:remote => true,
:class => "image", :id => "result_#{result.id}_destroy",
View
6 app/views/admin/races/create.js.erb
@@ -1,3 +1,3 @@
-page.insert_html :before, "create_race_row", :partial => "admin/races/race", :locals => { :race => @race }
-page.call :makeEditable
-page << "$('#race_#{@race.id}_row .editable').click()"
+jQuery('<%= escape_javascript(render(:partial => "admin/races/race", :locals => { :race => @race })) %>').insertBefore('#create_race_row');
+makeEditable();
+jQuery('#race_<%= @race.id %>_row .editable').click();
View
6 app/views/admin/races/create_result.js.erb
@@ -1,3 +1,3 @@
-page.replace_html "results", :partial => "results", :locals => { :race => @result.race }
-page.visual_effect :highlight, "result_#{@result.id}_row"
-page.call :restripeTable, :results
+jQuery('#results').html('<%= escape_javascript(render(@result.race)) %>');
+jQuery('#result_<%= @result.id %>_row').highlight();
+restripeTable('results');
View
8 app/views/admin/races/destroy.js.erb
@@ -1,4 +1,4 @@
-page.visual_effect(:puff, "race_#{@race.id}_row", :duration => 2)
-page.hide("warn")
-page.show("notice")
-page["notice_span"].replace_html "Deleted #{@race.name}"
+jQuery('#race_<%= @race.id %>_row').effect('puff', {}, 2000);
+jQuery('#warn').hide();
+jQuery('#notice').show();
+jQuery('#notice_span').html('Deleted <%= @race.name %>');
View
4 app/views/admin/races/destroy_result.js.erb
@@ -1,2 +1,2 @@
-page.replace_html "results", :partial => "results", :locals => { :race => @result.race }
-page.call :restripeTable, :results
+jQuery('#results').html'<%= escape_javascript(render(:partial => "results", :locals => { :race => @result.race })) %>')
+restripeTable('results');
View
6 app/views/admin/races/propagate.js.erb
@@ -1,3 +1,3 @@
-page[:propagate_races_progress].hide
-page[:propagate_races].show
-page.alert "Added all race categories from #{@event.full_name} to #{pluralize @event.children.count, "child"}"
+jQuery('#propagate_races_progress').hide();
+jQuery('#propagate_races').show();
+alert('Added all race categories from <%= @event.full_name %> to <%= pluralize @event.children.count, "child" %>');
View
4 app/views/admin/results/_result.html.erb
@@ -13,8 +13,8 @@
<td><%= result.race.name %></td>
<td class="right"><%= result.event_date_range_s %></td>
<td class="right"><%= number_with_precision(result.points, :precision => 0) if result.points > 0 %></td>
- <td class="page_links"><%= link_to(image_tag('/images/icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
- event_results_path(result.event, :anchor => "race_#{result.race.id}"), :class => "image") %>&nbsp;<%= link_to(image_tag('/images/icons/table_edit.png', :title => 'Edit race results', :alt => 'Edit race results'),
+ <td class="page_links"><%= link_to(image_tag('icons/page_go.png', :title => 'View public results web page', :alt => 'View public results web page'),
+ event_results_path(result.event, :anchor => "race_#{result.race.id}"), :class => "image") %>&nbsp;<%= link_to(image_tag('icons/table_edit.png', :title => 'Edit race results', :alt => 'Edit race results'),
edit_admin_race_path(result.race), :class => "image") %>
</td>
</tr>
View
2  app/views/admin/results/add_score.js.erb
@@ -1 +1 @@
-page.insert_html :after, "result_#{params[:id]}_row", :partial => 'score', :collection => @scores
+jQuery('<%= escape_javascript(render(@scores)) %>').insertAfter('result_<%= params[:id] %>_row');
View
6 app/views/admin/results/index.html.erb
@@ -44,7 +44,7 @@
var id = /\d+/.exec($(element).attr('id'))[0];
if ($(element).is('.collapsed')) {
$(element).removeClass('collapsed');
- element.src='/images/icons/spinner.gif';
+ element.src='icons/spinner.gif';
$.ajax({
url: '/admin/results/' + id + '/scores',
type: 'post',
@@ -55,7 +55,7 @@
});
}
else {
- element.src = '/images/icons/play_blue.png';
+ element.src = 'icons/play_blue.png';
$(element).addClass('collapsed');
$(element).removeClass('expanded');
$('tr.scores_' + id).each(function(index, e) {
@@ -65,7 +65,7 @@
}
function expand(element) {
- element.src = '/images/icons/down_blue.png';
+ element.src = 'icons/down_blue.png';
$(element).removeClass('collapsed');
$(element).addClass('expanded');
}
View
10 app/views/admin/results/index.js.erb
@@ -1,5 +1,5 @@
-page.replace_html("right_person", :partial => "person", :locals => { :person => @person, :results => @results })
-page['right_person'].stop
-page['right_person'].fadeTo("fast", 1)
-page << "$('#right_person tr:last-child td').height($('#left_person table').height() - $('#right_person table').height())"
-page['#find_progress_icon'].hide
+jQuery('#right_person').html('<%= escape_javascript(render(:partial => "person", :locals => { :person => @person, :results => @results })) %>');
+jQuery('#right_person').stop();
+jQuery('#right_person').fadeIn("fast", 1);
+$('#right_person tr:last-child td').height($('#left_person table').height() - $('#right_person table').height());
+jQuery('#find_progress_icon').hide();
View
12 app/views/admin/results/move.js.erb
@@ -1,6 +1,6 @@
-page["result_#{@result.id}_row"].remove
-page.insert_html :after, "#person_#{@person.id}_table tr:first-child", :partial => "result", :locals => { :result => @result }
-page.call :restripeTable, "person_#{@original_result_person.id}_table"
-page.call :restripeTable, "person_#{@person.id}_table"
-page[:people].css "opacity", 1
-page.hide '#find_progress_icon'
+jQuery('#result_<%= @result.id %>_row').remove();
+page.insert_html :after, "#person_<%= person.id %>_table tr:first-child", :partial => "result", :locals => { :result => @result }
+restripeTable("person_<%= original_result_person.i %>}_table");
+restripeTable("person_<%= person.id %>_table");
+jQuery('#people').fadeIn();
+jQuery('#find_progress_icon').hide();
View
2  app/views/admin/teams/destroy_name.js.erb
@@ -1 +1 @@
-page.visual_effect(:puff, "name_#{name_id}", :duration => 2)
+jQuery('name_<%= name_id %>').effect('puff', {}, 2000);
View
4 app/views/admin/teams/edit.html.erb
@@ -40,7 +40,7 @@
<tr id="alias_<%= name_alias.id %>">
<td><%= name_alias.name %></td>
<td>
- <%= link_to(image_tag('/images/icons/delete.png'),
+ <%= link_to(image_tag('icons/delete.png'),
admin_team_alias_path(@team, name_alias),
:method => "delete",
:remote => true,
@@ -56,7 +56,7 @@
<td><%= name.name %></td>
<td><%= name.year %></td>
<td>
- <%= link_to(image_tag("/images/icons/delete.png"),
+ <%= link_to(image_tag("icons/delete.png"),
:url => { :action => "destroy_name", :id => @team.id, :name_id => name.id},
:remote => true
) %>
View
2  app/views/admin/teams/index.html.erb
@@ -23,7 +23,7 @@
<% end -%>
<div class="buttons container">
- <%= link_to(image_tag('/images/icons/group_add.png'), { :action => 'new' }, { :class => "image" }) %>
+ <%= link_to(image_tag('icons/group_add.png'), { :action => 'new' }, { :class => "image" }) %>
</div>
<% content_for :javascript_include_tag do -%>
View
9 app/views/admin/teams/merge.js.erb
@@ -1,4 +1,5 @@
-page.remove "team_#{@other_team.id}_row"
-page.replace_html "team_#{@team.id}_aliases", render(:partial => 'aliases', :locals => { :team => @team })
-page.call :flash, "notice", "Merged #{@other_team.name} into #{@team.name}"
-page.call :restripeTable, :teams_table
+jQuery('#team_<%= @other_team.id %>_row').remove();
+jQuery('#team_<%= @team.id %>_aliases').html("<%= escape_javascript(render(:partial => 'aliases', :locals => { :team => @team })) %>");
+
+flash("notice", "Merged <%= @other_team.name %> into <%= @team.name %>");
+restripeTable('#teams_table');
View
8 app/views/admin/teams/merge_confirm.js.erb
@@ -1,4 +1,4 @@
-var $dialog = $('<div></div>')
+var $dialog = jQuery('<div></div>')
.html('<%= @other_teams.first.name %> <%= aka(@other_teams.first) %> already exists. Delete <%= @team.name_was %> and move results to <%= @other_teams.first.name %>?')
.dialog({
autoOpen: false,
@@ -6,15 +6,15 @@ var $dialog = $('<div></div>')
modal: true,
buttons: {
"Merge": function() {
- $(this).dialog("close");
- $.ajax({
+ jQuery(this).dialog("close");
+ jQuery.ajax({
url: '<%= admin_merge_team_path @other_teams.first, @team, :format => :js %>',
type: 'POST',
dataType: 'script'
});
},
Cancel: function() {
- $(this).dialog("close");
+ jQuery(this).dialog("close");
}
}
});
View
2  app/views/admin/velodromes/index.html.erb
@@ -11,5 +11,5 @@
<% end -%>
<div class="buttons container">
- <%= link_to(image_tag('/images/icons/add.png'), { :action => 'new' }, { :class => "image" }) %>
+ <%= link_to(image_tag('icons/add.png'), { :action => 'new' }, { :class => "image" }) %>
</div>
View
2  app/views/redirect.js.erb
@@ -1 +1 @@
-page.redirect_to(@redirect_to)
+document.location = <%= @redirect_to %>
View
6 app/views/shared/exception.js.erb
@@ -1,3 +1,3 @@
-page.show("warn")
-page.hide("notice")
-page["warn_span"].replace_html escape_once(exception.message)
+jQuery("#warn").show();
+jQuery("#notice").hide();
+jQuery('#warn_span').html(exception.message)
View
2  app/views/table/_base.html.erb
@@ -13,5 +13,5 @@
</tr>
<%- end -%>
</table>
- <%= link_to(image_tag("/images/icons/add.png"), :url => { :action => new_action }, :html => { :class => "image" }, :remote => true) if new_action -%>
+ <%= link_to(image_tag("icons/add.png"), :url => { :action => new_action }, :html => { :class => "image" }, :remote => true) if new_action -%>
</div>
View
10 public/404.html
@@ -170,7 +170,7 @@
#notice_span
{
- background-image: url(/images/icons/information.png);
+ background-image: url(icons/information.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -179,7 +179,7 @@
#warn_span, .warn
{
color: red;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(icons/exclamation.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -223,7 +223,7 @@
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(backgrounds/bar.gif);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -232,7 +232,7 @@
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(backgrounds/bar_low.gif);
border-top: 1px solid rgb(190, 190, 190);
}
@@ -483,7 +483,7 @@
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(backgrounds/grid.png);
}
.no_top_margin {
View
10 public/422.html
@@ -170,7 +170,7 @@
#notice_span
{
- background-image: url(/images/icons/information.png);
+ background-image: url(icons/information.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -179,7 +179,7 @@
#warn_span, .warn
{
color: red;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(icons/exclamation.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -223,7 +223,7 @@
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(backgrounds/bar.gif);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -232,7 +232,7 @@
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(backgrounds/bar_low.gif);
border-top: 1px solid rgb(190, 190, 190);
}
@@ -483,7 +483,7 @@
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(backgrounds/grid.png);
}
.no_top_margin {
View
10 public/500.html
@@ -170,7 +170,7 @@
#notice_span
{
- background-image: url(/images/icons/information.png);
+ background-image: url(icons/information.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -179,7 +179,7 @@
#warn_span, .warn
{
color: red;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(icons/exclamation.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -223,7 +223,7 @@
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(backgrounds/bar.gif);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -232,7 +232,7 @@
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(backgrounds/bar_low.gif);
border-top: 1px solid rgb(190, 190, 190);
}
@@ -483,7 +483,7 @@
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(backgrounds/grid.png);
}
.no_top_margin {
View
10 public/503.html
@@ -170,7 +170,7 @@
#notice_span
{
- background-image: url(/images/icons/information.png);
+ background-image: url(icons/information.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -179,7 +179,7 @@
#warn_span, .warn
{
color: red;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(icons/exclamation.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -223,7 +223,7 @@
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(backgrounds/bar.gif);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -232,7 +232,7 @@
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(backgrounds/bar_low.gif);
border-top: 1px solid rgb(190, 190, 190);
}
@@ -483,7 +483,7 @@
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(backgrounds/grid.png);
}
.no_top_margin {
View
10 public/maintenance.html
@@ -170,7 +170,7 @@
#notice_span
{
- background-image: url(/images/icons/information.png);
+ background-image: url(icons/information.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -179,7 +179,7 @@
#warn_span, .warn
{
color: red;
- background-image: url(/images/icons/exclamation.png);
+ background-image: url(icons/exclamation.png);
background-repeat: no-repeat;
padding-left: 20px;
padding-right: 4px;
@@ -223,7 +223,7 @@
div.nav#top {
height: 51px;
- background-image: url(/images/backgrounds/bar.gif);
+ background-image: url(backgrounds/bar.gif);
text-align: left;
border-bottom: 1px solid rgb(190, 190, 190);
}
@@ -232,7 +232,7 @@
text-align: left;
height: 23px;
line-height: 23px;
- background-image: url(/images/backgrounds/bar_low.gif);
+ background-image: url(backgrounds/bar_low.gif);
border-top: 1px solid rgb(190, 190, 190);
}
@@ -483,7 +483,7 @@
div.show_grid {
background-position: 13px 0px;
- background-image: url(/images/backgrounds/grid.png);
+ background-image: url(backgrounds/grid.png);
}
.no_top_margin {
View
12 test/acceptance/admin/pages_test.rb
@@ -3,14 +3,6 @@
# :stopdoc:
class PagesTest < AcceptanceTest
def test_pages
- # Check public page render OK with default static templates
- visit "/schedule"
- assert_page_has_content("Schedule")
-
- assert_page_has_no_content "This year is cancelled"
- assert_page_has_content("Schedule")
-
- # Now change the page
login_as FactoryGirl.create(:administrator)
visit "/admin/pages"
@@ -21,6 +13,10 @@ def test_pages
fill_in "page_body", :with => "This year is cancelled"
click_button "Save"
+ page = Page.last
+ assert_equal "Schedule", page.title, "New page title"
+ assert_equal "schedule", page.path, "New page path"
+ assert_equal "schedule", page.slug, "New page slug"
visit "/schedule"
assert_page_has_content "This year is cancelled"

No commit comments for this range

Something went wrong with that request. Please try again.