diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-07-26 04:14:30 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-07-26 04:14:30 +0000 |
commit | 8818320084e9723b958bee75c011bfcc74e3018f (patch) | |
tree | 70279140d627425e1269098d6f6c598d55048b81 /phpfspot.js | |
parent | 37690cf1c98d494359c941993337bd41e2aed9ad (diff) |
issue66, calendar is now shown on the right position and is getting closed when a specific date is getting selected
git-svn-id: file:///var/lib/svn/phpfspot/trunk@256 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.js')
-rw-r--r-- | phpfspot.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpfspot.js b/phpfspot.js index 88af0b5..cdd4bc2 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -214,7 +214,7 @@ function showCalendar(date_box, click_obj) var ypos = document.getElementById('topic').offsetTop; calendar_mode = 'to'; } - calendar.style.left = xpos + 60 + 'px'; + calendar.style.left = xpos + 100 + 'px'; calendar.style.top = ypos + 80 + 'px'; if(calendar.style.visibility == "" || calendar.style.visibility == 'hidden') { @@ -224,6 +224,14 @@ function showCalendar(date_box, click_obj) calendar_shown = 1; } else { + hideCalendar(); + } +} + +function hideCalendar() +{ + var calendar = document.getElementById('calendar'); + if(calendar.style.visibility != 'hidden') { calendar.style.visibility = 'hidden'; calendar_shown = 0; } @@ -241,6 +249,7 @@ function setCalendarDate(year, month, day) document.getElementById(calendar_mode+'year').value = year; document.getElementById(calendar_mode+'month').value = month; document.getElementById(calendar_mode+'day').value = day; + hideCalendar(); } function resetAll() |