Patch #41509 » 41509-v2.patch
app/assets/stylesheets/application.css | ||
---|---|---|
1245 | 1245 | |
1246 | 1246 |
.cal .calbody p.day-num {font-size: 1.1em; text-align:right;} |
1247 | 1247 |
.cal .calbody .abbr-day {display:none} |
1248 |
.cal .calbody.odd p.day-num {color: #bbb;} |
|
1248 |
.cal .calbody.this-month {background-color:#fff;} |
|
1249 |
.cal .calbody.other-month {background-color:#f6f7f8;} |
|
1250 |
.cal .calbody.other-month p.day-num {color: #bbb;} |
|
1249 | 1251 |
.cal .calbody.today {background:#ffd;} |
1250 | 1252 |
.cal .calbody.today p.day-num {font-weight: bold;} |
1251 | 1253 | |
1252 | 1254 |
.cal .calbody .icon {padding-top: 2px; padding-bottom: 3px;} |
1253 |
.cal .calbody.nwday:not(.odd) {background-color:#f1f1f1;}
|
|
1255 |
.cal .calbody.nwday:not(.other-month) {background-color:#f1f1f1;}
|
|
1254 | 1256 | |
1255 | 1257 |
p.cal.legend span {display:flex;} |
1256 | 1258 |
.controller-calendars p.buttons {margin-top: unset;} |
lib/redmine/helpers/calendar.rb | ||
---|---|---|
57 | 57 |
end |
58 | 58 | |
59 | 59 |
def day_css_classes(day) |
60 |
css = day.month==month ? +'even' : +'odd'
|
|
60 |
css = day.month==month ? +'this-month' : +'other-month'
|
|
61 | 61 |
css << " today" if User.current.today == day |
62 | 62 |
css << " nwday" if non_working_week_days.include?(day.cwday) |
63 | 63 |
css |
test/functional/calendars_controller_test.rb | ||
---|---|---|
219 | 219 | |
220 | 220 |
assert_select 'ul' do |
221 | 221 |
assert_select 'li.week-number:nth-of-type(2)', :text => /53$/ |
222 |
assert_select 'li.odd', :text => /^27/
|
|
223 |
assert_select 'li.even', :text => /^2/
|
|
222 |
assert_select 'li.other-month', :text => /^27/
|
|
223 |
assert_select 'li.this-month', :text => /^2/
|
|
224 | 224 |
end |
225 | 225 | |
226 | 226 |
assert_select 'ul' do |
227 | 227 |
assert_select 'li.week-number', :text => /1$/ |
228 |
assert_select 'li.odd', :text => /^3/
|
|
229 |
assert_select 'li.even', :text => /^9/
|
|
228 |
assert_select 'li.other-month', :text => /^3/
|
|
229 |
assert_select 'li.this-month', :text => /^9/
|
|
230 | 230 |
end |
231 | 231 | |
232 | 232 |
with_settings :start_of_week => 1 do |
... | ... | |
242 | 242 | |
243 | 243 |
assert_select 'ul' do |
244 | 244 |
assert_select 'li.week-number:nth-of-type(2)', :text => /53$/ |
245 |
assert_select 'li.even', :text => /^28/
|
|
246 |
assert_select 'li.even', :text => /^3/
|
|
245 |
assert_select 'li.this-month', :text => /^28/
|
|
246 |
assert_select 'li.this-month', :text => /^3/
|
|
247 | 247 |
end |
248 | 248 | |
249 | 249 |
assert_select 'ul' do |
250 | 250 |
assert_select 'li.week-number', :text => /1$/ |
251 |
assert_select 'li.even', :text => /^4/
|
|
252 |
assert_select 'li.even', :text => /^10/
|
|
251 |
assert_select 'li.this-month', :text => /^4/
|
|
252 |
assert_select 'li.this-month', :text => /^10/
|
|
253 | 253 |
end |
254 | 254 |
end |
255 | 255 |
- « Previous
- 1
- 2
- Next »