Commit 1ba4f9a2 authored by markcarver's avatar markcarver Committed by markcarver

Issue #3020589 by markcarver, cilefen: Default to Bootstrap 3.4.0

parent fdc01270
...@@ -15,11 +15,11 @@ This base theme bridges the gap between Drupal and the [Bootstrap Framework]. ...@@ -15,11 +15,11 @@ This base theme bridges the gap between Drupal and the [Bootstrap Framework].
- Extensive integration and template/preprocessor overrides for most of the - Extensive integration and template/preprocessor overrides for most of the
[Bootstrap Framework] CSS, Components and JavaScript [Bootstrap Framework] CSS, Components and JavaScript
- Theme settings to further enhance the Drupal Bootstrap integration: - Theme settings to further enhance the Drupal Bootstrap integration:
- [Breadcrumbs](https://getbootstrap.com/docs/3.3/components/#breadcrumbs) - [Breadcrumbs](https://getbootstrap.com/docs/3.4/components/#breadcrumbs)
- [Navbar](https://getbootstrap.com/docs/3.3/components/#navbar) - [Navbar](https://getbootstrap.com/docs/3.4/components/#navbar)
- [Popovers](https://getbootstrap.com/docs/3.3/javascript/#popovers) - [Popovers](https://getbootstrap.com/docs/3.4/javascript/#popovers)
- [Tooltips](https://getbootstrap.com/docs/3.3/javascript/#tooltips) - [Tooltips](https://getbootstrap.com/docs/3.4/javascript/#tooltips)
- [Wells](https://getbootstrap.com/docs/3.3/components/#wells) (per region) - [Wells](https://getbootstrap.com/docs/3.4/components/#wells) (per region)
### Documentation ### Documentation
Visit the project's [official documentation site](https://drupal-bootstrap.org) Visit the project's [official documentation site](https://drupal-bootstrap.org)
...@@ -41,4 +41,4 @@ or the markdown files inside the `./docs` directory. ...@@ -41,4 +41,4 @@ or the markdown files inside the `./docs` directory.
### 5 Year Evolution (gource) ### 5 Year Evolution (gource)
https://youtu.be/Cvq6MPJp2dI https://youtu.be/Cvq6MPJp2dI
[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/ [Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
...@@ -116,7 +116,7 @@ function _drush_bootstrap_generate_docs_settings(Theme $bootstrap) { ...@@ -116,7 +116,7 @@ function _drush_bootstrap_generate_docs_settings(Theme $bootstrap) {
// Ensure we have link references at the bottom. // Ensure we have link references at the bottom.
$output[] = ''; $output[] = '';
$output[] = '[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap'; $output[] = '[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap';
$output[] = '[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/'; $output[] = '[Bootstrap Framework]: https://getbootstrap.com/docs/3.4/';
// Save the generated output to the appropriate file. // Save the generated output to the appropriate file.
return file_put_contents(realpath($bootstrap->getPath() . '/docs/Theme-Settings.md'), implode("\n", $output)) !== FALSE; return file_put_contents(realpath($bootstrap->getPath() . '/docs/Theme-Settings.md'), implode("\n", $output)) !== FALSE;
......
...@@ -65,4 +65,4 @@ Please keep in mind though, this **IS NOT** a "support" channel. It's primary ...@@ -65,4 +65,4 @@ Please keep in mind though, this **IS NOT** a "support" channel. It's primary
use is to discuss issues and to help fix bugs with the base theme itself. use is to discuss issues and to help fix bugs with the base theme itself.
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap [Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/ [Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
...@@ -12,16 +12,16 @@ Generally speaking, you should really read the entire [Bootstrap Framework] ...@@ -12,16 +12,16 @@ Generally speaking, you should really read the entire [Bootstrap Framework]
documentation site, if you haven't already. Here are the four basic "sections" documentation site, if you haven't already. Here are the four basic "sections"
that site is split into: that site is split into:
- [Getting Started](https://getbootstrap.com/docs/3.3/getting-started) - An overview of - [Getting Started](https://getbootstrap.com/docs/3.4/getting-started) - An overview of
the [Bootstrap Framework], how to download and use, basic templates and the [Bootstrap Framework], how to download and use, basic templates and
examples, and more. examples, and more.
- [CSS](https://getbootstrap.com/docs/3.3/css/) - Global CSS settings, fundamental HTML - [CSS](https://getbootstrap.com/docs/3.4/css/) - Global CSS settings, fundamental HTML
elements styled and enhanced with extensible classes, and an advanced grid elements styled and enhanced with extensible classes, and an advanced grid
system. system.
- [Components](https://getbootstrap.com/docs/3.3/components/) - Over a dozen reusable - [Components](https://getbootstrap.com/docs/3.4/components/) - Over a dozen reusable
components built to provide iconography, dropdowns, input groups, navigation, components built to provide iconography, dropdowns, input groups, navigation,
alerts, and much more. alerts, and much more.
- [JavaScript](https://getbootstrap.com/docs/3.3/javascript/) - Bring the - [JavaScript](https://getbootstrap.com/docs/3.4/javascript/) - Bring the
[Bootstrap Framework] components to life with over a dozen custom jQuery [Bootstrap Framework] components to life with over a dozen custom jQuery
plugins. Easily include them all, or one by one. plugins. Easily include them all, or one by one.
...@@ -75,7 +75,7 @@ you are attempting to integrate the base theme with. ...@@ -75,7 +75,7 @@ you are attempting to integrate the base theme with.
**A: No, not "officially"** **A: No, not "officially"**
The [Bootstrap Framework] itself does not officially support older Internet The [Bootstrap Framework] itself does not officially support older Internet
Explorer [compatibility modes](https://getbootstrap.com/docs/3.3/getting-started/#support-ie-compatibility-modes). Explorer [compatibility modes](https://getbootstrap.com/docs/3.4/getting-started/#support-ie-compatibility-modes).
To ensure you are using the latest rendering mode for IE, consider installing To ensure you are using the latest rendering mode for IE, consider installing
the [HTML5 Tools](https://www.drupal.org/project/html5_tools) module. the [HTML5 Tools](https://www.drupal.org/project/html5_tools) module.
...@@ -123,5 +123,5 @@ Instead, you should create a custom sub-theme that isn't hosted on Drupal.org. ...@@ -123,5 +123,5 @@ Instead, you should create a custom sub-theme that isn't hosted on Drupal.org.
[Respond.js]: https://github.com/scottjehl/Respond [Respond.js]: https://github.com/scottjehl/Respond
[Drush]: http://www.drush.org [Drush]: http://www.drush.org
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap [Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/ [Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
[jQuery Update]: https://www.drupal.org/project/jquery_update [jQuery Update]: https://www.drupal.org/project/jquery_update
...@@ -52,7 +52,7 @@ documentation. For clarity, we will always attempt to use this word verbosely ...@@ -52,7 +52,7 @@ documentation. For clarity, we will always attempt to use this word verbosely
in one of the following ways: in one of the following ways:
- **[Drupal Bootstrap]** refers to the Drupal base theme project. - **[Drupal Bootstrap]** refers to the Drupal base theme project.
- **[Bootstrap Framework](https://getbootstrap.com/docs/3.3/)** refers to the external - **[Bootstrap Framework](https://getbootstrap.com/docs/3.4/)** refers to the external
front end framework. front end framework.
- **[drupal_bootstrap](https://api.drupal.org/apis/drupal_bootstrap)** refers - **[drupal_bootstrap](https://api.drupal.org/apis/drupal_bootstrap)** refers
to Drupal's bootstrapping process or phase. to Drupal's bootstrapping process or phase.
......
...@@ -61,7 +61,7 @@ enabled your starterkit, please refer to the starterkit's documentation page ...@@ -61,7 +61,7 @@ enabled your starterkit, please refer to the starterkit's documentation page
to customize. to customize.
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap [Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/ [Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
[jsDelivr CDN]: http://www.jsdelivr.com [jsDelivr CDN]: http://www.jsdelivr.com
[Less]: http://lesscss.org [Less]: http://lesscss.org
[Sass]: http://sass-lang.com [Sass]: http://sass-lang.com
...@@ -96,7 +96,7 @@ flexibility if the need ever arises. ...@@ -96,7 +96,7 @@ flexibility if the need ever arises.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
cdn_custom_css: cdn_custom_css:
'https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.css' 'https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/css/bootstrap.css'
</code></pre> </code></pre>
</td> </td>
...@@ -112,7 +112,7 @@ used instead if site aggregation is enabled. ...@@ -112,7 +112,7 @@ used instead if site aggregation is enabled.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
cdn_custom_css_min: cdn_custom_css_min:
'https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.min.css' 'https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/css/bootstrap.min.css'
</code></pre> </code></pre>
</td> </td>
...@@ -127,7 +127,8 @@ It is best to use <code>https</code> protocols here as it will allow more ...@@ -127,7 +127,8 @@ It is best to use <code>https</code> protocols here as it will allow more
flexibility if the need ever arises. flexibility if the need ever arises.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
cdn_custom_js: 'https://cdn.jsdelivr.net/bootstrap/3.3.7/js/bootstrap.js' cdn_custom_js:
'https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/js/bootstrap.js'
</code></pre> </code></pre>
</td> </td>
...@@ -143,7 +144,7 @@ used instead if site aggregation is enabled. ...@@ -143,7 +144,7 @@ used instead if site aggregation is enabled.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
cdn_custom_js_min: cdn_custom_js_min:
'https://cdn.jsdelivr.net/bootstrap/3.3.7/js/bootstrap.min.js' 'https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/js/bootstrap.min.js'
</code></pre> </code></pre>
</td> </td>
...@@ -157,7 +158,7 @@ cdn_jsdelivr_version ...@@ -157,7 +158,7 @@ cdn_jsdelivr_version
Choose the Bootstrap version from jsdelivr Choose the Bootstrap version from jsdelivr
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
cdn_jsdelivr_version: 3.3.7 cdn_jsdelivr_version: 3.4.0
</code></pre> </code></pre>
</td> </td>
...@@ -673,10 +674,9 @@ modal_jquery_ui_bridge ...@@ -673,10 +674,9 @@ modal_jquery_ui_bridge
<td> <td>
<div class="help-block"> <div class="help-block">
Enabling this replaces the core/jquery.ui.dialog dependency in the Enabling this replaces the core/jquery.ui.dialog dependency in the
core/drupal.dialog library with a bridge. This bridge adds support to core/drupal.dialog library with a jQuery UI Dialog widget bridge. This
Bootstrap Modals so that it may interpret jQuery UI Dialog functionality. bridge adds support to Bootstrap Modals so that it may interpret jQuery UI
It is highly recommended that this remain enabled unless you know what Dialog functionality.
you're really doing.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
modal_jquery_ui_bridge: 1 modal_jquery_ui_bridge: 1
...@@ -720,7 +720,8 @@ modal_focus_input ...@@ -720,7 +720,8 @@ modal_focus_input
<td> <td>
<div class="help-block"> <div class="help-block">
Enabling this focuses on the first available and visible input found in the Enabling this focuses on the first available and visible input found in the
modal after it's opened. modal after it's opened. If no element is found, the close button (if
visible) is focused instead.
</div> </div>
<pre class=" language-yaml"><code> <pre class=" language-yaml"><code>
modal_focus_input: 1 modal_focus_input: 1
...@@ -1130,4 +1131,4 @@ tooltip_trigger: hover ...@@ -1130,4 +1131,4 @@ tooltip_trigger: hover
</table> </table>
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap [Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
[Bootstrap Framework]: https://getbootstrap.com/docs/3.3/ [Bootstrap Framework]: https://getbootstrap.com/docs/3.4/
\ No newline at end of file
...@@ -113,7 +113,16 @@ module.exports = function (grunt) { ...@@ -113,7 +113,16 @@ module.exports = function (grunt) {
// Then, import the variable overrides. // Then, import the variable overrides.
'@import "' + path.join('starterkits', 'less', 'less', 'variable-overrides.less') + '"', '@import "' + path.join('starterkits', 'less', 'less', 'variable-overrides.less') + '"',
// Finally, import the base-theme overrides. // Finally, import the base-theme overrides.
'@import "' + path.join('starterkits', 'less', 'less', 'overrides.less') + '"' '@import "' + path.join('starterkits', 'less', 'less', 'overrides.less') + '"',
// Add some default variables that may not be available.
'@form-group-margin-bottom: 15px',
'@screen-sm-min: @screen-sm',
'@screen-md-min: @screen-md',
'@screen-lg-min: @screen-lg',
'@container-sm: @container-tablet',
'@container-md: @container-desktop',
'@container-large-desktop: (1140px + @grid-gutter-width)',
'@container-lg: @container-large-desktop'
]; ];
grunt.log.debug("\noptions: " + JSON.stringify(options, null, 2)); grunt.log.debug("\noptions: " + JSON.stringify(options, null, 2));
grunt.log.debug(imports.join("\n")); grunt.log.debug(imports.join("\n"));
......
...@@ -7,6 +7,12 @@ module.exports = function (grunt) { ...@@ -7,6 +7,12 @@ module.exports = function (grunt) {
var force = grunt.option('force'); var force = grunt.option('force');
var path = require('path'); var path = require('path');
var pkg = require('../package'); var pkg = require('../package');
var mapSeries = require('promise-map-series');
var simpleJsonRequest = require('simple-json-request');
var semver = require('semver');
var getJson = function (uri) {
return simpleJsonRequest.get({url: uri});
};
// Internal variables. // Internal variables.
var libraries = {}; var libraries = {};
...@@ -27,81 +33,117 @@ module.exports = function (grunt) { ...@@ -27,81 +33,117 @@ module.exports = function (grunt) {
grunt.verbose.writeln((expired ? 'EXPIRED' : 'VALID')[expired ? 'red' : 'green']); grunt.verbose.writeln((expired ? 'EXPIRED' : 'VALID')[expired ? 'red' : 'green']);
} }
var getApiV1Json = function ($package) {
var $json = {name: $package, assets: []};
var $latest = '0.0.0';
var $versions = [];
return getJson('https://data.jsdelivr.com/v1/package/npm/' + $package)
.catch(function (error) {
if (!(error instanceof Error)) {
error = new Error(error);
}
grunt.verbose.error(error);
})
.then(function ($packageJson) {
if (!$packageJson) {
$packageJson = {versions: []};
}
if ($packageJson.versions === void 0) {
$packageJson.versions = [];
}
return mapSeries($packageJson.versions, function ($version, $key) {
// Skip irrelevant versions.
if (!$version.match(/^3\.\d+\.\d+$/)) {
return Promise.resolve();
}
return getJson('https://data.jsdelivr.com/v1/package/npm/' + $package + '@' + $version + '/flat')
.then(function ($versionJson) {
// Skip empty files.
if (!$versionJson.files || !$versionJson.files.length) {
return;
}
$versions.push($version);
if (semver.compare($latest, $version) === -1) {
$latest = $version;
}
var $asset = {files: [], version: $version};
$versionJson.files.forEach(function ($file) {
// Skip old bootswatch file structure.
if ($package === 'bootswatch' && $file.name.match(/^\/2|\/bower_components/)) {
return;
}
var $matches = $file.name.match(/([^/]*)\/bootstrap(-theme)?(\.min)?\.(js|css)$/, $file['name']);
if ($matches && $matches[1] !== void 0 && $matches[4] !== void 0 && $matches[1] !== 'custom') {
$asset.files.push($file.name);
}
});
$json.assets.push($asset);
$json.lastversion = $latest;
$json.versions = $versions;
})
});
})
.then(function () {
return $json;
});
};
// Register a private sub-task. Doing this inside the main task prevents // Register a private sub-task. Doing this inside the main task prevents
// this private sub-task from being executed directly and also prevents it // this private sub-task from being executed directly and also prevents it
// from showing up on the list of available tasks on --help. // from showing up on the list of available tasks on --help.
grunt.registerTask('sync:api', function () { grunt.registerTask('sync:api', function () {
var done = this.async(); var done = this.async();
var request = require('request'); mapSeries(['bootstrap', 'bootswatch'], function ($package) {
grunt.verbose.write(pkg.urls.jsdelivr + ' '); return getApiV1Json($package);
request(pkg.urls.jsdelivr, function (error, response, body) { }).then(function (json) {
if (!error && response.statusCode == 200) { grunt.verbose.write("\nExtracting versions and themes from libraries...");
grunt.verbose.ok(); libraries = {};
var json; json.forEach(function (library) {
grunt.verbose.write("\nParsing JSON response..."); if (library.name === 'bootstrap' || library.name === 'bootswatch') {
try { library.assets.forEach(function (asset) {
json = JSON.parse(body); if (asset.version.match(/^3.\d\.\d$/)) {
grunt.verbose.ok(); if (!libraries[library.name]) libraries[library.name] = {};
} catch (e) { if (!libraries[library.name][asset.version]) libraries[library.name][asset.version] = {};
grunt.verbose.error(); asset.files.forEach(function (file) {
throw grunt.util.error('Unable to parse the response value (' + e.message + ').', e); if (!file.match(/bootstrap\.min\.css$/)) return;
} if (library.name === 'bootstrap') {
grunt.verbose.write("\nExtracting versions and themes from libraries..."); libraries[library.name][asset.version]['bootstrap'] = true;
libraries = {}; }
json.forEach(function (library) { else {
if (library.name === 'bootstrap' || library.name === 'bootswatch') { libraries[library.name][asset.version][file.split(path.sep).filter(Boolean)[0]] = true;
library.assets.forEach(function (asset) { }
if (asset.version.match(/^3.\d\.\d$/)) { });
if (!libraries[library.name]) libraries[library.name] = {};
if (!libraries[library.name][asset.version]) libraries[library.name][asset.version] = {};
asset.files.forEach(function (file) {
if (!file.match(/bootstrap\.min\.css$/)) return;
if (library.name === 'bootstrap') {
libraries[library.name][asset.version]['bootstrap'] = true;
}
else {
libraries[library.name][asset.version][file.split(path.sep)[0]] = true;
}
});
}
});
}
});
grunt.verbose.ok();
// Flatten themes.
for (var library in libraries) {
grunt.verbose.header(library);
if (!libraries.hasOwnProperty(library)) continue;
var versions = Object.keys(libraries[library]);
grunt.verbose.ok('Versions: ' + versions.join(', '));
var themeCount = 0;
for (var version in libraries[library]) {
if (!libraries[library].hasOwnProperty(version)) continue;
var themes = Object.keys(libraries[library][version]).sort();
libraries[library][version] = themes;
if (themes.length > themeCount) {
themeCount = themes.length;
} }
});
}
});
grunt.verbose.ok();
// Flatten themes.
for (var library in libraries) {
grunt.verbose.header(library);
if (!libraries.hasOwnProperty(library)) continue;
var versions = Object.keys(libraries[library]);
grunt.verbose.ok('Versions: ' + versions.join(', '));
var themeCount = 0;
for (var version in libraries[library]) {
if (!libraries[library].hasOwnProperty(version)) continue;
var themes = Object.keys(libraries[library][version]).sort();
libraries[library][version] = themes;
if (themes.length > themeCount) {
themeCount = themes.length;
} }
grunt.verbose.ok(grunt.util.pluralize(themeCount, 'Themes: 1/Themes: ' + themeCount));
} }
grunt.verbose.writeln(); grunt.verbose.ok(grunt.util.pluralize(themeCount, 'Themes: 1/Themes: ' + themeCount));
grunt.file.write(librariesCache, JSON.stringify(libraries, null, 2));
grunt.log.ok('Synced');
} }
else { grunt.verbose.writeln();
grunt.verbose.error(); grunt.file.write(librariesCache, JSON.stringify(libraries, null, 2));
if (error) grunt.verbose.error(error);
grunt.verbose.error('Request URL: ' + pkg.urls.jsdelivr); grunt.log.ok('Synced');
grunt.verbose.error('Status Code: ' + response.statusCode);
grunt.verbose.error('Response Headers: ' + JSON.stringify(response.headers, null, 2)); done();
grunt.verbose.error('Response:');
grunt.verbose.error(body);
grunt.fail.fatal('Unable to establish a connection. Run with --verbose to view the response received.');
}
return done(error);
}); });
}); });
......
...@@ -13,7 +13,7 @@ use Drupal\bootstrap\Bootstrap; ...@@ -13,7 +13,7 @@ use Drupal\bootstrap\Bootstrap;
function bootstrap_icon_providers() { function bootstrap_icon_providers() {
$providers['bootstrap'] = [ $providers['bootstrap'] = [
'title' => t('Bootstrap'), 'title' => t('Bootstrap'),
'url' => 'https://getbootstrap.com/docs/3.3/components/#glyphicons', 'url' => 'https://getbootstrap.com/docs/3.4/components/#glyphicons',
]; ];
return $providers; return $providers;
} }
......
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
// Unfortunately getbootstrap.com does not have HTTPS enabled, so the // Unfortunately getbootstrap.com does not have HTTPS enabled, so the
// preview image cannot be protocol relative. // preview image cannot be protocol relative.
// @todo Make protocol relative if/when Bootstrap enables HTTPS. // @todo Make protocol relative if/when Bootstrap enables HTTPS.
$preview.append('<a id="bootstrap-theme-preview-bootstrap_theme" class="bootswatch-preview element-invisible" href="https://getbootstrap.com/docs/3.3/examples/theme/" target="_blank"><img class="img-responsive" src="//getbootstrap.com/docs/3.3/examples/screenshots/theme.jpg" alt="' + Drupal.t('Preview of the Bootstrap theme') + '" /></a>'); $preview.append('<a id="bootstrap-theme-preview-bootstrap_theme" class="bootswatch-preview element-invisible" href="https://getbootstrap.com/docs/3.4/examples/theme/" target="_blank"><img class="img-responsive" src="//getbootstrap.com/docs/3.4/examples/screenshots/theme.jpg" alt="' + Drupal.t('Preview of the Bootstrap theme') + '" /></a>');
// Retrieve the Bootswatch theme preview images. // Retrieve the Bootswatch theme preview images.
// @todo This should be moved into PHP. // @todo This should be moved into PHP.
......
...@@ -15,8 +15,10 @@ ...@@ -15,8 +15,10 @@
"less-plugin-autoprefix": "^1.4.2", "less-plugin-autoprefix": "^1.4.2",
"less-plugin-clean-css": "^1.5.1", "less-plugin-clean-css": "^1.5.1",
"load-grunt-config": "^0.19.2", "load-grunt-config": "^0.19.2",
"promise-map-series": "^0.2.3",
"queue": "^4.4.1", "queue": "^4.4.1",
"request": "^2.83.0", "semver": "^5.6.0",
"simple-json-request": "^0.5.2",
"sync-exec": "^0.6.1", "sync-exec": "^0.6.1",
"time-grunt": "^1.4.0" "time-grunt": "^1.4.0"
}, },
...@@ -31,9 +33,6 @@ ...@@ -31,9 +33,6 @@
"js": "js", "js": "js",
"libraries": "lib" "libraries": "lib"
}, },
"urls": {
"jsdelivr": "https://api.jsdelivr.com/v1/bootstrap/libraries"
},
"githooks": { "githooks": {
"post-checkout": [ "post-checkout": [
{ {
......
...@@ -61,14 +61,14 @@ class Bootstrap { ...@@ -61,14 +61,14 @@ class Bootstrap {
* *
* @var string * @var string
*/ */
const FRAMEWORK_VERSION = '3.3.7'; const FRAMEWORK_VERSION = '3.4.0';
/** /**
* The Bootstrap Framework documentation site. * The Bootstrap Framework documentation site.
* *
* @var string * @var string
*/ */
const FRAMEWORK_HOMEPAGE = 'https://getbootstrap.com/docs/3.3/'; const FRAMEWORK_HOMEPAGE = 'https://getbootstrap.com/docs/3.4/';
/** /**
* The Bootstrap Framework repository. * The Bootstrap Framework repository.
...@@ -1009,6 +1009,7 @@ class Bootstrap { ...@@ -1009,6 +1009,7 @@ class Bootstrap {
$versions['3.3.5'] = $versions['3.3.4']; $versions['3.3.5'] = $versions['3.3.4'];
$versions['3.3.6'] = $versions['3.3.5']; $versions['3.3.6'] = $versions['3.3.5'];
$versions['3.3.7'] = $versions['3.3.6']; $versions['3.3.7'] = $versions['3.3.6'];
$versions['3.4.0'] = $versions['3.3.7'];
} }
// Return a specific versions icon set. // Return a specific versions icon set.
......
...@@ -25,7 +25,7 @@ class FormElement extends PreprocessBase implements PreprocessInterface { ...@@ -25,7 +25,7 @@ class FormElement extends PreprocessBase implements PreprocessInterface {
$variables['is_autocomplete'] = TRUE; $variables['is_autocomplete'] = TRUE;
} }
// See https://getbootstrap.com/docs/3.3/css/#forms-controls. // See https://getbootstrap.com/docs/3.4/css/#forms-controls.
$checkbox = $variables['is_checkbox'] = $element->isType('checkbox'); $checkbox = $variables['is_checkbox'] = $element->isType('checkbox');
$radio = $variables['is_radio'] = $element->isType('radio'); $radio = $variables['is_radio'] = $element->isType('radio');
......
...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* type = "textfield", * type = "textfield",
* weight = 1, * weight = 1,
* title = @Translation("Bootstrap CSS URL"), * title = @Translation("Bootstrap CSS URL"),
* defaultValue = "https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.css", * defaultValue = "https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/css/bootstrap.css",
* description = @Translation("It is best to use <code>https</code> protocols here as it will allow more flexibility if the need ever arises."), * description = @Translation("It is best to use <code>https</code> protocols here as it will allow more flexibility if the need ever arises."),
* groups = { * groups = {
* "advanced" = @Translation("Advanced"), * "advanced" = @Translation("Advanced"),
......
...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* type = "textfield", * type = "textfield",
* weight = 2, * weight = 2,
* title = @Translation("Minified Bootstrap CSS URL"), * title = @Translation("Minified Bootstrap CSS URL"),
* defaultValue = "https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.min.css", * defaultValue = "https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/css/bootstrap.min.css",
* description = @Translation("Additionally, you can provide the minimized version of the file. It will be used instead if site aggregation is enabled."), * description = @Translation("Additionally, you can provide the minimized version of the file. It will be used instead if site aggregation is enabled."),
* groups = { * groups = {
* "advanced" = @Translation("Advanced"), * "advanced" = @Translation("Advanced"),
......
...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* type = "textfield", * type = "textfield",
* weight = 3, * weight = 3,
* title = @Translation("Bootstrap JavaScript URL"), * title = @Translation("Bootstrap JavaScript URL"),
* defaultValue = "https://cdn.jsdelivr.net/bootstrap/3.3.7/js/bootstrap.js", * defaultValue = "https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/js/bootstrap.js",
* description = @Translation("It is best to use <code>https</code> protocols here as it will allow more flexibility if the need ever arises."), * description = @Translation("It is best to use <code>https</code> protocols here as it will allow more flexibility if the need ever arises."),
* groups = { * groups = {
* "advanced" = @Translation("Advanced"), * "advanced" = @Translation("Advanced"),
......
...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -15,7 +15,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* type = "textfield", * type = "textfield",
* weight = 4, * weight = 4,
* title = @Translation("Minified Bootstrap JavaScript URL"), * title = @Translation("Minified Bootstrap JavaScript URL"),
* defaultValue = "https://cdn.jsdelivr.net/bootstrap/3.3.7/js/bootstrap.min.js", * defaultValue = "https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/js/bootstrap.min.js",
* description = @Translation("Additionally, you can provide the minimized version of the file. It will be used instead if site aggregation is enabled."), * description = @Translation("Additionally, you can provide the minimized version of the file. It will be used instead if site aggregation is enabled."),
* groups = { * groups = {
* "advanced" = @Translation("Advanced"), * "advanced" = @Translation("Advanced"),
......
...@@ -39,7 +39,7 @@ class CdnJsdelivrTheme extends CdnProvider { ...@@ -39,7 +39,7 @@ class CdnJsdelivrTheme extends CdnProvider {
$setting->setProperty('suffix', '<div id="bootstrap-theme-preview"></div>'); $setting->setProperty('suffix', '<div id="bootstrap-theme-preview"></div>');
$setting->setProperty('description', t('Choose the example <a href=":bootstrap_theme" target="_blank">Bootstrap Theme</a> provided by Bootstrap or one of the many, many <a href=":bootswatch" target="_blank">Bootswatch</a> themes!', [ $setting->setProperty('description', t('Choose the example <a href=":bootstrap_theme" target="_blank">Bootstrap Theme</a> provided by Bootstrap or one of the many, many <a href=":bootswatch" target="_blank">Bootswatch</a> themes!', [
':bootswatch' => 'https://bootswatch.com', ':bootswatch' => 'https://bootswatch.com',
':bootstrap_theme' => 'https://getbootstrap.com/docs/3.3/examples/theme/', ':bootstrap_theme' => 'https://getbootstrap.com/docs/3.4/examples/theme/',
])); ]));
$options = []; $options = [];
......
...@@ -31,7 +31,7 @@ use Drupal\Core\Form\FormStateInterface; ...@@ -31,7 +31,7 @@ use Drupal\Core\Form\FormStateInterface;
* "region_wells" = @Translation("Region Wells"), * "region_wells" = @Translation("Region Wells"),
* }, * },
* see = { * see = {
* "https://getbootstrap.com/docs/3.3/components/#wells" = @Translation("Bootstrap Wells"), * "https://getbootstrap.com/docs/3.4/components/#wells" = @Translation("Bootstrap Wells"),
* }, * },
* ) * )
*/ */
......
...@@ -20,7 +20,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -20,7 +20,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* "button" = @Translation("Buttons"), * "button" = @Translation("Buttons"),
* }, * },
* see = { * see = {
* "https://getbootstrap.com/docs/3.3/css/#buttons" = @Translation("Buttons"), * "https://getbootstrap.com/docs/3.4/css/#buttons" = @Translation("Buttons"),
* "https://drupal-bootstrap.org/apis/hook_bootstrap_colorize_text_alter" = @Translation("hook_bootstrap_colorize_text_alter()"), * "https://drupal-bootstrap.org/apis/hook_bootstrap_colorize_text_alter" = @Translation("hook_bootstrap_colorize_text_alter()"),
* }, * },
* ) * )
......
...@@ -20,7 +20,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -20,7 +20,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* "container" = @Translation("Container"), * "container" = @Translation("Container"),
* }, * },
* see = { * see = {
* "https://getbootstrap.com/docs/3.3/css/#grid-example-fluid" = @Translation("Fluid container"), * "https://getbootstrap.com/docs/3.4/css/#grid-example-fluid" = @Translation("Fluid container"),
* }, * },
* ) * )
*/ */
......
...@@ -26,7 +26,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase; ...@@ -26,7 +26,7 @@ use Drupal\bootstrap\Plugin\Setting\SettingBase;
* "img-thumbnail" = @Translation("Thumbnail"), * "img-thumbnail" = @Translation("Thumbnail"),
* }, * },
* see = { * see = {
* "https://getbootstrap.com/docs/3.3/css/#images-shapes" = @Translation("Image Shapes"), * "https://getbootstrap.com/docs/3.4/css/#images-shapes" = @Translation("Image Shapes"),
* }, * },
* ) * )
*/ */
......
...@@ -32,7 +32,7 @@ class ModalEnabled extends SettingBase { ...@@ -32,7 +32,7 @@ class ModalEnabled extends SettingBase {
parent::alterFormElement($form, $form_state, $form_id); parent::alterFormElement($form, $form_state, $form_id);
$group = $this->getGroupElement($form, $form_state);