diff --git a/README.txt b/README.txt index 710f13bffa7101d6211dddc40c12c891ea4d396c..30ed6ec5c2d7546099963fc0ec518496a23f30c2 100644 --- a/README.txt +++ b/README.txt @@ -3,6 +3,6 @@ Bootstrap theme for Drupal 1. Download the Bootstrap library v2 (http://twitter.github.com/bootstrap/), make sure the resulting folder is named "bootstrap." If you are using the Github master branch, you will need to also find a way to compile the LESS and JS files since this module looks for bootstrap.css and bootstrap.js. 2. Place the bootstrap folder inside the bootstrap theme folder or your subtheme folder: [path_to_themes]/bootstrap/bootstrap/js… 3. Put any plugin files into [path_to_themes]/bootstrap/bootstrap/js/ -4. Make sure you have jQuery 1.7, which is available through the jQuery Update module (http://drupal.org/project/jquery_update/) 7.x-2.x-dev version. You need to make sure the 1.7 version is selected on the configuration page for it to work. +4. Make sure you have jQuery 1.7, which is available through the jQuery Update module (http://drupal.org/project/jquery_update/) 7.x-2.3 version or higher. You need to make sure the 1.7 version is selected on the configuration page for it to work. Author: http://drupal.org/node/259843/committers \ No newline at end of file diff --git a/bootstrap.info b/bootstrap.info index b293396ad0a4f83de1d520398c62bf5724dc61f0..68350bc6548f5d2633e209403647a8515e9e54a1 100644 --- a/bootstrap.info +++ b/bootstrap.info @@ -18,12 +18,10 @@ settings[toggle_name] = 0 settings[toggle_search] = 1 settings[cdn_bootstrap] = 0 settings[cdn_bootstrap_version] = 2.3.0 -settings[cdn_jquery] = 0 ;Exclude ;javascript ;exclude[js][] = 'modules/contextual/contextual.js' -;exclude[js][] = 'misc/jquery.js' ;css ;exclude[css][] = 'misc/vertical-tabs.css' diff --git a/includes/theme.inc b/includes/theme.inc index 054f30f8353b294e25e523c02ea7ac44cb4b9916..36296c57d775487402ccf9cbd5b0c28115e2ed5d 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -306,25 +306,11 @@ function bootstrap_js_alter(&$js) { } $js = array_diff_key($js, $excludes); - if (theme_get_setting('cdn_jquery')) { - // Add jQuery and the switch script to the $files array - $files[] = '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'; - - if (theme_get_setting('cdn_bootstrap')) { - $files[] = '//netdna.bootstrapcdn.com/twitter-bootstrap/'. theme_get_setting('cdn_bootstrap_version') .'/js/bootstrap.min.js'; - } - else { - $files[] = $theme_path . '/bootstrap/js/bootstrap.js'; - } - $files[] = $theme_path . '/js/switch.js'; + if (theme_get_setting('cdn_bootstrap')) { + $files[] = '//netdna.bootstrapcdn.com/twitter-bootstrap/'. theme_get_setting('cdn_bootstrap_version') .'/js/bootstrap.min.js'; } else { - if (theme_get_setting('cdn_bootstrap')) { - $files[] = '//netdna.bootstrapcdn.com/twitter-bootstrap/'. theme_get_setting('cdn_bootstrap_version') .'/js/bootstrap.min.js'; - } - else { - $files[] = $theme_path . '/bootstrap/js/bootstrap.js'; - } + $files[] = $theme_path . '/bootstrap/js/bootstrap.js'; } // Rearrange / Add JS diff --git a/js/switch.js b/js/switch.js deleted file mode 100644 index 53d1cd872293c38d4caaaf220d8aaa6d1eab91fc..0000000000000000000000000000000000000000 --- a/js/switch.js +++ /dev/null @@ -1,7 +0,0 @@ -(function($) { - // put together the name of the new jQuery variable - var version = $().jquery; - var versionName = version.replace(/\./g, ''); - // save the new version of jQuery globally and restore Drupal version - window.jq_bootstrap = jQuery.noConflict(true); -})(jQuery); diff --git a/theme-settings.php b/theme-settings.php index a28ddf62b077ecfb29c0b0c08018bc028a0fd541..ca7e0120e6f467b5158e8ecdc0f31e662da37cb2 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -56,14 +56,5 @@ function bootstrap_form_system_theme_settings_alter(&$form, $form_state, $form_i '#default_value' => theme_get_setting('cdn_bootstrap_version'), ); - $form['cdn']['cdn_jquery'] = array( - '#type' => 'checkbox', - '#title' => t('Use CDN to load in a newer version of jQuery using the no-conflict solution.'), - '#default_value' => theme_get_setting('cdn_jquery'), - '#description' => t('Use cdn to host the latest version of jquery and load the newer version using the ') . l('no-conflict', 'http://api.jquery.com/jQuery.noConflict/') . t(' solution.') - . '
' . - ('WARNING: this technique will load 2 versions of jQuery, which is bad for front-end performance and adds an extra whopping 90kb (not gziped) to your download (aka not mobile friendly). - Also this solution uses CDN and this will make you dependant on a third party who has no obligations towards you concerning uptime and service quality.') . '
', - ); }