diff --git a/Gruntfile.js b/Gruntfile.js index c34d42cb40..13f0913a32 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -344,13 +344,13 @@ module.exports = function (grunt) { /* boosted mod */ connect: { - // server: { - // options: { - // port: 3000, - // base: '.' - // } - // } - // }, + // server: { + // options: { + // port: 3000, + // base: '.' + // } + // } + // }, livereload: { options: { open: true, @@ -362,7 +362,7 @@ module.exports = function (grunt) { } } } - }, + }, /* end mod */ jekyll: { @@ -381,66 +381,72 @@ module.exports = function (grunt) { /* boosted mod */ replace: { - paths1: { - src: ['_gh_pages/*.html'], - overwrite: true, - replacements: [{ - from: 'href="/', - to: 'href="' - }] - }, - paths2: { - src: ['_gh_pages/*/*.html'], - overwrite: true, - replacements: [{ - from: 'href="/', - to: 'href="../' - }, - { - from: 'src="dist', - to: 'src="../dist', - }, - { - from: 'src="/dist', - to: 'src="../dist', - }, - { - from: 'src="/assets', - to: 'src="../assets', - }, - { - from: 'src="/../assets', - to: 'src="../assets', - }, - { - from: 'src="/examples', - to: 'src="../examples', - }] - }, - paths3: { - src: ['_gh_pages/*/*/*.html'], - overwrite: true, - replacements: [{ - from: 'href="/', - to: 'href="../../' - }, - { - from: 'src="/dist', - to: 'src="../../dist', - }, - { - from: 'src="dist', - to: 'src="../../dist', - }, - { - from: 'src="/assets', - to: 'src="../../assets', - }, - { - from: 'src="/../assets', - to: 'src="../../assets', - }] - } + paths1: { + src: ['_gh_pages/*.html'], + overwrite: true, + replacements: [ + { + from: 'href="/', + to: 'href="' + } + ] + }, + paths2: { + src: ['_gh_pages/*/*.html'], + overwrite: true, + replacements: [ + { + from: 'href="/', + to: 'href="../' + }, + { + from: 'src="dist', + to: 'src="../dist' + }, + { + from: 'src="/dist', + to: 'src="../dist' + }, + { + from: 'src="/assets', + to: 'src="../assets' + }, + { + from: 'src="/../assets', + to: 'src="../assets' + }, + { + from: 'src="/examples', + to: 'src="../examples' + } + ] + }, + paths3: { + src: ['_gh_pages/*/*/*.html'], + overwrite: true, + replacements: [ + { + from: 'href="/', + to: 'href="../../' + }, + { + from: 'src="/dist', + to: 'src="../../dist' + }, + { + from: 'src="dist', + to: 'src="../../dist' + }, + { + from: 'src="/assets', + to: 'src="../../assets' + }, + { + from: 'src="/../assets', + to: 'src="../../assets' + } + ] + } }, /* end mod */ diff --git a/docs-orange/_includes/boostwatch/buttons.html b/docs-orange/_includes/boostwatch/buttons.html index 174bab4d22..a629e1870f 100644 --- a/docs-orange/_includes/boostwatch/buttons.html +++ b/docs-orange/_includes/boostwatch/buttons.html @@ -121,7 +121,7 @@

Dark background

Dropdowns

- @@ -135,7 +135,7 @@

Dropdowns

-
- @@ -162,7 +162,7 @@

Dropdowns

- @@ -176,7 +176,7 @@

Dropdowns

- @@ -228,7 +228,7 @@

Sizes

- diff --git a/js/dist/collapse.js b/js/dist/collapse.js index ba37b3a876..8828526dbe 100644 --- a/js/dist/collapse.js +++ b/js/dist/collapse.js @@ -295,11 +295,11 @@ var Collapse = (function ($) { }], [{ key: '_keydown', value: function _keydown(e, that) { - var $items = undefined, - $tablist = $this.closest('div.panel-group '), - $this = $(that), - index = undefined, - k = e.which || e.keyCode; + var $items = undefined; + var $tablist = $this.closest('div.panel-group '); + var $this = $(that); + var index = undefined; + var k = e.which || e.keyCode; if (k === 32) { // space @@ -310,7 +310,8 @@ var Collapse = (function ($) { index = $items.index($items.filter(':focus')); if (k === 38 || k === 37) { - index--; // up & left + index--; + // up & left } if (k === 39 || k === 40) { index++; // down & right @@ -379,14 +380,14 @@ var Collapse = (function ($) { var $colltabs = $('[data-toggle="collapse"]:not(.navbar-toggle)'); $colltabs.attr({ role: 'tab', 'aria-selected': 'false', 'aria-expanded': 'false' }); $colltabs.each(function () { - var collid = $(this).attr('id') || uniqueId('ui-collapse'), - collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href')), - collparent = parent && $(parent), - colltab = $(this), - heading = '', - parent = colltab.attr('data-parent'); - - colltab.attr('id', collid); + var collid = $(this).attr('id') || uniqueId('ui-collapse'); + var collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href')); + var collparent = parent && $(parent); + var $colltab = $(this); + var heading = ''; + var parent = $colltab.attr('data-parent'); + + $colltab.attr('id', collid); if (collparent) { $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role', 'presentation'); collparent.attr({ role: 'tablist', 'aria-multiselectable': 'true' }); @@ -394,10 +395,10 @@ var Collapse = (function ($) { heading = collpanel.parent().children().first(); // On sélectionne le heading (panel-heading) if (collpanel.hasClass('in')) { - colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'true', 'aria-expanded': 'true', tabindex: '0' }); + $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'true', 'aria-expanded': 'true', tabindex: '0' }); // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role: 'tabpanel', tabindex: '0', 'aria-labelledby': collid, 'aria-hidden': 'false' }); } @@ -408,9 +409,9 @@ var Collapse = (function ($) { heading.children().first().addClass('panel-chevron-open'); } } else { - colltab.attr({ 'aria-controls': collpanel.attr('id'), tabindex: '-1' }); + $colltab.attr({ 'aria-controls': collpanel.attr('id'), tabindex: '-1' }); // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role: 'tabpanel', tabindex: '-1', 'aria-labelledby': collid, 'aria-hidden': 'true' }); } @@ -422,9 +423,9 @@ var Collapse = (function ($) { } else { heading = collpanel.parent().children().first(); // On sélectionne le heading (panel-heading) if (collpanel.hasClass('in')) { - colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'true', 'aria-expanded': 'true' }); + $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'true', 'aria-expanded': 'true' }); // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role: 'tabpanel', 'aria-labelledby': collid, 'aria-hidden': 'false' }); } @@ -435,9 +436,9 @@ var Collapse = (function ($) { heading.children().first().addClass('panel-chevron-open'); } } else { - colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'false', 'aria-expanded': 'false' }); + $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected': 'false', 'aria-expanded': 'false' }); // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role: 'tabpanel', 'aria-labelledby': collid, 'aria-hidden': 'true' }); } diff --git a/js/dist/collapse.js.map b/js/dist/collapse.js.map index 742bf40a84..7ee12675f0 100644 --- a/js/dist/collapse.js.map +++ b/js/dist/collapse.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/collapse.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAQvB,MAAM,IAAI,GAAkB,UAAU,CAAA;AACtC,MAAM,OAAO,GAAe,eAAe,CAAA;AAC3C,MAAM,QAAQ,GAAc,aAAa,CAAA;AACzC,MAAM,SAAS,SAAiB,QAAQ,AAAE,CAAA;AAC1C,MAAM,YAAY,GAAU,WAAW,CAAA;AACvC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;AAE/B,MAAM,OAAO,GAAG;AACd,UAAM,EAAG,IAAI;AACb,UAAM,EAAG,EAAE;GACZ,CAAA;;AAED,MAAM,WAAW,GAAG;AAClB,UAAM,EAAG,SAAS;AAClB,UAAM,EAAG,QAAQ;GAClB,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,QAAI,WAAoB,SAAS,AAAE;AACnC,SAAK,YAAoB,SAAS,AAAE;AACpC,QAAI,WAAoB,SAAS,AAAE;AACnC,UAAM,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,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;GAClD,CAAC,CAAA;AACF,GAAC,CAAC,YAAM;AACN,KAAC,CAAC,mCAAmC,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAA;GAC1E,CAAC,CAAA;;;;;;;AAOF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"collapse.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : 'string'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n IN : 'in',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.panel > .in, .panel > .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // public\n toggle() {\n if ($(this._element).hasClass(ClassName.IN)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray($(this._parent).find(Selector.ACTIVES))\n if (!actives.length) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n let startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n let dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n this._element.setAttribute('aria-expanded', true)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n $(this._element).parent().find('h4.panel-title').removeClass('panel-chevron-closed').addClass('panel-chevron-open')\n\n let complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.IN)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n let capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n let scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n let dimension = this._getDimension()\n let offsetDimension = dimension === Dimension.WIDTH ?\n 'offsetWidth' : 'offsetHeight'\n\n this._element.style[dimension] = `${this._element[offsetDimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.IN)\n\n this._element.setAttribute('aria-expanded', false)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = 0\n $(this._element).parent().find('h4.panel-title').addClass('panel-chevron-closed').removeClass('panel-chevron-open')\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n config.toggle = Boolean(config.toggle) // coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n let hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = $(this._config.parent)[0]\n let selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n let isOpen = $(element).hasClass(ClassName.IN)\n element.setAttribute('aria-expanded', isOpen)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n\n // static\n\n static _keydown(e, that) {\n let $items,\n $tablist = $this.closest('div.panel-group '),\n $this = $(that),\n index,\n k = e.which || e.keyCode\n\n if (k === 32) { \t\t\t\t\t// space\n $this.click()\n }\n\n $items = $tablist.find('[role=tab]')\n index = $items.index($items.filter(':focus'))\n\n if (k === 38 || k === 37) {\n index-- // up & left\n }\n if (k === 39 || k === 40) {\n index++ // down & right\n }\n if (index < 0) {\n index = $items.length - 1\n }\n if (index === $items.length) {\n index = 0\n }\n\n $items.eq(index).focus()\n e.preventDefault()\n e.stopPropagation()\n\n }\n\n static _getTargetFromElement(element) {\n let selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n let _config = $.extend(\n {},\n Default,\n $this.data(),\n typeof config === 'object' && config\n )\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * ------------------------------------------------------------------------\n * Adding accessibility\n * ------------------------------------------------------------------------\n */\n\n let uniqueId = function(prefix) {\n return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}`\n }\n\n let $colltabs = $('[data-toggle=\"collapse\"]:not(.navbar-toggle)')\n $colltabs.attr({ role:'tab', 'aria-selected':'false', 'aria-expanded':'false' })\n $colltabs.each(function() {\n let collid = $(this).attr('id') || uniqueId('ui-collapse'),\n collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href')),\n collparent = parent && $(parent),\n colltab = $(this),\n heading = '',\n parent = colltab.attr('data-parent')\n\n colltab.attr('id', collid)\n if (collparent) {\n $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role', 'presentation')\n collparent.attr({ role: 'tablist', 'aria-multiselectable' : 'true' })\n\n heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading)\n\n if (collpanel.hasClass('in')) {\n colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true', tabindex:'0' })\n\n // don't change the attribute for menu panel specific case\n if (!colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', tabindex:'0', 'aria-labelledby':collid, 'aria-hidden':'false' })\n }\n\n // Si on a bien le heading, on lui ajoute la classe panel-selected qui indique que panel est ouvert.\n // Enfin, on ajoute une classe sur le premier enfant du header pour ajouter le chevron bas (ouvert)\n if (heading.hasClass('panel-heading')) {\n heading.addClass('panel-selected')\n heading.children().first().addClass('panel-chevron-open')\n }\n } else {\n colltab.attr({ 'aria-controls' : collpanel.attr('id'), tabindex:'-1' })\n // don't change the attribute for menu panel specific case\n if (!colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', tabindex:'-1', 'aria-labelledby':collid, 'aria-hidden':'true' })\n }\n\n // Si on a bien le heading, on ajoute une classe sur le premier enfant du header pour ajouter le chevron droite (à ouvrir)\n if (heading.hasClass('panel-heading')) {\n heading.children().first().addClass('panel-chevron-closed')\n }\n }\n } else {\n heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading)\n if (collpanel.hasClass('in')) {\n colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true' })\n // don't change the attribute for menu panel specific case\n if (!colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'false' })\n }\n\n // Si on a bien le heading, on lui ajoute la classe panel-selected qui indique que panel est ouvert.\n // Enfin, on ajoute une classe sur le premier enfant du header pour ajouter le chevron bas (ouvert)\n if (heading.hasClass('panel-heading')) {\n heading.addClass('panel-selected')\n heading.children().first().addClass('panel-chevron-open')\n }\n\n } else {\n colltab.attr({ 'aria-controls' : collpanel.attr('id'), 'aria-selected':'false', 'aria-expanded':'false' })\n // don't change the attribute for menu panel specific case\n if (!colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'true' })\n }\n\n // Si on a bien le heading, on ajoute une classe sur le premier enfant du header pour ajouter le chevron droite (à ouvrir)\n if (heading.hasClass('panel-heading')) {\n heading.children().first().addClass('panel-chevron-closed')\n }\n }\n }\n })\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n $(document).on('keydown.collapse.data-api', '[data-toggle=\"collapse\"]', function (event) {\n let target = Collapse._getTargetFromElement(this)\n let k = event.which || event.keyCode\n if (!/(32|37|38|39|40)/.test(k)) {\n return true\n }\n Collapse._keydown.call($(target), event, this)\n event.preventDefault()\n event.stopPropagation()\n return false\n })\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n let target = Collapse._getTargetFromElement(this)\n let data = $(target).data(DATA_KEY)\n let config = data ? 'toggle' : $(this).data()\n\n Collapse._jQueryInterface.call($(target), config)\n })\n $(() => {\n $('.o-accordion .panel-heading h4 a ').prepend('
')\n })\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n\n})(jQuery)\n\nexport default Collapse\n"]} \ No newline at end of file +{"version":3,"sources":["../src/collapse.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAQvB,MAAM,IAAI,GAAkB,UAAU,CAAA;AACtC,MAAM,OAAO,GAAe,eAAe,CAAA;AAC3C,MAAM,QAAQ,GAAc,aAAa,CAAA;AACzC,MAAM,SAAS,SAAiB,QAAQ,AAAE,CAAA;AAC1C,MAAM,YAAY,GAAU,WAAW,CAAA;AACvC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;AAE/B,MAAM,OAAO,GAAG;AACd,UAAM,EAAG,IAAI;AACb,UAAM,EAAG,EAAE;GACZ,CAAA;;AAED,MAAM,WAAW,GAAG;AAClB,UAAM,EAAG,SAAS;AAClB,UAAM,EAAG,QAAQ;GAClB,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,QAAI,WAAoB,SAAS,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AAC,CAAA;AACjD,QAAI,IAAI,GAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AACrC,QAAI,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;;AAE7C,YAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAA;GAClD,CAAC,CAAA;AACF,GAAC,CAAC,YAAM;AACN,KAAC,CAAC,mCAAmC,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAA;GAC1E,CAAC,CAAA;;;;;;;AAOF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"collapse.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : 'string'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n IN : 'in',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.panel > .in, .panel > .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // public\n toggle() {\n if ($(this._element).hasClass(ClassName.IN)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray($(this._parent).find(Selector.ACTIVES))\n if (!actives.length) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n let startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n let dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n this._element.setAttribute('aria-expanded', true)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n $(this._element).parent().find('h4.panel-title').removeClass('panel-chevron-closed').addClass('panel-chevron-open')\n\n let complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.IN)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n let capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n let scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.IN)) {\n return\n }\n\n let startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n let dimension = this._getDimension()\n let offsetDimension = dimension === Dimension.WIDTH ?\n 'offsetWidth' : 'offsetHeight'\n\n this._element.style[dimension] = `${this._element[offsetDimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.IN)\n\n this._element.setAttribute('aria-expanded', false)\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n\n this.setTransitioning(true)\n\n let complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = 0\n $(this._element).parent().find('h4.panel-title').addClass('panel-chevron-closed').removeClass('panel-chevron-open')\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n config.toggle = Boolean(config.toggle) // coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n let hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = $(this._config.parent)[0]\n let selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n let isOpen = $(element).hasClass(ClassName.IN)\n element.setAttribute('aria-expanded', isOpen)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n\n // static\n\n static _keydown(e, that) {\n let $items\n let $tablist = $this.closest('div.panel-group ')\n let $this = $(that)\n let index\n let k = e.which || e.keyCode\n\n if (k === 32) {\n // space\n $this.click()\n }\n\n $items = $tablist.find('[role=tab]')\n index = $items.index($items.filter(':focus'))\n\n if (k === 38 || k === 37) {\n index--\n // up & left\n }\n if (k === 39 || k === 40) {\n index++ // down & right\n }\n if (index < 0) {\n index = $items.length - 1\n }\n if (index === $items.length) {\n index = 0\n }\n\n $items.eq(index).focus()\n e.preventDefault()\n e.stopPropagation()\n\n }\n\n static _getTargetFromElement(element) {\n let selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n let _config = $.extend(\n {},\n Default,\n $this.data(),\n typeof config === 'object' && config\n )\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n /**\n * ------------------------------------------------------------------------\n * Adding accessibility\n * ------------------------------------------------------------------------\n */\n\n let uniqueId = function (prefix) {\n return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}`\n }\n\n let $colltabs = $('[data-toggle=\"collapse\"]:not(.navbar-toggle)')\n $colltabs.attr({ role:'tab', 'aria-selected':'false', 'aria-expanded':'false' })\n $colltabs.each(function () {\n let collid = $(this).attr('id') || uniqueId('ui-collapse')\n let collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href'))\n let collparent = parent && $(parent)\n let $colltab = $(this)\n let heading = ''\n let parent = $colltab.attr('data-parent')\n\n $colltab.attr('id', collid)\n if (collparent) {\n $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role', 'presentation')\n collparent.attr({ role: 'tablist', 'aria-multiselectable' : 'true' })\n\n heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading)\n\n if (collpanel.hasClass('in')) {\n $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true', tabindex:'0' })\n\n // don't change the attribute for menu panel specific case\n if (!$colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', tabindex:'0', 'aria-labelledby':collid, 'aria-hidden':'false' })\n }\n\n // Si on a bien le heading, on lui ajoute la classe panel-selected qui indique que panel est ouvert.\n // Enfin, on ajoute une classe sur le premier enfant du header pour ajouter le chevron bas (ouvert)\n if (heading.hasClass('panel-heading')) {\n heading.addClass('panel-selected')\n heading.children().first().addClass('panel-chevron-open')\n }\n } else {\n $colltab.attr({ 'aria-controls' : collpanel.attr('id'), tabindex:'-1' })\n // don't change the attribute for menu panel specific case\n if (!$colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', tabindex:'-1', 'aria-labelledby':collid, 'aria-hidden':'true' })\n }\n\n // Si on a bien le heading, on ajoute une classe sur le premier enfant du header pour ajouter le chevron droite (à ouvrir)\n if (heading.hasClass('panel-heading')) {\n heading.children().first().addClass('panel-chevron-closed')\n }\n }\n } else {\n heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading)\n if (collpanel.hasClass('in')) {\n $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true' })\n // don't change the attribute for menu panel specific case\n if (!$colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'false' })\n }\n\n // Si on a bien le heading, on lui ajoute la classe panel-selected qui indique que panel est ouvert.\n // Enfin, on ajoute une classe sur le premier enfant du header pour ajouter le chevron bas (ouvert)\n if (heading.hasClass('panel-heading')) {\n heading.addClass('panel-selected')\n heading.children().first().addClass('panel-chevron-open')\n }\n\n } else {\n $colltab.attr({ 'aria-controls' : collpanel.attr('id'), 'aria-selected':'false', 'aria-expanded':'false' })\n // don't change the attribute for menu panel specific case\n if (!$colltab.hasClass('navbar-toggle')) {\n collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'true' })\n }\n\n // Si on a bien le heading, on ajoute une classe sur le premier enfant du header pour ajouter le chevron droite (à ouvrir)\n if (heading.hasClass('panel-heading')) {\n heading.children().first().addClass('panel-chevron-closed')\n }\n }\n }\n })\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n $(document).on('keydown.collapse.data-api', '[data-toggle=\"collapse\"]', function (event) {\n let target = Collapse._getTargetFromElement(this)\n let k = event.which || event.keyCode\n if (!/(32|37|38|39|40)/.test(k)) {\n return true\n }\n Collapse._keydown.call($(target), event, this)\n event.preventDefault()\n event.stopPropagation()\n return false\n })\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n let target = Collapse._getTargetFromElement(this)\n let data = $(target).data(DATA_KEY)\n let config = data ? 'toggle' : $(this).data()\n\n Collapse._jQueryInterface.call($(target), config)\n })\n $(() => {\n $('.o-accordion .panel-heading h4 a ').prepend('
')\n })\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n\n})(jQuery)\n\nexport default Collapse\n"]} \ No newline at end of file diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js index 0cc81f97ba..cbecf8ac1a 100644 --- a/js/dist/dropdown.js +++ b/js/dist/dropdown.js @@ -67,6 +67,7 @@ var Dropdown = (function ($) { this._addEventListeners(); } + // Boosted mod // set default acessibility Attributes // getters @@ -107,15 +108,14 @@ var Dropdown = (function ($) { if (showEvent.isDefaultPrevented()) { return false; } - + // Boosted mod // this.focus() + $(parent).find('.dropdown-menu li:not(.disabled) a:not(.disabled)').first().trigger('focus'); + // end mod this.setAttribute('aria-expanded', 'true'); - // patch to select by default first item $(parent).toggleClass(ClassName.OPEN); $(parent).trigger($.Event(Event.SHOWN, relatedTarget)); - $(this).parent().find('.dropdown-menu a').first().focus(); - return false; } }, { @@ -273,6 +273,7 @@ var Dropdown = (function ($) { $('.dropdown-menu').attr('role', 'menu'); $('.dropdown-menu a.dropdown-item').attr('role', 'menuitem'); }); + // end mod /** * ------------------------------------------------------------------------ * Data Api implementation diff --git a/js/dist/dropdown.js.map b/js/dist/dropdown.js.map index 744f9a813e..4edda28b24 100644 --- a/js/dist/dropdown.js.map +++ b/js/dist/dropdown.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/dropdown.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASvB,MAAM,IAAI,GAAkB,UAAU,CAAA;AACtC,MAAM,OAAO,GAAe,eAAe,CAAA;AAC3C,MAAM,QAAQ,GAAc,aAAa,CAAA;AACzC,MAAM,SAAS,SAAiB,QAAQ,AAAE,CAAA;AAC1C,MAAM,YAAY,GAAU,WAAW,CAAA;AACvC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAEtC,MAAM,KAAK,GAAG;AACZ,QAAI,WAAsB,SAAS,AAAE;AACrC,UAAM,aAAsB,SAAS,AAAE;AACvC,QAAI,WAAsB,SAAS,AAAE;AACrC,SAAK,YAAsB,SAAS,AAAE;AACtC,SAAK,YAAsB,SAAS,AAAE;AACtC,kBAAc,YAAa,SAAS,GAAG,YAAY,AAAE;AACrD,oBAAgB,cAAa,SAAS,GAAG,YAAY,AAAE;GACxD,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,YAAQ,EAAG,mBAAmB;AAC9B,YAAQ,EAAG,UAAU;AACrB,QAAI,EAAO,MAAM;GAClB,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,YAAQ,EAAQ,oBAAoB;AACpC,eAAW,EAAK,0BAA0B;AAC1C,cAAU,EAAM,gBAAgB;AAChC,aAAS,EAAO,eAAe;AAC/B,gBAAY,EAAI,kBAAk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AW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"dropdown.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n BACKDROP : 'dropdown-backdrop',\n DISABLED : 'disabled',\n OPEN : 'open'\n }\n\n const Selector = {\n BACKDROP : '.dropdown-backdrop',\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n ROLE_MENU : '[role=\"menu\"]',\n ROLE_LISTBOX : '[role=\"listbox\"]',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '[role=\"menu\"] li:not(.disabled) a, '\n + '[role=\"listbox\"] li:not(.disabled) a'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n\n constructor(element) {\n this._element = element\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n toggle() {\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return false\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return false\n }\n\n if ('ontouchstart' in document.documentElement &&\n (!$(parent).closest(Selector.NAVBAR_NAV).length)) {\n\n // if mobile we use a backdrop because click events don't delegate\n let dropdown = document.createElement('div')\n dropdown.className = ClassName.BACKDROP\n $(dropdown).insertBefore(this)\n $(dropdown).on('click', Dropdown._clearMenus)\n }\n\n let relatedTarget = { relatedTarget : this }\n let showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return false\n }\n\n // this.focus()\n this.setAttribute('aria-expanded', 'true')\n\n\n // patch to select by default first item\n $(parent).toggleClass(ClassName.OPEN)\n $(parent).trigger($.Event(Event.SHOWN, relatedTarget))\n $(this).parent().find('.dropdown-menu a').first().focus()\n\n return false\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n }\n\n\n // private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, this.toggle)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n $(this).data(DATA_KEY, (data = new Dropdown(this)))\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config].call(this)\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && event.which === 3) {\n return\n }\n\n let backdrop = $(Selector.BACKDROP)[0]\n if (backdrop) {\n backdrop.parentNode.removeChild(backdrop)\n }\n\n let toggles = $.makeArray($(Selector.DATA_TOGGLE))\n\n for (let i = 0; i < toggles.length; i++) {\n let parent = Dropdown._getParentFromElement(toggles[i])\n let relatedTarget = { relatedTarget : toggles[i] }\n\n if (!$(parent).hasClass(ClassName.OPEN)) {\n continue\n }\n\n if (event && event.type === 'click' &&\n (/input|textarea/i.test(event.target.tagName)) &&\n ($.contains(parent, event.target))) {\n continue\n }\n\n let hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(parent)\n .removeClass(ClassName.OPEN)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n let selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n static _dataApiKeydownHandler(event) {\n if (!/(38|40|27|32)/.test(event.which) ||\n /input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n if ((!isActive && event.which !== 27) ||\n (isActive && event.which === 27)) {\n\n if (event.which === 27) {\n let toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n let items = $.makeArray($(Selector.VISIBLE_ITEMS))\n\n items = items.filter((item) => {\n return item.offsetWidth || item.offsetHeight\n })\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === 38 && index > 0) { // up\n index--\n }\n\n if (event.which === 40 && index < items.length - 1) { // down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n\n }\n\n // set default acessibility Attributes\n $(document).ready(($) => {\n $('.dropdown-menu').attr('role', 'menu')\n $('.dropdown-menu a.dropdown-item').attr('role', 'menuitem')\n })\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler)\n .on(Event.CLICK_DATA_API, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle)\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n\n})(jQuery)\n\nexport default Dropdown\n"]} \ No newline at end of file +{"version":3,"sources":["../src/dropdown.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASvB,MAAM,IAAI,GAAkB,UAAU,CAAA;AACtC,MAAM,OAAO,GAAe,eAAe,CAAA;AAC3C,MAAM,QAAQ,GAAc,aAAa,CAAA;AACzC,MAAM,SAAS,SAAiB,QAAQ,AAAE,CAAA;AAC1C,MAAM,YAAY,GAAU,WAAW,CAAA;AACvC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAEtC,MAAM,KAAK,GAAG;AACZ,QAAI,WAAsB,SAAS,AAAE;AACrC,UAAM,aAAsB,SAAS,AAAE;AACvC,QAAI,WAAs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F,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,WAAW,CAAC,CAC9C,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CACzE,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,UAAU,EAAE,UAAC,CAAC,EAAK;AACpD,KAAC,CAAC,eAAe,EAAE,CAAA;GACpB,CAAC,CAAA;;;;;;;;AASJ,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"dropdown.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n BACKDROP : 'dropdown-backdrop',\n DISABLED : 'disabled',\n OPEN : 'open'\n }\n\n const Selector = {\n BACKDROP : '.dropdown-backdrop',\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n ROLE_MENU : '[role=\"menu\"]',\n ROLE_LISTBOX : '[role=\"listbox\"]',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '[role=\"menu\"] li:not(.disabled) a, '\n + '[role=\"listbox\"] li:not(.disabled) a'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n\n constructor(element) {\n this._element = element\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n toggle() {\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return false\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return false\n }\n\n if ('ontouchstart' in document.documentElement &&\n (!$(parent).closest(Selector.NAVBAR_NAV).length)) {\n\n // if mobile we use a backdrop because click events don't delegate\n let dropdown = document.createElement('div')\n dropdown.className = ClassName.BACKDROP\n $(dropdown).insertBefore(this)\n $(dropdown).on('click', Dropdown._clearMenus)\n }\n\n let relatedTarget = { relatedTarget : this }\n let showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return false\n }\n // Boosted mod\n // this.focus()\n $(parent).find('.dropdown-menu li:not(.disabled) a:not(.disabled)').first().trigger('focus')\n // end mod\n this.setAttribute('aria-expanded', 'true')\n\n $(parent).toggleClass(ClassName.OPEN)\n $(parent).trigger($.Event(Event.SHOWN, relatedTarget))\n return false\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n }\n\n\n // private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, this.toggle)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n $(this).data(DATA_KEY, (data = new Dropdown(this)))\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config].call(this)\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && event.which === 3) {\n return\n }\n\n let backdrop = $(Selector.BACKDROP)[0]\n if (backdrop) {\n backdrop.parentNode.removeChild(backdrop)\n }\n\n let toggles = $.makeArray($(Selector.DATA_TOGGLE))\n\n for (let i = 0; i < toggles.length; i++) {\n let parent = Dropdown._getParentFromElement(toggles[i])\n let relatedTarget = { relatedTarget : toggles[i] }\n\n if (!$(parent).hasClass(ClassName.OPEN)) {\n continue\n }\n\n if (event && event.type === 'click' &&\n (/input|textarea/i.test(event.target.tagName)) &&\n ($.contains(parent, event.target))) {\n continue\n }\n\n let hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(parent)\n .removeClass(ClassName.OPEN)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n let selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n static _dataApiKeydownHandler(event) {\n if (!/(38|40|27|32)/.test(event.which) ||\n /input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let parent = Dropdown._getParentFromElement(this)\n let isActive = $(parent).hasClass(ClassName.OPEN)\n\n if ((!isActive && event.which !== 27) ||\n (isActive && event.which === 27)) {\n\n if (event.which === 27) {\n let toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n let items = $.makeArray($(Selector.VISIBLE_ITEMS))\n\n items = items.filter((item) => {\n return item.offsetWidth || item.offsetHeight\n })\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === 38 && index > 0) { // up\n index--\n }\n\n if (event.which === 40 && index < items.length - 1) { // down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n\n }\n // Boosted mod\n // set default acessibility Attributes\n $(document).ready(($) => {\n $('.dropdown-menu').attr('role', 'menu')\n $('.dropdown-menu a.dropdown-item').attr('role', 'menuitem')\n })\n // end mod\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler)\n .on(Event.CLICK_DATA_API, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle)\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n\n})(jQuery)\n\nexport default Dropdown\n"]} \ No newline at end of file diff --git a/js/dist/modal.js b/js/dist/modal.js index 2d6be6fc52..e5abd4fa8a 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -524,8 +524,8 @@ var Modal = (function ($) { $modals.each(function () { // modal = l'élement déclencheur de l'aperçu de la popin // modalPanel = la fenêtre modal à proprement parler - var modal = $(this), - modalPanel = modal.attr('data-target') ? $(modal.attr('data-target')) : $(modal.attr('href')); + var $modal = $(this); + var modalPanel = $modal.attr('data-target') ? $($modal.attr('data-target')) : $($modal.attr('href')); // On ajoute les tags aria qui vont bien et on empeche le focus avec tabulation modalPanel.attr({ role: 'dialog' }); // LLA removed with BS 3.3.5, 'aria-hidden' : 'true', 'tabIndex' : '-1' }); diff --git a/js/dist/modal.js.map b/js/dist/modal.js.map index 3b98cb051f..2ce9c27c5e 100644 --- a/js/dist/modal.js.map +++ b/js/dist/modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/modal.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,KAAK,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASpB,MAAM,IAAI,GAA2B,OAAO,CAAA;AAC5C,MAAM,OAAO,GAAwB,eAAe,CAAA;AACpD,MAAM,QAAQ,GAAuB,UAAU,CAAA;AAC/C,MAAM,SAAS,SAA0B,QAAQ,AAAE,CAAA;AACnD,MAAM,YAAY,GAAmB,WAAW,CAAA;AAChD,MAAM,kBAAkB,GAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAC/C,MAAM,mBAAmB,GAAY,GAAG,CAAA;AACxC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;AAExC,MAAM,OAAO,GAAG;AACd,YAAQ,EAAG,IAAI;AACf,YAAQ,EAAG,IAAI;AACf,SAAK,EAAM,IAAI;AACf,QAAI,EAAO,IAAI;GAChB,CAAA;;AAED,MAAM,WAAW,GAAG;AAClB,YAAQ,EAAG,kBAAkB;AAC7B,YAAQ,EAAG,SAAS;AACpB,SAAK,EAAM,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,MAAM,CAAC,CAAC,CAAA;;;AAG/F,gBAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,QAAQ,EAAE,CAAC,CAAA;;;AAGpC,UAAI,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;AAChD,UAAI,UAAU,EAAE;AACd,YAAI,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACxC,YAAI,YAAY,EAAE;AAChB,oBAAU,CAAC,IAAI,CAAC,EAAE,iBAAiB,EAAG,YAAY,EAAE,CAAC,CAAA;SACtD;OACF;KACF,CAAC,CAAA;;AAEF,KAAC,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,UAAU,EAAE,CAAC,CAAA;GAC/C,CAAC,CAAA;;;;;;;AAOF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,KAAK,CAAC,gBAAgB,CAAA;AAC/C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,KAAK,CAAA;AAC9B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,KAAK,CAAC,gBAAgB,CAAA;GAC9B,CAAA;;AAED,SAAO,KAAK,CAAA;CAEb,CAAA,CAAE,MAAM,CAAC,CAAA","file":"modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n $.proxy(this.hide, this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n $.proxy(this._showElement, this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.IN)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window).off(EVENT_KEY)\n $(document).off(EVENT_KEY)\n $(this._element).off(EVENT_KEY)\n $(this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._originalBodyPadding = null\n this._scrollbarWidth = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.IN)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n let transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === 27) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.IN)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.IN)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px~`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n let fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n let documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth =\n documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(Selector.FIXED_CONTENT).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n `${bodyPadding + this._scrollbarWidth}px`\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n $(document).ready(() => {\n // Malgré les recommandation de Bootstrap, on fait en sorte d'ajouter les tags aria pour \"être sur\"\n let $modals = $('[data-toggle=\"modal\"]')\n $modals.each(function() {\n // modal = l'élement déclencheur de l'aperçu de la popin\n // modalPanel = la fenêtre modal à proprement parler\n let modal = $(this),\n modalPanel = modal.attr('data-target') ? $(modal.attr('data-target')) : $(modal.attr('href'))\n\n // On ajoute les tags aria qui vont bien et on empeche le focus avec tabulation\n modalPanel.attr({ role : 'dialog' })// LLA removed with BS 3.3.5, 'aria-hidden' : 'true', 'tabIndex' : '-1' });\n\n // On ajoute le tags aria-labelledby uniquement si la popin à un title et que celui-ci possède un id\n let modalTitle = modalPanel.find('.modal-title')\n if (modalTitle) {\n let modalTitleId = modalTitle.attr('id')\n if (modalTitleId) {\n modalPanel.attr({ 'aria-labelledby' : modalTitleId })\n }\n }\n })\n\n $('.modal-dialog').attr({ role : 'document' })\n })\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]} \ No newline at end of file +{"version":3,"sources":["../src/modal.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,KAAK,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;A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CAAA;AAC9B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,KAAK,CAAC,gBAAgB,CAAA;GAC9B,CAAA;;AAED,SAAO,KAAK,CAAA;CAEb,CAAA,CAAE,MAAM,CAAC,CAAA","file":"modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n $.proxy(this.hide, this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n $.proxy(this._showElement, this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.IN)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window).off(EVENT_KEY)\n $(document).off(EVENT_KEY)\n $(this._element).off(EVENT_KEY)\n $(this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._originalBodyPadding = null\n this._scrollbarWidth = null\n }\n\n\n // private\n\n _getConfig(config) {\n config = $.extend({}, Default, config)\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.IN)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n let transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === 27) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.IN)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.IN)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px~`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n let fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n let documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth =\n documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(Selector.FIXED_CONTENT).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n `${bodyPadding + this._scrollbarWidth}px`\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n $(document).ready(() => {\n // Malgré les recommandation de Bootstrap, on fait en sorte d'ajouter les tags aria pour \"être sur\"\n let $modals = $('[data-toggle=\"modal\"]')\n $modals.each(function () {\n // modal = l'élement déclencheur de l'aperçu de la popin\n // modalPanel = la fenêtre modal à proprement parler\n let $modal = $(this)\n let modalPanel = $modal.attr('data-target') ? $($modal.attr('data-target')) : $($modal.attr('href'))\n\n // On ajoute les tags aria qui vont bien et on empeche le focus avec tabulation\n modalPanel.attr({ role : 'dialog' })// LLA removed with BS 3.3.5, 'aria-hidden' : 'true', 'tabIndex' : '-1' });\n\n // On ajoute le tags aria-labelledby uniquement si la popin à un title et que celui-ci possède un id\n let modalTitle = modalPanel.find('.modal-title')\n if (modalTitle) {\n let modalTitleId = modalTitle.attr('id')\n if (modalTitleId) {\n modalPanel.attr({ 'aria-labelledby' : modalTitleId })\n }\n }\n })\n\n $('.modal-dialog').attr({ role : 'document' })\n })\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]} \ No newline at end of file diff --git a/js/dist/tab.js b/js/dist/tab.js index 7b29fd5e40..1718cfb285 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -147,16 +147,20 @@ var Tab = (function ($) { $.removeClass(this._element, DATA_KEY); this._element = null; } + + // Boosted mod }, { key: '_activate', + // end mod // private value: function _activate(element, container, callback) { + // Boosted mod var $active = $(container).find('> .active'); $active.find('[data-toggle=tab], [data-toggle=pill]').attr({ tabIndex: '-1', 'aria-selected': false }); $active.filter('.tab-pane').attr({ 'aria-hidden': true, tabIndex: '-1' }); - + // end mod var active = $(container).find(Selector.ACTIVE_CHILD)[0]; var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0])); @@ -171,12 +175,13 @@ var Tab = (function ($) { if (active) { $(active).removeClass(ClassName.IN); } - + // Boosted mod if (element.tagName === 'A') { var elemID = '#' + element.id; - $(elemID).attr({ tabIndex: '0', 'aria-selected': true }).focus(); + $(elemID).attr({ tabIndex: '0', 'aria-selected': true }).trigger('focus'); } $(element).filter('.tab-pane.active').attr({ 'aria-hidden': false, tabIndex: '0' }); + // end mod } }, { key: '_transitionComplete', @@ -250,7 +255,7 @@ var Tab = (function ($) { } var nextTab = $items.eq(index); if (nextTab.attr('role') === 'tab') { - nextTab.tab('show').focus(); + nextTab.tab('show').trigger('focus'); } e.preventDefault(); @@ -291,6 +296,7 @@ var Tab = (function ($) { Tab._jQueryInterface.call($(this), 'show'); }); + // Boosted mod $(document).on('keydown.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (event) { if (!/(38|40|39|37)/.test(event.which)) { return; @@ -298,11 +304,13 @@ var Tab = (function ($) { event.preventDefault(); Tab._keydown.call($(this), event); }); + // end mod /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ + // Boosted mod // ajout de l'accesibilité // =============================== @@ -319,19 +327,20 @@ var Tab = (function ($) { $tabs.attr('role', 'tab'); $tabs.each(function () { var tabpanel = $($(this).attr('href')); - var tab = $(this); - var tabid = tab.attr('id') || uniqueId('ui-tab'); + var $tab = $(this); + var tabid = $tab.attr('id') || uniqueId('ui-tab'); - tab.attr('id', tabid); + $tab.attr('id', tabid); - if (tab.hasClass('active')) { - tab.attr({ tabIndex: '0', 'aria-selected': 'true', 'aria-controls': tab.attr('href').substr(1) }); + if ($tab.hasClass('active')) { + $tab.attr({ tabIndex: '0', 'aria-selected': 'true', 'aria-controls': $tab.attr('href').substr(1) }); tabpanel.attr({ role: 'tabpanel', tabIndex: '0', 'aria-hidden': 'false', 'aria-labelledby': tabid }); } else { - tab.attr({ tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': tab.attr('href').substr(1) }); + $tab.attr({ tabIndex: '-1', 'aria-selected': 'false', 'aria-controls': $tab.attr('href').substr(1) }); tabpanel.attr({ role: 'tabpanel', tabIndex: '-1', 'aria-hidden': 'true', 'aria-labelledby': tabid }); } }); + // end mod $.fn[NAME] = Tab._jQueryInterface; $.fn[NAME].Constructor = Tab; diff --git a/js/dist/tab.js.map b/js/dist/tab.js.map index c5f7d5dde8..f4eb25c27c 100644 --- a/js/dist/tab.js.map +++ b/js/dist/tab.js.map @@ -1 +1 @@ -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A;;AAErB,QAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC1B,SAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAG,GAAG,EAAE,eAAe,EAAG,MAAM,EAAE,eAAe,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACnG,cAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,UAAU,EAAE,QAAQ,EAAG,GAAG,EAAE,aAAa,EAAG,OAAO,EAAE,iBAAiB,EAAC,KAAK,EAAE,CAAC,CAAA;KACvG,MAAM;AACL,SAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAG,IAAI,EAAE,eAAe,EAAG,OAAO,EAAE,eAAe,EAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACrG,cAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,UAAU,EAAE,QAAQ,EAAG,IAAI,EAAE,aAAa,EAAG,MAAM,EAAE,iBAAiB,EAAC,KAAK,EAAE,CAAC,CAAA;KACvG;GACF,CAAC,CAAA;;AAEF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,GAAG,CAAC,gBAAgB,CAAA;AAC7C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,GAAG,CAAA;AAC5B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,GAAG,CAAC,gBAAgB,CAAA;GAC5B,CAAA;;AAED,SAAO,GAAG,CAAA;CAEX,CAAA,CAAE,MAAM,CAAC,CAAA","file":"tab.js","sourcesContent":["import Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.tab'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n DROPDOWN : '.dropdown',\n UL : 'ul:not(.dropdown-menu)',\n FADE_CHILD : '> .nav-item .fade, > .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .nav-item > .active, > .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_TOGGLE : '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType === Node.ELEMENT_NODE) &&\n ($(this._element).hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let ulElement = $(this._element).closest(Selector.UL)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (ulElement) {\n previous = $.makeArray($(ulElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n this._element,\n ulElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeClass(this._element, DATA_KEY)\n this._element = null\n }\n\n\tstatic _keydown(e) {\n let $this = $(this)\n let $items\n let $ul = $this.closest('ul[role=tablist] ')\n let index\n let k = e.which || e.keyCode\n $this = $(this)\n if (!/(37|38|39|40)/.test(k)) {\n return\n }\n $items = $ul.find('[role=tab]:visible')\n index = $items.index($items.filter(':focus'))\n\n if (k === 38 || k === 37) {\n index--\n }\t// up & left\n if (k === 39 || k === 40) {\n index++\n }\t// down & right\n\n if (index < 0) {\n index = $items.length - 1\n }\n if (index === $items.length) {\n index = 0\n }\n let nextTab = $items.eq(index)\n if (nextTab.attr('role') === 'tab') {\n nextTab.tab('show').focus()\n }\n\n e.preventDefault()\n e.stopPropagation()\n}\n\n // private\n\n _activate(element, container, callback) {\n let $active = $(container).find('> .active')\n $active.find('[data-toggle=tab], [data-toggle=pill]').attr({ tabIndex : '-1', 'aria-selected' : false })\n $active.filter('.tab-pane').attr({ 'aria-hidden' : true, tabIndex : '-1' })\n\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || Boolean($(container).find(Selector.FADE_CHILD)[0]))\n\n let complete = $.proxy(\n this._transitionComplete,\n this,\n element,\n active,\n isTransitioning,\n callback\n )\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n\n if (element.tagName === 'A') {\n let elemID = `#${element.id}`\n $(elemID).attr({ tabIndex : '0', 'aria-selected' : true }).focus()\n }\n $(element).filter('.tab-pane.active').attr({ 'aria-hidden' : false, tabIndex : '0' })\n\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n active.setAttribute('aria-expanded', false)\n }\n\n $(element).addClass(ClassName.ACTIVE)\n element.setAttribute('aria-expanded', true)\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n\n $(document)\n\t.on('keydown.tab.data-api', '[data-toggle=\"tab\"], [data-toggle=\"pill\"]', function (event) {\n if (!/(38|40|39|37)/.test(event.which)) {\n return\n }\n event.preventDefault()\n Tab._keydown.call($(this), event)\n})\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n // ajout de l'accesibilité\n // ===============================\n\n let uniqueId = function(prefix) {\n return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}`\n }\n\n let $tablist = $('.nav-tabs, .nav-pills')\n let $lis = $tablist.children('li')\n let $tabs = $tablist.find('[data-toggle=\"tab\"], [data-toggle=\"pill\"]')\n\n $tablist.attr('role', 'tablist')\n $lis.attr('role', 'presentation')\n $tabs.attr('role', 'tab')\n $tabs.each(function() {\n let tabpanel = $($(this).attr('href'))\n let tab = $(this)\n let tabid = tab.attr('id') || uniqueId('ui-tab')\n\n tab.attr('id', tabid)\n\n if (tab.hasClass('active')) {\n tab.attr({ tabIndex : '0', 'aria-selected' : 'true', 'aria-controls': tab.attr('href').substr(1) })\n tabpanel.attr({ role : 'tabpanel', tabIndex : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid })\n } else {\n tab.attr({ tabIndex : '-1', 'aria-selected' : 'false', 'aria-controls': tab.attr('href').substr(1) })\n tabpanel.attr({ role : 'tabpanel', tabIndex : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid })\n }\n })\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\n return Tab\n\n})(jQuery)\n\nexport default Tab\n"]} \ No newline at end of file +{"version":3,"sources":["../src/tab.js"],"names":[],"mappings":";;;;;;;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AEtB,QAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC3B,UAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAG,GAAG,EAAE,eAAe,EAAG,MAAM,EAAE,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACrG,cAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,UAAU,EAAE,QAAQ,EAAG,GAAG,EAAE,aAAa,EAAG,OAAO,EAAE,iBAAiB,EAAC,KAAK,EAAE,CAAC,CAAA;KACvG,MAAM;AACL,UAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAG,IAAI,EAAE,eAAe,EAAG,OAAO,EAAE,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACvG,cAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAG,UAAU,EAAE,QAAQ,EAAG,IAAI,EAAE,aAAa,EAAG,MAAM,EAAE,iBAAiB,EAAC,KAAK,EAAE,CAAC,CAAA;KACvG;GACF,CAAC,CAAA;;;AAGF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,GAAG,CAAC,gBAAgB,CAAA;AAC7C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,GAAG,CAAA;AAC5B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,GAAG,CAAC,gBAAgB,CAAA;GAC5B,CAAA;;AAED,SAAO,GAAG,CAAA;CAEX,CAAA,CAAE,MAAM,CAAC,CAAA","file":"tab.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0-alpha.2): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0-alpha.2'\n const DATA_KEY = 'bs.tab'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n DROPDOWN : '.dropdown',\n UL : 'ul:not(.dropdown-menu)',\n FADE_CHILD : '> .nav-item .fade, > .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .nav-item > .active, > .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_TOGGLE : '.dropdown-toggle',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType === Node.ELEMENT_NODE) &&\n ($(this._element).hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let ulElement = $(this._element).closest(Selector.UL)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (ulElement) {\n previous = $.makeArray($(ulElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n this._element,\n ulElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeClass(this._element, DATA_KEY)\n this._element = null\n }\n // Boosted mod\n static _keydown(e) {\n let $this = $(this)\n let $items\n let $ul = $this.closest('ul[role=tablist] ')\n let index\n let k = e.which || e.keyCode\n $this = $(this)\n if (!/(37|38|39|40)/.test(k)) {\n return\n }\n $items = $ul.find('[role=tab]:visible')\n index = $items.index($items.filter(':focus'))\n\n if (k === 38 || k === 37) {\n index--\n }\t// up & left\n if (k === 39 || k === 40) {\n index++\n }\t// down & right\n\n if (index < 0) {\n index = $items.length - 1\n }\n if (index === $items.length) {\n index = 0\n }\n let nextTab = $items.eq(index)\n if (nextTab.attr('role') === 'tab') {\n nextTab.tab('show').trigger('focus')\n }\n\n e.preventDefault()\n e.stopPropagation()\n }\n // end mod\n // private\n\n _activate(element, container, callback) {\n // Boosted mod\n let $active = $(container).find('> .active')\n $active.find('[data-toggle=tab], [data-toggle=pill]').attr({ tabIndex : '-1', 'aria-selected' : false })\n $active.filter('.tab-pane').attr({ 'aria-hidden' : true, tabIndex : '-1' })\n // end mod\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || Boolean($(container).find(Selector.FADE_CHILD)[0]))\n\n let complete = $.proxy(\n this._transitionComplete,\n this,\n element,\n active,\n isTransitioning,\n callback\n )\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n // Boosted mod\n if (element.tagName === 'A') {\n let elemID = `#${element.id}`\n $(elemID).attr({ tabIndex : '0', 'aria-selected' : true }).trigger('focus')\n }\n $(element).filter('.tab-pane.active').attr({ 'aria-hidden' : false, tabIndex : '0' })\n // end mod\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n active.setAttribute('aria-expanded', false)\n }\n\n $(element).addClass(ClassName.ACTIVE)\n element.setAttribute('aria-expanded', true)\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n // Boosted mod\n $(document)\n .on('keydown.tab.data-api', '[data-toggle=\"tab\"], [data-toggle=\"pill\"]', function (event) {\n if (!/(38|40|39|37)/.test(event.which)) {\n return\n }\n event.preventDefault()\n Tab._keydown.call($(this), event)\n })\n // end mod\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n // Boosted mod\n // ajout de l'accesibilité\n // ===============================\n\n let uniqueId = function (prefix) {\n return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}`\n }\n\n let $tablist = $('.nav-tabs, .nav-pills')\n let $lis = $tablist.children('li')\n let $tabs = $tablist.find('[data-toggle=\"tab\"], [data-toggle=\"pill\"]')\n\n $tablist.attr('role', 'tablist')\n $lis.attr('role', 'presentation')\n $tabs.attr('role', 'tab')\n $tabs.each(function () {\n let tabpanel = $($(this).attr('href'))\n let $tab = $(this)\n let tabid = $tab.attr('id') || uniqueId('ui-tab')\n\n $tab.attr('id', tabid)\n\n if ($tab.hasClass('active')) {\n $tab.attr({ tabIndex : '0', 'aria-selected' : 'true', 'aria-controls': $tab.attr('href').substr(1) })\n tabpanel.attr({ role : 'tabpanel', tabIndex : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid })\n } else {\n $tab.attr({ tabIndex : '-1', 'aria-selected' : 'false', 'aria-controls': $tab.attr('href').substr(1) })\n tabpanel.attr({ role : 'tabpanel', tabIndex : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid })\n }\n })\n // end mod\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\n return Tab\n\n})(jQuery)\n\nexport default Tab\n"]} \ No newline at end of file diff --git a/js/src/collapse.js b/js/src/collapse.js index 49d142be8e..bf92808a55 100644 --- a/js/src/collapse.js +++ b/js/src/collapse.js @@ -310,13 +310,14 @@ const Collapse = (($) => { // static static _keydown(e, that) { - let $items, - $tablist = $this.closest('div.panel-group '), - $this = $(that), - index, - k = e.which || e.keyCode - - if (k === 32) { // space + let $items + let $tablist = $this.closest('div.panel-group ') + let $this = $(that) + let index + let k = e.which || e.keyCode + + if (k === 32) { + // space $this.click() } @@ -324,7 +325,8 @@ const Collapse = (($) => { index = $items.index($items.filter(':focus')) if (k === 38 || k === 37) { - index-- // up & left + index-- + // up & left } if (k === 39 || k === 40) { index++ // down & right @@ -384,21 +386,21 @@ const Collapse = (($) => { * ------------------------------------------------------------------------ */ - let uniqueId = function(prefix) { + let uniqueId = function (prefix) { return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}` } let $colltabs = $('[data-toggle="collapse"]:not(.navbar-toggle)') $colltabs.attr({ role:'tab', 'aria-selected':'false', 'aria-expanded':'false' }) - $colltabs.each(function() { - let collid = $(this).attr('id') || uniqueId('ui-collapse'), - collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href')), - collparent = parent && $(parent), - colltab = $(this), - heading = '', - parent = colltab.attr('data-parent') - - colltab.attr('id', collid) + $colltabs.each(function () { + let collid = $(this).attr('id') || uniqueId('ui-collapse') + let collpanel = $(this).attr('data-target') ? $($(this).attr('data-target')) : $($(this).attr('href')) + let collparent = parent && $(parent) + let $colltab = $(this) + let heading = '' + let parent = $colltab.attr('data-parent') + + $colltab.attr('id', collid) if (collparent) { $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role', 'presentation') collparent.attr({ role: 'tablist', 'aria-multiselectable' : 'true' }) @@ -406,10 +408,10 @@ const Collapse = (($) => { heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading) if (collpanel.hasClass('in')) { - colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true', tabindex:'0' }) + $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true', tabindex:'0' }) // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role:'tabpanel', tabindex:'0', 'aria-labelledby':collid, 'aria-hidden':'false' }) } @@ -420,9 +422,9 @@ const Collapse = (($) => { heading.children().first().addClass('panel-chevron-open') } } else { - colltab.attr({ 'aria-controls' : collpanel.attr('id'), tabindex:'-1' }) + $colltab.attr({ 'aria-controls' : collpanel.attr('id'), tabindex:'-1' }) // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role:'tabpanel', tabindex:'-1', 'aria-labelledby':collid, 'aria-hidden':'true' }) } @@ -434,9 +436,9 @@ const Collapse = (($) => { } else { heading = collpanel.parent().children().first() // On sélectionne le heading (panel-heading) if (collpanel.hasClass('in')) { - colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true' }) + $colltab.attr({ 'aria-controls': collpanel.attr('id'), 'aria-selected':'true', 'aria-expanded':'true' }) // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'false' }) } @@ -448,9 +450,9 @@ const Collapse = (($) => { } } else { - colltab.attr({ 'aria-controls' : collpanel.attr('id'), 'aria-selected':'false', 'aria-expanded':'false' }) + $colltab.attr({ 'aria-controls' : collpanel.attr('id'), 'aria-selected':'false', 'aria-expanded':'false' }) // don't change the attribute for menu panel specific case - if (!colltab.hasClass('navbar-toggle')) { + if (!$colltab.hasClass('navbar-toggle')) { collpanel.attr({ role:'tabpanel', 'aria-labelledby':collid, 'aria-hidden':'true' }) } diff --git a/js/src/dropdown.js b/js/src/dropdown.js index f9a88d91d2..36cd002573 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -108,16 +108,14 @@ const Dropdown = (($) => { if (showEvent.isDefaultPrevented()) { return false } - + // Boosted mod // this.focus() + $(parent).find('.dropdown-menu li:not(.disabled) a:not(.disabled)').first().trigger('focus') + // end mod this.setAttribute('aria-expanded', 'true') - - // patch to select by default first item $(parent).toggleClass(ClassName.OPEN) $(parent).trigger($.Event(Event.SHOWN, relatedTarget)) - $(this).parent().find('.dropdown-menu a').first().focus() - return false } @@ -261,12 +259,13 @@ const Dropdown = (($) => { } } - + // Boosted mod // set default acessibility Attributes $(document).ready(($) => { $('.dropdown-menu').attr('role', 'menu') $('.dropdown-menu a.dropdown-item').attr('role', 'menuitem') }) + // end mod /** * ------------------------------------------------------------------------ * Data Api implementation diff --git a/js/src/form.js b/js/src/form.js index 13d8f062e7..3a373ebac6 100644 --- a/js/src/form.js +++ b/js/src/form.js @@ -1,6 +1,7 @@ // forms validation fall back for old navigators $(document).ready(() => { 'use strict' + if (typeof validate === 'function') { $('form').validate({ errorPlacement(error, element) { diff --git a/js/src/megamenu.js b/js/src/megamenu.js index 9e451782fb..3bd52c74e9 100644 --- a/js/src/megamenu.js +++ b/js/src/megamenu.js @@ -39,8 +39,8 @@ const Megamenu = (($) => { $(megamenuItems).eq(index).trigger('focus') }) - // WAI-ARIA - $('.mega-menu .dropdown-toggle').each(function() { + // WAI-ARIA + $('.mega-menu .dropdown-toggle').each(function () { let dropdownToggleId = uuid() let dropdownMenu = $(this).next('ul.dropdown-menu') let dropdownMenuId = uuid() @@ -51,29 +51,29 @@ const Megamenu = (($) => { $(dropdownMenu).attr('aria-labelledby', dropdownToggleId) }) - $('.mega-menu .megamenu-dropdown-toggle').on('click', function() { - $('.mega-menu .megamenu-dropdown-toggle').each(function() { + $('.mega-menu .megamenu-dropdown-toggle').on('click', function () { + $('.mega-menu .megamenu-dropdown-toggle').each(function () { $(this).removeClass('active') }) $(this).addClass('active') }) // extending to level 2 in 320 - $('.mega-menu h3').on('click', function() { + $('.mega-menu h3').on('click', function () { $('.megamenuclosetop').parent().find('.megamenuclosetop').addClass('active') $('.megamenuclosetop').parent().parent().parent().parent().find('.container .navbar-toggleable-xs').addClass('active') $(this).addClass('disabled') }) // extending to level 1 in 320 - $('.nav-item .megamenu-dropdown-toggle').on('click', function() { + $('.nav-item .megamenu-dropdown-toggle').on('click', function () { $('.closing-bare').css({ height : '0' }) $('.open').removeClass('open') - // standard + // standard $(this).parent().addClass('open') $(this).attr('aria-expanded', 'true') - // 320 + // 320 if (document.body.clientWidth < 768) { $(this).parent().parent().addClass('menu-level1') let outerHeight = $(this).parent().find('ul[role=menu]').outerHeight() @@ -87,7 +87,7 @@ const Megamenu = (($) => { }) // extending to level 2 in 320 - $('.nav-item ul li div h3').on('click', function() { + $('.nav-item ul li div h3').on('click', function () { $(this).parent().find('ul').addClass('open') $(this).parent().find('ul').prepend(`
  • ${this.innerHTML}

  • `) $('.back_menu1').on('click', backToMenu1) @@ -98,14 +98,14 @@ const Megamenu = (($) => { } }) - // back to level 0 in 320 + // back to level 0 in 320 $('.nav-item .row h2').on('click', () => { $('.menu-level1').removeClass('menu-level1') $('.navbar-toggleable-xs').css({ height : 'inherit' }) }) - // back to level 1 in 320 - function backToMenu1 () { + // back to level 1 in 320 + function backToMenu1() { $('.menu-level1').removeClass('menu-level2') $('.back_menu1').remove() $('.row .open').removeClass('open') @@ -116,7 +116,7 @@ const Megamenu = (($) => { } // openning mega menu in 320 - $('.megamenubacktop').on('click', function() { + $('.megamenubacktop').on('click', function () { $('.menu-level1').removeClass('menu-level1').removeClass('menu-level2') $('.navbar-toggleable-xs').css({ height : 'inherit' }) $('.topmenucontent .icon-search').removeClass('color-orange') @@ -129,7 +129,7 @@ const Megamenu = (($) => { }) // close mega menu in 320 - $('.megamenuclosetop , .closing-bare-button a').on('click', function() { + $('.megamenuclosetop , .closing-bare-button a').on('click', function () { $('.open').removeClass('open') $('.megamenuclosetop').parent().find('.megamenubacktop').removeClass('disabled') $('.megamenuclosetop').parent().parent().parent().parent().find('.container .navbar-toggleable-xs').removeClass('active') @@ -139,7 +139,7 @@ const Megamenu = (($) => { $(this).removeClass('active') }) - // search bar + // search bar $('.megamenusearchtop').on('click', () => { $('.megamenuclosetop').trigger('click') $('.topmenucontent .icon-search').addClass('color-orange') @@ -147,12 +147,12 @@ const Megamenu = (($) => { }) // clear search - $('.megamenusearchinputclose').on('click', function() { + $('.megamenusearchinputclose').on('click', function () { $(this).parent().find('input').val('') $(this).removeClass('visible') }) - $('.megamenusearchinputtext').on('keyup', function() { + $('.megamenusearchinputtext').on('keyup', function () { if ($(this).val() !== '') { $(this).parent().find('.megamenusearchinputclose').addClass('visible') } else { diff --git a/js/src/modal.js b/js/src/modal.js index e84ddab755..4a06f2c5b2 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -517,11 +517,11 @@ const Modal = (($) => { $(document).ready(() => { // Malgré les recommandation de Bootstrap, on fait en sorte d'ajouter les tags aria pour "être sur" let $modals = $('[data-toggle="modal"]') - $modals.each(function() { + $modals.each(function () { // modal = l'élement déclencheur de l'aperçu de la popin // modalPanel = la fenêtre modal à proprement parler - let modal = $(this), - modalPanel = modal.attr('data-target') ? $(modal.attr('data-target')) : $(modal.attr('href')) + let $modal = $(this) + let modalPanel = $modal.attr('data-target') ? $($modal.attr('data-target')) : $($modal.attr('href')) // On ajoute les tags aria qui vont bien et on empeche le focus avec tabulation modalPanel.attr({ role : 'dialog' })// LLA removed with BS 3.3.5, 'aria-hidden' : 'true', 'tabIndex' : '-1' }); diff --git a/js/src/tab.js b/js/src/tab.js index 49ceb4be58..ca1a5a33ac 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -1,5 +1,6 @@ import Util from './util' + /** * -------------------------------------------------------------------------- * Bootstrap (v4.0.0-alpha.2): tab.js @@ -144,49 +145,50 @@ const Tab = (($) => { $.removeClass(this._element, DATA_KEY) this._element = null } + // Boosted mod + static _keydown(e) { + let $this = $(this) + let $items + let $ul = $this.closest('ul[role=tablist] ') + let index + let k = e.which || e.keyCode + $this = $(this) + if (!/(37|38|39|40)/.test(k)) { + return + } + $items = $ul.find('[role=tab]:visible') + index = $items.index($items.filter(':focus')) + + if (k === 38 || k === 37) { + index-- + } // up & left + if (k === 39 || k === 40) { + index++ + } // down & right + + if (index < 0) { + index = $items.length - 1 + } + if (index === $items.length) { + index = 0 + } + let nextTab = $items.eq(index) + if (nextTab.attr('role') === 'tab') { + nextTab.tab('show').trigger('focus') + } - static _keydown(e) { - let $this = $(this) - let $items - let $ul = $this.closest('ul[role=tablist] ') - let index - let k = e.which || e.keyCode - $this = $(this) - if (!/(37|38|39|40)/.test(k)) { - return - } - $items = $ul.find('[role=tab]:visible') - index = $items.index($items.filter(':focus')) - - if (k === 38 || k === 37) { - index-- - } // up & left - if (k === 39 || k === 40) { - index++ - } // down & right - - if (index < 0) { - index = $items.length - 1 - } - if (index === $items.length) { - index = 0 - } - let nextTab = $items.eq(index) - if (nextTab.attr('role') === 'tab') { - nextTab.tab('show').focus() - } - - e.preventDefault() - e.stopPropagation() -} - + e.preventDefault() + e.stopPropagation() + } + // end mod // private _activate(element, container, callback) { + // Boosted mod let $active = $(container).find('> .active') $active.find('[data-toggle=tab], [data-toggle=pill]').attr({ tabIndex : '-1', 'aria-selected' : false }) $active.filter('.tab-pane').attr({ 'aria-hidden' : true, tabIndex : '-1' }) - + // end mod let active = $(container).find(Selector.ACTIVE_CHILD)[0] let isTransitioning = callback && Util.supportsTransitionEnd() @@ -214,13 +216,13 @@ const Tab = (($) => { if (active) { $(active).removeClass(ClassName.IN) } - + // Boosted mod if (element.tagName === 'A') { let elemID = `#${element.id}` - $(elemID).attr({ tabIndex : '0', 'aria-selected' : true }).focus() + $(elemID).attr({ tabIndex : '0', 'aria-selected' : true }).trigger('focus') } $(element).filter('.tab-pane.active').attr({ 'aria-hidden' : false, tabIndex : '0' }) - + // end mod } _transitionComplete(element, active, isTransitioning, callback) { @@ -301,24 +303,26 @@ const Tab = (($) => { Tab._jQueryInterface.call($(this), 'show') }) - + // Boosted mod $(document) - .on('keydown.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (event) { - if (!/(38|40|39|37)/.test(event.which)) { - return - } - event.preventDefault() - Tab._keydown.call($(this), event) -}) + .on('keydown.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (event) { + if (!/(38|40|39|37)/.test(event.which)) { + return + } + event.preventDefault() + Tab._keydown.call($(this), event) + }) + // end mod /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ + // Boosted mod // ajout de l'accesibilité // =============================== - let uniqueId = function(prefix) { + let uniqueId = function (prefix) { return `${prefix || 'ui-id'}-${Math.floor(Math.random() * 1000 + 1)}` } @@ -329,21 +333,22 @@ const Tab = (($) => { $tablist.attr('role', 'tablist') $lis.attr('role', 'presentation') $tabs.attr('role', 'tab') - $tabs.each(function() { + $tabs.each(function () { let tabpanel = $($(this).attr('href')) - let tab = $(this) - let tabid = tab.attr('id') || uniqueId('ui-tab') + let $tab = $(this) + let tabid = $tab.attr('id') || uniqueId('ui-tab') - tab.attr('id', tabid) + $tab.attr('id', tabid) - if (tab.hasClass('active')) { - tab.attr({ tabIndex : '0', 'aria-selected' : 'true', 'aria-controls': tab.attr('href').substr(1) }) + if ($tab.hasClass('active')) { + $tab.attr({ tabIndex : '0', 'aria-selected' : 'true', 'aria-controls': $tab.attr('href').substr(1) }) tabpanel.attr({ role : 'tabpanel', tabIndex : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid }) } else { - tab.attr({ tabIndex : '-1', 'aria-selected' : 'false', 'aria-controls': tab.attr('href').substr(1) }) + $tab.attr({ tabIndex : '-1', 'aria-selected' : 'false', 'aria-controls': $tab.attr('href').substr(1) }) tabpanel.attr({ role : 'tabpanel', tabIndex : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid }) } }) + // end mod $.fn[NAME] = Tab._jQueryInterface $.fn[NAME].Constructor = Tab diff --git a/js/tests/visual/dropdown.html b/js/tests/visual/dropdown.html index e3da743a57..11474728ec 100644 --- a/js/tests/visual/dropdown.html +++ b/js/tests/visual/dropdown.html @@ -22,13 +22,13 @@

    Dropdown Bootstrap Visual Test