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,64 +1,83 @@
|
|
1
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/keycode
|
2
|
+
//= require jquery-ui/safe-active-element
|
3
|
+
//= require jquery-ui/unique-id
|
4
|
+
//= require jquery-ui/version
|
2
5
|
//= require jquery-ui/widget
|
3
6
|
|
4
7
|
/*!
|
5
|
-
* jQuery UI Tabs 1.
|
8
|
+
* jQuery UI Tabs 1.13.0
|
6
9
|
* http://jqueryui.com
|
7
10
|
*
|
8
11
|
* Copyright jQuery Foundation and other contributors
|
9
12
|
* Released under the MIT license.
|
10
13
|
* http://jquery.org/license
|
11
|
-
*
|
12
|
-
* http://api.jqueryui.com/tabs/
|
13
14
|
*/
|
14
|
-
|
15
|
+
|
16
|
+
//>>label: Tabs
|
17
|
+
//>>group: Widgets
|
18
|
+
//>>description: Transforms a set of container elements into a tab structure.
|
19
|
+
//>>docs: http://api.jqueryui.com/tabs/
|
20
|
+
//>>demos: http://jqueryui.com/tabs/
|
21
|
+
//>>css.structure: ../../themes/base/core.css
|
22
|
+
//>>css.structure: ../../themes/base/tabs.css
|
23
|
+
//>>css.theme: ../../themes/base/theme.css
|
24
|
+
|
25
|
+
( function( factory ) {
|
26
|
+
"use strict";
|
27
|
+
|
15
28
|
if ( typeof define === "function" && define.amd ) {
|
16
29
|
|
17
30
|
// AMD. Register as an anonymous module.
|
18
|
-
define([
|
31
|
+
define( [
|
19
32
|
"jquery",
|
20
|
-
"
|
21
|
-
"
|
33
|
+
"../keycode",
|
34
|
+
"../safe-active-element",
|
35
|
+
"../unique-id",
|
36
|
+
"../version",
|
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
|
-
|
31
|
-
version: "1.
|
47
|
+
$.widget( "ui.tabs", {
|
48
|
+
version: "1.13.0",
|
32
49
|
delay: 300,
|
33
50
|
options: {
|
34
51
|
active: null,
|
52
|
+
classes: {
|
53
|
+
"ui-tabs": "ui-corner-all",
|
54
|
+
"ui-tabs-nav": "ui-corner-all",
|
55
|
+
"ui-tabs-panel": "ui-corner-bottom",
|
56
|
+
"ui-tabs-tab": "ui-corner-top"
|
57
|
+
},
|
35
58
|
collapsible: false,
|
36
59
|
event: "click",
|
37
60
|
heightStyle: "content",
|
38
61
|
hide: null,
|
39
62
|
show: null,
|
40
63
|
|
41
|
-
//
|
64
|
+
// Callbacks
|
42
65
|
activate: null,
|
43
66
|
beforeActivate: null,
|
44
67
|
beforeLoad: null,
|
45
68
|
load: null
|
46
69
|
},
|
47
70
|
|
48
|
-
_isLocal: (function() {
|
71
|
+
_isLocal: ( function() {
|
49
72
|
var rhash = /#.*$/;
|
50
73
|
|
51
74
|
return function( anchor ) {
|
52
75
|
var anchorUrl, locationUrl;
|
53
76
|
|
54
|
-
// support: IE7
|
55
|
-
// IE7 doesn't normalize the href property when set via script (#9317)
|
56
|
-
anchor = anchor.cloneNode( false );
|
57
|
-
|
58
77
|
anchorUrl = anchor.href.replace( rhash, "" );
|
59
78
|
locationUrl = location.href.replace( rhash, "" );
|
60
79
|
|
61
|
-
//
|
80
|
+
// Decoding may throw an error if the URL isn't UTF-8 (#9518)
|
62
81
|
try {
|
63
82
|
anchorUrl = decodeURIComponent( anchorUrl );
|
64
83
|
} catch ( error ) {}
|
@@ -68,7 +87,7 @@ return $.widget( "ui.tabs", {
|
|
68
87
|
|
69
88
|
return anchor.hash.length > 1 && anchorUrl === locationUrl;
|
70
89
|
};
|
71
|
-
})(),
|
90
|
+
} )(),
|
72
91
|
|
73
92
|
_create: function() {
|
74
93
|
var that = this,
|
@@ -76,24 +95,23 @@ return $.widget( "ui.tabs", {
|
|
76
95
|
|
77
96
|
this.running = false;
|
78
97
|
|
79
|
-
this.
|
80
|
-
|
81
|
-
.toggleClass( "ui-tabs-collapsible", options.collapsible );
|
98
|
+
this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
|
99
|
+
this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
|
82
100
|
|
83
101
|
this._processTabs();
|
84
102
|
options.active = this._initialActive();
|
85
103
|
|
86
104
|
// Take disabling tabs via class attribute from HTML
|
87
105
|
// into account and update option properly.
|
88
|
-
if (
|
89
|
-
options.disabled = $.
|
106
|
+
if ( Array.isArray( options.disabled ) ) {
|
107
|
+
options.disabled = $.uniqueSort( options.disabled.concat(
|
90
108
|
$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
|
91
109
|
return that.tabs.index( li );
|
92
|
-
})
|
110
|
+
} )
|
93
111
|
) ).sort();
|
94
112
|
}
|
95
113
|
|
96
|
-
//
|
114
|
+
// Check for length avoids error when initializing empty list
|
97
115
|
if ( this.options.active !== false && this.anchors.length ) {
|
98
116
|
this.active = this._findActive( options.active );
|
99
117
|
} else {
|
@@ -113,28 +131,29 @@ return $.widget( "ui.tabs", {
|
|
113
131
|
locationHash = location.hash.substring( 1 );
|
114
132
|
|
115
133
|
if ( active === null ) {
|
134
|
+
|
116
135
|
// check the fragment identifier in the URL
|
117
136
|
if ( locationHash ) {
|
118
|
-
this.tabs.each(function( i, tab ) {
|
137
|
+
this.tabs.each( function( i, tab ) {
|
119
138
|
if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
|
120
139
|
active = i;
|
121
140
|
return false;
|
122
141
|
}
|
123
|
-
});
|
142
|
+
} );
|
124
143
|
}
|
125
144
|
|
126
|
-
//
|
145
|
+
// Check for a tab marked active via a class
|
127
146
|
if ( active === null ) {
|
128
147
|
active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
|
129
148
|
}
|
130
149
|
|
131
|
-
//
|
150
|
+
// No active tab, set to false
|
132
151
|
if ( active === null || active === -1 ) {
|
133
152
|
active = this.tabs.length ? 0 : false;
|
134
153
|
}
|
135
154
|
}
|
136
155
|
|
137
|
-
//
|
156
|
+
// Handle numbers: negative, out of range
|
138
157
|
if ( active !== false ) {
|
139
158
|
active = this.tabs.index( this.tabs.eq( active ) );
|
140
159
|
if ( active === -1 ) {
|
@@ -142,7 +161,7 @@ return $.widget( "ui.tabs", {
|
|
142
161
|
}
|
143
162
|
}
|
144
163
|
|
145
|
-
//
|
164
|
+
// Don't allow collapsible: false and active: false
|
146
165
|
if ( !collapsible && active === false && this.anchors.length ) {
|
147
166
|
active = 0;
|
148
167
|
}
|
@@ -158,7 +177,7 @@ return $.widget( "ui.tabs", {
|
|
158
177
|
},
|
159
178
|
|
160
179
|
_tabKeydown: function( event ) {
|
161
|
-
var focusedTab = $( this.document[0]
|
180
|
+
var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
|
162
181
|
selectedIndex = this.tabs.index( focusedTab ),
|
163
182
|
goingForward = true;
|
164
183
|
|
@@ -167,36 +186,39 @@ return $.widget( "ui.tabs", {
|
|
167
186
|
}
|
168
187
|
|
169
188
|
switch ( event.keyCode ) {
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
189
|
+
case $.ui.keyCode.RIGHT:
|
190
|
+
case $.ui.keyCode.DOWN:
|
191
|
+
selectedIndex++;
|
192
|
+
break;
|
193
|
+
case $.ui.keyCode.UP:
|
194
|
+
case $.ui.keyCode.LEFT:
|
195
|
+
goingForward = false;
|
196
|
+
selectedIndex--;
|
197
|
+
break;
|
198
|
+
case $.ui.keyCode.END:
|
199
|
+
selectedIndex = this.anchors.length - 1;
|
200
|
+
break;
|
201
|
+
case $.ui.keyCode.HOME:
|
202
|
+
selectedIndex = 0;
|
203
|
+
break;
|
204
|
+
case $.ui.keyCode.SPACE:
|
205
|
+
|
206
|
+
// Activate only, no collapsing
|
207
|
+
event.preventDefault();
|
208
|
+
clearTimeout( this.activating );
|
209
|
+
this._activate( selectedIndex );
|
210
|
+
return;
|
211
|
+
case $.ui.keyCode.ENTER:
|
212
|
+
|
213
|
+
// Toggle (cancel delayed activation, allow collapsing)
|
214
|
+
event.preventDefault();
|
215
|
+
clearTimeout( this.activating );
|
216
|
+
|
217
|
+
// Determine if we should collapse or activate
|
218
|
+
this._activate( selectedIndex === this.options.active ? false : selectedIndex );
|
219
|
+
return;
|
220
|
+
default:
|
221
|
+
return;
|
200
222
|
}
|
201
223
|
|
202
224
|
// Focus the appropriate tab, based on which key was pressed
|
@@ -213,7 +235,7 @@ return $.widget( "ui.tabs", {
|
|
213
235
|
focusedTab.attr( "aria-selected", "false" );
|
214
236
|
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
|
215
237
|
|
216
|
-
this.activating = this._delay(function() {
|
238
|
+
this.activating = this._delay( function() {
|
217
239
|
this.option( "active", selectedIndex );
|
218
240
|
}, this.delay );
|
219
241
|
}
|
@@ -227,7 +249,7 @@ return $.widget( "ui.tabs", {
|
|
227
249
|
// Ctrl+up moves focus to the current tab
|
228
250
|
if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
|
229
251
|
event.preventDefault();
|
230
|
-
this.active.focus
|
252
|
+
this.active.trigger( "focus" );
|
231
253
|
}
|
232
254
|
},
|
233
255
|
|
@@ -265,27 +287,23 @@ return $.widget( "ui.tabs", {
|
|
265
287
|
|
266
288
|
_focusNextTab: function( index, goingForward ) {
|
267
289
|
index = this._findNextTab( index, goingForward );
|
268
|
-
this.tabs.eq( index ).focus
|
290
|
+
this.tabs.eq( index ).trigger( "focus" );
|
269
291
|
return index;
|
270
292
|
},
|
271
293
|
|
272
294
|
_setOption: function( key, value ) {
|
273
295
|
if ( key === "active" ) {
|
296
|
+
|
274
297
|
// _activate() will handle invalid values and update this.options
|
275
298
|
this._activate( value );
|
276
299
|
return;
|
277
300
|
}
|
278
301
|
|
279
|
-
|
280
|
-
// don't use the widget factory's disabled handling
|
281
|
-
this._setupDisabled( value );
|
282
|
-
return;
|
283
|
-
}
|
284
|
-
|
285
|
-
this._super( key, value);
|
302
|
+
this._super( key, value );
|
286
303
|
|
287
304
|
if ( key === "collapsible" ) {
|
288
|
-
this.
|
305
|
+
this._toggleClass( "ui-tabs-collapsible", null, value );
|
306
|
+
|
289
307
|
// Setting collapsible: false while collapsed; open first panel
|
290
308
|
if ( !value && this.options.active === false ) {
|
291
309
|
this._activate( 0 );
|
@@ -309,30 +327,35 @@ return $.widget( "ui.tabs", {
|
|
309
327
|
var options = this.options,
|
310
328
|
lis = this.tablist.children( ":has(a[href])" );
|
311
329
|
|
312
|
-
//
|
330
|
+
// Get disabled tabs from class attribute from HTML
|
313
331
|
// this will get converted to a boolean if needed in _refresh()
|
314
332
|
options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
|
315
333
|
return lis.index( tab );
|
316
|
-
});
|
334
|
+
} );
|
317
335
|
|
318
336
|
this._processTabs();
|
319
337
|
|
320
|
-
//
|
338
|
+
// Was collapsed or no tabs
|
321
339
|
if ( options.active === false || !this.anchors.length ) {
|
322
340
|
options.active = false;
|
323
341
|
this.active = $();
|
342
|
+
|
324
343
|
// was active, but active tab is gone
|
325
344
|
} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
|
345
|
+
|
326
346
|
// all remaining tabs are disabled
|
327
347
|
if ( this.tabs.length === options.disabled.length ) {
|
328
348
|
options.active = false;
|
329
349
|
this.active = $();
|
350
|
+
|
330
351
|
// activate previous tab
|
331
352
|
} else {
|
332
353
|
this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
|
333
354
|
}
|
355
|
+
|
334
356
|
// was active, active tab still exists
|
335
357
|
} else {
|
358
|
+
|
336
359
|
// make sure active index is correct
|
337
360
|
options.active = this.tabs.index( this.active );
|
338
361
|
}
|
@@ -341,37 +364,37 @@ return $.widget( "ui.tabs", {
|
|
341
364
|
},
|
342
365
|
|
343
366
|
_refresh: function() {
|
344
|
-
this.
|
367
|
+
this._setOptionDisabled( this.options.disabled );
|
345
368
|
this._setupEvents( this.options.event );
|
346
369
|
this._setupHeightStyle( this.options.heightStyle );
|
347
370
|
|
348
|
-
this.tabs.not( this.active ).attr({
|
371
|
+
this.tabs.not( this.active ).attr( {
|
349
372
|
"aria-selected": "false",
|
350
373
|
"aria-expanded": "false",
|
351
374
|
tabIndex: -1
|
352
|
-
});
|
375
|
+
} );
|
353
376
|
this.panels.not( this._getPanelForTab( this.active ) )
|
354
377
|
.hide()
|
355
|
-
.attr({
|
378
|
+
.attr( {
|
356
379
|
"aria-hidden": "true"
|
357
|
-
});
|
380
|
+
} );
|
358
381
|
|
359
382
|
// Make sure one tab is in the tab order
|
360
383
|
if ( !this.active.length ) {
|
361
384
|
this.tabs.eq( 0 ).attr( "tabIndex", 0 );
|
362
385
|
} else {
|
363
386
|
this.active
|
364
|
-
.
|
365
|
-
.attr({
|
387
|
+
.attr( {
|
366
388
|
"aria-selected": "true",
|
367
389
|
"aria-expanded": "true",
|
368
390
|
tabIndex: 0
|
369
|
-
});
|
391
|
+
} );
|
392
|
+
this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
|
370
393
|
this._getPanelForTab( this.active )
|
371
394
|
.show()
|
372
|
-
.attr({
|
395
|
+
.attr( {
|
373
396
|
"aria-hidden": "false"
|
374
|
-
});
|
397
|
+
} );
|
375
398
|
}
|
376
399
|
},
|
377
400
|
|
@@ -381,60 +404,62 @@ return $.widget( "ui.tabs", {
|
|
381
404
|
prevAnchors = this.anchors,
|
382
405
|
prevPanels = this.panels;
|
383
406
|
|
384
|
-
this.tablist = this._getList()
|
385
|
-
|
386
|
-
|
407
|
+
this.tablist = this._getList().attr( "role", "tablist" );
|
408
|
+
this._addClass( this.tablist, "ui-tabs-nav",
|
409
|
+
"ui-helper-reset ui-helper-clearfix ui-widget-header" );
|
387
410
|
|
388
|
-
|
389
|
-
|
411
|
+
// Prevent users from focusing disabled tabs via click
|
412
|
+
this.tablist
|
413
|
+
.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
|
390
414
|
if ( $( this ).is( ".ui-state-disabled" ) ) {
|
391
415
|
event.preventDefault();
|
392
416
|
}
|
393
|
-
})
|
417
|
+
} )
|
394
418
|
|
395
|
-
//
|
419
|
+
// Support: IE <9
|
396
420
|
// Preventing the default action in mousedown doesn't prevent IE
|
397
421
|
// from focusing the element, so if the anchor gets focused, blur.
|
398
422
|
// We don't have to worry about focusing the previously focused
|
399
423
|
// element since clicking on a non-focusable element should focus
|
400
424
|
// the body anyway.
|
401
|
-
.
|
425
|
+
.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
|
402
426
|
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
|
403
427
|
this.blur();
|
404
428
|
}
|
405
|
-
});
|
429
|
+
} );
|
406
430
|
|
407
431
|
this.tabs = this.tablist.find( "> li:has(a[href])" )
|
408
|
-
.
|
409
|
-
.attr({
|
432
|
+
.attr( {
|
410
433
|
role: "tab",
|
411
434
|
tabIndex: -1
|
412
|
-
});
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
.attr({
|
419
|
-
role: "presentation",
|
435
|
+
} );
|
436
|
+
this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
|
437
|
+
|
438
|
+
this.anchors = this.tabs.map( function() {
|
439
|
+
return $( "a", this )[ 0 ];
|
440
|
+
} )
|
441
|
+
.attr( {
|
420
442
|
tabIndex: -1
|
421
|
-
});
|
443
|
+
} );
|
444
|
+
this._addClass( this.anchors, "ui-tabs-anchor" );
|
422
445
|
|
423
446
|
this.panels = $();
|
424
447
|
|
425
|
-
this.anchors.each(function( i, anchor ) {
|
448
|
+
this.anchors.each( function( i, anchor ) {
|
426
449
|
var selector, panel, panelId,
|
427
450
|
anchorId = $( anchor ).uniqueId().attr( "id" ),
|
428
451
|
tab = $( anchor ).closest( "li" ),
|
429
452
|
originalAriaControls = tab.attr( "aria-controls" );
|
430
453
|
|
431
|
-
//
|
454
|
+
// Inline tab
|
432
455
|
if ( that._isLocal( anchor ) ) {
|
433
456
|
selector = anchor.hash;
|
434
457
|
panelId = selector.substring( 1 );
|
435
458
|
panel = that.element.find( that._sanitizeSelector( selector ) );
|
459
|
+
|
436
460
|
// remote tab
|
437
461
|
} else {
|
462
|
+
|
438
463
|
// If the tab doesn't already have aria-controls,
|
439
464
|
// generate an id by using a throw-away element
|
440
465
|
panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
|
@@ -447,22 +472,21 @@ return $.widget( "ui.tabs", {
|
|
447
472
|
panel.attr( "aria-live", "polite" );
|
448
473
|
}
|
449
474
|
|
450
|
-
if ( panel.length) {
|
475
|
+
if ( panel.length ) {
|
451
476
|
that.panels = that.panels.add( panel );
|
452
477
|
}
|
453
478
|
if ( originalAriaControls ) {
|
454
479
|
tab.data( "ui-tabs-aria-controls", originalAriaControls );
|
455
480
|
}
|
456
|
-
tab.attr({
|
481
|
+
tab.attr( {
|
457
482
|
"aria-controls": panelId,
|
458
483
|
"aria-labelledby": anchorId
|
459
|
-
});
|
484
|
+
} );
|
460
485
|
panel.attr( "aria-labelledby", anchorId );
|
461
|
-
});
|
486
|
+
} );
|
462
487
|
|
463
|
-
this.panels
|
464
|
-
|
465
|
-
.attr( "role", "tabpanel" );
|
488
|
+
this.panels.attr( "role", "tabpanel" );
|
489
|
+
this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
|
466
490
|
|
467
491
|
// Avoid memory leaks (#10056)
|
468
492
|
if ( prevTabs ) {
|
@@ -472,20 +496,21 @@ return $.widget( "ui.tabs", {
|
|
472
496
|
}
|
473
497
|
},
|
474
498
|
|
475
|
-
//
|
499
|
+
// Allow overriding how to find the list for rare usage scenarios (#7715)
|
476
500
|
_getList: function() {
|
477
|
-
return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
|
501
|
+
return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
|
478
502
|
},
|
479
503
|
|
480
504
|
_createPanel: function( id ) {
|
481
505
|
return $( "<div>" )
|
482
506
|
.attr( "id", id )
|
483
|
-
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
|
484
507
|
.data( "ui-tabs-destroy", true );
|
485
508
|
},
|
486
509
|
|
487
|
-
|
488
|
-
|
510
|
+
_setOptionDisabled: function( disabled ) {
|
511
|
+
var currentItem, li, i;
|
512
|
+
|
513
|
+
if ( Array.isArray( disabled ) ) {
|
489
514
|
if ( !disabled.length ) {
|
490
515
|
disabled = false;
|
491
516
|
} else if ( disabled.length === this.anchors.length ) {
|
@@ -493,37 +518,40 @@ return $.widget( "ui.tabs", {
|
|
493
518
|
}
|
494
519
|
}
|
495
520
|
|
496
|
-
//
|
497
|
-
for (
|
521
|
+
// Disable tabs
|
522
|
+
for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
|
523
|
+
currentItem = $( li );
|
498
524
|
if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
|
499
|
-
|
500
|
-
|
501
|
-
.attr( "aria-disabled", "true" );
|
525
|
+
currentItem.attr( "aria-disabled", "true" );
|
526
|
+
this._addClass( currentItem, null, "ui-state-disabled" );
|
502
527
|
} else {
|
503
|
-
|
504
|
-
|
505
|
-
.removeAttr( "aria-disabled" );
|
528
|
+
currentItem.removeAttr( "aria-disabled" );
|
529
|
+
this._removeClass( currentItem, null, "ui-state-disabled" );
|
506
530
|
}
|
507
531
|
}
|
508
532
|
|
509
533
|
this.options.disabled = disabled;
|
534
|
+
|
535
|
+
this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
|
536
|
+
disabled === true );
|
510
537
|
},
|
511
538
|
|
512
539
|
_setupEvents: function( event ) {
|
513
540
|
var events = {};
|
514
541
|
if ( event ) {
|
515
|
-
$.each( event.split(" "), function( index, eventName ) {
|
542
|
+
$.each( event.split( " " ), function( index, eventName ) {
|
516
543
|
events[ eventName ] = "_eventHandler";
|
517
|
-
});
|
544
|
+
} );
|
518
545
|
}
|
519
546
|
|
520
547
|
this._off( this.anchors.add( this.tabs ).add( this.panels ) );
|
548
|
+
|
521
549
|
// Always prevent the default action, even when disabled
|
522
550
|
this._on( true, this.anchors, {
|
523
551
|
click: function( event ) {
|
524
552
|
event.preventDefault();
|
525
553
|
}
|
526
|
-
});
|
554
|
+
} );
|
527
555
|
this._on( this.anchors, events );
|
528
556
|
this._on( this.tabs, { keydown: "_tabKeydown" } );
|
529
557
|
this._on( this.panels, { keydown: "_panelKeydown" } );
|
@@ -540,7 +568,7 @@ return $.widget( "ui.tabs", {
|
|
540
568
|
maxHeight = parent.height();
|
541
569
|
maxHeight -= this.element.outerHeight() - this.element.height();
|
542
570
|
|
543
|
-
this.element.siblings( ":visible" ).each(function() {
|
571
|
+
this.element.siblings( ":visible" ).each( function() {
|
544
572
|
var elem = $( this ),
|
545
573
|
position = elem.css( "position" );
|
546
574
|
|
@@ -548,22 +576,22 @@ return $.widget( "ui.tabs", {
|
|
548
576
|
return;
|
549
577
|
}
|
550
578
|
maxHeight -= elem.outerHeight( true );
|
551
|
-
});
|
579
|
+
} );
|
552
580
|
|
553
|
-
this.element.children().not( this.panels ).each(function() {
|
581
|
+
this.element.children().not( this.panels ).each( function() {
|
554
582
|
maxHeight -= $( this ).outerHeight( true );
|
555
|
-
});
|
583
|
+
} );
|
556
584
|
|
557
|
-
this.panels.each(function() {
|
585
|
+
this.panels.each( function() {
|
558
586
|
$( this ).height( Math.max( 0, maxHeight -
|
559
587
|
$( this ).innerHeight() + $( this ).height() ) );
|
560
|
-
})
|
561
|
-
|
588
|
+
} )
|
589
|
+
.css( "overflow", "auto" );
|
562
590
|
} else if ( heightStyle === "auto" ) {
|
563
591
|
maxHeight = 0;
|
564
|
-
this.panels.each(function() {
|
592
|
+
this.panels.each( function() {
|
565
593
|
maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
|
566
|
-
}).height( maxHeight );
|
594
|
+
} ).height( maxHeight );
|
567
595
|
}
|
568
596
|
},
|
569
597
|
|
@@ -586,12 +614,16 @@ return $.widget( "ui.tabs", {
|
|
586
614
|
event.preventDefault();
|
587
615
|
|
588
616
|
if ( tab.hasClass( "ui-state-disabled" ) ||
|
617
|
+
|
589
618
|
// tab is already loading
|
590
619
|
tab.hasClass( "ui-tabs-loading" ) ||
|
620
|
+
|
591
621
|
// can't switch durning an animation
|
592
622
|
this.running ||
|
623
|
+
|
593
624
|
// click on active header, but not collapsible
|
594
625
|
( clickedIsActive && !options.collapsible ) ||
|
626
|
+
|
595
627
|
// allow canceling activation
|
596
628
|
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
|
597
629
|
return;
|
@@ -614,7 +646,7 @@ return $.widget( "ui.tabs", {
|
|
614
646
|
this._toggle( event, eventData );
|
615
647
|
},
|
616
648
|
|
617
|
-
//
|
649
|
+
// Handles show/hide for selecting tabs
|
618
650
|
_toggle: function( event, eventData ) {
|
619
651
|
var that = this,
|
620
652
|
toShow = eventData.newPanel,
|
@@ -628,7 +660,7 @@ return $.widget( "ui.tabs", {
|
|
628
660
|
}
|
629
661
|
|
630
662
|
function show() {
|
631
|
-
eventData.newTab.closest( "li" )
|
663
|
+
that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
|
632
664
|
|
633
665
|
if ( toShow.length && that.options.show ) {
|
634
666
|
that._show( toShow, that.options.show, complete );
|
@@ -638,63 +670,66 @@ return $.widget( "ui.tabs", {
|
|
638
670
|
}
|
639
671
|
}
|
640
672
|
|
641
|
-
//
|
673
|
+
// Start out by hiding, then showing, then completing
|
642
674
|
if ( toHide.length && this.options.hide ) {
|
643
675
|
this._hide( toHide, this.options.hide, function() {
|
644
|
-
eventData.oldTab.closest( "li" )
|
676
|
+
that._removeClass( eventData.oldTab.closest( "li" ),
|
677
|
+
"ui-tabs-active", "ui-state-active" );
|
645
678
|
show();
|
646
|
-
});
|
679
|
+
} );
|
647
680
|
} else {
|
648
|
-
eventData.oldTab.closest( "li" )
|
681
|
+
this._removeClass( eventData.oldTab.closest( "li" ),
|
682
|
+
"ui-tabs-active", "ui-state-active" );
|
649
683
|
toHide.hide();
|
650
684
|
show();
|
651
685
|
}
|
652
686
|
|
653
687
|
toHide.attr( "aria-hidden", "true" );
|
654
|
-
eventData.oldTab.attr({
|
688
|
+
eventData.oldTab.attr( {
|
655
689
|
"aria-selected": "false",
|
656
690
|
"aria-expanded": "false"
|
657
|
-
});
|
691
|
+
} );
|
692
|
+
|
658
693
|
// If we're switching tabs, remove the old tab from the tab order.
|
659
694
|
// If we're opening from collapsed state, remove the previous tab from the tab order.
|
660
695
|
// If we're collapsing, then keep the collapsing tab in the tab order.
|
661
696
|
if ( toShow.length && toHide.length ) {
|
662
697
|
eventData.oldTab.attr( "tabIndex", -1 );
|
663
698
|
} else if ( toShow.length ) {
|
664
|
-
this.tabs.filter(function() {
|
699
|
+
this.tabs.filter( function() {
|
665
700
|
return $( this ).attr( "tabIndex" ) === 0;
|
666
|
-
})
|
667
|
-
|
701
|
+
} )
|
702
|
+
.attr( "tabIndex", -1 );
|
668
703
|
}
|
669
704
|
|
670
705
|
toShow.attr( "aria-hidden", "false" );
|
671
|
-
eventData.newTab.attr({
|
706
|
+
eventData.newTab.attr( {
|
672
707
|
"aria-selected": "true",
|
673
708
|
"aria-expanded": "true",
|
674
709
|
tabIndex: 0
|
675
|
-
});
|
710
|
+
} );
|
676
711
|
},
|
677
712
|
|
678
713
|
_activate: function( index ) {
|
679
714
|
var anchor,
|
680
715
|
active = this._findActive( index );
|
681
716
|
|
682
|
-
//
|
717
|
+
// Trying to activate the already active panel
|
683
718
|
if ( active[ 0 ] === this.active[ 0 ] ) {
|
684
719
|
return;
|
685
720
|
}
|
686
721
|
|
687
|
-
//
|
722
|
+
// Trying to collapse, simulate a click on the current active header
|
688
723
|
if ( !active.length ) {
|
689
724
|
active = this.active;
|
690
725
|
}
|
691
726
|
|
692
727
|
anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
|
693
|
-
this._eventHandler({
|
728
|
+
this._eventHandler( {
|
694
729
|
target: anchor,
|
695
730
|
currentTarget: anchor,
|
696
731
|
preventDefault: $.noop
|
697
|
-
});
|
732
|
+
} );
|
698
733
|
},
|
699
734
|
|
700
735
|
_findActive: function( index ) {
|
@@ -702,9 +737,11 @@ return $.widget( "ui.tabs", {
|
|
702
737
|
},
|
703
738
|
|
704
739
|
_getIndex: function( index ) {
|
740
|
+
|
705
741
|
// meta-function to give users option to provide a href string instead of a numerical index.
|
706
742
|
if ( typeof index === "string" ) {
|
707
|
-
index = this.anchors.index( this.anchors.filter( "[href$='" +
|
743
|
+
index = this.anchors.index( this.anchors.filter( "[href$='" +
|
744
|
+
$.escapeSelector( index ) + "']" ) );
|
708
745
|
}
|
709
746
|
|
710
747
|
return index;
|
@@ -715,39 +752,24 @@ return $.widget( "ui.tabs", {
|
|
715
752
|
this.xhr.abort();
|
716
753
|
}
|
717
754
|
|
718
|
-
this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
|
719
|
-
|
720
755
|
this.tablist
|
721
|
-
.
|
722
|
-
.
|
756
|
+
.removeAttr( "role" )
|
757
|
+
.off( this.eventNamespace );
|
723
758
|
|
724
759
|
this.anchors
|
725
|
-
.
|
726
|
-
.removeAttr( "role" )
|
727
|
-
.removeAttr( "tabIndex" )
|
760
|
+
.removeAttr( "role tabIndex" )
|
728
761
|
.removeUniqueId();
|
729
762
|
|
730
|
-
this.
|
731
|
-
|
732
|
-
this.tabs.add( this.panels ).each(function() {
|
763
|
+
this.tabs.add( this.panels ).each( function() {
|
733
764
|
if ( $.data( this, "ui-tabs-destroy" ) ) {
|
734
765
|
$( this ).remove();
|
735
766
|
} else {
|
736
|
-
$( this )
|
737
|
-
|
738
|
-
"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
|
739
|
-
.removeAttr( "tabIndex" )
|
740
|
-
.removeAttr( "aria-live" )
|
741
|
-
.removeAttr( "aria-busy" )
|
742
|
-
.removeAttr( "aria-selected" )
|
743
|
-
.removeAttr( "aria-labelledby" )
|
744
|
-
.removeAttr( "aria-hidden" )
|
745
|
-
.removeAttr( "aria-expanded" )
|
746
|
-
.removeAttr( "role" );
|
767
|
+
$( this ).removeAttr( "role tabIndex " +
|
768
|
+
"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
|
747
769
|
}
|
748
|
-
});
|
770
|
+
} );
|
749
771
|
|
750
|
-
this.tabs.each(function() {
|
772
|
+
this.tabs.each( function() {
|
751
773
|
var li = $( this ),
|
752
774
|
prev = li.data( "ui-tabs-aria-controls" );
|
753
775
|
if ( prev ) {
|
@@ -757,7 +779,7 @@ return $.widget( "ui.tabs", {
|
|
757
779
|
} else {
|
758
780
|
li.removeAttr( "aria-controls" );
|
759
781
|
}
|
760
|
-
});
|
782
|
+
} );
|
761
783
|
|
762
784
|
this.panels.show();
|
763
785
|
|
@@ -776,17 +798,17 @@ return $.widget( "ui.tabs", {
|
|
776
798
|
disabled = false;
|
777
799
|
} else {
|
778
800
|
index = this._getIndex( index );
|
779
|
-
if (
|
801
|
+
if ( Array.isArray( disabled ) ) {
|
780
802
|
disabled = $.map( disabled, function( num ) {
|
781
803
|
return num !== index ? num : null;
|
782
|
-
});
|
804
|
+
} );
|
783
805
|
} else {
|
784
806
|
disabled = $.map( this.tabs, function( li, num ) {
|
785
807
|
return num !== index ? num : null;
|
786
|
-
});
|
808
|
+
} );
|
787
809
|
}
|
788
810
|
}
|
789
|
-
this.
|
811
|
+
this._setOptionDisabled( disabled );
|
790
812
|
},
|
791
813
|
|
792
814
|
disable: function( index ) {
|
@@ -802,13 +824,13 @@ return $.widget( "ui.tabs", {
|
|
802
824
|
if ( $.inArray( index, disabled ) !== -1 ) {
|
803
825
|
return;
|
804
826
|
}
|
805
|
-
if (
|
827
|
+
if ( Array.isArray( disabled ) ) {
|
806
828
|
disabled = $.merge( [ index ], disabled ).sort();
|
807
829
|
} else {
|
808
830
|
disabled = [ index ];
|
809
831
|
}
|
810
832
|
}
|
811
|
-
this.
|
833
|
+
this._setOptionDisabled( disabled );
|
812
834
|
},
|
813
835
|
|
814
836
|
load: function( index, event ) {
|
@@ -820,54 +842,64 @@ return $.widget( "ui.tabs", {
|
|
820
842
|
eventData = {
|
821
843
|
tab: tab,
|
822
844
|
panel: panel
|
845
|
+
},
|
846
|
+
complete = function( jqXHR, status ) {
|
847
|
+
if ( status === "abort" ) {
|
848
|
+
that.panels.stop( false, true );
|
849
|
+
}
|
850
|
+
|
851
|
+
that._removeClass( tab, "ui-tabs-loading" );
|
852
|
+
panel.removeAttr( "aria-busy" );
|
853
|
+
|
854
|
+
if ( jqXHR === that.xhr ) {
|
855
|
+
delete that.xhr;
|
856
|
+
}
|
823
857
|
};
|
824
858
|
|
825
|
-
//
|
859
|
+
// Not remote
|
826
860
|
if ( this._isLocal( anchor[ 0 ] ) ) {
|
827
861
|
return;
|
828
862
|
}
|
829
863
|
|
830
864
|
this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
|
831
865
|
|
832
|
-
//
|
866
|
+
// Support: jQuery <1.8
|
833
867
|
// jQuery <1.8 returns false if the request is canceled in beforeSend,
|
834
868
|
// but as of 1.8, $.ajax() always returns a jqXHR object.
|
835
869
|
if ( this.xhr && this.xhr.statusText !== "canceled" ) {
|
836
|
-
|
870
|
+
this._addClass( tab, "ui-tabs-loading" );
|
837
871
|
panel.attr( "aria-busy", "true" );
|
838
872
|
|
839
873
|
this.xhr
|
840
|
-
.
|
874
|
+
.done( function( response, status, jqXHR ) {
|
875
|
+
|
841
876
|
// support: jQuery <1.8
|
842
877
|
// http://bugs.jquery.com/ticket/11778
|
843
|
-
setTimeout(function() {
|
878
|
+
setTimeout( function() {
|
844
879
|
panel.html( response );
|
845
880
|
that._trigger( "load", event, eventData );
|
881
|
+
|
882
|
+
complete( jqXHR, status );
|
846
883
|
}, 1 );
|
847
|
-
})
|
848
|
-
.
|
884
|
+
} )
|
885
|
+
.fail( function( jqXHR, status ) {
|
886
|
+
|
849
887
|
// support: jQuery <1.8
|
850
888
|
// http://bugs.jquery.com/ticket/11778
|
851
|
-
setTimeout(function() {
|
852
|
-
|
853
|
-
that.panels.stop( false, true );
|
854
|
-
}
|
855
|
-
|
856
|
-
tab.removeClass( "ui-tabs-loading" );
|
857
|
-
panel.removeAttr( "aria-busy" );
|
858
|
-
|
859
|
-
if ( jqXHR === that.xhr ) {
|
860
|
-
delete that.xhr;
|
861
|
-
}
|
889
|
+
setTimeout( function() {
|
890
|
+
complete( jqXHR, status );
|
862
891
|
}, 1 );
|
863
|
-
});
|
892
|
+
} );
|
864
893
|
}
|
865
894
|
},
|
866
895
|
|
867
896
|
_ajaxSettings: function( anchor, event, eventData ) {
|
868
897
|
var that = this;
|
869
898
|
return {
|
870
|
-
|
899
|
+
|
900
|
+
// Support: IE <11 only
|
901
|
+
// Strip any hash that exists to prevent errors with the Ajax request
|
902
|
+
url: anchor.attr( "href" ).replace( /#.*$/, "" ),
|
871
903
|
beforeSend: function( jqXHR, settings ) {
|
872
904
|
return that._trigger( "beforeLoad", event,
|
873
905
|
$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
|
@@ -879,6 +911,21 @@ return $.widget( "ui.tabs", {
|
|
879
911
|
var id = $( tab ).attr( "aria-controls" );
|
880
912
|
return this.element.find( this._sanitizeSelector( "#" + id ) );
|
881
913
|
}
|
882
|
-
});
|
914
|
+
} );
|
915
|
+
|
916
|
+
// DEPRECATED
|
917
|
+
// TODO: Switch return back to widget declaration at top of file when this is removed
|
918
|
+
if ( $.uiBackCompat !== false ) {
|
919
|
+
|
920
|
+
// Backcompat for ui-tab class (now ui-tabs-tab)
|
921
|
+
$.widget( "ui.tabs", $.ui.tabs, {
|
922
|
+
_processTabs: function() {
|
923
|
+
this._superApply( arguments );
|
924
|
+
this._addClass( this.tabs, "ui-tab" );
|
925
|
+
}
|
926
|
+
} );
|
927
|
+
}
|
928
|
+
|
929
|
+
return $.ui.tabs;
|
883
930
|
|
884
|
-
})
|
931
|
+
} );
|