Allow multiple category widget dropdowns
|Reported by:||t31os_||Owned by:||azaozz|
Whilst the instance of each widget is unique, the select boxes displayed at not given unique IDs or Names, resulting in valid markup, and resulting in only the secondary select box operating correctly. The JS var gets redeclared by the duplicative script, which gives precedence to the second dropdown.
One use case would be a page that lists long archives and shows a jump menu at both the top and bottom of the page. This would have to be done directly in the template due to the widget restrictions at present.
I am attaching a patch that adds a static counter into the category widget function, and gives each dropdown a unique identifier ID/Name, allowing simultaneous use of several category dropdowns, the JS function is updated appropriately to.
Code tested on IE7 and FF3, functionality remains the same as the original code, minus the limitation mentioned above.
Feedback is appreciated, and please do re-tag if necessary.