mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Merge branch 'eslint' of https://github.com/bardiharborow/bootstrap into bardiharborow-eslint
This commit is contained in:
commit
432fe74c31
@ -1,206 +1,230 @@
|
||||
{
|
||||
"root": true,
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 7,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"jquery": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 8,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
|
||||
// Possible Errors
|
||||
"array-callback-return": "error",
|
||||
"comma-dangle": ["error", "never"],
|
||||
"handle-callback-err": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-cond-assign": "error",
|
||||
"no-console": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-control-regex": "error",
|
||||
"no-debugger": "error",
|
||||
"no-dupe-args": "error",
|
||||
"no-dupe-keys": "error",
|
||||
"no-duplicate-case": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-empty": "error",
|
||||
"no-empty-character-class": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-empty-pattern": "error",
|
||||
"no-ex-assign": "error",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-extra-parens": "off",
|
||||
"no-extra-semi": "error",
|
||||
"no-func-assign": "error",
|
||||
"no-inner-declarations": "error",
|
||||
"no-invalid-regexp": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-negated-in-lhs": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-restricted-globals": ["error", "event"],
|
||||
"no-self-assign": "error",
|
||||
"no-sparse-arrays": "error",
|
||||
"no-unexpected-multiline": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unused-labels": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-useless-rename": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-jsdoc": "off",
|
||||
"valid-typeof": "error",
|
||||
"no-extra-parens": "error",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-unsafe-negation": "error",
|
||||
"valid-jsdoc": "error",
|
||||
|
||||
// Best Practices
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-scoped-var": "error",
|
||||
"class-methods-use-this": "off",
|
||||
"complexity": "error",
|
||||
"consistent-return": "error",
|
||||
"curly": "error",
|
||||
"default-case": "error",
|
||||
"dot-location": "off",
|
||||
"dot-notation": "off",
|
||||
"dot-location": ["error", "property"],
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": "error",
|
||||
"guard-for-in": "error",
|
||||
"no-alert": "error",
|
||||
"no-caller": "error",
|
||||
"no-case-declarations": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": ["error", {"ignore": [-1, 0, 1]}],
|
||||
"no-multi-spaces": "off",
|
||||
"no-magic-numbers": ["error", {
|
||||
"ignore": [-1, 0, 1],
|
||||
"ignoreArrayIndexes": true
|
||||
}
|
||||
],
|
||||
"no-multi-spaces": ["error", {
|
||||
"exceptions": {
|
||||
"AssignmentExpression": true,
|
||||
"ArrowFunctionExpression": true,
|
||||
"CallExpression": true,
|
||||
"VariableDeclarator": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-multi-str": "error",
|
||||
"no-native-reassign": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "off",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal": "error",
|
||||
"no-new": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-process-env": "error",
|
||||
"no-proto": "error",
|
||||
"no-redeclare": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-return-assign": "off",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "off",
|
||||
"no-with": "error",
|
||||
"radix": "error",
|
||||
"unicode-bom": ["error", "never"],
|
||||
"vars-on-top": "off",
|
||||
"vars-on-top": "error",
|
||||
"wrap-iife": "error",
|
||||
"yoda": "error",
|
||||
|
||||
// Strict Mode
|
||||
"strict": "error",
|
||||
|
||||
// Variables
|
||||
"init-declarations": "off",
|
||||
"no-catch-shadow": "error",
|
||||
"no-delete-var": "error",
|
||||
"no-label-var": "error",
|
||||
"no-shadow": "off",
|
||||
"no-restricted-globals": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-undef": "error",
|
||||
"no-undefined": "off",
|
||||
"no-shadow": "off",
|
||||
"no-undef-init": "error",
|
||||
"no-unused-vars": "error",
|
||||
"no-undefined": "off",
|
||||
"no-use-before-define": "off",
|
||||
|
||||
// Stylistic
|
||||
// Node.js and CommonJS
|
||||
"callback-return": "off",
|
||||
"global-require": "error",
|
||||
"handle-callback-err": "error",
|
||||
"no-mixed-requires": "error",
|
||||
"no-new-require": "error",
|
||||
"no-path-concat": "error",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-sync": "error",
|
||||
|
||||
// Stylistic Issues
|
||||
"array-bracket-spacing": "error",
|
||||
"block-spacing": "error",
|
||||
"brace-style": "error",
|
||||
"camelcase": "error",
|
||||
"comma-dangle": "error",
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"computed-property-spacing": "error",
|
||||
"consistent-this": "error",
|
||||
"eol-last": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-names": "off",
|
||||
"func-style": "off",
|
||||
"func-style": ["error", "declaration"],
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": "error",
|
||||
"line-comment-position": "off",
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"lines-around-comment": "off",
|
||||
"max-statements-per-line": ["error", { "max": 1 }],
|
||||
"new-cap": "off",
|
||||
"newline-after-var": "off",
|
||||
"lines-around-directive": "error",
|
||||
"max-depth": ["error", 10],
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements-per-line": "error",
|
||||
"max-statements": "off",
|
||||
"multiline-ternary": "off",
|
||||
"new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-continue": "off",
|
||||
"no-inline-comments": "off",
|
||||
"no-lonely-if": "error",
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"no-mixed-operators": "off",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"no-nested-ternary": "off",
|
||||
"no-negated-condition": "off",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new-object": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-tabs": "error",
|
||||
"no-ternary": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-spacing": ["warn", "always"],
|
||||
"object-curly-newline": ["error", { "minProperties": 1 }],
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"object-property-newline": "error",
|
||||
"one-var": "off",
|
||||
"one-var-declaration-per-line": "error",
|
||||
"one-var": ["error", "never"],
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "off",
|
||||
"padded-blocks": "off",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"quotes": ["error", "single"],
|
||||
"semi": ["error", "never"],
|
||||
"require-jsdoc": "off",
|
||||
"semi-spacing": "error",
|
||||
"semi": ["error", "never"],
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": "off",
|
||||
"spaced-comment": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-before-function-paren": ["error", {
|
||||
"anonymous": "always",
|
||||
"named": "never"
|
||||
}],
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "error",
|
||||
"unicode-bom": "error",
|
||||
"wrap-regex": "off",
|
||||
|
||||
// es6
|
||||
// ECMAScript 6
|
||||
"arrow-body-style": "off",
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"constructor-super": "error",
|
||||
"generator-star-spacing": "error",
|
||||
"no-class-assign": "error",
|
||||
"no-const-assign": "error",
|
||||
"no-dupe-class-members": "error",
|
||||
"no-new-symbol": "error",
|
||||
"no-this-before-super": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "off",
|
||||
"prefer-const": "error",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-reflect": "off",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"require-yield": "error"
|
||||
|
||||
"rest-spread-spacing": "error",
|
||||
"sort-imports": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"yield-star-spacing": "error"
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ const Alert = (($) => {
|
||||
close(element) {
|
||||
element = element || this._element
|
||||
|
||||
let rootElement = this._getRootElement(element)
|
||||
let customEvent = this._triggerCloseEvent(rootElement)
|
||||
const rootElement = this._getRootElement(element)
|
||||
const customEvent = this._triggerCloseEvent(rootElement)
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return
|
||||
@ -86,7 +86,7 @@ const Alert = (($) => {
|
||||
// private
|
||||
|
||||
_getRootElement(element) {
|
||||
let selector = Util.getSelectorFromElement(element)
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
let parent = false
|
||||
|
||||
if (selector) {
|
||||
@ -101,7 +101,7 @@ const Alert = (($) => {
|
||||
}
|
||||
|
||||
_triggerCloseEvent(element) {
|
||||
let closeEvent = $.Event(Event.CLOSE)
|
||||
const closeEvent = $.Event(Event.CLOSE)
|
||||
|
||||
$(element).trigger(closeEvent)
|
||||
return closeEvent
|
||||
@ -133,7 +133,7 @@ const Alert = (($) => {
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let $element = $(this)
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
|
@ -66,12 +66,12 @@ const Button = (($) => {
|
||||
|
||||
toggle() {
|
||||
let triggerChangeEvent = true
|
||||
let rootElement = $(this._element).closest(
|
||||
const rootElement = $(this._element).closest(
|
||||
Selector.DATA_TOGGLE
|
||||
)[0]
|
||||
|
||||
if (rootElement) {
|
||||
let input = $(this._element).find(Selector.INPUT)[0]
|
||||
const input = $(this._element).find(Selector.INPUT)[0]
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
@ -80,7 +80,7 @@ const Button = (($) => {
|
||||
triggerChangeEvent = false
|
||||
|
||||
} else {
|
||||
let activeElement = $(rootElement).find(Selector.ACTIVE)[0]
|
||||
const activeElement = $(rootElement).find(Selector.ACTIVE)[0]
|
||||
|
||||
if (activeElement) {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE)
|
||||
@ -151,7 +151,7 @@ const Button = (($) => {
|
||||
Button._jQueryInterface.call($(button), 'toggle')
|
||||
})
|
||||
.on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
|
||||
let button = $(event.target).closest(Selector.BUTTON)[0]
|
||||
const button = $(event.target).closest(Selector.BUTTON)[0]
|
||||
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))
|
||||
})
|
||||
|
||||
|
@ -161,7 +161,8 @@ const Carousel = (($) => {
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval(
|
||||
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval
|
||||
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this),
|
||||
this._config.interval
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -169,9 +170,9 @@ const Carousel = (($) => {
|
||||
to(index) {
|
||||
this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]
|
||||
|
||||
let activeIndex = this._getItemIndex(this._activeElement)
|
||||
const activeIndex = this._getItemIndex(this._activeElement)
|
||||
|
||||
if (index > (this._items.length - 1) || index < 0) {
|
||||
if (index > this._items.length - 1 || index < 0) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -186,7 +187,7 @@ const Carousel = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let direction = index > activeIndex ?
|
||||
const direction = index > activeIndex ?
|
||||
Direction.NEXT :
|
||||
Direction.PREVIOUS
|
||||
|
||||
@ -255,19 +256,19 @@ const Carousel = (($) => {
|
||||
}
|
||||
|
||||
_getItemByDirection(direction, activeElement) {
|
||||
let isNextDirection = direction === Direction.NEXT
|
||||
let isPrevDirection = direction === Direction.PREVIOUS
|
||||
let activeIndex = this._getItemIndex(activeElement)
|
||||
let lastItemIndex = (this._items.length - 1)
|
||||
let isGoingToWrap = (isPrevDirection && activeIndex === 0) ||
|
||||
(isNextDirection && activeIndex === lastItemIndex)
|
||||
const isNextDirection = direction === Direction.NEXT
|
||||
const isPrevDirection = direction === Direction.PREVIOUS
|
||||
const activeIndex = this._getItemIndex(activeElement)
|
||||
const lastItemIndex = this._items.length - 1
|
||||
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
|
||||
isNextDirection && activeIndex === lastItemIndex
|
||||
|
||||
if (isGoingToWrap && !this._config.wrap) {
|
||||
return activeElement
|
||||
}
|
||||
|
||||
let delta = direction === Direction.PREVIOUS ? -1 : 1
|
||||
let itemIndex = (activeIndex + delta) % this._items.length
|
||||
const delta = direction === Direction.PREVIOUS ? -1 : 1
|
||||
const itemIndex = (activeIndex + delta) % this._items.length
|
||||
|
||||
return itemIndex === -1 ?
|
||||
this._items[this._items.length - 1] : this._items[itemIndex]
|
||||
@ -275,7 +276,7 @@ const Carousel = (($) => {
|
||||
|
||||
|
||||
_triggerSlideEvent(relatedTarget, directionalClassname) {
|
||||
let slideEvent = $.Event(Event.SLIDE, {
|
||||
const slideEvent = $.Event(Event.SLIDE, {
|
||||
relatedTarget,
|
||||
direction: directionalClassname
|
||||
})
|
||||
@ -291,7 +292,7 @@ const Carousel = (($) => {
|
||||
.find(Selector.ACTIVE)
|
||||
.removeClass(ClassName.ACTIVE)
|
||||
|
||||
let nextIndicator = this._indicatorsElement.children[
|
||||
const nextIndicator = this._indicatorsElement.children[
|
||||
this._getItemIndex(element)
|
||||
]
|
||||
|
||||
@ -302,13 +303,13 @@ const Carousel = (($) => {
|
||||
}
|
||||
|
||||
_slide(direction, element) {
|
||||
let activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]
|
||||
let nextElement = element || activeElement &&
|
||||
const activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]
|
||||
const nextElement = element || activeElement &&
|
||||
this._getItemByDirection(direction, activeElement)
|
||||
|
||||
let isCycling = Boolean(this._interval)
|
||||
const isCycling = Boolean(this._interval)
|
||||
|
||||
let directionalClassName = direction === Direction.NEXT ?
|
||||
const directionalClassName = direction === Direction.NEXT ?
|
||||
ClassName.LEFT :
|
||||
ClassName.RIGHT
|
||||
|
||||
@ -317,7 +318,7 @@ const Carousel = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let slideEvent = this._triggerSlideEvent(nextElement, directionalClassName)
|
||||
const slideEvent = this._triggerSlideEvent(nextElement, directionalClassName)
|
||||
if (slideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
@ -335,7 +336,7 @@ const Carousel = (($) => {
|
||||
|
||||
this._setActiveIndicatorElement(nextElement)
|
||||
|
||||
let slidEvent = $.Event(Event.SLID, {
|
||||
const slidEvent = $.Event(Event.SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: directionalClassName
|
||||
})
|
||||
@ -389,13 +390,13 @@ const Carousel = (($) => {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (typeof config === 'object') {
|
||||
$.extend(_config, config)
|
||||
}
|
||||
|
||||
let action = typeof config === 'string' ? config : _config.slide
|
||||
const action = typeof config === 'string' ? config : _config.slide
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(this, _config)
|
||||
@ -417,20 +418,20 @@ const Carousel = (($) => {
|
||||
}
|
||||
|
||||
static _dataApiClickHandler(event) {
|
||||
let selector = Util.getSelectorFromElement(this)
|
||||
const selector = Util.getSelectorFromElement(this)
|
||||
|
||||
if (!selector) {
|
||||
return
|
||||
}
|
||||
|
||||
let target = $(selector)[0]
|
||||
const target = $(selector)[0]
|
||||
|
||||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
|
||||
return
|
||||
}
|
||||
|
||||
let config = $.extend({}, $(target).data(), $(this).data())
|
||||
let slideIndex = this.getAttribute('data-slide-to')
|
||||
const config = $.extend({}, $(target).data(), $(this).data())
|
||||
const slideIndex = this.getAttribute('data-slide-to')
|
||||
|
||||
if (slideIndex) {
|
||||
config.interval = false
|
||||
@ -459,7 +460,7 @@ const Carousel = (($) => {
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, () => {
|
||||
$(Selector.DATA_RIDE).each(function () {
|
||||
let $carousel = $(this)
|
||||
const $carousel = $(this)
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data())
|
||||
})
|
||||
})
|
||||
|
@ -134,7 +134,7 @@ const Collapse = (($) => {
|
||||
}
|
||||
}
|
||||
|
||||
let startEvent = $.Event(Event.SHOW)
|
||||
const startEvent = $.Event(Event.SHOW)
|
||||
$(this._element).trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return
|
||||
@ -147,7 +147,7 @@ const Collapse = (($) => {
|
||||
}
|
||||
}
|
||||
|
||||
let dimension = this._getDimension()
|
||||
const dimension = this._getDimension()
|
||||
|
||||
$(this._element)
|
||||
.removeClass(ClassName.COLLAPSE)
|
||||
@ -164,7 +164,7 @@ const Collapse = (($) => {
|
||||
|
||||
this.setTransitioning(true)
|
||||
|
||||
let complete = () => {
|
||||
const complete = () => {
|
||||
$(this._element)
|
||||
.removeClass(ClassName.COLLAPSING)
|
||||
.addClass(ClassName.COLLAPSE)
|
||||
@ -182,8 +182,8 @@ const Collapse = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
|
||||
let scrollSize = `scroll${capitalizedDimension}`
|
||||
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
|
||||
const scrollSize = `scroll${capitalizedDimension}`
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
@ -198,14 +198,14 @@ const Collapse = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let startEvent = $.Event(Event.HIDE)
|
||||
const startEvent = $.Event(Event.HIDE)
|
||||
$(this._element).trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
let dimension = this._getDimension()
|
||||
let offsetDimension = dimension === Dimension.WIDTH ?
|
||||
const dimension = this._getDimension()
|
||||
const offsetDimension = dimension === Dimension.WIDTH ?
|
||||
'offsetWidth' : 'offsetHeight'
|
||||
|
||||
this._element.style[dimension] = `${this._element[offsetDimension]}px`
|
||||
@ -227,7 +227,7 @@ const Collapse = (($) => {
|
||||
|
||||
this.setTransitioning(true)
|
||||
|
||||
let complete = () => {
|
||||
const complete = () => {
|
||||
this.setTransitioning(false)
|
||||
$(this._element)
|
||||
.removeClass(ClassName.COLLAPSING)
|
||||
@ -272,13 +272,13 @@ const Collapse = (($) => {
|
||||
}
|
||||
|
||||
_getDimension() {
|
||||
let hasWidth = $(this._element).hasClass(Dimension.WIDTH)
|
||||
const hasWidth = $(this._element).hasClass(Dimension.WIDTH)
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT
|
||||
}
|
||||
|
||||
_getParent() {
|
||||
let parent = $(this._config.parent)[0]
|
||||
let selector =
|
||||
const parent = $(this._config.parent)[0]
|
||||
const selector =
|
||||
`[data-toggle="collapse"][data-parent="${this._config.parent}"]`
|
||||
|
||||
$(parent).find(selector).each((i, element) => {
|
||||
@ -293,7 +293,7 @@ const Collapse = (($) => {
|
||||
|
||||
_addAriaAndCollapsedClass(element, triggerArray) {
|
||||
if (element) {
|
||||
let isOpen = $(element).hasClass(ClassName.ACTIVE)
|
||||
const isOpen = $(element).hasClass(ClassName.ACTIVE)
|
||||
element.setAttribute('aria-expanded', isOpen)
|
||||
|
||||
if (triggerArray.length) {
|
||||
@ -308,15 +308,15 @@ const Collapse = (($) => {
|
||||
// static
|
||||
|
||||
static _getTargetFromElement(element) {
|
||||
let selector = Util.getSelectorFromElement(element)
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
return selector ? $(selector)[0] : null
|
||||
}
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let $this = $(this)
|
||||
const $this = $(this)
|
||||
let data = $this.data(DATA_KEY)
|
||||
let _config = $.extend(
|
||||
const _config = $.extend(
|
||||
{},
|
||||
Default,
|
||||
$this.data(),
|
||||
@ -353,9 +353,9 @@ const Collapse = (($) => {
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
|
||||
let target = Collapse._getTargetFromElement(this)
|
||||
let data = $(target).data(DATA_KEY)
|
||||
let config = data ? 'toggle' : $(this).data()
|
||||
const target = Collapse._getTargetFromElement(this)
|
||||
const data = $(target).data(DATA_KEY)
|
||||
const config = data ? 'toggle' : $(this).data()
|
||||
|
||||
Collapse._jQueryInterface.call($(target), config)
|
||||
})
|
||||
|
@ -85,8 +85,8 @@ const Dropdown = (($) => {
|
||||
return false
|
||||
}
|
||||
|
||||
let parent = Dropdown._getParentFromElement(this)
|
||||
let isActive = $(parent).hasClass(ClassName.ACTIVE)
|
||||
const parent = Dropdown._getParentFromElement(this)
|
||||
const isActive = $(parent).hasClass(ClassName.ACTIVE)
|
||||
|
||||
Dropdown._clearMenus()
|
||||
|
||||
@ -95,17 +95,19 @@ const Dropdown = (($) => {
|
||||
}
|
||||
|
||||
if ('ontouchstart' in document.documentElement &&
|
||||
(!$(parent).closest(Selector.NAVBAR_NAV).length)) {
|
||||
!$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||
|
||||
// if mobile we use a backdrop because click events don't delegate
|
||||
let dropdown = document.createElement('div')
|
||||
const dropdown = document.createElement('div')
|
||||
dropdown.className = ClassName.BACKDROP
|
||||
$(dropdown).insertBefore(this)
|
||||
$(dropdown).on('click', Dropdown._clearMenus)
|
||||
}
|
||||
|
||||
let relatedTarget = { relatedTarget : this }
|
||||
let showEvent = $.Event(Event.SHOW, relatedTarget)
|
||||
const relatedTarget = {
|
||||
relatedTarget : this
|
||||
}
|
||||
const showEvent = $.Event(Event.SHOW, relatedTarget)
|
||||
|
||||
$(parent).trigger(showEvent)
|
||||
|
||||
@ -114,7 +116,7 @@ const Dropdown = (($) => {
|
||||
}
|
||||
|
||||
this.focus()
|
||||
this.setAttribute('aria-expanded', 'true')
|
||||
this.setAttribute('aria-expanded', true)
|
||||
|
||||
$(parent).toggleClass(ClassName.ACTIVE)
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget))
|
||||
@ -143,7 +145,8 @@ const Dropdown = (($) => {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
$(this).data(DATA_KEY, (data = new Dropdown(this)))
|
||||
data = new Dropdown(this)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
@ -160,28 +163,30 @@ const Dropdown = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let backdrop = $(Selector.BACKDROP)[0]
|
||||
const backdrop = $(Selector.BACKDROP)[0]
|
||||
if (backdrop) {
|
||||
backdrop.parentNode.removeChild(backdrop)
|
||||
}
|
||||
|
||||
let toggles = $.makeArray($(Selector.DATA_TOGGLE))
|
||||
const toggles = $.makeArray($(Selector.DATA_TOGGLE))
|
||||
|
||||
for (let i = 0; i < toggles.length; i++) {
|
||||
let parent = Dropdown._getParentFromElement(toggles[i])
|
||||
let relatedTarget = { relatedTarget : toggles[i] }
|
||||
const parent = Dropdown._getParentFromElement(toggles[i])
|
||||
const relatedTarget = {
|
||||
relatedTarget : toggles[i]
|
||||
}
|
||||
|
||||
if (!$(parent).hasClass(ClassName.ACTIVE)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (event && event.type === 'click' &&
|
||||
(/input|textarea/i.test(event.target.tagName)) &&
|
||||
($.contains(parent, event.target))) {
|
||||
/input|textarea/i.test(event.target.tagName) &&
|
||||
$.contains(parent, event.target)) {
|
||||
continue
|
||||
}
|
||||
|
||||
let hideEvent = $.Event(Event.HIDE, relatedTarget)
|
||||
const hideEvent = $.Event(Event.HIDE, relatedTarget)
|
||||
$(parent).trigger(hideEvent)
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
continue
|
||||
@ -197,7 +202,7 @@ const Dropdown = (($) => {
|
||||
|
||||
static _getParentFromElement(element) {
|
||||
let parent
|
||||
let selector = Util.getSelectorFromElement(element)
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
|
||||
if (selector) {
|
||||
parent = $(selector)[0]
|
||||
@ -219,14 +224,14 @@ const Dropdown = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let parent = Dropdown._getParentFromElement(this)
|
||||
let isActive = $(parent).hasClass(ClassName.ACTIVE)
|
||||
const parent = Dropdown._getParentFromElement(this)
|
||||
const isActive = $(parent).hasClass(ClassName.ACTIVE)
|
||||
|
||||
if ((!isActive && event.which !== ESCAPE_KEYCODE) ||
|
||||
(isActive && event.which === ESCAPE_KEYCODE)) {
|
||||
if (!isActive && event.which !== ESCAPE_KEYCODE ||
|
||||
isActive && event.which === ESCAPE_KEYCODE) {
|
||||
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
let toggle = $(parent).find(Selector.DATA_TOGGLE)[0]
|
||||
const toggle = $(parent).find(Selector.DATA_TOGGLE)[0]
|
||||
$(toggle).trigger('focus')
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
show(relatedTarget) {
|
||||
let showEvent = $.Event(Event.SHOW, {
|
||||
const showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget
|
||||
})
|
||||
|
||||
@ -152,7 +152,7 @@ const Modal = (($) => {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
let hideEvent = $.Event(Event.HIDE)
|
||||
const hideEvent = $.Event(Event.HIDE)
|
||||
|
||||
$(this._element).trigger(hideEvent)
|
||||
|
||||
@ -173,7 +173,7 @@ const Modal = (($) => {
|
||||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS)
|
||||
|
||||
if (Util.supportsTransitionEnd() &&
|
||||
($(this._element).hasClass(ClassName.FADE))) {
|
||||
$(this._element).hasClass(ClassName.FADE)) {
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, (event) => this._hideModal(event))
|
||||
@ -212,11 +212,11 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
_showElement(relatedTarget) {
|
||||
let transition = Util.supportsTransitionEnd() &&
|
||||
const transition = Util.supportsTransitionEnd() &&
|
||||
$(this._element).hasClass(ClassName.FADE)
|
||||
|
||||
if (!this._element.parentNode ||
|
||||
(this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {
|
||||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// don't move modals dom position
|
||||
document.body.appendChild(this._element)
|
||||
}
|
||||
@ -235,11 +235,11 @@ const Modal = (($) => {
|
||||
this._enforceFocus()
|
||||
}
|
||||
|
||||
let shownEvent = $.Event(Event.SHOWN, {
|
||||
const shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget
|
||||
})
|
||||
|
||||
let transitionComplete = () => {
|
||||
const transitionComplete = () => {
|
||||
if (this._config.focus) {
|
||||
this._element.focus()
|
||||
}
|
||||
@ -261,7 +261,7 @@ const Modal = (($) => {
|
||||
.on(Event.FOCUSIN, (event) => {
|
||||
if (document !== event.target &&
|
||||
this._element !== event.target &&
|
||||
(!$(this._element).has(event.target).length)) {
|
||||
!$(this._element).has(event.target).length) {
|
||||
this._element.focus()
|
||||
}
|
||||
})
|
||||
@ -290,7 +290,7 @@ const Modal = (($) => {
|
||||
|
||||
_hideModal() {
|
||||
this._element.style.display = 'none'
|
||||
this._element.setAttribute('aria-hidden', 'true')
|
||||
this._element.setAttribute('aria-hidden', true)
|
||||
this._showBackdrop(() => {
|
||||
$(document.body).removeClass(ClassName.OPEN)
|
||||
this._resetAdjustments()
|
||||
@ -307,11 +307,11 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
_showBackdrop(callback) {
|
||||
let animate = $(this._element).hasClass(ClassName.FADE) ?
|
||||
const animate = $(this._element).hasClass(ClassName.FADE) ?
|
||||
ClassName.FADE : ''
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
let doAnimate = Util.supportsTransitionEnd() && animate
|
||||
const doAnimate = Util.supportsTransitionEnd() && animate
|
||||
|
||||
this._backdrop = document.createElement('div')
|
||||
this._backdrop.className = ClassName.BACKDROP
|
||||
@ -359,7 +359,7 @@ const Modal = (($) => {
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$(this._backdrop).removeClass(ClassName.ACTIVE)
|
||||
|
||||
let callbackRemove = () => {
|
||||
const callbackRemove = () => {
|
||||
this._removeBackdrop()
|
||||
if (callback) {
|
||||
callback()
|
||||
@ -367,7 +367,7 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
if (Util.supportsTransitionEnd() &&
|
||||
($(this._element).hasClass(ClassName.FADE))) {
|
||||
$(this._element).hasClass(ClassName.FADE)) {
|
||||
$(this._backdrop)
|
||||
.one(Util.TRANSITION_END, callbackRemove)
|
||||
.emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)
|
||||
@ -391,7 +391,7 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
_adjustDialog() {
|
||||
let isModalOverflowing =
|
||||
const isModalOverflowing =
|
||||
this._element.scrollHeight > document.documentElement.clientHeight
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
@ -414,7 +414,7 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
_setScrollbar() {
|
||||
let bodyPadding = parseInt(
|
||||
const bodyPadding = parseInt(
|
||||
$(Selector.FIXED_CONTENT).css('padding-right') || 0,
|
||||
10
|
||||
)
|
||||
@ -432,10 +432,10 @@ const Modal = (($) => {
|
||||
}
|
||||
|
||||
_getScrollbarWidth() { // thx d.walsh
|
||||
let scrollDiv = document.createElement('div')
|
||||
const scrollDiv = document.createElement('div')
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER
|
||||
document.body.appendChild(scrollDiv)
|
||||
let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
|
||||
const scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
|
||||
document.body.removeChild(scrollDiv)
|
||||
return scrollbarWidth
|
||||
}
|
||||
@ -446,7 +446,7 @@ const Modal = (($) => {
|
||||
static _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = $.extend(
|
||||
const _config = $.extend(
|
||||
{},
|
||||
Modal.Default,
|
||||
$(this).data(),
|
||||
@ -480,20 +480,20 @@ const Modal = (($) => {
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
let target
|
||||
let selector = Util.getSelectorFromElement(this)
|
||||
const selector = Util.getSelectorFromElement(this)
|
||||
|
||||
if (selector) {
|
||||
target = $(selector)[0]
|
||||
}
|
||||
|
||||
let config = $(target).data(DATA_KEY) ?
|
||||
const config = $(target).data(DATA_KEY) ?
|
||||
'toggle' : $.extend({}, $(target).data(), $(this).data())
|
||||
|
||||
if (this.tagName === 'A') {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
let $target = $(target).one(Event.SHOW, (showEvent) => {
|
||||
const $target = $(target).one(Event.SHOW, (showEvent) => {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// only register focus restorer if modal will actually get shown
|
||||
return
|
||||
|
@ -107,11 +107,11 @@ const Popover = (($) => {
|
||||
}
|
||||
|
||||
getTipElement() {
|
||||
return (this.tip = this.tip || $(this.config.template)[0])
|
||||
return this.tip = this.tip || $(this.config.template)[0]
|
||||
}
|
||||
|
||||
setContent() {
|
||||
let $tip = $(this.getTipElement())
|
||||
const $tip = $(this.getTipElement())
|
||||
|
||||
// we use append for html objects to maintain js events
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle())
|
||||
@ -139,7 +139,7 @@ const Popover = (($) => {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = typeof config === 'object' ? config : null
|
||||
const _config = typeof config === 'object' ? config : null
|
||||
|
||||
if (!data && /destroy|hide/.test(config)) {
|
||||
return
|
||||
|
@ -108,13 +108,13 @@ const ScrollSpy = (($) => {
|
||||
// public
|
||||
|
||||
refresh() {
|
||||
let autoMethod = this._scrollElement !== this._scrollElement.window ?
|
||||
const autoMethod = this._scrollElement !== this._scrollElement.window ?
|
||||
OffsetMethod.POSITION : OffsetMethod.OFFSET
|
||||
|
||||
let offsetMethod = this._config.method === 'auto' ?
|
||||
const offsetMethod = this._config.method === 'auto' ?
|
||||
autoMethod : this._config.method
|
||||
|
||||
let offsetBase = offsetMethod === OffsetMethod.POSITION ?
|
||||
const offsetBase = offsetMethod === OffsetMethod.POSITION ?
|
||||
this._getScrollTop() : 0
|
||||
|
||||
this._offsets = []
|
||||
@ -122,12 +122,12 @@ const ScrollSpy = (($) => {
|
||||
|
||||
this._scrollHeight = this._getScrollHeight()
|
||||
|
||||
let targets = $.makeArray($(this._selector))
|
||||
const targets = $.makeArray($(this._selector))
|
||||
|
||||
targets
|
||||
.map((element) => {
|
||||
let target
|
||||
let targetSelector = Util.getSelectorFromElement(element)
|
||||
const targetSelector = Util.getSelectorFromElement(element)
|
||||
|
||||
if (targetSelector) {
|
||||
target = $(targetSelector)[0]
|
||||
@ -197,9 +197,9 @@ const ScrollSpy = (($) => {
|
||||
}
|
||||
|
||||
_process() {
|
||||
let scrollTop = this._getScrollTop() + this._config.offset
|
||||
let scrollHeight = this._getScrollHeight()
|
||||
let maxScroll = this._config.offset
|
||||
const scrollTop = this._getScrollTop() + this._config.offset
|
||||
const scrollHeight = this._getScrollHeight()
|
||||
const maxScroll = this._config.offset
|
||||
+ scrollHeight
|
||||
- this._scrollElement.offsetHeight
|
||||
|
||||
@ -208,7 +208,7 @@ const ScrollSpy = (($) => {
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
let target = this._targets[this._targets.length - 1]
|
||||
const target = this._targets[this._targets.length - 1]
|
||||
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target)
|
||||
@ -222,7 +222,7 @@ const ScrollSpy = (($) => {
|
||||
}
|
||||
|
||||
for (let i = this._offsets.length; i--;) {
|
||||
let isActiveTarget = this._activeTarget !== this._targets[i]
|
||||
const isActiveTarget = this._activeTarget !== this._targets[i]
|
||||
&& scrollTop >= this._offsets[i]
|
||||
&& (this._offsets[i + 1] === undefined ||
|
||||
scrollTop < this._offsets[i + 1])
|
||||
@ -244,7 +244,7 @@ const ScrollSpy = (($) => {
|
||||
`${selector}[href="${target}"]`
|
||||
})
|
||||
|
||||
let $link = $(queries.join(','))
|
||||
const $link = $(queries.join(','))
|
||||
|
||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
|
||||
@ -270,7 +270,7 @@ const ScrollSpy = (($) => {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = typeof config === 'object' && config || null
|
||||
const _config = typeof config === 'object' && config
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config)
|
||||
@ -297,10 +297,10 @@ const ScrollSpy = (($) => {
|
||||
*/
|
||||
|
||||
$(window).on(Event.LOAD_DATA_API, () => {
|
||||
let scrollSpys = $.makeArray($(Selector.DATA_SPY))
|
||||
const scrollSpys = $.makeArray($(Selector.DATA_SPY))
|
||||
|
||||
for (let i = scrollSpys.length; i--;) {
|
||||
let $spy = $(scrollSpys[i])
|
||||
const $spy = $(scrollSpys[i])
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data())
|
||||
}
|
||||
})
|
||||
|
@ -78,26 +78,26 @@ const Tab = (($) => {
|
||||
|
||||
show() {
|
||||
if (this._element.parentNode &&
|
||||
(this._element.parentNode.nodeType === Node.ELEMENT_NODE) &&
|
||||
($(this._element).hasClass(ClassName.ACTIVE))) {
|
||||
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
|
||||
$(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
return
|
||||
}
|
||||
|
||||
let target
|
||||
let previous
|
||||
let listElement = $(this._element).closest(Selector.LIST)[0]
|
||||
let selector = Util.getSelectorFromElement(this._element)
|
||||
const listElement = $(this._element).closest(Selector.LIST)[0]
|
||||
const selector = Util.getSelectorFromElement(this._element)
|
||||
|
||||
if (listElement) {
|
||||
previous = $.makeArray($(listElement).find(Selector.ACTIVE))
|
||||
previous = previous[previous.length - 1]
|
||||
}
|
||||
|
||||
let hideEvent = $.Event(Event.HIDE, {
|
||||
const hideEvent = $.Event(Event.HIDE, {
|
||||
relatedTarget: this._element
|
||||
})
|
||||
|
||||
let showEvent = $.Event(Event.SHOW, {
|
||||
const showEvent = $.Event(Event.SHOW, {
|
||||
relatedTarget: previous
|
||||
})
|
||||
|
||||
@ -108,7 +108,7 @@ const Tab = (($) => {
|
||||
$(this._element).trigger(showEvent)
|
||||
|
||||
if (showEvent.isDefaultPrevented() ||
|
||||
(hideEvent.isDefaultPrevented())) {
|
||||
hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -121,12 +121,12 @@ const Tab = (($) => {
|
||||
listElement
|
||||
)
|
||||
|
||||
let complete = () => {
|
||||
let hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
const complete = () => {
|
||||
const hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
relatedTarget: this._element
|
||||
})
|
||||
|
||||
let shownEvent = $.Event(Event.SHOWN, {
|
||||
const shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget: previous
|
||||
})
|
||||
|
||||
@ -150,13 +150,13 @@ const Tab = (($) => {
|
||||
// private
|
||||
|
||||
_activate(element, container, callback) {
|
||||
let active = $(container).find(Selector.ACTIVE_CHILD)[0]
|
||||
let isTransitioning = callback
|
||||
const active = $(container).find(Selector.ACTIVE_CHILD)[0]
|
||||
const isTransitioning = callback
|
||||
&& Util.supportsTransitionEnd()
|
||||
&& ((active && $(active).hasClass(ClassName.FADE))
|
||||
&& (active && $(active).hasClass(ClassName.FADE)
|
||||
|| Boolean($(container).find(Selector.FADE_CHILD)[0]))
|
||||
|
||||
let complete = () => this._transitionComplete(
|
||||
const complete = () => this._transitionComplete(
|
||||
element,
|
||||
active,
|
||||
isTransitioning,
|
||||
@ -181,7 +181,7 @@ const Tab = (($) => {
|
||||
if (active) {
|
||||
$(active).removeClass(ClassName.ACTIVE)
|
||||
|
||||
let dropdownChild = $(active.parentNode).find(
|
||||
const dropdownChild = $(active.parentNode).find(
|
||||
Selector.DROPDOWN_ACTIVE_CHILD
|
||||
)[0]
|
||||
|
||||
@ -203,9 +203,9 @@ const Tab = (($) => {
|
||||
}
|
||||
|
||||
if (element.parentNode &&
|
||||
($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {
|
||||
$(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
|
||||
let dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
|
||||
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
|
||||
if (dropdownElement) {
|
||||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
|
||||
}
|
||||
@ -223,11 +223,11 @@ const Tab = (($) => {
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let $this = $(this)
|
||||
const $this = $(this)
|
||||
let data = $this.data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = data = new Tab(this)
|
||||
data = new Tab(this)
|
||||
$this.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ const Tooltip = (($) => {
|
||||
|
||||
toggle(event) {
|
||||
if (event) {
|
||||
let dataKey = this.constructor.DATA_KEY
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
let context = $(event.currentTarget).data(dataKey)
|
||||
|
||||
if (!context) {
|
||||
@ -242,12 +242,12 @@ const Tooltip = (($) => {
|
||||
if ($(this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements')
|
||||
}
|
||||
let showEvent = $.Event(this.constructor.Event.SHOW)
|
||||
const showEvent = $.Event(this.constructor.Event.SHOW)
|
||||
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$(this.element).trigger(showEvent)
|
||||
|
||||
let isInTheDom = $.contains(
|
||||
const isInTheDom = $.contains(
|
||||
this.element.ownerDocument.documentElement,
|
||||
this.element
|
||||
)
|
||||
@ -256,8 +256,8 @@ const Tooltip = (($) => {
|
||||
return
|
||||
}
|
||||
|
||||
let tip = this.getTipElement()
|
||||
let tipId = Util.getUID(this.constructor.NAME)
|
||||
const tip = this.getTipElement()
|
||||
const tipId = Util.getUID(this.constructor.NAME)
|
||||
|
||||
tip.setAttribute('id', tipId)
|
||||
this.element.setAttribute('aria-describedby', tipId)
|
||||
@ -268,11 +268,11 @@ const Tooltip = (($) => {
|
||||
$(tip).addClass(ClassName.FADE)
|
||||
}
|
||||
|
||||
let placement = typeof this.config.placement === 'function' ?
|
||||
const placement = typeof this.config.placement === 'function' ?
|
||||
this.config.placement.call(this, tip, this.element) :
|
||||
this.config.placement
|
||||
|
||||
let attachment = this._getAttachment(placement)
|
||||
const attachment = this._getAttachment(placement)
|
||||
|
||||
$(tip)
|
||||
.data(this.constructor.DATA_KEY, this)
|
||||
@ -296,8 +296,8 @@ const Tooltip = (($) => {
|
||||
|
||||
$(tip).addClass(ClassName.ACTIVE)
|
||||
|
||||
let complete = () => {
|
||||
let prevHoverState = this._hoverState
|
||||
const complete = () => {
|
||||
const prevHoverState = this._hoverState
|
||||
this._hoverState = null
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.SHOWN)
|
||||
@ -319,9 +319,9 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
hide(callback) {
|
||||
let tip = this.getTipElement()
|
||||
let hideEvent = $.Event(this.constructor.Event.HIDE)
|
||||
let complete = () => {
|
||||
const tip = this.getTipElement()
|
||||
const hideEvent = $.Event(this.constructor.Event.HIDE)
|
||||
const complete = () => {
|
||||
if (this._hoverState !== HoverState.ACTIVE && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip)
|
||||
}
|
||||
@ -344,7 +344,7 @@ const Tooltip = (($) => {
|
||||
$(tip).removeClass(ClassName.ACTIVE)
|
||||
|
||||
if (Util.supportsTransitionEnd() &&
|
||||
($(this.tip).hasClass(ClassName.FADE))) {
|
||||
$(this.tip).hasClass(ClassName.FADE)) {
|
||||
|
||||
$(tip)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
@ -365,11 +365,11 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
getTipElement() {
|
||||
return (this.tip = this.tip || $(this.config.template)[0])
|
||||
return this.tip = this.tip || $(this.config.template)[0]
|
||||
}
|
||||
|
||||
setContent() {
|
||||
let $tip = $(this.getTipElement())
|
||||
const $tip = $(this.getTipElement())
|
||||
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())
|
||||
|
||||
@ -381,7 +381,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
setElementContent($element, content) {
|
||||
let html = this.config.html
|
||||
const html = this.config.html
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// content is a DOM node or a jQuery
|
||||
if (html) {
|
||||
@ -422,7 +422,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_setListeners() {
|
||||
let triggers = this.config.trigger.split(' ')
|
||||
const triggers = this.config.trigger.split(' ')
|
||||
|
||||
triggers.forEach((trigger) => {
|
||||
if (trigger === 'click') {
|
||||
@ -433,10 +433,10 @@ const Tooltip = (($) => {
|
||||
)
|
||||
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
let eventIn = trigger === Trigger.HOVER ?
|
||||
const eventIn = trigger === Trigger.HOVER ?
|
||||
this.constructor.Event.MOUSEENTER :
|
||||
this.constructor.Event.FOCUSIN
|
||||
let eventOut = trigger === Trigger.HOVER ?
|
||||
const eventOut = trigger === Trigger.HOVER ?
|
||||
this.constructor.Event.MOUSELEAVE :
|
||||
this.constructor.Event.FOCUSOUT
|
||||
|
||||
@ -465,9 +465,9 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_fixTitle() {
|
||||
let titleType = typeof this.element.getAttribute('data-original-title')
|
||||
const titleType = typeof this.element.getAttribute('data-original-title')
|
||||
if (this.element.getAttribute('title') ||
|
||||
(titleType !== 'string')) {
|
||||
titleType !== 'string') {
|
||||
this.element.setAttribute(
|
||||
'data-original-title',
|
||||
this.element.getAttribute('title') || ''
|
||||
@ -477,7 +477,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_enter(event, context) {
|
||||
let dataKey = this.constructor.DATA_KEY
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
|
||||
context = context || $(event.currentTarget).data(dataKey)
|
||||
|
||||
@ -496,7 +496,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
if ($(context.getTipElement()).hasClass(ClassName.ACTIVE) ||
|
||||
(context._hoverState === HoverState.ACTIVE)) {
|
||||
context._hoverState === HoverState.ACTIVE) {
|
||||
context._hoverState = HoverState.ACTIVE
|
||||
return
|
||||
}
|
||||
@ -518,7 +518,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_leave(event, context) {
|
||||
let dataKey = this.constructor.DATA_KEY
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
|
||||
context = context || $(event.currentTarget).data(dataKey)
|
||||
|
||||
@ -557,7 +557,7 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_isWithActiveTrigger() {
|
||||
for (let trigger in this._activeTrigger) {
|
||||
for (const trigger in this._activeTrigger) {
|
||||
if (this._activeTrigger[trigger]) {
|
||||
return true
|
||||
}
|
||||
@ -591,10 +591,10 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_getDelegateConfig() {
|
||||
let config = {}
|
||||
const config = {}
|
||||
|
||||
if (this.config) {
|
||||
for (let key in this.config) {
|
||||
for (const key in this.config) {
|
||||
if (this.constructor.Default[key] !== this.config[key]) {
|
||||
config[key] = this.config[key]
|
||||
}
|
||||
@ -610,8 +610,7 @@ const Tooltip = (($) => {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = typeof config === 'object' ?
|
||||
config : null
|
||||
const _config = typeof config === 'object' && config
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return
|
||||
|
@ -27,7 +27,7 @@ const Util = (($) => {
|
||||
|
||||
// shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
function toType(obj) {
|
||||
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||
}
|
||||
|
||||
function isElement(obj) {
|
||||
@ -52,11 +52,13 @@ const Util = (($) => {
|
||||
return false
|
||||
}
|
||||
|
||||
let el = document.createElement('bootstrap')
|
||||
const el = document.createElement('bootstrap')
|
||||
|
||||
for (let name in TransitionEndEvent) {
|
||||
for (const name in TransitionEndEvent) {
|
||||
if (el.style[name] !== undefined) {
|
||||
return { end: TransitionEndEvent[name] }
|
||||
return {
|
||||
end: TransitionEndEvent[name]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,15 +98,14 @@ const Util = (($) => {
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
let Util = {
|
||||
const Util = {
|
||||
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
|
||||
getUID(prefix) {
|
||||
do {
|
||||
/* eslint-disable no-bitwise */
|
||||
// eslint-disable-next-line no-bitwise
|
||||
prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here
|
||||
/* eslint-enable no-bitwise */
|
||||
} while (document.getElementById(prefix))
|
||||
return prefix
|
||||
},
|
||||
@ -133,17 +134,12 @@ const Util = (($) => {
|
||||
},
|
||||
|
||||
typeCheckConfig(componentName, config, configTypes) {
|
||||
for (let property in configTypes) {
|
||||
for (const property in configTypes) {
|
||||
if (configTypes.hasOwnProperty(property)) {
|
||||
let expectedTypes = configTypes[property]
|
||||
let value = config[property]
|
||||
let valueType
|
||||
|
||||
if (value && isElement(value)) {
|
||||
valueType = 'element'
|
||||
} else {
|
||||
valueType = toType(value)
|
||||
}
|
||||
const expectedTypes = configTypes[property]
|
||||
const value = config[property]
|
||||
const valueType = value && isElement(value) ?
|
||||
'element' : toType(value)
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(
|
||||
|
40
js/tests/.eslintrc.json
Normal file
40
js/tests/.eslintrc.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"env": {
|
||||
"qunit": true,
|
||||
"es6": false
|
||||
},
|
||||
"globals": {
|
||||
"Util": false
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5,
|
||||
"sourceType": "script"
|
||||
},
|
||||
"rules": {
|
||||
// Best Practices
|
||||
"consistent-return": "off",
|
||||
"no-alert": "off",
|
||||
"no-console": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-extend-native": "off",
|
||||
"no-magic-numbers": "off",
|
||||
"vars-on-top": "off",
|
||||
|
||||
// Strict Mode
|
||||
"strict": "off",
|
||||
|
||||
// Stylistic Issues
|
||||
"brace-style": "off",
|
||||
"func-style": "off",
|
||||
"max-statements-per-line": "off",
|
||||
"object-curly-newline": "off",
|
||||
"object-property-newline": "off",
|
||||
|
||||
// ECMAScript 6
|
||||
"no-var": "off",
|
||||
"object-shorthand": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
"prefer-template": "off",
|
||||
"prefer-rest-params": "off"
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('alert plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('button plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('carousel plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('collapse plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('dropdowns plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('modal plugin')
|
||||
|
||||
@ -374,7 +374,7 @@ $(function () {
|
||||
var paddingRight = parseInt($(document.body).css('padding-right'), 10)
|
||||
assert.strictEqual(isNaN(paddingRight), false)
|
||||
assert.strictEqual(paddingRight !== 0, true)
|
||||
$(document.body).css('padding-right', ''); // Because test case "should ignore other inline styles when trying to restore body padding after closing" fail if not
|
||||
$(document.body).css('padding-right', '') // Because test case "should ignore other inline styles when trying to restore body padding after closing" fail if not
|
||||
done()
|
||||
})
|
||||
.bootstrapModal('show')
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
// Don't re-order tests.
|
||||
QUnit.config.reorder = false
|
||||
@ -70,32 +70,3 @@
|
||||
})
|
||||
|
||||
}())
|
||||
|
||||
|
||||
// bind polyfill
|
||||
// shoutout mdn: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
if (typeof this !== 'function') {
|
||||
// closest thing possible to the ECMAScript 5
|
||||
// internal IsCallable function
|
||||
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
||||
}
|
||||
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1)
|
||||
var fToBind = this
|
||||
var FNOP = function () {}
|
||||
var fBound = function () {
|
||||
return fToBind.apply(this instanceof FNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)))
|
||||
}
|
||||
|
||||
if (this.prototype) {
|
||||
// native functions don't have a prototype
|
||||
FNOP.prototype = this.prototype
|
||||
}
|
||||
fBound.prototype = new FNOP()
|
||||
|
||||
return fBound
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('popover plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('scrollspy plugin')
|
||||
|
||||
@ -231,8 +231,8 @@ $(function () {
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapScrollspy({ offset: 0, target: '#navigation' })
|
||||
|
||||
!function testActiveElements() {
|
||||
if (++times > 3) return done()
|
||||
function testActiveElements() {
|
||||
if (++times > 3) { return done() }
|
||||
|
||||
$content.one('scroll', function () {
|
||||
assert.ok($('#a-1').hasClass('active'), 'nav item for outer element has "active" class')
|
||||
@ -241,7 +241,9 @@ $(function () {
|
||||
})
|
||||
|
||||
$content.scrollTop($content.scrollTop() + 10)
|
||||
}()
|
||||
}
|
||||
|
||||
testActiveElements()
|
||||
})
|
||||
|
||||
QUnit.test('should clear selection if above the first section', function (assert) {
|
||||
@ -399,8 +401,8 @@ $(function () {
|
||||
$navbar.appendTo('#qunit-fixture')
|
||||
$content.appendTo('#qunit-fixture')
|
||||
|
||||
if (type === 'js') $content.bootstrapScrollspy({ target: '.navbar', offset: 0, method: 'position' })
|
||||
else if (type === 'data') $(window).trigger('load')
|
||||
if (type === 'js') { $content.bootstrapScrollspy({ target: '.navbar', offset: 0, method: 'position' }) }
|
||||
else if (type === 'data') { $(window).trigger('load') }
|
||||
|
||||
var $target = $('#div-' + type + 'm-2')
|
||||
var scrollspy = $content.data('bs.scrollspy')
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('tabs plugin')
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
$(function () {
|
||||
'use strict';
|
||||
'use strict'
|
||||
|
||||
QUnit.module('tooltip plugin')
|
||||
|
||||
@ -382,7 +382,7 @@ $(function () {
|
||||
var $tooltip = $($target.data('bs.tooltip').tip)
|
||||
|
||||
// this is some dumb hack stuff because sub pixels in firefox
|
||||
var top = Math.round($target.offset().top + ($target[0].offsetHeight / 2) - ($tooltip[0].offsetHeight / 2))
|
||||
var top = Math.round($target.offset().top + $target[0].offsetHeight / 2 - $tooltip[0].offsetHeight / 2)
|
||||
var top2 = Math.round($tooltip.offset().top)
|
||||
var topDiff = top - top2
|
||||
assert.ok(topDiff <= 1 && topDiff >= -1)
|
||||
@ -723,10 +723,10 @@ $(function () {
|
||||
$('#tt-outer').trigger('mouseleave')
|
||||
assert.strictEqual(currentUid, $('#tt-content').text())
|
||||
|
||||
assert.ok(obj._hoverState == 'out', 'the tooltip hoverState should be set to "out"')
|
||||
assert.ok(obj._hoverState === 'out', 'the tooltip hoverState should be set to "out"')
|
||||
|
||||
$('#tt-outer').trigger('mouseenter')
|
||||
assert.ok(obj._hoverState == 'active', 'the tooltip hoverState should be set to "active"')
|
||||
assert.ok(obj._hoverState === 'active', 'the tooltip hoverState should be set to "active"')
|
||||
|
||||
assert.strictEqual(currentUid, $('#tt-content').text())
|
||||
})
|
||||
@ -788,7 +788,7 @@ $(function () {
|
||||
var tooltip = $el.data('bs.tooltip')
|
||||
var $tooltip = $(tooltip.getTipElement())
|
||||
|
||||
function showingTooltip() { return $tooltip.hasClass('active') || tooltip._hoverState == 'active' }
|
||||
function showingTooltip() { return $tooltip.hasClass('active') || tooltip._hoverState === 'active' }
|
||||
|
||||
var tests = [
|
||||
['mouseenter', 'mouseleave'],
|
||||
@ -812,8 +812,8 @@ $(function () {
|
||||
|
||||
$.each(tests, function (idx, triggers) {
|
||||
for (var i = 0, len = triggers.length; i < len; i++) {
|
||||
$el.trigger(triggers[i]);
|
||||
assert.equal(i < (len - 1), showingTooltip())
|
||||
$el.trigger(triggers[i])
|
||||
assert.equal(i < len - 1, showingTooltip())
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -18,7 +18,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"change-version": "node grunt/change-version.js",
|
||||
"eslint": "eslint --config js/.eslintrc.json js/src",
|
||||
"eslint": "eslint --ignore-path .eslintignore js",
|
||||
"jscs": "jscs --config=js/.jscsrc js/src js/tests/unit docs/assets/js/src grunt Gruntfile.js docs/assets/js/ie-emulation-modes-warning.js docs/assets/js/ie10-viewport-bug-workaround.js",
|
||||
"htmlhint": "htmlhint --config docs/.htmlhintrc _gh_pages/",
|
||||
"postcss": "postcss --config grunt/postcss.js --replace dist/css/*.css",
|
||||
|
Loading…
x
Reference in New Issue
Block a user