Convert to new Horde_Calendar custom event changes
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 18 Dec 2009 20:35:11 +0000 (13:35 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 18 Dec 2009 20:35:11 +0000 (13:35 -0700)
kronolith/lib/Kronolith.php
kronolith/new.php
kronolith/templates/index/edit.inc

index 6ab5d63..8f29b92 100644 (file)
@@ -79,6 +79,7 @@ class Kronolith
         Horde::addScriptFile($datejs, 'kronolith');
         Horde::addScriptFile('date.js', 'kronolith');
         Horde::addScriptFile('kronolith.js', 'kronolith');
+        Horde::addScriptFile('new.js', 'kronolith');
         Horde_Ui_JsCalendar::init();
 
         if (isset($GLOBALS['language'])) {
index 2a35b90..d7121e0 100644 (file)
@@ -63,6 +63,7 @@ if (isset($url)) {
 
 $title = _("Add a new event");
 $calendars = Kronolith::listCalendars(false, Horde_Perms::EDIT | Kronolith::PERMS_DELEGATE);
+Horde::addScriptFile('new.js', 'kronolith');
 Horde::addScriptFile('popup.js', 'horde');
 require KRONOLITH_TEMPLATES . '/common-header.inc';
 require KRONOLITH_TEMPLATES . '/menu.inc';
index a8da2f1..a833328 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), function(date) { $(\'kronolithEventStartDate\').setValue(date.toString(Kronolith.conf.date_format)) });return false;')) . Horde::img('picker.png', _("Set start date"), 'id="kronolithEventStartPicker"') . '</a>' ?>
+      <?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>' ?>
       <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), function(date) { $(\'kronolithEventEndDate\').setValue(date.toString(Kronolith.conf.date_format)) });return false;')) . Horde::img('picker.png', _("Set end date"), 'id="kronolithEventEndPicker"') . '</a>' ?>
+      <?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>' ?>
       <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>