Theme handling in Dialog and Datepicker widgets

Theme handling in Dialog and Datepicker widgets


Hi everyone!
As I'm working on the integration of jQuery UI in DNN, I come across
an issue concerning the theming of the Dialog and Datepicker widgets.
I was very impressed, when I saw that you even added support for
multiple themes on one page by simply prefixing the styles. The
problem is, that the popup controls are added at the bottom of the
page, therefore being only themeable by adding the class name to the
body. But this disables the use of multiple themes.
I was able to work around this issue by using the open/close and
beforeShow/onClose events respectively and using jQuery().wrap to
create a <div> with the given theme's class name, and jQuery().replace
to remove it when closing. In the case of the Datepicker I was able to
use jQuery(inst.dpDiv) to access the element for wrapping. For Dialog
I had to use jQuery(this).parent().parent(), which, to me, looks kind
of ugly, and I fear this is bound to break in future releases. Also,
the close events are called at the start of the closing animation, so
the wrapping div and therefore the theming is removed before the
animation completes.
Shouldn't the popup widgets include a theme name option so this
handling can be included with the widget? I'd be willing to supply a
patch for this feature, if it is decided to include this option.
Best regards,
Christoph