jquery-ui-rails 5.0.4 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitmodules +1 -1
- data/.travis.yml +1 -1
- data/History.md +23 -2
- data/README.md +67 -50
- data/Rakefile +58 -29
- data/VERSIONS.md +4 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/core.js +15 -304
- data/app/assets/javascripts/jquery-ui/data.js +45 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
- data/app/assets/javascripts/jquery-ui/effect.js +565 -891
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +89 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +83 -0
- data/app/assets/javascripts/jquery-ui/form.js +25 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
- data/app/assets/javascripts/jquery-ui/ie.js +20 -0
- data/app/assets/javascripts/jquery-ui/jquery-patch.js +91 -0
- data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/app/assets/javascripts/jquery-ui/labels.js +71 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/app/assets/javascripts/jquery-ui/position.js +107 -111
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +722 -0
- data/app/assets/javascripts/jquery-ui/version.js +20 -0
- data/app/assets/javascripts/jquery-ui/widget.js +359 -163
- data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +200 -163
- data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +153 -106
- data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +289 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2243 -0
- data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +267 -181
- data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +430 -294
- data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +174 -84
- data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +228 -158
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +63 -41
- data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1225 -0
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
- data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +259 -177
- data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +199 -160
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1623 -0
- data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +184 -114
- data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +258 -211
- data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +165 -100
- data/app/assets/javascripts/jquery-ui.js +53 -33
- data/app/assets/stylesheets/jquery-ui/accordion.css +1 -15
- data/app/assets/stylesheets/jquery-ui/all.css +1 -1
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -3
- data/app/assets/stylesheets/jquery-ui/base.css +3 -1
- data/app/assets/stylesheets/jquery-ui/button.css +35 -68
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +12 -8
- data/app/assets/stylesheets/jquery-ui/datepicker.css +11 -2
- data/app/assets/stylesheets/jquery-ui/dialog.css +38 -11
- data/app/assets/stylesheets/jquery-ui/draggable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/menu.css +7 -7
- data/app/assets/stylesheets/jquery-ui/progressbar.css +2 -3
- data/app/assets/stylesheets/jquery-ui/resizable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +11 -22
- data/app/assets/stylesheets/jquery-ui/slider.css +2 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/spinner.css +7 -22
- data/app/assets/stylesheets/jquery-ui/tabs.css +1 -2
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +121 -92
- data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +153 -146
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/button.js +0 -414
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +0 -73
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +0 -39
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +0 -40
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker.js +0 -2086
- data/app/assets/javascripts/jquery-ui/effect-blind.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-bounce.js +0 -125
- data/app/assets/javascripts/jquery-ui/effect-clip.js +0 -79
- data/app/assets/javascripts/jquery-ui/effect-drop.js +0 -77
- data/app/assets/javascripts/jquery-ui/effect-explode.js +0 -109
- data/app/assets/javascripts/jquery-ui/effect-fade.js +0 -42
- data/app/assets/javascripts/jquery-ui/effect-fold.js +0 -88
- data/app/assets/javascripts/jquery-ui/effect-highlight.js +0 -62
- data/app/assets/javascripts/jquery-ui/effect-puff.js +0 -63
- data/app/assets/javascripts/jquery-ui/effect-pulsate.js +0 -75
- data/app/assets/javascripts/jquery-ui/effect-scale.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-shake.js +0 -86
- data/app/assets/javascripts/jquery-ui/effect-size.js +0 -235
- data/app/assets/javascripts/jquery-ui/effect-slide.js +0 -76
- data/app/assets/javascripts/jquery-ui/effect-transfer.js +0 -59
- data/app/assets/javascripts/jquery-ui/mouse.js +0 -202
- data/app/assets/javascripts/jquery-ui/resizable.js +0 -1183
- data/app/assets/javascripts/jquery-ui/selectable.js +0 -291
- data/app/assets/javascripts/jquery-ui/sortable.js +0 -1308
@@ -1,47 +1,71 @@
|
|
1
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/version
|
2
|
+
//= require jquery-ui/keycode
|
3
|
+
//= require jquery-ui/unique-id
|
2
4
|
//= require jquery-ui/widget
|
3
5
|
|
4
6
|
/*!
|
5
|
-
* jQuery UI Accordion 1.
|
7
|
+
* jQuery UI Accordion 1.13.0
|
6
8
|
* http://jqueryui.com
|
7
9
|
*
|
8
10
|
* Copyright jQuery Foundation and other contributors
|
9
11
|
* Released under the MIT license.
|
10
12
|
* http://jquery.org/license
|
11
|
-
*
|
12
|
-
* http://api.jqueryui.com/accordion/
|
13
13
|
*/
|
14
|
-
|
14
|
+
|
15
|
+
//>>label: Accordion
|
16
|
+
//>>group: Widgets
|
17
|
+
/* eslint-disable max-len */
|
18
|
+
//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
|
19
|
+
/* eslint-enable max-len */
|
20
|
+
//>>docs: http://api.jqueryui.com/accordion/
|
21
|
+
//>>demos: http://jqueryui.com/accordion/
|
22
|
+
//>>css.structure: ../../themes/base/core.css
|
23
|
+
//>>css.structure: ../../themes/base/accordion.css
|
24
|
+
//>>css.theme: ../../themes/base/theme.css
|
25
|
+
|
26
|
+
( function( factory ) {
|
27
|
+
"use strict";
|
28
|
+
|
15
29
|
if ( typeof define === "function" && define.amd ) {
|
16
30
|
|
17
31
|
// AMD. Register as an anonymous module.
|
18
|
-
define([
|
32
|
+
define( [
|
19
33
|
"jquery",
|
20
|
-
"
|
21
|
-
"
|
34
|
+
"../version",
|
35
|
+
"../keycode",
|
36
|
+
"../unique-id",
|
37
|
+
"../widget"
|
22
38
|
], factory );
|
23
39
|
} else {
|
24
40
|
|
25
41
|
// Browser globals
|
26
42
|
factory( jQuery );
|
27
43
|
}
|
28
|
-
}(function( $ ) {
|
44
|
+
} )( function( $ ) {
|
45
|
+
"use strict";
|
29
46
|
|
30
47
|
return $.widget( "ui.accordion", {
|
31
|
-
version: "1.
|
48
|
+
version: "1.13.0",
|
32
49
|
options: {
|
33
50
|
active: 0,
|
34
51
|
animate: {},
|
52
|
+
classes: {
|
53
|
+
"ui-accordion-header": "ui-corner-top",
|
54
|
+
"ui-accordion-header-collapsed": "ui-corner-all",
|
55
|
+
"ui-accordion-content": "ui-corner-bottom"
|
56
|
+
},
|
35
57
|
collapsible: false,
|
36
58
|
event: "click",
|
37
|
-
header:
|
59
|
+
header: function( elem ) {
|
60
|
+
return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
|
61
|
+
},
|
38
62
|
heightStyle: "auto",
|
39
63
|
icons: {
|
40
64
|
activeHeader: "ui-icon-triangle-1-s",
|
41
65
|
header: "ui-icon-triangle-1-e"
|
42
66
|
},
|
43
67
|
|
44
|
-
//
|
68
|
+
// Callbacks
|
45
69
|
activate: null,
|
46
70
|
beforeActivate: null
|
47
71
|
},
|
@@ -64,17 +88,18 @@ return $.widget( "ui.accordion", {
|
|
64
88
|
|
65
89
|
_create: function() {
|
66
90
|
var options = this.options;
|
91
|
+
|
67
92
|
this.prevShow = this.prevHide = $();
|
68
|
-
this.
|
69
|
-
|
70
|
-
.attr( "role", "tablist" );
|
93
|
+
this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
|
94
|
+
this.element.attr( "role", "tablist" );
|
71
95
|
|
72
|
-
//
|
73
|
-
if ( !options.collapsible && (options.active === false || options.active == null) ) {
|
96
|
+
// Don't allow collapsible: false and active: false / null
|
97
|
+
if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
|
74
98
|
options.active = 0;
|
75
99
|
}
|
76
100
|
|
77
101
|
this._processPanels();
|
102
|
+
|
78
103
|
// handle negative values
|
79
104
|
if ( options.active < 0 ) {
|
80
105
|
options.active += this.headers.length;
|
@@ -90,54 +115,42 @@ return $.widget( "ui.accordion", {
|
|
90
115
|
},
|
91
116
|
|
92
117
|
_createIcons: function() {
|
93
|
-
var
|
118
|
+
var icon, children,
|
119
|
+
icons = this.options.icons;
|
120
|
+
|
94
121
|
if ( icons ) {
|
95
|
-
$( "<span>" )
|
96
|
-
|
97
|
-
|
98
|
-
this.active.children( ".ui-accordion-header-icon" )
|
99
|
-
|
100
|
-
.
|
101
|
-
|
122
|
+
icon = $( "<span>" );
|
123
|
+
this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
|
124
|
+
icon.prependTo( this.headers );
|
125
|
+
children = this.active.children( ".ui-accordion-header-icon" );
|
126
|
+
this._removeClass( children, icons.header )
|
127
|
+
._addClass( children, null, icons.activeHeader )
|
128
|
+
._addClass( this.headers, "ui-accordion-icons" );
|
102
129
|
}
|
103
130
|
},
|
104
131
|
|
105
132
|
_destroyIcons: function() {
|
106
|
-
this.headers
|
107
|
-
|
108
|
-
.children( ".ui-accordion-header-icon" )
|
109
|
-
.remove();
|
133
|
+
this._removeClass( this.headers, "ui-accordion-icons" );
|
134
|
+
this.headers.children( ".ui-accordion-header-icon" ).remove();
|
110
135
|
},
|
111
136
|
|
112
137
|
_destroy: function() {
|
113
138
|
var contents;
|
114
139
|
|
115
|
-
//
|
116
|
-
this.element
|
117
|
-
.removeClass( "ui-accordion ui-widget ui-helper-reset" )
|
118
|
-
.removeAttr( "role" );
|
140
|
+
// Clean up main element
|
141
|
+
this.element.removeAttr( "role" );
|
119
142
|
|
120
|
-
//
|
143
|
+
// Clean up headers
|
121
144
|
this.headers
|
122
|
-
.
|
123
|
-
"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
|
124
|
-
.removeAttr( "role" )
|
125
|
-
.removeAttr( "aria-expanded" )
|
126
|
-
.removeAttr( "aria-selected" )
|
127
|
-
.removeAttr( "aria-controls" )
|
128
|
-
.removeAttr( "tabIndex" )
|
145
|
+
.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
|
129
146
|
.removeUniqueId();
|
130
147
|
|
131
148
|
this._destroyIcons();
|
132
149
|
|
133
|
-
//
|
150
|
+
// Clean up content panels
|
134
151
|
contents = this.headers.next()
|
135
|
-
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
|
136
|
-
"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
|
137
152
|
.css( "display", "" )
|
138
|
-
.removeAttr( "role" )
|
139
|
-
.removeAttr( "aria-hidden" )
|
140
|
-
.removeAttr( "aria-labelledby" )
|
153
|
+
.removeAttr( "role aria-hidden aria-labelledby" )
|
141
154
|
.removeUniqueId();
|
142
155
|
|
143
156
|
if ( this.options.heightStyle !== "content" ) {
|
@@ -147,6 +160,7 @@ return $.widget( "ui.accordion", {
|
|
147
160
|
|
148
161
|
_setOption: function( key, value ) {
|
149
162
|
if ( key === "active" ) {
|
163
|
+
|
150
164
|
// _activate() will handle invalid values and update this.options
|
151
165
|
this._activate( value );
|
152
166
|
return;
|
@@ -161,7 +175,7 @@ return $.widget( "ui.accordion", {
|
|
161
175
|
|
162
176
|
this._super( key, value );
|
163
177
|
|
164
|
-
//
|
178
|
+
// Setting collapsible: false while collapsed; open first panel
|
165
179
|
if ( key === "collapsible" && !value && this.options.active === false ) {
|
166
180
|
this._activate( 0 );
|
167
181
|
}
|
@@ -172,16 +186,19 @@ return $.widget( "ui.accordion", {
|
|
172
186
|
this._createIcons();
|
173
187
|
}
|
174
188
|
}
|
189
|
+
},
|
190
|
+
|
191
|
+
_setOptionDisabled: function( value ) {
|
192
|
+
this._super( value );
|
193
|
+
|
194
|
+
this.element.attr( "aria-disabled", value );
|
175
195
|
|
176
|
-
//
|
196
|
+
// Support: IE8 Only
|
197
|
+
// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
|
177
198
|
// so we need to add the disabled class to the headers and panels
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
.attr( "aria-disabled", value );
|
182
|
-
this.headers.add( this.headers.next() )
|
183
|
-
.toggleClass( "ui-state-disabled", !!value );
|
184
|
-
}
|
199
|
+
this._toggleClass( null, "ui-state-disabled", !!value );
|
200
|
+
this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
|
201
|
+
!!value );
|
185
202
|
},
|
186
203
|
|
187
204
|
_keydown: function( event ) {
|
@@ -195,37 +212,37 @@ return $.widget( "ui.accordion", {
|
|
195
212
|
toFocus = false;
|
196
213
|
|
197
214
|
switch ( event.keyCode ) {
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
215
|
+
case keyCode.RIGHT:
|
216
|
+
case keyCode.DOWN:
|
217
|
+
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
|
218
|
+
break;
|
219
|
+
case keyCode.LEFT:
|
220
|
+
case keyCode.UP:
|
221
|
+
toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
|
222
|
+
break;
|
223
|
+
case keyCode.SPACE:
|
224
|
+
case keyCode.ENTER:
|
225
|
+
this._eventHandler( event );
|
226
|
+
break;
|
227
|
+
case keyCode.HOME:
|
228
|
+
toFocus = this.headers[ 0 ];
|
229
|
+
break;
|
230
|
+
case keyCode.END:
|
231
|
+
toFocus = this.headers[ length - 1 ];
|
232
|
+
break;
|
216
233
|
}
|
217
234
|
|
218
235
|
if ( toFocus ) {
|
219
236
|
$( event.target ).attr( "tabIndex", -1 );
|
220
237
|
$( toFocus ).attr( "tabIndex", 0 );
|
221
|
-
toFocus.focus
|
238
|
+
$( toFocus ).trigger( "focus" );
|
222
239
|
event.preventDefault();
|
223
240
|
}
|
224
241
|
},
|
225
242
|
|
226
243
|
_panelKeyDown: function( event ) {
|
227
244
|
if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
|
228
|
-
$( event.currentTarget ).prev().focus
|
245
|
+
$( event.currentTarget ).prev().trigger( "focus" );
|
229
246
|
}
|
230
247
|
},
|
231
248
|
|
@@ -233,25 +250,32 @@ return $.widget( "ui.accordion", {
|
|
233
250
|
var options = this.options;
|
234
251
|
this._processPanels();
|
235
252
|
|
236
|
-
//
|
237
|
-
if ( ( options.active === false && options.collapsible === true ) ||
|
253
|
+
// Was collapsed or no panel
|
254
|
+
if ( ( options.active === false && options.collapsible === true ) ||
|
255
|
+
!this.headers.length ) {
|
238
256
|
options.active = false;
|
239
257
|
this.active = $();
|
258
|
+
|
240
259
|
// active false only when collapsible is true
|
241
260
|
} else if ( options.active === false ) {
|
242
261
|
this._activate( 0 );
|
262
|
+
|
243
263
|
// was active, but active panel is gone
|
244
264
|
} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
|
265
|
+
|
245
266
|
// all remaining panel are disabled
|
246
|
-
if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
|
267
|
+
if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
|
247
268
|
options.active = false;
|
248
269
|
this.active = $();
|
270
|
+
|
249
271
|
// activate previous panel
|
250
272
|
} else {
|
251
273
|
this._activate( Math.max( 0, options.active - 1 ) );
|
252
274
|
}
|
275
|
+
|
253
276
|
// was active, active panel still exists
|
254
277
|
} else {
|
278
|
+
|
255
279
|
// make sure active index is correct
|
256
280
|
options.active = this.headers.index( this.active );
|
257
281
|
}
|
@@ -265,13 +289,16 @@ return $.widget( "ui.accordion", {
|
|
265
289
|
var prevHeaders = this.headers,
|
266
290
|
prevPanels = this.panels;
|
267
291
|
|
268
|
-
|
269
|
-
.
|
292
|
+
if ( typeof this.options.header === "function" ) {
|
293
|
+
this.headers = this.options.header( this.element );
|
294
|
+
} else {
|
295
|
+
this.headers = this.element.find( this.options.header );
|
296
|
+
}
|
297
|
+
this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
|
298
|
+
"ui-state-default" );
|
270
299
|
|
271
|
-
this.panels = this.headers.next()
|
272
|
-
|
273
|
-
.filter( ":not(.ui-accordion-content-active)" )
|
274
|
-
.hide();
|
300
|
+
this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
|
301
|
+
this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
|
275
302
|
|
276
303
|
// Avoid memory leaks (#10056)
|
277
304
|
if ( prevPanels ) {
|
@@ -286,52 +313,51 @@ return $.widget( "ui.accordion", {
|
|
286
313
|
heightStyle = options.heightStyle,
|
287
314
|
parent = this.element.parent();
|
288
315
|
|
289
|
-
this.active = this._findActive( options.active )
|
290
|
-
|
291
|
-
.
|
292
|
-
this.active.next()
|
293
|
-
|
294
|
-
.show();
|
316
|
+
this.active = this._findActive( options.active );
|
317
|
+
this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
|
318
|
+
._removeClass( this.active, "ui-accordion-header-collapsed" );
|
319
|
+
this._addClass( this.active.next(), "ui-accordion-content-active" );
|
320
|
+
this.active.next().show();
|
295
321
|
|
296
322
|
this.headers
|
297
323
|
.attr( "role", "tab" )
|
298
|
-
.each(function() {
|
324
|
+
.each( function() {
|
299
325
|
var header = $( this ),
|
300
326
|
headerId = header.uniqueId().attr( "id" ),
|
301
327
|
panel = header.next(),
|
302
328
|
panelId = panel.uniqueId().attr( "id" );
|
303
329
|
header.attr( "aria-controls", panelId );
|
304
330
|
panel.attr( "aria-labelledby", headerId );
|
305
|
-
})
|
331
|
+
} )
|
306
332
|
.next()
|
307
333
|
.attr( "role", "tabpanel" );
|
308
334
|
|
309
335
|
this.headers
|
310
336
|
.not( this.active )
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
337
|
+
.attr( {
|
338
|
+
"aria-selected": "false",
|
339
|
+
"aria-expanded": "false",
|
340
|
+
tabIndex: -1
|
341
|
+
} )
|
342
|
+
.next()
|
343
|
+
.attr( {
|
344
|
+
"aria-hidden": "true"
|
345
|
+
} )
|
346
|
+
.hide();
|
321
347
|
|
322
|
-
//
|
348
|
+
// Make sure at least one header is in the tab order
|
323
349
|
if ( !this.active.length ) {
|
324
350
|
this.headers.eq( 0 ).attr( "tabIndex", 0 );
|
325
351
|
} else {
|
326
|
-
this.active.attr({
|
352
|
+
this.active.attr( {
|
327
353
|
"aria-selected": "true",
|
328
354
|
"aria-expanded": "true",
|
329
355
|
tabIndex: 0
|
330
|
-
})
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
356
|
+
} )
|
357
|
+
.next()
|
358
|
+
.attr( {
|
359
|
+
"aria-hidden": "false"
|
360
|
+
} );
|
335
361
|
}
|
336
362
|
|
337
363
|
this._createIcons();
|
@@ -340,7 +366,7 @@ return $.widget( "ui.accordion", {
|
|
340
366
|
|
341
367
|
if ( heightStyle === "fill" ) {
|
342
368
|
maxHeight = parent.height();
|
343
|
-
this.element.siblings( ":visible" ).each(function() {
|
369
|
+
this.element.siblings( ":visible" ).each( function() {
|
344
370
|
var elem = $( this ),
|
345
371
|
position = elem.css( "position" );
|
346
372
|
|
@@ -348,24 +374,31 @@ return $.widget( "ui.accordion", {
|
|
348
374
|
return;
|
349
375
|
}
|
350
376
|
maxHeight -= elem.outerHeight( true );
|
351
|
-
});
|
377
|
+
} );
|
352
378
|
|
353
|
-
this.headers.each(function() {
|
379
|
+
this.headers.each( function() {
|
354
380
|
maxHeight -= $( this ).outerHeight( true );
|
355
|
-
});
|
381
|
+
} );
|
356
382
|
|
357
383
|
this.headers.next()
|
358
|
-
.each(function() {
|
384
|
+
.each( function() {
|
359
385
|
$( this ).height( Math.max( 0, maxHeight -
|
360
386
|
$( this ).innerHeight() + $( this ).height() ) );
|
361
|
-
})
|
387
|
+
} )
|
362
388
|
.css( "overflow", "auto" );
|
363
389
|
} else if ( heightStyle === "auto" ) {
|
364
390
|
maxHeight = 0;
|
365
391
|
this.headers.next()
|
366
|
-
.each(function() {
|
392
|
+
.each( function() {
|
393
|
+
var isVisible = $( this ).is( ":visible" );
|
394
|
+
if ( !isVisible ) {
|
395
|
+
$( this ).show();
|
396
|
+
}
|
367
397
|
maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
|
368
|
-
|
398
|
+
if ( !isVisible ) {
|
399
|
+
$( this ).hide();
|
400
|
+
}
|
401
|
+
} )
|
369
402
|
.height( maxHeight );
|
370
403
|
}
|
371
404
|
},
|
@@ -373,19 +406,19 @@ return $.widget( "ui.accordion", {
|
|
373
406
|
_activate: function( index ) {
|
374
407
|
var active = this._findActive( index )[ 0 ];
|
375
408
|
|
376
|
-
//
|
409
|
+
// Trying to activate the already active panel
|
377
410
|
if ( active === this.active[ 0 ] ) {
|
378
411
|
return;
|
379
412
|
}
|
380
413
|
|
381
|
-
//
|
414
|
+
// Trying to collapse, simulate a click on the currently active header
|
382
415
|
active = active || this.active[ 0 ];
|
383
416
|
|
384
|
-
this._eventHandler({
|
417
|
+
this._eventHandler( {
|
385
418
|
target: active,
|
386
419
|
currentTarget: active,
|
387
420
|
preventDefault: $.noop
|
388
|
-
});
|
421
|
+
} );
|
389
422
|
},
|
390
423
|
|
391
424
|
_findActive: function( selector ) {
|
@@ -399,18 +432,19 @@ return $.widget( "ui.accordion", {
|
|
399
432
|
if ( event ) {
|
400
433
|
$.each( event.split( " " ), function( index, eventName ) {
|
401
434
|
events[ eventName ] = "_eventHandler";
|
402
|
-
});
|
435
|
+
} );
|
403
436
|
}
|
404
437
|
|
405
438
|
this._off( this.headers.add( this.headers.next() ) );
|
406
439
|
this._on( this.headers, events );
|
407
|
-
this._on( this.headers.next(), { keydown: "_panelKeyDown" });
|
440
|
+
this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
|
408
441
|
this._hoverable( this.headers );
|
409
442
|
this._focusable( this.headers );
|
410
443
|
},
|
411
444
|
|
412
445
|
_eventHandler: function( event ) {
|
413
|
-
var
|
446
|
+
var activeChildren, clickedChildren,
|
447
|
+
options = this.options,
|
414
448
|
active = this.active,
|
415
449
|
clicked = $( event.currentTarget ),
|
416
450
|
clickedIsActive = clicked[ 0 ] === active[ 0 ],
|
@@ -427,8 +461,10 @@ return $.widget( "ui.accordion", {
|
|
427
461
|
event.preventDefault();
|
428
462
|
|
429
463
|
if (
|
464
|
+
|
430
465
|
// click on active header, but not collapsible
|
431
466
|
( clickedIsActive && !options.collapsible ) ||
|
467
|
+
|
432
468
|
// allow canceling activation
|
433
469
|
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
|
434
470
|
return;
|
@@ -436,33 +472,30 @@ return $.widget( "ui.accordion", {
|
|
436
472
|
|
437
473
|
options.active = collapsing ? false : this.headers.index( clicked );
|
438
474
|
|
439
|
-
//
|
475
|
+
// When the call to ._toggle() comes after the class changes
|
440
476
|
// it causes a very odd bug in IE 8 (see #6720)
|
441
477
|
this.active = clickedIsActive ? $() : clicked;
|
442
478
|
this._toggle( eventData );
|
443
479
|
|
444
|
-
//
|
480
|
+
// Switch classes
|
445
481
|
// corner classes on the previously active header stay after the animation
|
446
|
-
|
482
|
+
this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
|
447
483
|
if ( options.icons ) {
|
448
|
-
active.children( ".ui-accordion-header-icon" )
|
449
|
-
|
450
|
-
.
|
484
|
+
activeChildren = active.children( ".ui-accordion-header-icon" );
|
485
|
+
this._removeClass( activeChildren, null, options.icons.activeHeader )
|
486
|
+
._addClass( activeChildren, null, options.icons.header );
|
451
487
|
}
|
452
488
|
|
453
489
|
if ( !clickedIsActive ) {
|
454
|
-
clicked
|
455
|
-
.
|
456
|
-
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
|
490
|
+
this._removeClass( clicked, "ui-accordion-header-collapsed" )
|
491
|
+
._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
|
457
492
|
if ( options.icons ) {
|
458
|
-
clicked.children( ".ui-accordion-header-icon" )
|
459
|
-
|
460
|
-
.
|
493
|
+
clickedChildren = clicked.children( ".ui-accordion-header-icon" );
|
494
|
+
this._removeClass( clickedChildren, null, options.icons.header )
|
495
|
+
._addClass( clickedChildren, null, options.icons.activeHeader );
|
461
496
|
}
|
462
497
|
|
463
|
-
clicked
|
464
|
-
.next()
|
465
|
-
.addClass( "ui-accordion-content-active" );
|
498
|
+
this._addClass( clicked.next(), "ui-accordion-content-active" );
|
466
499
|
}
|
467
500
|
},
|
468
501
|
|
@@ -470,7 +503,7 @@ return $.widget( "ui.accordion", {
|
|
470
503
|
var toShow = data.newPanel,
|
471
504
|
toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
|
472
505
|
|
473
|
-
//
|
506
|
+
// Handle activating a panel during the animation for another activation
|
474
507
|
this.prevShow.add( this.prevHide ).stop( true, true );
|
475
508
|
this.prevShow = toShow;
|
476
509
|
this.prevHide = toHide;
|
@@ -483,42 +516,44 @@ return $.widget( "ui.accordion", {
|
|
483
516
|
this._toggleComplete( data );
|
484
517
|
}
|
485
518
|
|
486
|
-
toHide.attr({
|
519
|
+
toHide.attr( {
|
487
520
|
"aria-hidden": "true"
|
488
|
-
});
|
489
|
-
toHide.prev().attr({
|
521
|
+
} );
|
522
|
+
toHide.prev().attr( {
|
490
523
|
"aria-selected": "false",
|
491
524
|
"aria-expanded": "false"
|
492
|
-
});
|
525
|
+
} );
|
526
|
+
|
493
527
|
// if we're switching panels, remove the old header from the tab order
|
494
528
|
// if we're opening from collapsed state, remove the previous header from the tab order
|
495
529
|
// if we're collapsing, then keep the collapsing header in the tab order
|
496
530
|
if ( toShow.length && toHide.length ) {
|
497
|
-
toHide.prev().attr({
|
531
|
+
toHide.prev().attr( {
|
498
532
|
"tabIndex": -1,
|
499
533
|
"aria-expanded": "false"
|
500
|
-
});
|
534
|
+
} );
|
501
535
|
} else if ( toShow.length ) {
|
502
|
-
this.headers.filter(function() {
|
536
|
+
this.headers.filter( function() {
|
503
537
|
return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
|
504
|
-
})
|
505
|
-
|
538
|
+
} )
|
539
|
+
.attr( "tabIndex", -1 );
|
506
540
|
}
|
507
541
|
|
508
542
|
toShow
|
509
543
|
.attr( "aria-hidden", "false" )
|
510
544
|
.prev()
|
511
|
-
.attr({
|
545
|
+
.attr( {
|
512
546
|
"aria-selected": "true",
|
513
547
|
"aria-expanded": "true",
|
514
548
|
tabIndex: 0
|
515
|
-
});
|
549
|
+
} );
|
516
550
|
},
|
517
551
|
|
518
552
|
_animate: function( toShow, toHide, data ) {
|
519
553
|
var total, easing, duration,
|
520
554
|
that = this,
|
521
555
|
adjust = 0,
|
556
|
+
boxSizing = toShow.css( "box-sizing" ),
|
522
557
|
down = toShow.length &&
|
523
558
|
( !toHide.length || ( toShow.index() < toHide.index() ) ),
|
524
559
|
animate = this.options.animate || {},
|
@@ -533,6 +568,7 @@ return $.widget( "ui.accordion", {
|
|
533
568
|
if ( typeof options === "string" ) {
|
534
569
|
easing = options;
|
535
570
|
}
|
571
|
+
|
536
572
|
// fall back from options to animation in case of partial down settings
|
537
573
|
easing = easing || options.easing || animate.easing;
|
538
574
|
duration = duration || options.duration || animate.duration;
|
@@ -551,7 +587,7 @@ return $.widget( "ui.accordion", {
|
|
551
587
|
step: function( now, fx ) {
|
552
588
|
fx.now = Math.round( now );
|
553
589
|
}
|
554
|
-
});
|
590
|
+
} );
|
555
591
|
toShow
|
556
592
|
.hide()
|
557
593
|
.animate( this.showProps, {
|
@@ -561,23 +597,24 @@ return $.widget( "ui.accordion", {
|
|
561
597
|
step: function( now, fx ) {
|
562
598
|
fx.now = Math.round( now );
|
563
599
|
if ( fx.prop !== "height" ) {
|
564
|
-
|
600
|
+
if ( boxSizing === "content-box" ) {
|
601
|
+
adjust += fx.now;
|
602
|
+
}
|
565
603
|
} else if ( that.options.heightStyle !== "content" ) {
|
566
604
|
fx.now = Math.round( total - toHide.outerHeight() - adjust );
|
567
605
|
adjust = 0;
|
568
606
|
}
|
569
607
|
}
|
570
|
-
});
|
608
|
+
} );
|
571
609
|
},
|
572
610
|
|
573
611
|
_toggleComplete: function( data ) {
|
574
|
-
var toHide = data.oldPanel
|
612
|
+
var toHide = data.oldPanel,
|
613
|
+
prev = toHide.prev();
|
575
614
|
|
576
|
-
toHide
|
577
|
-
|
578
|
-
.prev
|
579
|
-
.removeClass( "ui-corner-top" )
|
580
|
-
.addClass( "ui-corner-all" );
|
615
|
+
this._removeClass( toHide, "ui-accordion-content-active" );
|
616
|
+
this._removeClass( prev, "ui-accordion-header-active" )
|
617
|
+
._addClass( prev, "ui-accordion-header-collapsed" );
|
581
618
|
|
582
619
|
// Work around for rendering bug in IE (#5421)
|
583
620
|
if ( toHide.length ) {
|
@@ -585,6 +622,6 @@ return $.widget( "ui.accordion", {
|
|
585
622
|
}
|
586
623
|
this._trigger( "activate", null, data );
|
587
624
|
}
|
588
|
-
});
|
625
|
+
} );
|
589
626
|
|
590
|
-
})
|
627
|
+
} );
|