Copyright 2012-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz (slusarz@horde.org)
Inheritance: extends Horde_Core_Ajax_Imple_AutoCompleter_Base
Example #1
0
 /**
  */
 public function __construct(array $params = array())
 {
     global $page_output;
     parent::__construct(array_merge(array('boxClass' => 'hordeACBox impACBox', 'boxClassFocus' => 'impACBoxFocus', 'deleteIcon' => strval(Horde_Themes::img('delete-small.png')), 'displayFilter' => 'new Function("t", "return t.sub(/<[^>]*>$/, \\"\\").strip().escapeHTML()")', 'growingInputClass' => 'hordeACTrigger impACTrigger', 'listClass' => 'hordeACList impACList', 'processValueCallback' => 'ImpComposeBase.autocompleteValue.bind(ImpComposeBase)', 'removeClass' => 'hordeACItemRemove impACItemRemove', 'triggerContainer' => strval(new Horde_Support_Randomid())), $params));
     $this->_raw = array_merge($this->_raw, array('displayFilter', 'filterCallback', 'onAdd', 'onRemove', 'processValueCallback'));
     $page_output->addScriptFile('compose-base.js');
     $page_output->addScriptFile('prettyautocomplete.js');
 }
Example #2
0
 /**
  * @param mixed $search  The search array to use. If a string,
  *                       autocompleter will use this JS variable name to
  *                       do the search. If an array, this data will be
  *                       passed to the autocompleter automatically.
  * @param array $params  Configuration options:
  *   - autoSelect: TODO
  *   - choices: (integer) TODO
  *   - frequency: (integer) TODO
  *   - fullSearch: (integer) TODO
  *   - ignoreCase: (integer) TODO
  *   - minChars: (integer) Minimum # of characters before search is made.
  *   - onSelect: (string) Javascript code to run on select.
  *   - onShow: (string) Javascript code to run on show.
  *   - onType: (string) Javascript code to run on type.
  *   - paramName: (string) TODO
  *   - partialChars: (integer) TODO
  *   - partialSearch: (integer) TODO
  *   - score: (integer) TODO
  *   - tokens: (array) Valid token separators.
  */
 public function __construct($search, array $params = array())
 {
     $this->_search = $search;
     parent::__construct(array_merge(array('fullSearch' => 1, 'partialSearch' => 1, 'score' => 1, 'tokens' => array(',', ';')), $params));
 }
Example #3
0
 /**
  * @param array $params  Configuration options:
  *   - box
  *   - boxClass
  *   - deleteIcon
  *   - displayFilter
  *   - existing
  *   - filterCallback
  *   - growingInputClass
  *   - listClass
  *   - minTriggerWidth
  *   - onAdd
  *   - onRemove
  *   - requireSelection
  *   - trigger
  *   - triggerContainer
  *   - uri
  */
 public function __construct(array $params = array())
 {
     parent::__construct(array_merge(array('deleteIcon' => strval(Horde_Themes::img('delete-small.png')), 'triggerContainer' => strval(new Horde_Support_Randomid())), $params));
     $this->_raw = array_merge($this->_raw, array('displayFilter', 'filterCallback', 'onAdd', 'onRemove', 'beforeUpdate'));
     $GLOBALS['page_output']->addScriptFile('prettyautocomplete.js', 'horde');
 }