From: Michael J. Rubinsky Date: Thu, 23 Jul 2009 22:45:16 +0000 (-0400) Subject: Fix Kronolith's Horde_Ajax_Imple usage. (Need to call ->attach() on instances) X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=81cb4e781a71702a8906768663f7c58a69a98cef;p=horde.git Fix Kronolith's Horde_Ajax_Imple usage. (Need to call ->attach() on instances) --- diff --git a/kronolith/attendees.php b/kronolith/attendees.php index e4c0c6a96..67ca17f0d 100644 --- a/kronolith/attendees.php +++ b/kronolith/attendees.php @@ -248,7 +248,8 @@ $date = new Horde_Date($date); $vfb_html = $attendee_view->render($date); // Add the ContactAutoCompleter -Horde_Ajax_Imple::getInstance(array('kronolith', 'ContactAutoCompleter'), array('triggerId' => 'newAttendees')); +$cac = Horde_Ajax_Imple::getInstance(array('kronolith', 'ContactAutoCompleter'), array('triggerId' => 'newAttendees')); +$cac->attach(); $title = _("Edit attendees"); require KRONOLITH_TEMPLATES . '/common-header.inc'; diff --git a/kronolith/calendars/edit.php b/kronolith/calendars/edit.php index f87c51b39..191b45562 100644 --- a/kronolith/calendars/edit.php +++ b/kronolith/calendars/edit.php @@ -58,4 +58,5 @@ require KRONOLITH_TEMPLATES . '/common-header.inc'; require KRONOLITH_TEMPLATES . '/menu.inc'; echo $form->renderActive($form->getRenderer(), $vars, 'edit.php', 'post'); require $registry->get('templates', 'horde') . '/common-footer.inc'; -Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'tags', 'id')); +$ac = Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'tags', 'id')); +$ac->attach(); diff --git a/kronolith/index.php b/kronolith/index.php index 2b88e9e36..e5d4e21b5 100644 --- a/kronolith/index.php +++ b/kronolith/index.php @@ -65,5 +65,6 @@ require KRONOLITH_TEMPLATES . '/index/index.inc'; Kronolith::includeScriptFiles(); Horde::outputInlineScript(); $notification->notify(array('listeners' => array('javascript'))); -Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'kronolithEventTags', 'pretty' => true)); +$tac = Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'kronolithEventTags', 'pretty' => true)); +$tac->attach(); echo "\n"; diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index 4e6c891ae..d4c0392df 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -379,7 +379,9 @@ endif;
- 'tags', 'id' => $event->getUID())); ?> + 'tags', 'id' => $event->getUID())); + $tac->attach(); + ?> diff --git a/kronolith/templates/panel.inc b/kronolith/templates/panel.inc index f9c0de5d2..58e40d5d9 100644 --- a/kronolith/templates/panel.inc +++ b/kronolith/templates/panel.inc @@ -66,11 +66,13 @@ if ($cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . ''; } -Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), array('triggerId' => 'remove' . md5($id . $tag_id), - 'action' => 'delete', - 'resource' => $id, - 'type' => 'calendar', - 'tagId' => $tag_id)); +$ta = Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), + array('triggerId' => 'remove' . md5($id . $tag_id), + 'action' => 'delete', + 'resource' => $id, + 'type' => 'calendar', + 'tagId' => $tag_id)); +$ta->attach(); ?> @@ -80,11 +82,14 @@ Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), array('triggerId
'newtags-input_' . $id, 'id' => $id)); - Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), array('triggerId' => 'newtags-button', - 'resource' => $id, - 'type' => 'calendar', - 'action' => 'add')); + $tac = Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'newtags-input_' . $id, 'id' => $id)); + $tac->attach(); + $ta = Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), + array('triggerId' => 'newtags-button', + 'resource' => $id, + 'type' => 'calendar', + 'action' => 'add')); + $ta->attach(); ?>