From 0a02a1454b28f13d47ed0d27a6338f29f5aafaed Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 9 Mar 2010 12:51:29 -0500 Subject: [PATCH] Allow passing a 'no_onload' paramter to signify to immediatly execute the inline script. Needed for attaching the autocompleter when outputing the autocompleter in an ajax chunk --- framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php b/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php index 526fd9c50..a075ff901 100644 --- a/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php +++ b/framework/Ajax/lib/Horde/Ajax/Imple/AutoCompleter.php @@ -18,6 +18,7 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base * @param array $params Configuration parameters. *
      * 'triggerId' => (string) [optional] TODO
+     * 'no_onload' => (boolean) [optional] Don't wait for dom:onload to attach
      * 
*/ public function __construct($params) @@ -85,7 +86,7 @@ abstract class Horde_Ajax_Imple_AutoCompleter extends Horde_Ajax_Imple_Base Horde::addScriptFile('effects.js', 'horde'); - Horde::addInlineScript((isset($config['var']) ? $config['var'] . ' = ' : '') . 'new ' . $func . '(' . implode(',', $params) . ',' . $js_params . ')', 'dom'); + Horde::addInlineScript((isset($config['var']) ? $config['var'] . ' = ' : '') . 'new ' . $func . '(' . implode(',', $params) . ',' . $js_params . ')', empty($this->_params['no_onload']) ? 'dom' : null); } /** -- 2.11.0