? popups_468218_jquery_update.patch Index: popups.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/popups/popups.module,v retrieving revision 1.11.8.13 diff -u -p -r1.11.8.13 popups.module --- popups.module 10 Dec 2010 02:51:17 -0000 1.11.8.13 +++ popups.module 10 Dec 2010 19:54:32 -0000 @@ -132,6 +132,10 @@ function popups_form_alter(&$form, $form * @return $content in a json wrapper with metadata. */ function popups_render_as_json($content) { + // Call theme_page so modules like jquery_update can do their thing. We don't + // really care about the mark up though. + $ignore = theme('page', $content); + $path = $_GET['q']; // Get current path from params. return drupal_json(array( 'title' => drupal_get_title(), @@ -172,6 +176,22 @@ function popups_get_js() { } } + unset($popup_js['core']['misc/jquery.js']); + unset($popup_js['core']['misc/drupal.js']); + + if (module_exists('jquery_update')) { + foreach (jquery_update_get_replacements() as $type => $replacements) { + foreach ($replacements as $find => $replace) { + if (isset($popup_js[$type][$find])) { + // Create a new entry for the replacement file, and unset the original one. + $replace = JQUERY_UPDATE_REPLACE_PATH .'/'. $replace; + //$popup_js[$type][$replace] = str_replace($find, $replace, $popup_js[$type][$find]); + unset($popup_js[$type][$find]); + } + } + } + } + return $popup_js; } @@ -477,4 +497,4 @@ function popups_preprocess_page() { if (isset($settings)) { drupal_add_js($settings, 'setting'); } -} \ No newline at end of file +}