Some fixes to activeselect
| Project: | Active Select |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
The attached patch fixes some bugs in the activeselect:
1) Makes the throbber visibile in Internet Explorer and Opera, by adding a throbber next to the dropdown menu (the throbber in the background is visible only in Firefox).
2) Sometimes the dropdown menus are way too wide, depending also on the current font width in the stylesheet, so I added a activeselectResizeFactor value that allows a fine tuning of the target width; this value is set by default to 9, and can be overridden in the section of the page.tpl.php before calling the Drupal scripts.
3) The append(new Option(.....)) didn't work for me, so I replaced it with a working code.
4) Removed the hasClass() function, replaced it with the jQuery .attr('class', ...).
5) Added prefix and suffix to the theme("form_element", ...).
| Attachment | Size |
|---|---|
| activeselect.patch.txt | 7.24 KB |

#1
#2
CSS patch and part of .js, and .module about width and throbber - works fine.
All parts - with menu selection - works fine.
BUT, I can see only first option from three - with form 'select'.
(Html source of page has three options. If you save it separately, and open as static page - you will see, that page was generated correctly.)
#3
On wideness:
Commenting out
width: this.targets[target].targetWidth +'px'Tightens up the box. It appears to resize automatically in both IE6 and FF. I'm not sure if any other browsers will have problems with this but it's worth a try-- maybe there's no point in explicitly resizing the box, since it's done anyway.
#4
I tested this patch, and it seems to work as advertised. Fool2's suggestion didn't seem to have any impact in FF or Opera. Maybe the line can be left out entirely.