OSDN Git Service

Updated the project calendar for greater accessibility.
authorEric Davis <edavis@littlestreamsoftware.com>
Tue, 15 Jun 2010 23:20:32 +0000 (23:20 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Tue, 15 Jun 2010 23:20:32 +0000 (23:20 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3769 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/common/_calendar.rhtml
public/stylesheets/application.css

index 2a5d9ae..d0cf2a0 100644 (file)
@@ -1,12 +1,12 @@
 <table class="cal">
 <thead>
-<tr><td></td><% 7.times do |i| %><th><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
+<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
 </thead>
 <tbody>
 <tr>
 <% day = calendar.startdt
 while day <= calendar.enddt %>
-<%= "<th>#{day.cweek}</th>" if day.cwday == calendar.first_wday %>
+<%= "<td class='week-number' title='#{ l(:label_week) }'>#{day.cweek}</td>" if day.cwday == calendar.first_wday %>
 <td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
 <p class="day-num"><%= day.day %></p>  
 <% calendar.events_on(day).each do |i| %>
index 49366cc..4c4d5f5 100644 (file)
@@ -519,10 +519,11 @@ vertical-align: bottom;
 
 /***** Calendar *****/
 table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
-table.cal thead th {width: 14%;}
+table.cal thead th {width: 14%; background-color:#EEEEEE; padding: 4px; }
+table.cal thead th.week-number {width: auto;}
 table.cal tbody tr {height: 100px;}
-table.cal th { background-color:#EEEEEE; padding: 4px; }
 table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
+table.cal td.week-number { background-color:#EEEEEE; padding: 4px; border:none; font-size: 1em;}
 table.cal td p.day-num {font-size: 1.1em; text-align:right;}
 table.cal td.odd p.day-num {color: #bbb;}
 table.cal td.today {background:#ffffdd;}