From 385f5e914938432b268585c5808340c067b928fb Mon Sep 17 00:00:00 2001 From: Samuel Pelletier Date: Fri, 17 Jan 2014 16:26:34 -0500 Subject: [PATCH] Hide the images instead of the divs when showYearControls=NO so the calendar border remains intact. The previous behaviour created a visual glitch by removing the top corners of the calendar border. --- Frameworks/Ajax/Ajax/WebServerResources/calendar.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Frameworks/Ajax/Ajax/WebServerResources/calendar.js b/Frameworks/Ajax/Ajax/WebServerResources/calendar.js index 6b1f69e84db..ec2a3103387 100644 --- a/Frameworks/Ajax/Ajax/WebServerResources/calendar.js +++ b/Frameworks/Ajax/Ajax/WebServerResources/calendar.js @@ -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.