Skip to main content

Search and Top Navigation

#4784 closed enhancement (fixed)

Opened August 18, 2009 01:06PM UTC

Closed August 26, 2009 02:06AM UTC

Widget factory: Allow multiple option arguments on init

Reported by: jzaefferer Owned by:
Priority: major Milestone: 1.8
Component: ui.core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

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)
Change History (2)

Changed August 18, 2009 01:09PM UTC by jzaefferer comment:1

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.

Changed August 26, 2009 02:06AM UTC by scottgonzalez comment:2

resolution: → fixed
status: newclosed

Fixed in r3133.