'pretty' => true,
'var' => 'kronolithCTagAc'))
->attach();
+
+Horde_Ajax_Imple::factory(
+ array('kronolith', 'ContactAutoCompleter'),
+ array('triggerId' => 'kronolithEventAttendees',
+ 'triggerContainer' => 'kronolithAttendeesACTriggerContainer',
+ 'box' => 'kronolithAttendeesACBox',
+ 'pretty' => true,
+ 'var' => 'kronolithEAttendeesAc'))
+ ->attach();
+
echo "</body>\n</html>";
this.doAction('getEvent', { cal: calendar, id: id, date: date }, this.editEventCallback.bind(this));
$('kronolithEventTopTags').update();
} else {
+ kronolithEAttendeesAc.reset();
kronolithETagAc.reset();
this.doAction('listTopTags', null, this.topTagsCallback.curry('kronolithEventTopTags', 'kronolithEventTag'));
var d;
}
/* Attendees */
+ kronolithEAttendeesAc.reset();
this.freeBusy = $H();
$('kronolithEventStartDate').stopObserving('change');
if (!Object.isUndefined(ev.at)) {
- $('kronolithEventAttendees').setValue(ev.at.pluck('l').join(', '));
+ kronolithEAttendeesAc.reset(ev.at.pluck('l'));
var table = $('kronolithEventTabAttendees').down('tbody');
table.select('tr').invoke('remove');
ev.at.each(function(attendee) {
}
$event->readForm();
+
$result = $this->_saveEvent($event);
if (($result !== true) && $this->_vars->sendupdates) {
Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_REQUEST);
{
$js_params['indicator'] = $this->_params['triggerId'] . '_loading_img';
- return array(
- 'ajax' => 'ContactAutoCompleter',
- 'params' => $js_params,
- 'raw_params' => array(
- 'onSelect' => 'function (v) { if (!v.endsWith(";")) { v += ","; } return v + " "; }',
- 'onType' => 'function (e) { return e.include("<") ? "" : e; }'
- ),
- );
+ $ret = array('params' => $js_params,
+ 'raw_params' => array(
+ 'onSelect' => 'function (v) { if (!v.endsWith(";")) { v += ","; } return v + " "; }',
+ 'onType' => 'function (e) { return e.include("<") ? "" : e; }'
+ ));
+ if (empty($this->_params['pretty'])) {
+ $ret['ajax'] = 'ContactAutoCompleter';
+ } else {
+ $ret['pretty'] = 'ContactAutoCompleter';
+ }
+
+ if (!empty($this->_params['var'])) {
+ $ret['var'] = $this->_params['var'];
+ }
+
+ return $ret;
}
/**
<div id="kronolithEventTabAttendees" class="kronolithTabsOption" style="display:none">
<label>
<?php echo _("Add attendees e-mail addresses") ?>:<br />
- <textarea name="attendees" id="kronolithEventAttendees" rows="2" cols="100" class="kronolithLongField"></textarea>
+ <input id="kronolithEventAttendees" name="attendees" />
+ <span id="kronolithEventAttendees_loading_img" style="display:none;"><?php echo Horde::img('loading.gif', _("Loading...")) ?></span>
</label>
<br />
<label>
margin: 0;
height: 100%;
}
-#kronolithEventACBox, #kronolithCalendarinternalACBox {
+#kronolithEventACBox, #kronolithCalendarinternalACBox, #kronolithAttendeesACBox {
line-height: 100%;
}