Index: jquery_ui.module =================================================================== --- jquery_ui.module (revision 119) +++ jquery_ui.module (working copy) @@ -38,6 +38,7 @@ static $loaded_files, $ui_core, $effects_core; $jquery_ui_path = JQUERY_UI_PATH . '/ui'; $compression = variable_get('jquery_update_compression_type', 'mini'); + $version_18 = version_compare(jquery_ui_get_version(), '1.8a', '>='); // Convert file to an array if it's not one already, to compensate for // lazy developers. ;) @@ -48,15 +49,32 @@ // If core hasn't been added yet, add it. if (!isset($ui_core)) { $ui_core = TRUE; - jquery_ui_add(array('ui.core')); + if ($version_18) { + jquery_ui_add(array('jquery.ui.core')); + } + else { + jquery_ui_add(array('ui.core')); + } } // Loop through list of files to include and add them to the page. foreach ($files as $file) { + // Fix old filename if new version. + if ($version_18) { + if (strpos($file, 'effects.') === 0 || strpos($file, 'ui.') === 0) { + $file = 'jquery.'. $file; + } + } + // Any effects files require the effects core file. - if (!isset($effects_core) && strpos($file, 'effects.') === 0) { + if (!isset($effects_core) && (strpos($file, 'effects.') === 0 || strpos($file, 'jquery.effects.') === 0)) { $effects_core = TRUE; - jquery_ui_add(array('effects.core')); + if ($version_18) { + jquery_ui_add(array('jquery.effects.core')); + } + else { + jquery_ui_add(array('effects.core')); + } } // Load other files. Index: README.txt =================================================================== --- README.txt (revision 120) +++ README.txt (working copy) @@ -40,7 +40,7 @@ * Enable the module at Administer >> Site building >> Modules. --- JQUERY UI 1.7 -- +-- JQUERY UI 1.7 (and greater) -- The jQuery UI module uses jQuery UI 1.6 because jQuery UI 1.7 requires at least jQuery 1.3, which is not shipped with Drupal 6. If you absolutely need to move