Fix date pickers, add date picker to task form.
authorJan Schneider <jan@horde.org>
Mon, 18 Jan 2010 17:48:59 +0000 (18:48 +0100)
committerJan Schneider <jan@horde.org>
Tue, 19 Jan 2010 05:41:40 +0000 (06:41 +0100)
kronolith/js/kronolith.js
kronolith/templates/index/edit.inc
kronolith/templates/index/task.inc

index cb1e6fc..364927a 100644 (file)
@@ -2532,6 +2532,12 @@ KronolithCore = {
                 this.toggleAllDay();
                 return;
 
+            case 'kronolithEventStartPicker':
+            case 'kronolithEventEndPicker':
+            case 'kronolithTaskDuePicker':
+                Horde_Calendar.open(id, Date.parseExact($F(id.replace(/Picker$/, 'Date')), Kronolith.conf.date_format));
+                return;
+
             case 'kronolithEventLinkNone':
             case 'kronolithEventLinkDaily':
             case 'kronolithEventLinkWeekly':
index 7fcb33d..01765ca 100644 (file)
   <tr>
     <td>
       <input type="text" name="start_date" id="kronolithEventStartDate" size="10" />
-      <?php echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'Horde_Calendar.open(\'kronolithEventStartPicker\', Date.parseExact($F(\'kronolithEventStartDate\'), Kronolith.conf.date_format));return false;')) . Horde::img('picker.png', _("Set start date"), 'id="kronolithEventStartPicker"') . '</a>' ?>
+      <?php echo Horde::img('picker.png', _("Set start date"), 'id="kronolithEventStartPicker"') ?>
       <label id="kronolithEventStartTimeLabel"><?php echo _("at") ?> <input type="text" name="start_time" id="kronolithEventStartTime" size="8" /></label>
     </td>
     <td>
       <input type="text" name="end_date" id="kronolithEventEndDate" size="10" />
-      <?php echo Horde::url('#')->link(array('title' => _("Select a date"), 'onclick' => 'Horde_Calendar.open(\'kronolithEventEndPicker\', Date.parseExact($F(\'kronolithEventEndDate\'), Kronolith.conf.date_format));return false;')) . Horde::img('picker.png', _("Set end date"), 'id="kronolithEventEndPicker"') . '</a>' ?>
+      <?php echo Horde::img('picker.png', _("Set end date"), 'id="kronolithEventEndPicker"') ?>
       <label id="kronolithEventEndTimeLabel"><?php echo _("at") ?> <input type="text" name="end_time" id="kronolithEventEndTime" size="8" /></label>
     </td>
     <td><label><input type="checkbox" name="whole_day" id="kronolithEventAllday"  /> <?php echo _("all-day event") ?></label></td>
index 861a2a1..6db9f95 100644 (file)
@@ -33,7 +33,8 @@
   <td>
     <div>
       <label><?php echo _("Due date") ?>:</label><br />
-      <input type="text" name="task[due_date]" id="kronolithTaskDueDate" size="10" class="kronolithDatePicker" />
+      <input type="text" name="task[due_date]" id="kronolithTaskDueDate" size="10" />
+      <?php echo Horde::img('picker.png', _("Set due date"), 'id="kronolithTaskDuePicker"') ?>
       <?php echo _("at") ?>
       <input type="text" name="task[due_time]" id="kronolithTaskDueTime" size="8" />
     </div>