Add date picker.
authorJan Schneider <jan@horde.org>
Wed, 9 Dec 2009 16:28:14 +0000 (17:28 +0100)
committerJan Schneider <jan@horde.org>
Wed, 9 Dec 2009 16:28:14 +0000 (17:28 +0100)
kronolith/lib/Kronolith.php
kronolith/templates/index/edit.inc
kronolith/themes/screen.css

index 1470589..9728c7e 100644 (file)
@@ -79,6 +79,7 @@ class Kronolith
         Horde::addScriptFile($datejs, 'kronolith');
         Horde::addScriptFile('date.js', 'kronolith');
         Horde::addScriptFile('kronolith.js', 'kronolith');
+        Horde_Ui_JsCalendar::init();
 
         if (isset($GLOBALS['language'])) {
             header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
index bf568e2..155330c 100644 (file)
   </tr>
   <tr>
     <td>
-      <input type="text" name="start_date" id="kronolithEventStartDate" size="10" class="kronolithDatePicker" />
+      <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), function(date) { $(\'kronolithEventStartDate\').setValue(date.toString(Kronolith.conf.date_format)) });return false;')) . Horde::img('picker.png', _("Set start date"), 'id="kronolithEventStartPicker"') . '</a>' ?>
       <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" class="kronolithDatePicker" />
+      <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), function(date) { $(\'kronolithEventEndDate\').setValue(date.toString(Kronolith.conf.date_format)) });return false;')) . Horde::img('picker.png', _("Set end date"), 'id="kronolithEventEndPicker"') . '</a>' ?>
       <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 b72d3e3..7cc508e 100644 (file)
@@ -652,12 +652,6 @@ a.kronolithFormCancel {
 .kronolithDialog label {
     font-weight: bold;
 }
-.kronolithDialog input.kronolithDatePicker {
-    padding-right: 20px;
-    background-image: url("graphics/picker.png");
-    background-position: right center;
-    background-repeat: no-repeat;
-}
 .kronolithLongField {
     width: 100%;
 }
@@ -1296,9 +1290,10 @@ li.panel-tags {
     color: #000;
 }
 
-#color-picker {
+#color-picker, #horde-calendar {
     z-index: 103;
 }
+
 #calendarPrint {
     display: none;
 }