From: XhmikosR Date: Fri, 28 Mar 2014 18:08:42 +0000 (+0200) Subject: Add the jquery check in customizer's output. X-Git-Tag: v3.2.0~237^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7950c0ff0ae216fbcb7f24f3fd93eae34ba6b4a6;p=thirdparty%2Fbootstrap.git Add the jquery check in customizer's output. --- diff --git a/docs/assets/js/_src/customizer.js b/docs/assets/js/_src/customizer.js index 201f6e1788..5494aa5270 100644 --- a/docs/assets/js/_src/customizer.js +++ b/docs/assets/js/_src/customizer.js @@ -295,6 +295,8 @@ window.onload = function () { // wait for load in a dumb way because B-0 function generateJS(preamble) { var $checked = $('#plugin-section input:checked') + var jqueryCheck = 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap\'s JavaScript requires jQuery") }\n\n' + if (!$checked.length) return false var js = $checked @@ -302,6 +304,8 @@ window.onload = function () { // wait for load in a dumb way because B-0 .toArray() .join('\n') + js = jqueryCheck + js + return { 'bootstrap.js': preamble + js, 'bootstrap.min.js': preamble + cw + uglify(js)