scriptpath / themepath

Apr 6, 2010 at 9:41 AM

Hi Christoph,

it would be helpful to have the ability to set the path to scripts and themes. Right now, one has to have the jquery ui module installed if using the library in a custom module, for redistributing the library this is not very helpful.

You also might consider support for CDN's.

Other than that, great work!

Apr 6, 2010 at 9:50 AM

Hi proeder!

I actually built this library having in mind an easy deployment. Various commercial modules require you to install more than one module, due to the fact that they have their own reusable framework libraries, that were deployed separately (at least until DNN5). The same thing happens here: The jqui-module package is simply a prerequisite for your own custom modules.

Nonetheless, I will consider adding support for manual support files distribution. Especially since I am not always able to keep up with the latest jQuery development, this would enable developers to deploy their own jQuery version with their modules. I'll try to post an update later this week.


Apr 9, 2010 at 11:02 AM

Hi proeder!

I don't think, I'll be able to fit in the update this week. I just created a new release with the current version 1.4.2 of jQuery and a minor addition to the Tabs control.

I wanted to add your feature, but it got me thinking about the best way to implement it. The problem is, that there are a few things things to consider:

  • Where is the jQuery core js file? (needs the complete path, due to version number)
  • Where is the jQuery UI js file? (same problem)
  • How and when do you configure, which files to use? This must occur before any control tries to register jQuery on the page.

The "ThemePath" has already been implemented though. If you want to use your own custom theme, you can call

JQueryUI.RegisterJQueryUITheme(this.Page, "MyTheme", "~/Path/To/MyTheme/", "1.7.2");

You have to follow a convention though: Your css file must be named jquery-ui-<Version>.<ThemeName>.css, in order for the infrastructure to find it. The path is freely choosable, but must be in the application, since the infrastructre will perform a check, if the file actually exists. Maybe I can add an override, so you can specify a url for using a CDN.

For the core files, this would have to occur in a similar fashion. Do you perhaps have a picture in mind, how you would want to include the core files?


May 14, 2010 at 12:07 PM

Each control would have a property called ScriptPathUI and ScriptPathjQuery or so which you would be using to instantiate the necessary scripts. This could be the full path to the core files, no need to follow a naming convention.