issue66, calendar is now shown on the right position and is getting closed when a...
authorAndreas Unterkircher <unki@netshadow.at>
Thu, 26 Jul 2007 04:14:30 +0000 (04:14 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Thu, 26 Jul 2007 04:14:30 +0000 (04:14 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@256 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.js
themes/default/templates/search.tpl

index 88af0b5ba07b51f7b124cb701c69f345c179e8bd..cdd4bc201e8ffee337ffb63a1a260d9b2931d293 100644 (file)
@@ -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()
index 1498e70b1228d0cd2f14b6f177cb43a42d47038a..549f2dc071acd7a93d9f1d6e716a0457b03e2d38 100644 (file)
     </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" />