summaryrefslogtreecommitdiffstats
path: root/phpfspot.js
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2009-05-23 12:48:50 +0200
committerAndreas Unterkircher <unki@netshadow.at>2009-05-23 12:48:50 +0200
commit5bc4f09805223539cd593ccbe7ed49955dd58775 (patch)
treeb7971b858a06dd6a340f55fc39c4f27efcc89d30 /phpfspot.js
parentea36e81b91c8689ae44d413eca4697d1993ac30b (diff)
make calendar window working again, fixes #78
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'phpfspot.js')
-rw-r--r--phpfspot.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/phpfspot.js b/phpfspot.js
index 54395e2..f705e88 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -535,8 +535,8 @@ function hidePhotoDetails(mode)
function showCalendar(date_box, click_obj)
{
var calendar = document.getElementById('calendar');
- var year = document.getElementById(date_box+'year').value;
- var month = document.getElementById(date_box+'month').value;
+ var userdate = document.getElementById('date_' + date_box).value;
+
if(date_box == 'from') {
var xpos = document.getElementById('frompic').offsetLeft;
var ypos = document.getElementById('frompic').offsetTop;
@@ -553,7 +553,7 @@ function showCalendar(date_box, click_obj)
if(calendar.style.visibility == "" || calendar.style.visibility == 'hidden') {
calendar.style.visibility = 'visible';
calendar.innerHTML = "Loading...";
- calendar.innerHTML = HTML_AJAX.grab(encodeURI(web_path +'/rpc.php?action=get_calendar_matrix&year=' + year + '&month=' + month));
+ calendar.innerHTML = HTML_AJAX.grab(encodeURI(web_path +'/rpc.php?action=get_calendar_matrix&date=' + userdate));
calendar_shown = 1;
}
else {
@@ -581,18 +581,16 @@ function setMonth(year, month, day)
{
var calendar = document.getElementById('calendar');
calendar.innerHTML = "Loading...";
- calendar.innerHTML = HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=get_calendar_matrix&year='+ year +'&month='+ month +'&day='+ day));
+ calendar.innerHTML = HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=get_calendar_matrix&date='+ year +'-'+ month +'-'+ day));
}
/**
* get the user-selected date from the calendar and
* put it into the date-search boxes
*/
-function setCalendarDate(year, month, day)
+function setCalendarDate(userdate)
{
- document.getElementById(calendar_mode+'year').value = year;
- document.getElementById(calendar_mode+'month').value = month;
- document.getElementById(calendar_mode+'day').value = day;
+ document.getElementById('date_'+calendar_mode).value = userdate;
hideCalendar();
} // setCalendarDate()