Opened 14 years ago

Closed 14 years ago

#4784 closed enhancement (fixed)

Widget factory: Allow multiple option arguments on init

Reported by: Jörn Zaefferer Owned by:
Priority: major Milestone: 1.8
Component: ui.core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


The widget factory should extended to merge multiple option arguments on init together into one. That would enable mixins ala:

{{{$(...).autocomplete($.autocomplete.fromSelect, {

custom stuff for this one


Where a preconfigured set of options can be stored seperate from a plugin, and when used being further customized.

Attached is a testcase.

Attachments (1)

multiple-options-test.diff (780 bytes) - added by Jörn Zaefferer 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by Jörn Zaefferer

Attachment: multiple-options-test.diff added


comment:1 Changed 14 years ago by Jörn Zaefferer

Can't really figure out how to implement that. The $.fn method has to pass through its arguments to the constructor function. I'd rather not change that to an array, but I don't know how to call the constructor with varargs.

comment:2 Changed 14 years ago by Scott González

Resolution: fixed
Status: newclosed

Fixed in r3133.

Note: See TracTickets for help on using tickets.