diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-09 22:04:17 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-09 22:04:17 +0100 |
commit | 14d1912115c40c3c905b9a077732c526e0a15ffd (patch) | |
tree | 47ff4eda706b93d3e0ca185bffbc0dfa81daa040 /library/bootstrap/js/bootstrap.js | |
parent | c42cbda9047256998a144b3836413c682bd0f949 (diff) | |
download | volse-hubzilla-14d1912115c40c3c905b9a077732c526e0a15ffd.tar.gz volse-hubzilla-14d1912115c40c3c905b9a077732c526e0a15ffd.tar.bz2 volse-hubzilla-14d1912115c40c3c905b9a077732c526e0a15ffd.zip |
upgrade bs to latest git and some more progress
Diffstat (limited to 'library/bootstrap/js/bootstrap.js')
-rw-r--r-- | library/bootstrap/js/bootstrap.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/library/bootstrap/js/bootstrap.js b/library/bootstrap/js/bootstrap.js index 256877332..ee87b9f88 100644 --- a/library/bootstrap/js/bootstrap.js +++ b/library/bootstrap/js/bootstrap.js @@ -645,7 +645,7 @@ var Carousel = function ($) { if (this._isSliding) { throw new Error('Carousel is sliding'); } - this._slide(Direction.PREVIOUS); + this._slide(Direction.PREV); }; Carousel.prototype.pause = function pause(event) { @@ -701,7 +701,7 @@ var Carousel = function ($) { return; } - var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; + var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; this._slide(direction, this._items[index]); }; @@ -772,7 +772,7 @@ var Carousel = function ($) { Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) { var isNextDirection = direction === Direction.NEXT; - var isPrevDirection = direction === Direction.PREVIOUS; + var isPrevDirection = direction === Direction.PREV; var activeIndex = this._getItemIndex(activeElement); var lastItemIndex = this._items.length - 1; var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; @@ -781,7 +781,7 @@ var Carousel = function ($) { return activeElement; } - var delta = direction === Direction.PREVIOUS ? -1 : 1; + var delta = direction === Direction.PREV ? -1 : 1; var itemIndex = (activeIndex + delta) % this._items.length; return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; @@ -1374,9 +1374,11 @@ var Dropdown = function ($) { var DATA_API_KEY = '.data-api'; var JQUERY_NO_CONFLICT = $.fn[NAME]; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key + var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) + var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + '|' + ARROW_DOWN_KEYCODE + '|' + ESCAPE_KEYCODE + '|' + SPACE_KEYCODE); var Event = { HIDE: 'hide' + EVENT_KEY, @@ -1549,7 +1551,7 @@ var Dropdown = function ($) { }; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { + if (!REGEXP_KEYDOWN.test(event.which) || /input|textarea/i.test(event.target.tagName)) { return; } |