From 4f74564881be2e063e6ab0d5bac4a0c5cdd15f63 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 16 Jul 2009 13:22:28 -0600 Subject: [PATCH] Move imple handling to Horde_Ajax_Imple::. --- imp/imple.php | 58 ------------ imp/lib/{ => Ajax}/Imple/ContactAutoCompleter.php | 11 ++- imp/lib/{ => Ajax}/Imple/SpellChecker.php | 13 ++- imp/lib/Imple.php | 98 -------------------- imp/lib/UI/Compose.php | 7 +- kronolith/attendees.php | 2 +- kronolith/calendars/edit.php | 2 +- kronolith/imple.php | 63 ------------- kronolith/index.php | 2 +- kronolith/js/src/tagactions.js | 6 +- .../lib/{ => Ajax}/Imple/ContactAutoCompleter.php | 9 +- kronolith/lib/{ => Ajax}/Imple/Embed.php | 31 +++---- kronolith/lib/{ => Ajax}/Imple/TagActions.php | 16 ++-- .../lib/{ => Ajax}/Imple/TagAutoCompleter.php | 14 +-- kronolith/lib/Imple.php | 100 --------------------- kronolith/templates/edit/edit.inc | 2 +- kronolith/templates/panel.inc | 6 +- 17 files changed, 65 insertions(+), 375 deletions(-) delete mode 100644 imp/imple.php rename imp/lib/{ => Ajax}/Imple/ContactAutoCompleter.php (90%) rename imp/lib/{ => Ajax}/Imple/SpellChecker.php (89%) delete mode 100644 imp/lib/Imple.php delete mode 100644 kronolith/imple.php rename kronolith/lib/{ => Ajax}/Imple/ContactAutoCompleter.php (92%) rename kronolith/lib/{ => Ajax}/Imple/Embed.php (85%) rename kronolith/lib/{ => Ajax}/Imple/TagActions.php (89%) rename kronolith/lib/{ => Ajax}/Imple/TagAutoCompleter.php (87%) delete mode 100644 kronolith/lib/Imple.php diff --git a/imp/imple.php b/imp/imple.php deleted file mode 100644 index b1c37d7c0..000000000 --- a/imp/imple.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @package IMP - */ - -// As of right now, imples don't need read/write session access. -$session_control = 'readonly'; -$session_timeout = 'none'; - -$authentication = 'horde'; -require_once dirname(__FILE__) . '/lib/base.php'; - -$viewmode = $_SESSION['imp']['view']; - -if (!($path = Horde_Util::getFormData('imple'))) { - if ($viewmode == 'dimp') { - Horde::sendHTTPResponse(new stdClass(), 'json'); - } - exit; -} - -if ($path[0] == '/') { - $path = substr($path, 1); -} - -$path = explode('/', $path); -$impleName = reset($path); - -if (!($imple = IMP_Imple::factory($impleName))) { - if ($viewmode == 'dimp') { - Horde::sendHTTPResponse(new stdClass(), 'json'); - } - exit; -} - -$args = array(); -foreach ($path as $pair) { - if (strpos($pair, '=') === false) { - $args[$pair] = true; - } else { - list($name, $val) = explode('=', $pair); - $args[$name] = $val; - } -} - -$result = $imple->handle($args); - -$ct = empty($_SERVER['Content-Type']) - ? (is_string($result) ? 'plain' : 'json') - : $_SERVER['Content-Type']; - -Horde::sendHTTPResponse($result, $ct); diff --git a/imp/lib/Imple/ContactAutoCompleter.php b/imp/lib/Ajax/Imple/ContactAutoCompleter.php similarity index 90% rename from imp/lib/Imple/ContactAutoCompleter.php rename to imp/lib/Ajax/Imple/ContactAutoCompleter.php index 3960b3c9b..edadd241c 100644 --- a/imp/lib/Imple/ContactAutoCompleter.php +++ b/imp/lib/Ajax/Imple/ContactAutoCompleter.php @@ -1,5 +1,7 @@ * @package IMP */ -class IMP_Imple_ContactAutoCompleter extends IMP_Imple +class IMP_Ajax_Imple_ContactAutoCompleter extends Horde_Ajax_Imple_Base { /** * The URL to use in attach(). @@ -33,7 +35,7 @@ class IMP_Imple_ContactAutoCompleter extends IMP_Imple * 'resultsId' => TODO (optional) * */ - function __construct($params) + public function __construct($params) { if (empty($params['triggerId'])) { $params['triggerId'] = $this->_randomid(); @@ -50,7 +52,8 @@ class IMP_Imple_ContactAutoCompleter extends IMP_Imple */ public function attach() { - parent::attach(); + Horde::addScriptFile('prototype.js', 'horde', true); + Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('autocomplete.js', 'horde', true); $params = array( @@ -86,7 +89,7 @@ class IMP_Imple_ContactAutoCompleter extends IMP_Imple if (!$ac_browser || $_SESSION['imp']['cache']['ac_ajax']) { $func = 'Ajax.Autocompleter'; if (empty($this->_url)) { - $this->_url = Horde::url($GLOBALS['registry']->get('webroot', 'imp') . '/imple.php?imple=ContactAutoCompleter/input=' . rawurlencode($this->_params['triggerId']), true); + $this->_url = $this->_getUrl('ContactAutoCompleter', 'imp', array('input' => $this->_params['triggerId'])); } $params[] = '"' . $this->_url . '"'; diff --git a/imp/lib/Imple/SpellChecker.php b/imp/lib/Ajax/Imple/SpellChecker.php similarity index 89% rename from imp/lib/Imple/SpellChecker.php rename to imp/lib/Ajax/Imple/SpellChecker.php index 9dc421103..d0b1494c8 100644 --- a/imp/lib/Imple/SpellChecker.php +++ b/imp/lib/Ajax/Imple/SpellChecker.php @@ -1,5 +1,7 @@ * @package IMP */ -class IMP_Imple_SpellChecker extends IMP_Imple +class IMP_Ajax_Imple_SpellChecker extends Horde_Ajax_Imple_Base { /** * Constructor. @@ -22,7 +24,7 @@ class IMP_Imple_SpellChecker extends IMP_Imple * 'triggerId' => TODO (optional) * */ - function __construct($params = array()) + public function __construct($params = array()) { if (empty($params['id'])) { $params['id'] = $this->_randomid(); @@ -54,10 +56,13 @@ class IMP_Imple_SpellChecker extends IMP_Imple */ public function attach() { - parent::attach(); + Horde::addScriptFile('prototype.js', 'horde', true); + Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('KeyNavList.js', 'imp', true); Horde::addScriptFile('SpellChecker.js', 'imp', true); - $url = Horde::url($GLOBALS['registry']->get('webroot', 'imp') . '/imple.php?imple=SpellChecker/input=' . rawurlencode($this->_params['targetId']), true); + + $url = $this->_getUrl('SpellChecker', 'imp', array('input' => $this->_params['targetId'])); + IMP::addInlineScript($this->_params['id'] . ' = new SpellChecker("' . $url . '", "' . $this->_params['targetId'] . '", "' . $this->_params['triggerId'] . '", ' . $this->_params['states'] . ', ' . $this->_params['locales'] . ', \'widget\');', 'dom'); } diff --git a/imp/lib/Imple.php b/imp/lib/Imple.php deleted file mode 100644 index a2ce17ee4..000000000 --- a/imp/lib/Imple.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @package IMP - */ -class IMP_Imple -{ - /** - * Parameters needed by the subclasses. - * - * @var array - */ - protected $_params = array(); - - /** - * Attempts to return a concrete IMP_Imple instance based on $imple. - * - * @param string $imple The type of concrete subclass to return based - * on the imple type indicated. The code is - * dynamically included. - * @param array $params The configuration parameter array. - * - * @return mixed The newly created concrete instance, or false on error. - */ - static public function factory($imple, $params = array()) - { - $imple = basename($imple); - if (!$imple) { - return false; - } - - $class = 'IMP_Imple_' . $imple; - if (!class_exists($class)) { - include_once dirname(__FILE__) . '/Imple/' . $imple . '.php'; - if (!class_exists($class)) { - return false; - } - } - - return new $class($params); - } - - /** - * Constructor. - * - * @param array $params Any parameters needed by the class. - */ - function __construct($params) - { - $this->_params = $params; - $this->attach(); - } - - /** - * Attach the object to a javascript event. - */ - public function attach() - { - Horde::addScriptFile('prototype.js', 'horde', true); - Horde::addScriptFile('effects.js', 'horde', true); - } - - /** - * TODO - * - * @param TODO - */ - public function handle($args) - { - } - - /** - * Return the rendered HTML code. - * - * @return string The HTML code. - */ - public function html() - { - } - - /** - * Generate a random ID string. - * - * @return string The random ID string. - */ - protected function _randomid() - { - return 'imple_' . uniqid(mt_rand()); - } - -} diff --git a/imp/lib/UI/Compose.php b/imp/lib/UI/Compose.php index 793525cfe..6f2cd6cb0 100644 --- a/imp/lib/UI/Compose.php +++ b/imp/lib/UI/Compose.php @@ -99,7 +99,8 @@ class IMP_UI_Compose { /* Attach autocompleters to the compose form elements. */ foreach ($fields as $val) { - call_user_func_array(array('IMP_Imple', 'factory'), array('ContactAutoCompleter', array('triggerId' => $val))); + $imple = Horde_Ajax_Imple::getInstance(array('imp', 'ContactAutoCompleter'), array('triggerId' => $val)); + $imple->attach(); } } @@ -122,7 +123,9 @@ class IMP_UI_Compose 'Error' => $spell_img . $br . _("Spell Check Failed") ) ); - call_user_func_array(array('IMP_Imple', 'factory'), array('SpellChecker', $args)); + + $imple = Horde_Ajax_Imple::getInstance(array('imp', 'SpellChecker'), $args); + $imple->attach(); } /** diff --git a/kronolith/attendees.php b/kronolith/attendees.php index 12c9054f4..e4c0c6a96 100644 --- a/kronolith/attendees.php +++ b/kronolith/attendees.php @@ -248,7 +248,7 @@ $date = new Horde_Date($date); $vfb_html = $attendee_view->render($date); // Add the ContactAutoCompleter -Kronolith_Imple::factory('ContactAutoCompleter', array('triggerId' => 'newAttendees')); +Horde_Ajax_Imple::getInstance(array('kronolith', 'ContactAutoCompleter'), array('triggerId' => 'newAttendees')); $title = _("Edit attendees"); require KRONOLITH_TEMPLATES . '/common-header.inc'; diff --git a/kronolith/calendars/edit.php b/kronolith/calendars/edit.php index a88023aba..f87c51b39 100644 --- a/kronolith/calendars/edit.php +++ b/kronolith/calendars/edit.php @@ -58,4 +58,4 @@ 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'; -Kronolith_Imple::factory('TagAutoCompleter', array('triggerId' => 'tags', 'id')); +Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'tags', 'id')); diff --git a/kronolith/imple.php b/kronolith/imple.php deleted file mode 100644 index 10a059315..000000000 --- a/kronolith/imple.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ - -require_once dirname(__FILE__) . '/lib/base.php'; - -$path = Horde_Util::getFormData('imple'); -if (!$path) { - exit; -} -if ($path[0] == '/') { - $path = substr($path, 1); -} -$path = explode('/', $path); -$impleName = array_shift($path); - -$imple = Kronolith_Imple::factory($impleName); -if (!$imple) { - exit; -} -$args = array(); -foreach ($path as $pair) { - if (strpos($pair, '=') === false) { - $args[$pair] = true; - } else { - list($name, $val) = explode('=', $pair); - $args[$name] = $val; - } -} - -$result = $imple->handle($args); - -if (!empty($_SERVER['Content-Type'])) { - $ct = $_SERVER['Content-Type']; -} else { - $ct = is_string($result) ? 'plain' : 'json'; -} - -switch ($ct) { -case 'json': - header('Content-Type: application/json'); - echo Horde_Serialize::serialize($result, Horde_Serialize::JSON, Horde_Nls::getCharset()); - break; - -case 'plain': - header('Content-Type: text/plain'); - echo $result; - break; - -case 'html': - header('Content-Type: text/html'); - echo $result; - break; - -default: - echo $result; -} diff --git a/kronolith/index.php b/kronolith/index.php index 284582fcb..89976e1c3 100644 --- a/kronolith/index.php +++ b/kronolith/index.php @@ -65,5 +65,5 @@ require KRONOLITH_TEMPLATES . '/index/index.inc'; Kronolith::includeScriptFiles(); Kronolith::outputInlineScript(); $notification->notify(array('listeners' => array('javascript'))); -Kronolith_Imple::factory('TagAutoCompleter', array('triggerId' => 'kronolithEventTags', 'pretty' => true)); +Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'kronolithEventTags', 'pretty' => true)); echo "\n"; diff --git a/kronolith/js/src/tagactions.js b/kronolith/js/src/tagactions.js index ed66515d8..237597ca9 100644 --- a/kronolith/js/src/tagactions.js +++ b/kronolith/js/src/tagactions.js @@ -2,7 +2,7 @@ function addTag(resource, type, endpoint) { if (!$('newtags-input_' + resource).value.blank()) { var params = new Object(); - params.imple="TagActions/action=add/resource=" + resource + "/type=" + type + "/tags=" + $('newtags-input_' + resource).value; + params.imple="/action=add/resource=" + resource + "/type=" + type + "/tags=" + $('newtags-input_' + resource).value; new Ajax.Updater({success:'tags_' + resource}, endpoint, { @@ -19,7 +19,7 @@ function addTag(resource, type, endpoint) function removeTag(resource, type, tagid, endpoint) { var params = new Object(); - params.imple = "TagActions/action=remove/resource=" + resource + "/type=" + type + "/tags=" + tagid; + params.imple = "/action=remove/resource=" + resource + "/type=" + type + "/tags=" + tagid; new Ajax.Updater({success:'tags_' + resource}, endpoint, { @@ -29,4 +29,4 @@ function removeTag(resource, type, tagid, endpoint) ); return true; -} \ No newline at end of file +} diff --git a/kronolith/lib/Imple/ContactAutoCompleter.php b/kronolith/lib/Ajax/Imple/ContactAutoCompleter.php similarity index 92% rename from kronolith/lib/Imple/ContactAutoCompleter.php rename to kronolith/lib/Ajax/Imple/ContactAutoCompleter.php index 598a0b6aa..2f58934c6 100644 --- a/kronolith/lib/Imple/ContactAutoCompleter.php +++ b/kronolith/lib/Ajax/Imple/ContactAutoCompleter.php @@ -1,5 +1,7 @@ * @package Kronolith */ -class Kronolith_Imple_ContactAutoCompleter extends Kronolith_Imple +class Kronolith_Ajax_Imple_ContactAutoCompleter extends Horde_Ajax_Imple_Base { /** * Constructor. @@ -36,13 +38,14 @@ class Kronolith_Imple_ContactAutoCompleter extends Kronolith_Imple */ public function attach() { - parent::attach(); + Horde::addScriptFile('prototype.js', 'horde', true); + Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('autocomplete.js', 'horde', true); $params = array( '"' . $this->_params['triggerId'] . '"', '"' . $this->_params['resultsId'] . '"', - '"' . Horde::url($GLOBALS['registry']->get('webroot', 'kronolith') . '/imple.php?imple=ContactAutoCompleter/input=' . rawurlencode($this->_params['triggerId']), true) . '"' + '"' . $this->_getUrl('ContactAutoCompleter', 'kronolith', array('input' => $this->_params['triggerId'])) . '"' ); $js_params = array( diff --git a/kronolith/lib/Imple/Embed.php b/kronolith/lib/Ajax/Imple/Embed.php similarity index 85% rename from kronolith/lib/Imple/Embed.php rename to kronolith/lib/Ajax/Imple/Embed.php index d284a6bb0..b8301679d 100644 --- a/kronolith/lib/Imple/Embed.php +++ b/kronolith/lib/Ajax/Imple/Embed.php @@ -1,27 +1,22 @@ - * + * @author Michael J. Rubinsky * @package Kronolith */ -class Kronolith_Imple_Embed extends Kronolith_Imple { - +class Kronolith_Ajax_Imple_Embed extends Horde_Ajax_Imple_Base +{ /** - * Override the parent method since it uses Horde::addScriptFile() - * */ - function attach() + public function attach() { - //noop } - /** * Handles the output of the embedded widget. This must always be valid * javascript. @@ -37,7 +32,7 @@ class Kronolith_Imple_Embed extends Kronolith_Imple { * * @param array $args Arguments for this view. */ - function handle($args) + public function handle($args) { /* First, determine the type of view we are asking for */ $view = $args['view']; @@ -66,10 +61,12 @@ class Kronolith_Imple_Embed extends Kronolith_Imple { /* Build the block parameters */ - $params = array('calendar' => $calendar, - 'maxevents' => $max_events, - 'months' => $count_month, - 'days' => $count_days); + $params = array( + 'calendar' => $calendar, + 'maxevents' => $max_events, + 'months' => $count_month, + 'days' => $count_days + ); /* Call the Horde_Block api to get the calendar HTML */ $title = $registry->call('horde/blockTitle', array('kronolith', $view, $params)); diff --git a/kronolith/lib/Imple/TagActions.php b/kronolith/lib/Ajax/Imple/TagActions.php similarity index 89% rename from kronolith/lib/Imple/TagActions.php rename to kronolith/lib/Ajax/Imple/TagActions.php index baa82fa45..b4bb3e838 100644 --- a/kronolith/lib/Imple/TagActions.php +++ b/kronolith/lib/Ajax/Imple/TagActions.php @@ -1,30 +1,26 @@ - * + * @author Michael J. Rubinsky * @package Kronolith */ -class Kronolith_Imple_TagActions extends Kronolith_Imple +class Kronolith_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base { + /** + */ public function attach() { - // TODO: HACK! attach is called in the contructor which means that even - // if we are only handling the request, we try to attach(). - if (count($this->_params) == 0) { - return; - } Horde::addScriptFile('tagactions.js'); $dom_id = $this->_params['triggerId']; $action = $this->_params['action']; $content_id = $this->_params['resource']; $content_type = $this->_params['type']; $tag_id = !empty($this->_params['tagId']) ? $this->_params['tagId'] : null; - $endpoint = Horde::url('imple.php', true); + $endpoint = $this->_getUrl('TagActions', 'kronolith'); if ($action == 'add') { $js = "Event.observe('" . $dom_id . "_" . $content_id . "', 'click', function(event) {addTag('" . $content_id . "', '" . $content_type . "', '" . $endpoint . "'); Event.stop(event)});"; diff --git a/kronolith/lib/Imple/TagAutoCompleter.php b/kronolith/lib/Ajax/Imple/TagAutoCompleter.php similarity index 87% rename from kronolith/lib/Imple/TagAutoCompleter.php rename to kronolith/lib/Ajax/Imple/TagAutoCompleter.php index e10bfd5ef..d17fd9b0b 100644 --- a/kronolith/lib/Imple/TagAutoCompleter.php +++ b/kronolith/lib/Ajax/Imple/TagAutoCompleter.php @@ -8,7 +8,7 @@ * @author Michael Slusarz * @package Kronolith */ -class Kronolith_Imple_TagAutoCompleter extends Kronolith_Imple +class Kronolith_Ajax_Imple_TagAutoCompleter extends Horde_Ajax_Imple_Base { /** * Constructor. @@ -39,15 +39,17 @@ class Kronolith_Imple_TagAutoCompleter extends Kronolith_Imple */ public function attach() { - global $registry; - parent::attach(); + Horde::addScriptFile('prototype.js', 'horde', true); + Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('autocomplete.js', 'horde', true); + $registry = Horde_Registry::singleton(); + if ($pretty = !empty($this->_params['pretty'])) { Horde::addScriptFile('prettyautocomplete.js', 'horde', true); - $this->_params['uri'] = Horde::url($GLOBALS['registry']->get('webroot', 'kronolith') . '/imple.php?imple=TagAutoCompleter', true); + $this->_params['uri'] = $this->_getUrl('TagAutoCompleter', 'kronolith'); } else { - $this->_params['uri'] = Horde::url($GLOBALS['registry']->get('webroot', 'kronolith') . '/imple.php?imple=TagAutoCompleter/input=' . rawurlencode($this->_params['triggerId']), true); + $this->_params['uri'] = $this->_getUrl('TagAutoCompleter', 'kronolith', array('input' => $this->_params['triggerId'])); } if (!$pretty) { @@ -113,7 +115,7 @@ class Kronolith_Imple_TagAutoCompleter extends Kronolith_Imple * * @return array All matching tags. */ - static public function getTagList($search = '') + public function getTagList($search = '') { $tagger = Kronolith::getTagger(); $tags = $tagger->listTags($search); diff --git a/kronolith/lib/Imple.php b/kronolith/lib/Imple.php deleted file mode 100644 index 50062f8e6..000000000 --- a/kronolith/lib/Imple.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @package Kronolith - */ -class Kronolith_Imple -{ - - /** - * Parameters needed by the subclasses. - * - * @var array - */ - protected $_params = array(); - - /** - * Attempts to return a concrete Imple instance based on $imple. - * - * @param string $imple The type of concrete Imple subclass to return - * return, based on the imple type indicated. The - * code is dynamically included. - * @param array $params The configuration parameter array. - * - * @return mixed The newly created concrete Imple instance, or false on - * error. - */ - public static function factory($imple, $params = array()) - { - $imple = basename($imple); - if (!$imple) { - return false; - } - - $class = 'Kronolith_Imple_' . $imple; - if (!class_exists($class)) { - include_once dirname(__FILE__) . '/Imple/' . $imple . '.php'; - if (!class_exists($class)) { - return false; - } - } - - return new $class($params); - } - - /** - * Constructor. - * - * @param array $params Any parameters needed by the class. - */ - public function __construct($params) - { - $this->_params = $params; - $this->attach(); - } - - /** - * Attach the Imple object to a javascript event. - */ - public function attach() - { - Horde::addScriptFile('prototype.js', 'horde', true); - Horde::addScriptFile('effects.js', 'horde', true); - } - - /** - * TODO - * - * @param TODO - */ - public function handle($args) - { - } - - /** - * Return the rendered HTML code. - * - * @return string The HTML code. - */ - public function html() - { - } - - /** - * Generate a random ID string. - * - * @access private - * - * @return string The random ID string. - */ - public function _randomid() - { - return 'imple_' . uniqid(mt_rand()); - } - -} diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index 3992470ab..4e6c891ae 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -379,7 +379,7 @@ endif;
- 'tags', 'id' => $event->getUID())); ?> + 'tags', 'id' => $event->getUID())); ?> diff --git a/kronolith/templates/panel.inc b/kronolith/templates/panel.inc index 4b60cfb82..f9c0de5d2 100644 --- a/kronolith/templates/panel.inc +++ b/kronolith/templates/panel.inc @@ -66,7 +66,7 @@ if ($cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { . Horde::img('delete-small.png', _("Remove Tag"), '', $registry->getImageDir('horde')) . ''; } -Kronolith_Imple::factory('TagActions', array('triggerId' => 'remove' . md5($id . $tag_id), +Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), array('triggerId' => 'remove' . md5($id . $tag_id), 'action' => 'delete', 'resource' => $id, 'type' => 'calendar', @@ -80,8 +80,8 @@ Kronolith_Imple::factory('TagActions', array('triggerId' => 'remove' . md5($id .
'newtags-input_' . $id, 'id' => $id)); - Kronolith_Imple::factory('TagActions', array('triggerId' => 'newtags-button', + Horde_Ajax_Imple::getInstance(array('kronolith', 'TagAutoCompleter'), array('triggerId' => 'newtags-input_' . $id, 'id' => $id)); + Horde_Ajax_Imple::getInstance(array('kronolith', 'TagActions'), array('triggerId' => 'newtags-button', 'resource' => $id, 'type' => 'calendar', 'action' => 'add')); -- 2.11.0