Index: jquery_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jquery_ui/jquery_ui.module,v
retrieving revision 1.6.2.2
diff -u -p -r1.6.2.2 jquery_ui.module
--- jquery_ui.module	21 Jun 2009 03:43:03 -0000	1.6.2.2
+++ jquery_ui.module	5 Sep 2010 17:28:01 -0000
@@ -95,3 +95,48 @@ function jquery_ui_get_version() {
   return $version;
 }
 
+/**
+ * Implementation of hook_menu().
+ */
+function jquery_ui_menu() {
+  $items['admin/settings/jquery_ui'] = array(
+    'title' => 'jQuery UI',
+    'description' => 'Configure settings for jQuery UI module.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('jquery_ui_settings'),
+    'access arguments' => array('administer site configuration'),
+  );
+  return $items;
+}
+
+/**
+ * Admin settings form.
+ */
+function jquery_ui_settings() {
+  $themes = array('none' => 'none');
+  foreach (glob(JQUERY_UI_PATH . '/themes/*') as $theme) {
+    $theme = basename($theme);
+    $theme_str = ucwords(str_replace('-', ' ', $theme));
+    $themes[$theme] = $theme_str;
+  }
+
+  $form['jquery_ui_theme'] = array(
+    '#type' => 'select',
+    '#title' => t('Choose jQuery UI Theme'),
+    '#options' => $themes,
+    '#default_value' => variable_get('jquery_ui_theme', 'none'),
+    '#description' => t('Visit !link to view all themes.', array('!link' => l('http://jqueryui.com/themeroller/#themeGallery', 'http://jqueryui.com/themeroller/#themeGallery'))),
+  );
+
+  return system_settings_form($form);
+}
+
+/**
+ * Implementation of hook_init()
+ */
+function jquery_ui_init() {
+  $jquery_ui_theme = variable_get('jquery_ui_theme', 'none');
+  if ($jquery_ui_theme != 'none') {
+    drupal_add_css(JQUERY_UI_PATH . '/themes/' . $jquery_ui_theme . '/ui.all.css');
+  }
+}
