0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Revert UMD (#13772 & friends) for now, due to #13812.

Will hopefully revert this reversion and land a fully-working version of UMD in v3.3.0.

Revert "some changes from #13801 - add strict mode back and =="
This reverts commit 2b302f69eea416bc85e7827b7d7a74d49f879662.

Revert "Fix regression of #10038 introduced by #13772"
This reverts commit e9d6756a1ac76a9db31a41e8e03f663bedc41b70.

Revert "MD/CommonJS/Globals #12909"
This reverts commit 1c6fa9010daf0d0c21de9e20fe6ac4dba1788d90.

Revert "address #13811"
This reverts commit f347d7d955bbb17234b8e12c68efae7d516ce62c.

Conflicts:
    js/carousel.js
    js/collapse.js
    js/dropdown.js
    js/modal.js
    js/tab.js
    js/tooltip.js
This commit is contained in:
Chris Rebert 2014-06-23 11:07:18 -07:00
parent bc895a4b43
commit c2c19a4d2d
17 changed files with 1710 additions and 1782 deletions

View File

@ -33,7 +33,7 @@ module.exports = function (grunt) {
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + ' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n', ' */\n',
// NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too. // NOTE: This jqueryCheck code is duplicated in customizer.js; if making changes here, be sure to update the other copy too.
jqueryCheck: 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n', jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n',
// Task configuration. // Task configuration.
clean: { clean: {

View File

@ -4,7 +4,7 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQuery == 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
/* ======================================================================== /* ========================================================================
* Bootstrap: transition.js v3.1.1 * Bootstrap: transition.js v3.1.1

View File

@ -306,7 +306,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
function generateJS(preamble) { function generateJS(preamble) {
var $checked = $('#plugin-section input:checked') var $checked = $('#plugin-section input:checked')
var jqueryCheck = 'if (typeof define == \'undefined\' && typeof exports == \'undefined\' && typeof jQuery == \'undefined\') { throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\') }\n\n' var jqueryCheck = 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap\'s JavaScript requires jQuery") }\n\n'
if (!$checked.length) return false if (!$checked.length) return false

View File

@ -11,9 +11,10 @@
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true, "disallowSpacesInsideArrayBrackets": true,
"disallowTrailingComma": true,
"disallowSpacesInsideParentheses": true, "disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true, "disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true, "requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true, "requireCommaBeforeLineBreak": true,
"requireDotNotation": true, "requireDotNotation": true,

View File

@ -11,6 +11,5 @@
"nonbsp" : true, "nonbsp" : true,
"strict" : true, "strict" : true,
"undef" : true, "undef" : true,
"unused" : true, "unused" : true
"predef" : [ "define", "require" ]
} }

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// AFFIX CLASS DEFINITION // AFFIX CLASS DEFINITION
// ====================== // ======================
@ -143,6 +139,4 @@
}) })
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// ALERT CLASS DEFINITION // ALERT CLASS DEFINITION
// ====================== // ======================
@ -93,6 +89,4 @@
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// BUTTON PUBLIC CLASS DEFINITION // BUTTON PUBLIC CLASS DEFINITION
// ============================== // ==============================
@ -111,6 +107,4 @@
e.preventDefault() e.preventDefault()
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// CAROUSEL CLASS DEFINITION // CAROUSEL CLASS DEFINITION
// ========================= // =========================
@ -223,6 +219,4 @@
}) })
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// COLLAPSE PUBLIC CLASS DEFINITION // COLLAPSE PUBLIC CLASS DEFINITION
// ================================ // ================================
@ -171,6 +167,4 @@
Plugin.call($target, option) Plugin.call($target, option)
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// DROPDOWN CLASS DEFINITION // DROPDOWN CLASS DEFINITION
// ========================= // =========================
@ -152,6 +148,4 @@
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// MODAL CLASS DEFINITION // MODAL CLASS DEFINITION
// ====================== // ======================
@ -281,6 +277,4 @@
Plugin.call($target, option, this) Plugin.call($target, option, this)
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// POPOVER PUBLIC CLASS DEFINITION // POPOVER PUBLIC CLASS DEFINITION
// =============================== // ===============================
@ -114,6 +110,4 @@
return this return this
} }
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// SCROLLSPY CLASS DEFINITION // SCROLLSPY CLASS DEFINITION
// ========================== // ==========================
@ -171,6 +167,4 @@
}) })
}) })
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// TAB CLASS DEFINITION // TAB CLASS DEFINITION
// ==================== // ====================
@ -129,6 +125,4 @@
Plugin.call($(this), 'show') Plugin.call($(this), 'show')
}) })
}) }(jQuery);
}();

View File

@ -8,12 +8,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// TOOLTIP PUBLIC CLASS DEFINITION // TOOLTIP PUBLIC CLASS DEFINITION
// =============================== // ===============================
@ -458,6 +454,4 @@
return this return this
} }
}) }(jQuery);
}();

View File

@ -7,12 +7,8 @@
* ======================================================================== */ * ======================================================================== */
+function () { 'use strict'; +function ($) {
'use strict';
(function (o_o) {
typeof define == 'function' && define.amd ? define(['jquery'], o_o) :
typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery)
})(function ($) {
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================ // ============================================================
@ -60,6 +56,4 @@
} }
}) })
}) }(jQuery);
}();