From ea56c37ca9674f0155448699918650bbfcfbb888 Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Tue, 16 Jun 2015 21:40:15 -0400 Subject: update bootstrap to 3.3.5 --- bower_components/bootstrap/js/.jscsrc | 6 ++ bower_components/bootstrap/js/affix.js | 6 +- bower_components/bootstrap/js/alert.js | 4 +- bower_components/bootstrap/js/button.js | 22 +++++--- bower_components/bootstrap/js/carousel.js | 4 +- bower_components/bootstrap/js/collapse.js | 4 +- bower_components/bootstrap/js/dropdown.js | 88 +++++++++++++++-------------- bower_components/bootstrap/js/modal.js | 12 ++-- bower_components/bootstrap/js/popover.js | 4 +- bower_components/bootstrap/js/scrollspy.js | 4 +- bower_components/bootstrap/js/tab.js | 8 ++- bower_components/bootstrap/js/tooltip.js | 78 ++++++++++++++++++------- bower_components/bootstrap/js/transition.js | 2 +- 13 files changed, 147 insertions(+), 95 deletions(-) (limited to 'bower_components/bootstrap/js') diff --git a/bower_components/bootstrap/js/.jscsrc b/bower_components/bootstrap/js/.jscsrc index 982676e1..9544d2d2 100644 --- a/bower_components/bootstrap/js/.jscsrc +++ b/bower_components/bootstrap/js/.jscsrc @@ -8,6 +8,7 @@ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], "disallowSpaceBeforeBinaryOperators": [","], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, "disallowSpacesInsideArrayBrackets": true, "disallowSpacesInsideParentheses": true, @@ -16,8 +17,11 @@ "requireCamelCaseOrUpperCaseIdentifiers": true, "requireCapitalizedConstructors": true, "requireCommaBeforeLineBreak": true, + "requireDollarBeforejQueryAssignment": true, "requireDotNotation": true, "requireLineFeedAtFileEnd": true, + "requirePaddingNewLinesAfterUseStrict": true, + "requirePaddingNewLinesBeforeExport": true, "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], "requireSpaceAfterLineComment": true, @@ -30,7 +34,9 @@ "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, "requireSpacesInsideObjectBrackets": "allButNested", + "validateAlignedFunctionParameters": true, "validateIndentation": 2, "validateLineBreaks": "LF", + "validateNewlineAfterArrayElements": true, "validateQuoteMarks": "'" } diff --git a/bower_components/bootstrap/js/affix.js b/bower_components/bootstrap/js/affix.js index 98197642..11a3d39a 100644 --- a/bower_components/bootstrap/js/affix.js +++ b/bower_components/bootstrap/js/affix.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: affix.js v3.3.4 + * Bootstrap: affix.js v3.3.5 * http://getbootstrap.com/javascript/#affix * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -28,7 +28,7 @@ this.checkPosition() } - Affix.VERSION = '3.3.4' + Affix.VERSION = '3.3.5' Affix.RESET = 'affix affix-top affix-bottom' @@ -78,7 +78,7 @@ var offset = this.options.offset var offsetTop = offset.top var offsetBottom = offset.bottom - var scrollHeight = $(document.body).height() + var scrollHeight = Math.max($(document).height(), $(document.body).height()) if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) diff --git a/bower_components/bootstrap/js/alert.js b/bower_components/bootstrap/js/alert.js index 1925ef01..a7787cb5 100644 --- a/bower_components/bootstrap/js/alert.js +++ b/bower_components/bootstrap/js/alert.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: alert.js v3.3.4 + * Bootstrap: alert.js v3.3.5 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -18,7 +18,7 @@ $(el).on('click', dismiss, this.close) } - Alert.VERSION = '3.3.4' + Alert.VERSION = '3.3.5' Alert.TRANSITION_DURATION = 150 diff --git a/bower_components/bootstrap/js/button.js b/bower_components/bootstrap/js/button.js index 7c7c021f..15d7dca6 100644 --- a/bower_components/bootstrap/js/button.js +++ b/bower_components/bootstrap/js/button.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: button.js v3.3.4 + * Bootstrap: button.js v3.3.5 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -19,7 +19,7 @@ this.isLoading = false } - Button.VERSION = '3.3.4' + Button.VERSION = '3.3.5' Button.DEFAULTS = { loadingText: 'loading...' @@ -31,7 +31,7 @@ var val = $el.is('input') ? 'val' : 'html' var data = $el.data() - state = state + 'Text' + state += 'Text' if (data.resetText == null) $el.data('resetText', $el[val]()) @@ -56,15 +56,19 @@ if ($parent.length) { var $input = this.$element.find('input') if ($input.prop('type') == 'radio') { - if ($input.prop('checked') && this.$element.hasClass('active')) changed = false - else $parent.find('.active').removeClass('active') + if ($input.prop('checked')) changed = false + $parent.find('.active').removeClass('active') + this.$element.addClass('active') + } else if ($input.prop('type') == 'checkbox') { + if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false + this.$element.toggleClass('active') } - if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + $input.prop('checked', this.$element.hasClass('active')) + if (changed) $input.trigger('change') } else { this.$element.attr('aria-pressed', !this.$element.hasClass('active')) + this.$element.toggleClass('active') } - - if (changed) this.$element.toggleClass('active') } @@ -107,7 +111,7 @@ var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') Plugin.call($btn, 'toggle') - e.preventDefault() + if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() }) .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) diff --git a/bower_components/bootstrap/js/carousel.js b/bower_components/bootstrap/js/carousel.js index a38ef14d..6b2f1c4b 100644 --- a/bower_components/bootstrap/js/carousel.js +++ b/bower_components/bootstrap/js/carousel.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: carousel.js v3.3.4 + * Bootstrap: carousel.js v3.3.5 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -30,7 +30,7 @@ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } - Carousel.VERSION = '3.3.4' + Carousel.VERSION = '3.3.5' Carousel.TRANSITION_DURATION = 600 diff --git a/bower_components/bootstrap/js/collapse.js b/bower_components/bootstrap/js/collapse.js index 954513c5..329e5354 100644 --- a/bower_components/bootstrap/js/collapse.js +++ b/bower_components/bootstrap/js/collapse.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: collapse.js v3.3.4 + * Bootstrap: collapse.js v3.3.5 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -29,7 +29,7 @@ if (this.options.toggle) this.toggle() } - Collapse.VERSION = '3.3.4' + Collapse.VERSION = '3.3.5' Collapse.TRANSITION_DURATION = 350 diff --git a/bower_components/bootstrap/js/dropdown.js b/bower_components/bootstrap/js/dropdown.js index 9874600f..bc4d3734 100644 --- a/bower_components/bootstrap/js/dropdown.js +++ b/bower_components/bootstrap/js/dropdown.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: dropdown.js v3.3.4 + * Bootstrap: dropdown.js v3.3.5 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== * Copyright 2011-2015 Twitter, Inc. @@ -19,7 +19,41 @@ $(element).on('click.bs.dropdown', this.toggle) } - Dropdown.VERSION = '3.3.4' + Dropdown.VERSION = '3.3.5' + + function getParent($this) { + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = selector && $(selector) + + return $parent && $parent.length ? $parent : $this.parent() + } + + function clearMenus(e) { + if (e && e.which === 3) return + $(backdrop).remove() + $(toggle).each(function () { + var $this = $(this) + var $parent = getParent($this) + var relatedTarget = { relatedTarget: this } + + if (!$parent.hasClass('open')) return + + if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + + $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + + if (e.isDefaultPrevented()) return + + $this.attr('aria-expanded', 'false') + $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) + }) + } Dropdown.prototype.toggle = function (e) { var $this = $(this) @@ -34,7 +68,10 @@ if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { // if mobile we use a backdrop because click events don't delegate - $('