]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add the jquery check in customizer's output.
authorXhmikosR <xhmikosr@users.sourceforge.net>
Fri, 28 Mar 2014 18:08:42 +0000 (20:08 +0200)
committerXhmikosR <xhmikosr@users.sourceforge.net>
Wed, 9 Apr 2014 07:15:02 +0000 (10:15 +0300)
docs/assets/js/_src/customizer.js

index 201f6e178861cdeae0285cf977e55e7c799d05fc..5494aa52708825472834f1a10fa5a1b489975b70 100644 (file)
@@ -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)