diff --git a/js/.jscsrc b/js/.jscsrc index fb6cd10c23ef599b0382891053bf81a062f47f10..e6eb84560053bed9e5ebba5866f989e3b2fbf019 100644 --- a/js/.jscsrc +++ b/js/.jscsrc @@ -11,10 +11,9 @@ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInsideArrayBrackets": true, - "disallowSpacesInsideParentheses": true, "disallowTrailingComma": true, + "disallowSpacesInsideParentheses": true, "disallowTrailingWhitespace": true, - "requireCamelCaseOrUpperCaseIdentifiers": true, "requireCapitalizedConstructors": true, "requireCommaBeforeLineBreak": true, "requireDotNotation": true, diff --git a/js/.jshintrc b/js/.jshintrc index a59e1d00a1136c3e14693ea08af584c601aa5bc0..0cf661ddc2cae956f149c33319bd9b65cc7f7eb6 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -9,7 +9,7 @@ "latedef" : true, "laxbreak" : true, "nonbsp" : true, - "strict" : true, "undef" : true, - "unused" : true + "unused" : true, + "predef" : [ "define", "require" ] } diff --git a/js/affix.js b/js/affix.js index 5af32fee640ff3159fd47d23172e26e8c2bab747..d5f591fb5ed432ced37c5dd49ae093c105465442 100644 --- a/js/affix.js +++ b/js/affix.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // AFFIX CLASS DEFINITION @@ -139,4 +143,4 @@ }) }) -}(jQuery); +}); diff --git a/js/alert.js b/js/alert.js index 905aacc150f73fdb06c2c1aecba3bea5a7eeb2d1..f7fc6fb8e29f2107044f1d7c2955723b1e250eee 100644 --- a/js/alert.js +++ b/js/alert.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // ALERT CLASS DEFINITION @@ -89,4 +93,4 @@ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) -}(jQuery); +}); diff --git a/js/button.js b/js/button.js index aa714507228906a7628fa3b0fbe55e7ec1af0623..cab7d8c3da97916471d14869fba3206c6a1aa6f8 100644 --- a/js/button.js +++ b/js/button.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // BUTTON PUBLIC CLASS DEFINITION @@ -107,4 +111,4 @@ e.preventDefault() }) -}(jQuery); +}); diff --git a/js/carousel.js b/js/carousel.js index f0117980d96037ba533ff250945b39c636804516..af51cf50d54133b7f8610f9b36ec15dcc25edb0b 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // CAROUSEL CLASS DEFINITION @@ -209,4 +213,4 @@ }) }) -}(jQuery); +}); diff --git a/js/collapse.js b/js/collapse.js index 87098dbd2350b9911de11b8c957fc0707bac888b..d5d74d07b98058649dd70483ba78d41ee38018a1 100644 --- a/js/collapse.js +++ b/js/collapse.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // COLLAPSE PUBLIC CLASS DEFINITION @@ -178,4 +182,4 @@ Plugin.call($target, option) }) -}(jQuery); +}); diff --git a/js/dropdown.js b/js/dropdown.js index bc671fef010a8ad9fd5746c080473dfdc6e22c99..39d2951eb6bfaef66d1d152bff8ac5d94ffa7410 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // DROPDOWN CLASS DEFINITION @@ -148,4 +152,4 @@ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown) -}(jQuery); +}); diff --git a/js/modal.js b/js/modal.js index f23ba825f271eb1455c67d14732d98e07d089b14..2c363ec331edb818edf08772a4edcf5904343b31 100644 --- a/js/modal.js +++ b/js/modal.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // MODAL CLASS DEFINITION @@ -277,4 +281,4 @@ Plugin.call($target, option, this) }) -}(jQuery); +}); diff --git a/js/popover.js b/js/popover.js index c8ec3bef4087ce9877425434ace55a9034377dfa..8d2840c2e8ecfb113bb846d20562ed09101a2e3a 100644 --- a/js/popover.js +++ b/js/popover.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // POPOVER PUBLIC CLASS DEFINITION @@ -110,4 +114,4 @@ return this } -}(jQuery); +}); diff --git a/js/scrollspy.js b/js/scrollspy.js index d527e9c2d92f1d5ffe830a2aa64fc1618ee3ad48..78858680e355a36de9877b4124f036d9dc903eda 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // SCROLLSPY CLASS DEFINITION @@ -157,4 +161,4 @@ }) }) -}(jQuery); +}); diff --git a/js/tab.js b/js/tab.js index 51f5cbb6870ec6ae24ad32a067de31d609c61b64..57ae6bc9f230de69b47d696098ca7068f6919c79 100644 --- a/js/tab.js +++ b/js/tab.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // TAB CLASS DEFINITION @@ -125,4 +129,4 @@ Plugin.call($(this), 'show') }) -}(jQuery); +}); diff --git a/js/tooltip.js b/js/tooltip.js index b4ced6d2af9fa0c74ec0dfb9c96ad103eb63cba5..692651457f9a17550a283228e00251a1236ed769 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -8,7 +8,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // TOOLTIP PUBLIC CLASS DEFINITION @@ -454,4 +458,4 @@ return this } -}(jQuery); +}); diff --git a/js/transition.js b/js/transition.js index e8c8f992fff4e795c913f9d72551da9298d96a0f..8fcf8ff4bd284d54c7cddc367529fe061759e1f0 100644 --- a/js/transition.js +++ b/js/transition.js @@ -7,7 +7,11 @@ * ======================================================================== */ -+function ($) { +(function (o_o) { + typeof define === 'function' && define.amd ? define(['jquery'], o_o) : + typeof exports === 'object' ? o_o(require('jquery')) : o_o(this.jQuery) +})(function ($) { + 'use strict'; // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) @@ -46,4 +50,4 @@ $.support.transition = transitionEnd() }) -}(jQuery); +});