<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tasks/css_sprites.rake</filename>
    </added>
    <added>
      <filename>public/images/icons/arrow_down.png</filename>
    </added>
    <added>
      <filename>public/images/icons/arrow_right.png</filename>
    </added>
    <added>
      <filename>public/images/icons/arrow_up.png</filename>
    </added>
    <added>
      <filename>public/images/icons/logo.gif</filename>
    </added>
    <added>
      <filename>public/images/icons/rss.gif</filename>
    </added>
    <added>
      <filename>public/images/icons/sort_asc.gif</filename>
    </added>
    <added>
      <filename>public/images/icons/sort_desc.gif</filename>
    </added>
    <added>
      <filename>public/images/icons/sort_none.gif</filename>
    </added>
    <added>
      <filename>public/images/sprite.png</filename>
    </added>
    <added>
      <filename>public/images/sprite2.png</filename>
    </added>
    <added>
      <filename>public/images/sprites.png</filename>
    </added>
    <added>
      <filename>public/stylesheets/sprites.css</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -59,4 +59,14 @@ module ApplicationHelper
   def create_or_update_button(object)
     submit_tag (object.new_record? ? 'Create'[] : 'Update'[]), :disable_with =&gt; (object.new_record? ? 'Creating'[] : 'Updating'[]) + '&amp;hellip;'
   end
+  
+  def css_image_tag(url, options = {})
+    extension = File.extname(url)
+    key = File.basename(url, extension)
+
+    css_class = &quot;sprite-#{key} css-sprite&quot;
+    css_class += &quot; &quot; + options.delete(:class) if options[:class]
+
+    content_tag(:span, '', options.merge(:class =&gt; css_class))
+  end
 end</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,11 +17,11 @@ module DashboardHelper
     before = position[:then].to_i
     
     if now &lt; before
-      return image_tag('arrow_up.png')
+      return css_image_tag('arrow_up.png')
     elsif now == before
-      return image_tag('arrow_right.png')
+      return css_image_tag('arrow_right.png')
     elsif now &gt; before
-      return image_tag('arrow_down.png')
+      return css_image_tag('arrow_down.png')
     end
     ''
   end</diff>
      <filename>app/helpers/dashboard_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module LogsHelper
   end
   
   def icon_link(game_id, icon, message, url)
-    link_to(image_tag(&quot;icons/#{icon}.png&quot;), url) + ' ' + format_message(game_id, message)
+    link_to(css_image_tag(&quot;icons/#{icon}.png&quot;), url) + ' ' + format_message(game_id, message)
   end
 
   def log_uri(log)</diff>
      <filename>app/helpers/logs_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@
               - else
                 &amp;nbsp;
           %td
-            = link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this user's matches&quot;[]), game_matches_path(@game, :filter =&gt; game_participation.user_id)
+            = link_to css_image_tag('icons/game.png', :class =&gt; 'team', :title =&gt; &quot;Show this user's matches&quot;[]), game_matches_path(@game, :filter =&gt; game_participation.user_id)
             = user_link_full(@game, game_participation.user)
           %td= game_participation.ranking
           %td= game_participation.matches_played</diff>
      <filename>app/views/dashboard/_leaderboard.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 #logs
-  = link_to image_tag('rss.gif'), log_feed_url(current_game), :class =&gt; 'rss'
+  = link_to css_image_tag('rss.gif'), log_feed_url(current_game), :class =&gt; 'rss'
   
   %h3= 'Events'[]
   .list</diff>
      <filename>app/views/dashboard/_logs.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
 %html{ :xmlns =&gt; 'http://www.w3.org/1999/xhtml', :lang =&gt; &quot;en&quot; }
   %head
     %title= page_title
-    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
+    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'sprites', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
     /[if IE]
       = stylesheet_link_tag 'lib/ie', :media =&gt; 'screen, projection'
     = yield :head
@@ -15,14 +15,14 @@
         #links
           = render :partial =&gt; 'shared/login'
 
-        #logo= link_to image_tag('logo.gif'), root_url
+        #logo= link_to css_image_tag('logo.gif'), root_url
 
       #menu.clear
         .column.span-20= render :partial =&gt; 'shared/menu'
         - unless current_game.nil? || current_game.new_record?
           #add_match.column.span-4.last
             - if enabled_users.size &gt;= current_game.team_size * 2
-              = link_to_function image_tag('icons/add.png') + ' ' + 'Add match'[], &quot;scoreKeeper.newMatch.toggle()&quot;
+              = link_to_function css_image_tag('icons/add.png') + ' ' + 'Add match'[], &quot;scoreKeeper.newMatch.toggle()&quot;
             - else
               - if current_game.team_size * 2 - enabled_users.size == 1
                 #user_minimum= 'Add one more user'[:add_one_more_user]</diff>
      <filename>app/views/layouts/application.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@
       - unless @page_title.blank?
         = ' - '
         = @page_title
-    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
+    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'sprites', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
     = stylesheet_link_tag 'print', :media =&gt; 'print'
     /[if IE]
       = stylesheet_link_tag 'lib/ie', :media =&gt; 'screen, projection'
@@ -18,7 +18,7 @@
         #hd
           #links
 
-          #logo= link_to image_tag('logo.gif'), root_url
+          #logo= link_to css_image_tag('logo.gif'), root_url
   
         - unless @page_title.blank?
           %h2#page_title= @page_title</diff>
      <filename>app/views/layouts/login.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@
       - unless @page_title.blank?
         = ' - '
         = @page_title
-    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
+    = stylesheet_link_tag 'lib/reset', 'lib/typography', 'lib/grid', 'lib/forms', 'sprites', 'screen', :media =&gt; 'screen, projection', :cache =&gt; 'cache/all'
     = stylesheet_link_tag 'print', :media =&gt; 'print'
     /[if IE]
       = stylesheet_link_tag 'lib/ie', :media =&gt; 'screen, projection'
@@ -17,7 +17,7 @@
   %body.public
     .container
       #hd
-        #logo= link_to image_tag('logo.gif'), root_url
+        #logo= link_to css_image_tag('logo.gif'), root_url
 
       - unless @page_title.blank?
         - if @page_title_options[:show]</diff>
      <filename>app/views/layouts/public.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,24 @@
 - sorted_teams = Match.sort_teams_by_filter(match.teams, params[:filter])
 
 %td.members
-  = link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(:game_id =&gt; match.game_id, :filter =&gt; sorted_teams.first.team_ids)
+  = link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(:game_id =&gt; match.game_id, :filter =&gt; sorted_teams.first.team_ids)
   = render :partial =&gt; 'matches/members', :locals =&gt; { :team =&gt; sorted_teams.first }
 
 %td.score{ :nowrap =&gt; 'nowrap' }
   - if sorted_teams.first.score &gt; sorted_teams.last.score
-    = image_tag('icons/medal_gold_2.png', :class =&gt; 'winner')
+    = css_image_tag('icons/medal_gold_2.png', :class =&gt; 'winner')
   - else
-    = image_tag('icons/blank.gif', :width =&gt; 16, :height =&gt; 16, :class =&gt; 'loser')
+    = css_image_tag('icons/blank.gif', :width =&gt; 16, :height =&gt; 16, :class =&gt; 'loser')
   
   = sorted_teams.collect(&amp;:score).join(' - ')
   - if sorted_teams.last.score &gt; sorted_teams.first.score
-    = image_tag('icons/medal_gold_2.png', :class =&gt; 'winner')
+    = css_image_tag('icons/medal_gold_2.png', :class =&gt; 'winner')
   - else
-    = image_tag('icons/blank.gif', :width =&gt; 16, :height =&gt; 16, :class =&gt; 'loser')
+    = css_image_tag('icons/blank.gif', :width =&gt; 16, :height =&gt; 16, :class =&gt; 'loser')
 
 %td.members
-  = link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(:game_id =&gt; match.game_id, :filter =&gt; sorted_teams.last.team_ids)
+  = link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(:game_id =&gt; match.game_id, :filter =&gt; sorted_teams.last.team_ids)
   = render :partial =&gt; 'matches/members', :locals =&gt; { :team =&gt; sorted_teams.last }
   
 %td.comments
-  = link_to image_tag('icons/comment.png', :class =&gt; 'comments', :alt =&gt; 'Comment on this match'[]) + &quot; (#{match.comments_count})&quot;, game_match_path(match.game_id, match)
\ No newline at end of file
+  = link_to css_image_tag('icons/comment.png', :class =&gt; 'comments', :alt =&gt; 'Comment on this match'[]) + &quot; (#{match.comments_count})&quot;, game_match_path(match.game_id, match)
\ No newline at end of file</diff>
      <filename>app/views/matches/_match_columns.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -34,9 +34,9 @@
   = will_paginate @matches
 
   #feeds
-    = link_to image_tag('rss.gif') + ' ' + 'Atom feed (all matches)'[], match_feed_url(current_game), :class =&gt; 'rss'
+    = link_to css_image_tag('rss.gif') + ' ' + 'Atom feed (all matches)'[], match_feed_url(current_game), :class =&gt; 'rss'
     - unless params[:filter].blank?
-      = link_to image_tag('rss.gif') + ' ' + 'Atom feed (filtered)'[], match_feed_url(current_game, :filter =&gt; params[:filter]), :class =&gt; 'rss'
+      = link_to css_image_tag('rss.gif') + ' ' + 'Atom feed (filtered)'[], match_feed_url(current_game, :filter =&gt; params[:filter]), :class =&gt; 'rss'
 
 - content_for :head do
   = auto_discovery_link_tag :atom, match_feed_url(current_game), :title =&gt; 'All matches'[]
@@ -50,4 +50,4 @@
     - if @filter.length == 1
       = link_to 'Show user details'[], game_user_path(current_game, @filter.first)
     - elsif @filter.length &gt; 1
-      %p= link_to image_tag('icons/chart_bar.png') + ' ' + 'Show team details'[], game_team_path(current_game, @filter.collect(&amp;:id).join(','))
\ No newline at end of file
+      %p= link_to css_image_tag('icons/chart_bar.png') + ' ' + 'Show team details'[], game_team_path(current_game, @filter.collect(&amp;:id).join(','))
\ No newline at end of file</diff>
      <filename>app/views/matches/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@
         %span.index= '#' + (index + 1).to_s + '&amp;nbsp;'
         %span.user= link_to(h(comment.user.name), game_user_path(@match.game_id, comment.user), :name =&gt; &quot;c#{comment.id}&quot;) + '&amp;nbsp;'
         - if @match.winner.memberships.collect(&amp;:user_id).include?(comment.user_id)
-          %span.medal= image_tag('icons/medal_gold_2.png', :class =&gt; 'winner') + '&amp;nbsp;'
+          %span.medal= css_image_tag('icons/medal_gold_2.png', :class =&gt; 'winner') + '&amp;nbsp;'
         %span.time= time_ago_in_words(comment.created_at) + ' ago'
       .content{ :id =&gt; &quot;content_#{comment.id}&quot; }
         = render :partial =&gt; 'comments/comment', :object =&gt; comment</diff>
      <filename>app/views/matches/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -15,8 +15,8 @@
       - @teams.each do |team|
         %tr{ :class =&gt; cycle('even', 'odd') }
           %td.user
-            = link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(current_game, :filter =&gt; team[:team_ids])
-            = link_to image_tag('icons/chart_bar.png', :class =&gt; 'team'), game_team_path(current_game, team[:team_ids])
+            = link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(current_game, :filter =&gt; team[:team_ids])
+            = link_to css_image_tag('icons/chart_bar.png', :class =&gt; 'team'), game_team_path(current_game, team[:team_ids])
             = team[:players].collect { |u| user_link(current_game, u)}.join(', ')
 
           %td.ranking= team[:total_ranking]</diff>
      <filename>app/views/teams/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,7 @@
             = link_to image_tag(user.mugshot.public_filename(:thumb), :alt =&gt; h(user.name)), game_user_path(current_game, user)
           = link_to h(user.name), game_user_path(current_game, user)
 
-    .matchlink= link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]) + ' ' + 'Show matches'[], game_matches_path(current_game, :filter =&gt; @ids.join(','))
+    .matchlink= link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]) + ' ' + 'Show matches'[], game_matches_path(current_game, :filter =&gt; @ids.join(','))
 
     %table.for_against
       %tr</diff>
      <filename>app/views/teams/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -26,8 +26,8 @@
       %tbody
         - @teams.each do |team|
           %tr{ :class =&gt; cycle('even', 'odd') }
-            %td= link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(@game, :filter =&gt; team[:team].team_ids)
-            %td= link_to image_tag('icons/chart_bar.png', :class =&gt; 'team'), game_team_path(@game, team[:team].team_ids)
+            %td= link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this team's matches&quot;[]), game_matches_path(@game, :filter =&gt; team[:team].team_ids)
+            %td= link_to css_image_tag('icons/chart_bar.png', :class =&gt; 'team'), game_team_path(@game, team[:team].team_ids)
             %td= link_to team[:team_mate].name, game_user_path(@game, team[:team_mate])
             %td= team[:team_mate_game_participation].ranking.to_i
             %td= team[:played]
@@ -42,7 +42,7 @@
     - if @user.mugshot
       .mugshot= image_tag @user.mugshot.public_filename(:thumb), :alt =&gt; h(@user.name)
     
-    .matchlink= link_to image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this user's matches&quot;[]) + ' ' + 'Show matches'[], game_matches_path(@game, :filter =&gt; @user.id)
+    .matchlink= link_to css_image_tag('icons/game.png', :class =&gt; 'team', :alt =&gt; &quot;Show this user's matches&quot;[]) + ' ' + 'Show matches'[], game_matches_path(@game, :filter =&gt; @user.id)
 
     #counts
       %p.position</diff>
      <filename>app/views/users/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ config.whiny_nils = true
 
 # Show full error reports and disable caching
 config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching             = true
+config.action_controller.perform_caching             = false
 config.action_view.debug_rjs                         = true
 
 # Don't care if the mailer can't send</diff>
      <filename>config/environments/development.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,6 @@
+.css-sprite
+  :vertical-align text-bottom
+
 a
   :color #3589AF
   :text-decoration none
@@ -70,9 +73,6 @@ textarea
       :padding-right 21px
       :padding-top 9px
       :color #FFFFFF
-    
-      img
-        :vertical-align text-bottom
 
     #user_minimum
       :padding-right 21px
@@ -285,7 +285,7 @@ table.form
       :padding-right 5px
 
       &amp;.header
-        :background-image url('/images/sort_none.gif')
+        :background-image url('/images/icons/sort_none.gif')
         :cursor pointer
         :font-weight bold
         :background-repeat no-repeat
@@ -294,11 +294,11 @@ table.form
         :margin-left -1px
 
       &amp;.headerSortUp
-        :background-image url('/images/sort_asc.gif')
+        :background-image url('/images/icons/sort_asc.gif')
         :background-color #3399CC
 
       &amp;.headerSortDown
-        :background-image url('/images/sort_desc.gif')
+        :background-image url('/images/icons/sort_desc.gif')
         :background-color #3399CC
 
       a</diff>
      <filename>public/stylesheets/sass/screen.sass</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,6 @@
+.css-sprite {
+  vertical-align: text-bottom; }
+
 a {
   color: #3589AF;
   text-decoration: none; }
@@ -60,8 +63,6 @@ textarea {
       padding-right: 21px;
       padding-top: 9px;
       color: #FFFFFF; }
-      #menu #add_match a img {
-        vertical-align: text-bottom; }
     #menu #add_match #user_minimum {
       padding-right: 21px;
       padding-top: 9px;
@@ -235,7 +236,7 @@ table.form {
       padding-left: 5px;
       padding-right: 5px; }
       .list table th.header {
-        background-image: url('/images/sort_none.gif');
+        background-image: url('/images/icons/sort_none.gif');
         cursor: pointer;
         font-weight: bold;
         background-repeat: no-repeat;
@@ -243,10 +244,10 @@ table.form {
         padding-right: 20px;
         margin-left: -1px; }
       .list table th.headerSortUp {
-        background-image: url('/images/sort_asc.gif');
+        background-image: url('/images/icons/sort_asc.gif');
         background-color: #3399CC; }
       .list table th.headerSortDown {
-        background-image: url('/images/sort_desc.gif');
+        background-image: url('/images/icons/sort_desc.gif');
         background-color: #3399CC; }
       .list table th a {
         color: #CCEEFF; }</diff>
      <filename>public/stylesheets/screen.css</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>public/images/arrow_down.png</filename>
    </removed>
    <removed>
      <filename>public/images/arrow_right.png</filename>
    </removed>
    <removed>
      <filename>public/images/arrow_up.png</filename>
    </removed>
    <removed>
      <filename>public/images/logo.gif</filename>
    </removed>
    <removed>
      <filename>public/images/rss.gif</filename>
    </removed>
    <removed>
      <filename>public/images/sort_asc.gif</filename>
    </removed>
    <removed>
      <filename>public/images/sort_desc.gif</filename>
    </removed>
    <removed>
      <filename>public/images/sort_none.gif</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>a3793694b1dd4ac08ced4f21706b3dc254a5fc22</id>
    </parent>
  </parents>
  <author>
    <name>Lars G. Sehested</name>
    <email>lars@larssehested.com</email>
  </author>
  <url>http://github.com/larssg/score-keeper/commit/248ad24cfca5cf826633c3b6803f17eb097ffb39</url>
  <id>248ad24cfca5cf826633c3b6803f17eb097ffb39</id>
  <committed-date>2009-06-27T18:59:09-07:00</committed-date>
  <authored-date>2009-06-27T18:59:09-07:00</authored-date>
  <message>Use CSS sprites</message>
  <tree>cd8864ec5a783d0e036b68c5c412a7bac9fb568f</tree>
  <committer>
    <name>Lars G. Sehested</name>
    <email>lars@larssehested.com</email>
  </committer>
</commit>
