mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
Merge branch 'master' into mixin-table-of-contents
* master: Fix bad grunt merge and then G R U N T Reorder the Gruntfile a bit Fixes #12892: Link to one of the SO articles on Bootstrap modals and YouTube Remove unneeded quotes. Rename generateRawFilesJs to generateRawFiles Remove redundant parens Conflicts: docs/assets/js/raw-files.min.js test-infra/npm-shrinkwrap.canonical.json
This commit is contained in:
commit
0b415c6099
62
Gruntfile.js
62
Gruntfile.js
@ -19,7 +19,7 @@ module.exports = function (grunt) {
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
|
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
|
||||||
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
|
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
|
||||||
var generateRawFilesJs = require('./grunt/bs-raw-files-generator.js');
|
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
|
||||||
var updateShrinkwrap = require('./grunt/shrinkwrap.js');
|
var updateShrinkwrap = require('./grunt/shrinkwrap.js');
|
||||||
|
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
@ -66,8 +66,8 @@ module.exports = function (grunt) {
|
|||||||
},
|
},
|
||||||
grunt: {
|
grunt: {
|
||||||
options: {
|
options: {
|
||||||
'requireCamelCaseOrUpperCaseIdentifiers': null,
|
requireCamelCaseOrUpperCaseIdentifiers: null,
|
||||||
'requireParenthesesAroundIIFE': true
|
requireParenthesesAroundIIFE: true
|
||||||
},
|
},
|
||||||
src: '<%= jshint.grunt.src %>'
|
src: '<%= jshint.grunt.src %>'
|
||||||
},
|
},
|
||||||
@ -82,26 +82,6 @@ module.exports = function (grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
csslint: {
|
|
||||||
options: {
|
|
||||||
csslintrc: 'less/.csslintrc'
|
|
||||||
},
|
|
||||||
src: [
|
|
||||||
'dist/css/bootstrap.css',
|
|
||||||
'dist/css/bootstrap-theme.css'
|
|
||||||
],
|
|
||||||
examples: [
|
|
||||||
'docs/examples/**/*.css'
|
|
||||||
],
|
|
||||||
docs: {
|
|
||||||
options: {
|
|
||||||
'ids': false,
|
|
||||||
'overqualified-elements': false
|
|
||||||
},
|
|
||||||
src: 'docs/assets/css/src/docs.css'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
concat: {
|
concat: {
|
||||||
options: {
|
options: {
|
||||||
banner: '<%= banner %>\n<%= jqueryCheck %>',
|
banner: '<%= banner %>\n<%= jqueryCheck %>',
|
||||||
@ -164,6 +144,13 @@ module.exports = function (grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
qunit: {
|
||||||
|
options: {
|
||||||
|
inject: 'js/tests/unit/phantom.js'
|
||||||
|
},
|
||||||
|
files: 'js/tests/index.html'
|
||||||
|
},
|
||||||
|
|
||||||
less: {
|
less: {
|
||||||
compileCore: {
|
compileCore: {
|
||||||
options: {
|
options: {
|
||||||
@ -237,6 +224,26 @@ module.exports = function (grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
csslint: {
|
||||||
|
options: {
|
||||||
|
csslintrc: 'less/.csslintrc'
|
||||||
|
},
|
||||||
|
src: [
|
||||||
|
'dist/css/bootstrap.css',
|
||||||
|
'dist/css/bootstrap-theme.css'
|
||||||
|
],
|
||||||
|
examples: [
|
||||||
|
'docs/examples/**/*.css'
|
||||||
|
],
|
||||||
|
docs: {
|
||||||
|
options: {
|
||||||
|
ids: false,
|
||||||
|
'overqualified-elements': false
|
||||||
|
},
|
||||||
|
src: 'docs/assets/css/src/docs.css'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
cssmin: {
|
cssmin: {
|
||||||
compress: {
|
compress: {
|
||||||
options: {
|
options: {
|
||||||
@ -314,13 +321,6 @@ module.exports = function (grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
qunit: {
|
|
||||||
options: {
|
|
||||||
inject: 'js/tests/unit/phantom.js'
|
|
||||||
},
|
|
||||||
files: 'js/tests/index.html'
|
|
||||||
},
|
|
||||||
|
|
||||||
connect: {
|
connect: {
|
||||||
server: {
|
server: {
|
||||||
options: {
|
options: {
|
||||||
@ -470,7 +470,7 @@ module.exports = function (grunt) {
|
|||||||
grunt.registerTask('build-customizer-html', 'jade');
|
grunt.registerTask('build-customizer-html', 'jade');
|
||||||
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
|
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
|
||||||
var banner = grunt.template.process('<%= banner %>');
|
var banner = grunt.template.process('<%= banner %>');
|
||||||
generateRawFilesJs(banner);
|
generateRawFiles(banner);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Task for updating the npm packages used by the Travis build.
|
// Task for updating the npm packages used by the Travis build.
|
||||||
|
8
dist/js/bootstrap.js
vendored
8
dist/js/bootstrap.js
vendored
@ -25,10 +25,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
|
|||||||
var el = document.createElement('bootstrap')
|
var el = document.createElement('bootstrap')
|
||||||
|
|
||||||
var transEndEventNames = {
|
var transEndEventNames = {
|
||||||
'WebkitTransition' : 'webkitTransitionEnd',
|
WebkitTransition : 'webkitTransitionEnd',
|
||||||
'MozTransition' : 'transitionend',
|
MozTransition : 'transitionend',
|
||||||
'OTransition' : 'oTransitionEnd otransitionend',
|
OTransition : 'oTransitionEnd otransitionend',
|
||||||
'transition' : 'transitionend'
|
transition : 'transitionend'
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var name in transEndEventNames) {
|
for (var name in transEndEventNames) {
|
||||||
|
2
docs/assets/js/customize.min.js
vendored
2
docs/assets/js/customize.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/raw-files.min.js
vendored
2
docs/assets/js/raw-files.min.js
vendored
File diff suppressed because one or more lines are too long
@ -45,11 +45,11 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
|||||||
|
|
||||||
function createGist(configJson) {
|
function createGist(configJson) {
|
||||||
var data = {
|
var data = {
|
||||||
'description': 'Bootstrap Customizer Config',
|
description: 'Bootstrap Customizer Config',
|
||||||
'public': true,
|
'public': true,
|
||||||
'files': {
|
files: {
|
||||||
'config.json': {
|
'config.json': {
|
||||||
'content': configJson
|
content: configJson
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,13 +231,17 @@ $('#myModal').on('show.bs.modal', function (e) {
|
|||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
||||||
<div class="bs-callout bs-callout-warning">
|
<div class="bs-callout bs-callout-warning">
|
||||||
<h4>Make modals accessible</h4>
|
<h4>Make modals accessible</h4>
|
||||||
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
|
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
|
||||||
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
|
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="bs-callout bs-callout-info">
|
||||||
|
<h4>Embedding YouTube videos</h4>
|
||||||
|
<p>Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. <a href="http://stackoverflow.com/questions/18622508/bootstrap-3-and-youtube-in-modal">See this helpful Stack Overflow post</a> for more information.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 id="modals-sizes">Optional sizes</h2>
|
<h2 id="modals-sizes">Optional sizes</h2>
|
||||||
<p>Modals have two optional sizes, available via modifier classes to be placed on a <code>.modal-dialog</code>.</p>
|
<p>Modals have two optional sizes, available via modifier classes to be placed on a <code>.modal-dialog</code>.</p>
|
||||||
<div class="bs-example">
|
<div class="bs-example">
|
||||||
|
@ -17,7 +17,7 @@ var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json';
|
|||||||
function cleanup(shrinkwrap) {
|
function cleanup(shrinkwrap) {
|
||||||
// Remove `resolved` property to avoid irrelevant changes
|
// Remove `resolved` property to avoid irrelevant changes
|
||||||
// See https://github.com/npm/npm/issues/3581
|
// See https://github.com/npm/npm/issues/3581
|
||||||
if ((typeof shrinkwrap) === 'string') {
|
if (typeof shrinkwrap === 'string') {
|
||||||
return shrinkwrap;
|
return shrinkwrap;
|
||||||
}
|
}
|
||||||
delete shrinkwrap.resolved;
|
delete shrinkwrap.resolved;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
||||||
"disallowMixedSpacesAndTabs": true,
|
"disallowMixedSpacesAndTabs": true,
|
||||||
"disallowMultipleLineStrings": true,
|
"disallowMultipleLineStrings": true,
|
||||||
|
"disallowQuotedKeysInObjects": "allButReserved",
|
||||||
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
|
||||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
|
||||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||||
|
@ -391,12 +391,12 @@ $(function () {
|
|||||||
test('tooltips should be placed dynamically, with the dynamic placement option', function () {
|
test('tooltips should be placed dynamically, with the dynamic placement option', function () {
|
||||||
$.support.transition = false
|
$.support.transition = false
|
||||||
var ttContainer = $('<div id="dynamic-tt-test"/>').css({
|
var ttContainer = $('<div id="dynamic-tt-test"/>').css({
|
||||||
'height' : 400,
|
height : 400,
|
||||||
'overflow' : 'hidden',
|
overflow : 'hidden',
|
||||||
'position' : 'absolute',
|
position : 'absolute',
|
||||||
'top' : 0,
|
top : 0,
|
||||||
'left' : 0,
|
left : 0,
|
||||||
'width' : 600
|
width : 600
|
||||||
})
|
})
|
||||||
.appendTo('body')
|
.appendTo('body')
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
var el = document.createElement('bootstrap')
|
var el = document.createElement('bootstrap')
|
||||||
|
|
||||||
var transEndEventNames = {
|
var transEndEventNames = {
|
||||||
'WebkitTransition' : 'webkitTransitionEnd',
|
WebkitTransition : 'webkitTransitionEnd',
|
||||||
'MozTransition' : 'transitionend',
|
MozTransition : 'transitionend',
|
||||||
'OTransition' : 'oTransitionEnd otransitionend',
|
OTransition : 'oTransitionEnd otransitionend',
|
||||||
'transition' : 'transitionend'
|
transition : 'transitionend'
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var name in transEndEventNames) {
|
for (var name in transEndEventNames) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user