Bryan, looks like the JQuery folks are developing an core control for
this so I thought that this was good news: 
http://wiki.jqueryui.com/w/page/12138056/Selectmenu



On Jun 17, 10:53 am, Bryan Larsen <[email protected]> wrote:
> I've added a new control to the rails3 branch of hobo-jquery.
>
> https://github.com/bryanlarsen/hobo-jquery/commit/f4c38038d323ec0326a...
>
> Here's the documentation:
>
> Creates an enhanced version of the [jQuery-UI demo
> combobox](http://jqueryui.com/demos/autocomplete/#combobox).  This
> will turn any select (even a select-many) into a combobox.
>
> NOTE:  backwards compatibility with the Hobo&Rails prototype/lowpro
> handlers requires event.simulate.js.   You may need to rerun your
> hobo_query:install generator to copy this file into your application.
>
> Standard usage:
>
>     <hjq-combobox>
>       <select .../>
>     </hjq-combobox>
>
> If you don't supply the select, it will use Hobo's `<input>` tag.
> This is usually the right default.
>
> You can tell Hobo to always use a combobox for select-one,
> select-many, select-input and/or select-menu.
>
>     <extend tag="select-one">
>       <hjq-combobox tag="select-one">
>         <old-select-one merge/>
>       </hjq-combobox>
>     </extend>
>
> To make the behavior more like the demo's, turn off autoFill & clearButton:
>
>     <hjq-combobox autoFill="&false" clearButton="&false"/>
>
> Combobox is a new control that is built on autocomplete.   The
> autocomplete options may not be used directly.   If you need any of
> them let me know -- they shouldn't be too hard to add if you volunteer
> to test them.
>
> ### Attributes
>
> - `autoFill` (default: true):  select first value rather than clearing
> if there's a match
>
> - `clearButton` (default: true): add a "clear" button
>
> - `adjustWidth` (default: true): if true, will set the autocomplete
> width the same as the old select.  (requires jQuery 1.4.4 to work on
> IE8)
>
> - uiStyle (default: false): if true, will add classes so that the
> autocomplete input takes a jQuery-UI style.  If false, the standard
> Hobo style is used.
>
> ### Events
>
> - `selected` (default: `$(this).simulate('change');`):  this is a
> jQuery-UI event handler.  The default value for this option fires the
> `onchange` handler on the underlying `select` in a manner compatible
> with both prototype.js and jQuery.  For this to work,
> event.simulate.js must be loaded, and jQuery must be put into
> noConflict mode.  hobo-jquery should be doing both of these for you if
> you are using it as recommended in the README.
>
> cheers,
> Bryan

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to