hello friends,
i have done a few improvements to the autocomplete module, to fix problems and improve functionality: added selectOnly option to autoselect a result if there's only one. this may save you a click. moved the loading indicator to the left side, in case the field is rtl. requires a small plugin i made, attached here. a css entry is being added to this effect. the included css file has this, but as oposed to the main autocomplete.css, colors are given as names. it's nice, but i'm open to changes ;) . added substrings, and substringsSeparators. as oposed to multiple, which deals with a list of elements separated by a fixed string, substringSeparators is a string made of chars, that each and any of them provide a separator between autocompletable strings. it supports editing a program with a closed list of keywords, and operators and spaces as separators. added extraFields, a list of names or ids (if prefixed with #) of other fields to provide as fieldname=value params to the ajax query. in case names are provided, they are expected to be inputs in the same form as the input itself. more complex relationship may be found by adding suitable callbacks to extraParams, which i'd only ask to receive the $input and the key name as parameters. pasted joern's solution to the ticket http://ui.jquery.com/bugs/ticket/3587, to allow pressing of other key combinations while an autocompletable fields has focus, and still keep autocompletion valid. though i can't yet be very specific, i found multiple autocompletion buggy, and hope to devote some time to contribute to it's fix too. -- alex
jquery.autocomplete.js
Description: JavaScript source
jquery.direction.js
Description: JavaScript source
.ac_results { padding: 0px; border: 1px solid black; background-color: Window; overflow: hidden; z-index: 99999; } .ac_results ul { width: 100%; list-style-position: outside; list-style: none; padding: 0; margin: 0; } .ac_results li { margin: 0px; padding: 2px 5px; cursor: default; display: block; /* if width will be 100% horizontal scrollbar will apear when scroll mode will be used */ /*width: 100%;*/ font: menu; font-size: 12px; /* it is very important, if line-height not setted or setted in relative units scroll will be broken in firefox */ line-height: 16px; overflow: hidden; } .ac_loading { background : Window url('indicator.gif') right center no-repeat; } .ac_loading_rtl { background : Window url('indicator.gif') left center no-repeat; } .ac_odd { background-color: #eee; } .ac_over { background-color: #0A246A; color: HighlightText; }
smime.p7s
Description: S/MIME Cryptographic Signature