Skip to content

Commit

Permalink
Merge pull request #529 from spelletier/fix_calendar_border_with_no_y…
Browse files Browse the repository at this point in the history
…ear_control

Hide the images instead of the divs when showYearControls=NO.
  • Loading branch information
darkv committed Jan 18, 2014
2 parents e58d406 + 385f5e9 commit 534a63f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Frameworks/Ajax/Ajax/WebServerResources/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,16 @@ function calendar_update() {
get_element('calendar_prev_month').onclick = calendar_prev_month;
get_element('calendar_next_month').onclick = calendar_next_month;
if (calendar.showYearControls) {
get_element('calendar_prev_year').style.visibility = 'visible';
get_element('calendar_prev_year').childNodes[0].style.visibility = 'visible';
get_element('calendar_prev_year').onclick = calendar_prev_year;
get_element('calendar_next_year').style.visibility = 'visible';
get_element('calendar_next_year').childNodes[0].style.visibility = 'visible';
get_element('calendar_next_year').onclick = calendar_next_year;
}
else {
get_element('calendar_prev_year').style.visibility = 'hidden';
get_element('calendar_next_year').style.visibility = 'hidden';
get_element('calendar_prev_year').childNodes[0].style.visibility = 'hidden';
get_element('calendar_prev_year').onclick = undefined;
get_element('calendar_next_year').childNodes[0].style.visibility = 'hidden';
get_element('calendar_next_year').onclick = undefined;
}

// Iterate through the 42 calendar date boxes.
Expand Down

0 comments on commit 534a63f

Please sign in to comment.