summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.js11
-rw-r--r--themes/default/templates/search.tpl4
2 files changed, 12 insertions, 3 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()
diff --git a/themes/default/templates/search.tpl b/themes/default/templates/search.tpl
index 1498e70..549f2dc 100644
--- a/themes/default/templates/search.tpl
+++ b/themes/default/templates/search.tpl
@@ -23,12 +23,12 @@
</tr>
<tr>
<td>&nbsp;</td>
- <td>{$from_date} <a href="javascript:showCalendar('from');"><img src="resources/date.png" id="frompic"/></a></td>
+ <td>{$from_date} <a href="javascript:showCalendar('from');" onclick="click(this);"><img src="resources/date.png" id="frompic"/></a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
- {$to_date} <a href="javascript:showCalendar('to');"><img src="resources/date.png" id="topic" /></a>
+ {$to_date} <a href="javascript:showCalendar('to');" onclick="click(this);"><img src="resources/date.png" id="topic" /></a>
</td>
<td>
<input type="image" src="resources/doit.png" alt="Tag-Search" />