diff --git a/jquery_update.module b/jquery_update.module index 520e076..cb94f0f 100644 --- a/jquery_update.module +++ b/jquery_update.module @@ -70,6 +70,16 @@ function jquery_update_library_alter(&$javascript, $module) { return; } + // Check if we are updating the admin theme. + if ($admin_theme_key = variable_get('admin_theme')) { + if (!variable_get('jquery_update_admin_theme', '0')) { + global $theme_key; + if ($theme_key === $admin_theme_key) { + return; + } + } + } + $path = drupal_get_path('module', 'jquery_update'); // Make sure we inject either the minified or uncompressed version as desired. @@ -128,6 +138,15 @@ function jquery_update_settings_form() { '#default_value' => variable_get('jquery_update_jquery_version', '1.5'), '#description' => t('Select which jQuery version branch to use.'), ); + // Only show this setting if a separate administration theme is in use. + if (variable_get('admin_theme')) { + $form['jquery_update_admin_theme'] = array( + '#type' => 'checkbox', + '#title' => t('Update administration theme pages'), + '#default_value' => variable_get('jquery_update_admin_theme', '0'), + '#description' => t("For all pages using the administration theme, update jQuery to the version selected above."), + ); + } $form['jquery_update_compression_type'] = array( '#type' => 'radios', '#title' => t('jQuery compression level'),