From: Michael J. Rubinsky Date: Tue, 9 Mar 2010 17:51:29 +0000 (-0500) Subject: Allow passing a 'no_onload' paramter to signify to immediatly execute the inline... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0a02a1454b28f13d47ed0d27a6338f29f5aafaed;p=horde.git 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 --- 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); } /**