Index: jquery_ui.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/jquery_ui/jquery_ui.module,v retrieving revision 1.6.4.5 diff -u -p -r1.6.4.5 jquery_ui.module --- jquery_ui.module 21 Jun 2009 03:42:54 -0000 1.6.4.5 +++ jquery_ui.module 27 Jun 2009 11:16:42 -0000 @@ -35,7 +35,7 @@ else { * on the page, or a string with a single file name. */ function jquery_ui_add($files = array()) { - static $loaded_files, $ui_core, $effects_core; + static $loaded_files, $ui_core, $effects_core, $weight; $jquery_ui_path = JQUERY_UI_PATH . '/ui'; $compression = variable_get('jquery_update_compression_type', 'mini'); @@ -44,6 +44,10 @@ function jquery_ui_add($files = array()) if (!is_array($files)) { $files = array($files); } + + if (!isset($weight)) { + $weight = JS_LIBRARY + 5; + } // If core hasn't been added yet, add it. if (!isset($ui_core)) { @@ -76,7 +80,7 @@ function jquery_ui_add($files = array()) break; } $js_path = $jquery_ui_path . '/' . $file_path; - drupal_add_js($js_path); + drupal_add_js($js_path, array('weight' => $weight++)); $loaded_files[$file] = $js_path; } }