Opened 12 years ago

Closed 12 years ago

#3270 closed task (fixed)

[cla][patch][test] Select: build new HTML select widget

Reported by: bill Owned by: dante
Priority: high Milestone: 1.1
Component: DojoX Form Version: 0.9
Keywords: Cc: nathan
Blocked By: Blocking:

Description

Make a select widget similar to the browser's or OS's select boxes. It can have fancy HTML in the drop down list, and the selected item's fancy HTML gets copied to the left of the arrow when you select it.

Probably won't have filtering by typing a string, since there's no input box, and since the drop down items can be arbitrary HTML, including a simple image.

The data list will always be short (usually <10 items) and will usually be embedded in the HTML file like a normal select, so not sure if we even need a dojo.data interface.

Attachments (2)

DropDownSelect.patch (21.7 KB) - added by nathan 12 years ago.
atch which adds dojox.form.DropDownSelect?. It handles rich text as desired.
DropDownSelect.2.patch (23.0 KB) - added by nathan 12 years ago.
Updated file with better tests (images, different font sizes, line breaks) and a fix to onChange not firing.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by Adam Peller

Milestone: 1.02.0

comment:2 Changed 12 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:3 Changed 12 years ago by nathan

Cc: nathan added

comment:4 Changed 12 years ago by nathan

I have created a "DropDownSelect?" widget which does what I think you are looking for. I will attach a patch for it (in dojox.form.DropDownSelect?)

Let me know if this is useful, or if there is anything else that would be needed for inclusion (maybe it can go into 1.1 as a part of dojox.form - and get moved into dijit.form over time...)

comment:5 Changed 12 years ago by nathan

Summary: Select: build new HTML select widget[cla][patch][test] Select: build new HTML select widget

Changed 12 years ago by nathan

Attachment: DropDownSelect.patch added

atch which adds dojox.form.DropDownSelect?. It handles rich text as desired.

Changed 12 years ago by nathan

Attachment: DropDownSelect.2.patch added

Updated file with better tests (images, different font sizes, line breaks) and a fix to onChange not firing.

comment:6 Changed 12 years ago by bill

Component: DijitDojoX Form
Milestone: 1.31.1
Owner: changed from haysmark to phiggins

I looked over the code very briefly, didn't notice any glaring issues, and the demo looks great. Assigning to phiggins to check into dojox for now (if it meets his approval).

comment:7 Changed 12 years ago by bill

Owner: changed from phiggins to dante

comment:8 Changed 12 years ago by dante

Resolution: fixed
Status: newclosed

(In [13085]) fixes #3270 - another awesome patch from nathan toone - proxy commit DropDownSelect? into dojox.form

Note: See TracTickets for help on using tickets.