jquery-ui-rails 5.0.5 → 6.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.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.travis.yml +1 -1
- data/History.md +12 -0
- data/README.md +47 -30
- data/Rakefile +48 -27
- data/VERSIONS.md +1 -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.js +52 -33
- data/app/assets/javascripts/jquery-ui/core.js +37 -304
- data/app/assets/javascripts/jquery-ui/data.js +41 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +48 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
- data/app/assets/javascripts/jquery-ui/effect.js +620 -284
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +73 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +113 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +68 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +72 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +114 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +50 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +92 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +60 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +46 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +67 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +60 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +77 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +194 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +79 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +43 -0
- data/app/assets/javascripts/jquery-ui/escape-selector.js +23 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +86 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +80 -0
- data/app/assets/javascripts/jquery-ui/form.js +22 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +49 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +49 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +50 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +44 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +61 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +37 -0
- data/app/assets/javascripts/jquery-ui/ie.js +17 -0
- data/app/assets/javascripts/jquery-ui/jquery-1-7.js +91 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +47 -0
- data/app/assets/javascripts/jquery-ui/labels.js +65 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +46 -0
- data/app/assets/javascripts/jquery-ui/position.js +92 -109
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +42 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +23 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +47 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +38 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +51 -0
- data/app/assets/javascripts/jquery-ui/version.js +17 -0
- data/app/assets/javascripts/jquery-ui/widget.js +328 -151
- data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +187 -162
- data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +148 -92
- data/app/assets/javascripts/jquery-ui/widgets/button.js +391 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +291 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +300 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2123 -0
- data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +229 -158
- data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +416 -293
- data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +167 -83
- data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +164 -134
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +230 -0
- data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +60 -41
- data/app/assets/javascripts/jquery-ui/{resizable.js → widgets/resizable.js} +413 -362
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +314 -0
- data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +253 -176
- data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +193 -157
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1561 -0
- data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +175 -112
- data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +237 -195
- data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +136 -87
- 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 +11 -7
- 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 +1 -2
- 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 +1 -2
- 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 +113 -87
- data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +150 -144
- 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/selectable.js +0 -291
- data/app/assets/javascripts/jquery-ui/sortable.js +0 -1319
@@ -1,64 +1,82 @@
|
|
1
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/escape-selector
|
2
|
+
//= require jquery-ui/keycode
|
3
|
+
//= require jquery-ui/safe-active-element
|
4
|
+
//= require jquery-ui/unique-id
|
5
|
+
//= require jquery-ui/version
|
2
6
|
//= require jquery-ui/widget
|
3
7
|
|
4
8
|
/*!
|
5
|
-
* jQuery UI Tabs 1.
|
9
|
+
* jQuery UI Tabs 1.12.1
|
6
10
|
* http://jqueryui.com
|
7
11
|
*
|
8
12
|
* Copyright jQuery Foundation and other contributors
|
9
13
|
* Released under the MIT license.
|
10
14
|
* http://jquery.org/license
|
11
|
-
*
|
12
|
-
* http://api.jqueryui.com/tabs/
|
13
15
|
*/
|
14
|
-
|
16
|
+
|
17
|
+
//>>label: Tabs
|
18
|
+
//>>group: Widgets
|
19
|
+
//>>description: Transforms a set of container elements into a tab structure.
|
20
|
+
//>>docs: http://api.jqueryui.com/tabs/
|
21
|
+
//>>demos: http://jqueryui.com/tabs/
|
22
|
+
//>>css.structure: ../../themes/base/core.css
|
23
|
+
//>>css.structure: ../../themes/base/tabs.css
|
24
|
+
//>>css.theme: ../../themes/base/theme.css
|
25
|
+
|
26
|
+
( function( factory ) {
|
15
27
|
if ( typeof define === "function" && define.amd ) {
|
16
28
|
|
17
29
|
// AMD. Register as an anonymous module.
|
18
|
-
define([
|
30
|
+
define( [
|
19
31
|
"jquery",
|
20
|
-
"
|
21
|
-
"
|
32
|
+
"../escape-selector",
|
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( $ ) {
|
29
45
|
|
30
|
-
|
31
|
-
version: "1.
|
46
|
+
$.widget( "ui.tabs", {
|
47
|
+
version: "1.12.1",
|
32
48
|
delay: 300,
|
33
49
|
options: {
|
34
50
|
active: null,
|
51
|
+
classes: {
|
52
|
+
"ui-tabs": "ui-corner-all",
|
53
|
+
"ui-tabs-nav": "ui-corner-all",
|
54
|
+
"ui-tabs-panel": "ui-corner-bottom",
|
55
|
+
"ui-tabs-tab": "ui-corner-top"
|
56
|
+
},
|
35
57
|
collapsible: false,
|
36
58
|
event: "click",
|
37
59
|
heightStyle: "content",
|
38
60
|
hide: null,
|
39
61
|
show: null,
|
40
62
|
|
41
|
-
//
|
63
|
+
// Callbacks
|
42
64
|
activate: null,
|
43
65
|
beforeActivate: null,
|
44
66
|
beforeLoad: null,
|
45
67
|
load: null
|
46
68
|
},
|
47
69
|
|
48
|
-
_isLocal: (function() {
|
70
|
+
_isLocal: ( function() {
|
49
71
|
var rhash = /#.*$/;
|
50
72
|
|
51
73
|
return function( anchor ) {
|
52
74
|
var anchorUrl, locationUrl;
|
53
75
|
|
54
|
-
// support: IE7
|
55
|
-
// IE7 doesn't normalize the href property when set via script (#9317)
|
56
|
-
anchor = anchor.cloneNode( false );
|
57
|
-
|
58
76
|
anchorUrl = anchor.href.replace( rhash, "" );
|
59
77
|
locationUrl = location.href.replace( rhash, "" );
|
60
78
|
|
61
|
-
//
|
79
|
+
// Decoding may throw an error if the URL isn't UTF-8 (#9518)
|
62
80
|
try {
|
63
81
|
anchorUrl = decodeURIComponent( anchorUrl );
|
64
82
|
} catch ( error ) {}
|
@@ -68,7 +86,7 @@ return $.widget( "ui.tabs", {
|
|
68
86
|
|
69
87
|
return anchor.hash.length > 1 && anchorUrl === locationUrl;
|
70
88
|
};
|
71
|
-
})(),
|
89
|
+
} )(),
|
72
90
|
|
73
91
|
_create: function() {
|
74
92
|
var that = this,
|
@@ -76,9 +94,8 @@ return $.widget( "ui.tabs", {
|
|
76
94
|
|
77
95
|
this.running = false;
|
78
96
|
|
79
|
-
this.
|
80
|
-
|
81
|
-
.toggleClass( "ui-tabs-collapsible", options.collapsible );
|
97
|
+
this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
|
98
|
+
this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
|
82
99
|
|
83
100
|
this._processTabs();
|
84
101
|
options.active = this._initialActive();
|
@@ -89,11 +106,11 @@ return $.widget( "ui.tabs", {
|
|
89
106
|
options.disabled = $.unique( options.disabled.concat(
|
90
107
|
$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
|
91
108
|
return that.tabs.index( li );
|
92
|
-
})
|
109
|
+
} )
|
93
110
|
) ).sort();
|
94
111
|
}
|
95
112
|
|
96
|
-
//
|
113
|
+
// Check for length avoids error when initializing empty list
|
97
114
|
if ( this.options.active !== false && this.anchors.length ) {
|
98
115
|
this.active = this._findActive( options.active );
|
99
116
|
} else {
|
@@ -113,28 +130,29 @@ return $.widget( "ui.tabs", {
|
|
113
130
|
locationHash = location.hash.substring( 1 );
|
114
131
|
|
115
132
|
if ( active === null ) {
|
133
|
+
|
116
134
|
// check the fragment identifier in the URL
|
117
135
|
if ( locationHash ) {
|
118
|
-
this.tabs.each(function( i, tab ) {
|
136
|
+
this.tabs.each( function( i, tab ) {
|
119
137
|
if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
|
120
138
|
active = i;
|
121
139
|
return false;
|
122
140
|
}
|
123
|
-
});
|
141
|
+
} );
|
124
142
|
}
|
125
143
|
|
126
|
-
//
|
144
|
+
// Check for a tab marked active via a class
|
127
145
|
if ( active === null ) {
|
128
146
|
active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
|
129
147
|
}
|
130
148
|
|
131
|
-
//
|
149
|
+
// No active tab, set to false
|
132
150
|
if ( active === null || active === -1 ) {
|
133
151
|
active = this.tabs.length ? 0 : false;
|
134
152
|
}
|
135
153
|
}
|
136
154
|
|
137
|
-
//
|
155
|
+
// Handle numbers: negative, out of range
|
138
156
|
if ( active !== false ) {
|
139
157
|
active = this.tabs.index( this.tabs.eq( active ) );
|
140
158
|
if ( active === -1 ) {
|
@@ -142,7 +160,7 @@ return $.widget( "ui.tabs", {
|
|
142
160
|
}
|
143
161
|
}
|
144
162
|
|
145
|
-
//
|
163
|
+
// Don't allow collapsible: false and active: false
|
146
164
|
if ( !collapsible && active === false && this.anchors.length ) {
|
147
165
|
active = 0;
|
148
166
|
}
|
@@ -158,7 +176,7 @@ return $.widget( "ui.tabs", {
|
|
158
176
|
},
|
159
177
|
|
160
178
|
_tabKeydown: function( event ) {
|
161
|
-
var focusedTab = $( this.document[0]
|
179
|
+
var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
|
162
180
|
selectedIndex = this.tabs.index( focusedTab ),
|
163
181
|
goingForward = true;
|
164
182
|
|
@@ -167,36 +185,39 @@ return $.widget( "ui.tabs", {
|
|
167
185
|
}
|
168
186
|
|
169
187
|
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
|
-
|
188
|
+
case $.ui.keyCode.RIGHT:
|
189
|
+
case $.ui.keyCode.DOWN:
|
190
|
+
selectedIndex++;
|
191
|
+
break;
|
192
|
+
case $.ui.keyCode.UP:
|
193
|
+
case $.ui.keyCode.LEFT:
|
194
|
+
goingForward = false;
|
195
|
+
selectedIndex--;
|
196
|
+
break;
|
197
|
+
case $.ui.keyCode.END:
|
198
|
+
selectedIndex = this.anchors.length - 1;
|
199
|
+
break;
|
200
|
+
case $.ui.keyCode.HOME:
|
201
|
+
selectedIndex = 0;
|
202
|
+
break;
|
203
|
+
case $.ui.keyCode.SPACE:
|
204
|
+
|
205
|
+
// Activate only, no collapsing
|
206
|
+
event.preventDefault();
|
207
|
+
clearTimeout( this.activating );
|
208
|
+
this._activate( selectedIndex );
|
209
|
+
return;
|
210
|
+
case $.ui.keyCode.ENTER:
|
211
|
+
|
212
|
+
// Toggle (cancel delayed activation, allow collapsing)
|
213
|
+
event.preventDefault();
|
214
|
+
clearTimeout( this.activating );
|
215
|
+
|
216
|
+
// Determine if we should collapse or activate
|
217
|
+
this._activate( selectedIndex === this.options.active ? false : selectedIndex );
|
218
|
+
return;
|
219
|
+
default:
|
220
|
+
return;
|
200
221
|
}
|
201
222
|
|
202
223
|
// Focus the appropriate tab, based on which key was pressed
|
@@ -213,7 +234,7 @@ return $.widget( "ui.tabs", {
|
|
213
234
|
focusedTab.attr( "aria-selected", "false" );
|
214
235
|
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
|
215
236
|
|
216
|
-
this.activating = this._delay(function() {
|
237
|
+
this.activating = this._delay( function() {
|
217
238
|
this.option( "active", selectedIndex );
|
218
239
|
}, this.delay );
|
219
240
|
}
|
@@ -227,7 +248,7 @@ return $.widget( "ui.tabs", {
|
|
227
248
|
// Ctrl+up moves focus to the current tab
|
228
249
|
if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
|
229
250
|
event.preventDefault();
|
230
|
-
this.active.focus
|
251
|
+
this.active.trigger( "focus" );
|
231
252
|
}
|
232
253
|
},
|
233
254
|
|
@@ -265,27 +286,23 @@ return $.widget( "ui.tabs", {
|
|
265
286
|
|
266
287
|
_focusNextTab: function( index, goingForward ) {
|
267
288
|
index = this._findNextTab( index, goingForward );
|
268
|
-
this.tabs.eq( index ).focus
|
289
|
+
this.tabs.eq( index ).trigger( "focus" );
|
269
290
|
return index;
|
270
291
|
},
|
271
292
|
|
272
293
|
_setOption: function( key, value ) {
|
273
294
|
if ( key === "active" ) {
|
295
|
+
|
274
296
|
// _activate() will handle invalid values and update this.options
|
275
297
|
this._activate( value );
|
276
298
|
return;
|
277
299
|
}
|
278
300
|
|
279
|
-
|
280
|
-
// don't use the widget factory's disabled handling
|
281
|
-
this._setupDisabled( value );
|
282
|
-
return;
|
283
|
-
}
|
284
|
-
|
285
|
-
this._super( key, value);
|
301
|
+
this._super( key, value );
|
286
302
|
|
287
303
|
if ( key === "collapsible" ) {
|
288
|
-
this.
|
304
|
+
this._toggleClass( "ui-tabs-collapsible", null, value );
|
305
|
+
|
289
306
|
// Setting collapsible: false while collapsed; open first panel
|
290
307
|
if ( !value && this.options.active === false ) {
|
291
308
|
this._activate( 0 );
|
@@ -309,30 +326,35 @@ return $.widget( "ui.tabs", {
|
|
309
326
|
var options = this.options,
|
310
327
|
lis = this.tablist.children( ":has(a[href])" );
|
311
328
|
|
312
|
-
//
|
329
|
+
// Get disabled tabs from class attribute from HTML
|
313
330
|
// this will get converted to a boolean if needed in _refresh()
|
314
331
|
options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
|
315
332
|
return lis.index( tab );
|
316
|
-
});
|
333
|
+
} );
|
317
334
|
|
318
335
|
this._processTabs();
|
319
336
|
|
320
|
-
//
|
337
|
+
// Was collapsed or no tabs
|
321
338
|
if ( options.active === false || !this.anchors.length ) {
|
322
339
|
options.active = false;
|
323
340
|
this.active = $();
|
341
|
+
|
324
342
|
// was active, but active tab is gone
|
325
343
|
} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
|
344
|
+
|
326
345
|
// all remaining tabs are disabled
|
327
346
|
if ( this.tabs.length === options.disabled.length ) {
|
328
347
|
options.active = false;
|
329
348
|
this.active = $();
|
349
|
+
|
330
350
|
// activate previous tab
|
331
351
|
} else {
|
332
352
|
this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
|
333
353
|
}
|
354
|
+
|
334
355
|
// was active, active tab still exists
|
335
356
|
} else {
|
357
|
+
|
336
358
|
// make sure active index is correct
|
337
359
|
options.active = this.tabs.index( this.active );
|
338
360
|
}
|
@@ -341,37 +363,37 @@ return $.widget( "ui.tabs", {
|
|
341
363
|
},
|
342
364
|
|
343
365
|
_refresh: function() {
|
344
|
-
this.
|
366
|
+
this._setOptionDisabled( this.options.disabled );
|
345
367
|
this._setupEvents( this.options.event );
|
346
368
|
this._setupHeightStyle( this.options.heightStyle );
|
347
369
|
|
348
|
-
this.tabs.not( this.active ).attr({
|
370
|
+
this.tabs.not( this.active ).attr( {
|
349
371
|
"aria-selected": "false",
|
350
372
|
"aria-expanded": "false",
|
351
373
|
tabIndex: -1
|
352
|
-
});
|
374
|
+
} );
|
353
375
|
this.panels.not( this._getPanelForTab( this.active ) )
|
354
376
|
.hide()
|
355
|
-
.attr({
|
377
|
+
.attr( {
|
356
378
|
"aria-hidden": "true"
|
357
|
-
});
|
379
|
+
} );
|
358
380
|
|
359
381
|
// Make sure one tab is in the tab order
|
360
382
|
if ( !this.active.length ) {
|
361
383
|
this.tabs.eq( 0 ).attr( "tabIndex", 0 );
|
362
384
|
} else {
|
363
385
|
this.active
|
364
|
-
.
|
365
|
-
.attr({
|
386
|
+
.attr( {
|
366
387
|
"aria-selected": "true",
|
367
388
|
"aria-expanded": "true",
|
368
389
|
tabIndex: 0
|
369
|
-
});
|
390
|
+
} );
|
391
|
+
this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
|
370
392
|
this._getPanelForTab( this.active )
|
371
393
|
.show()
|
372
|
-
.attr({
|
394
|
+
.attr( {
|
373
395
|
"aria-hidden": "false"
|
374
|
-
});
|
396
|
+
} );
|
375
397
|
}
|
376
398
|
},
|
377
399
|
|
@@ -381,60 +403,63 @@ return $.widget( "ui.tabs", {
|
|
381
403
|
prevAnchors = this.anchors,
|
382
404
|
prevPanels = this.panels;
|
383
405
|
|
384
|
-
this.tablist = this._getList()
|
385
|
-
|
386
|
-
|
406
|
+
this.tablist = this._getList().attr( "role", "tablist" );
|
407
|
+
this._addClass( this.tablist, "ui-tabs-nav",
|
408
|
+
"ui-helper-reset ui-helper-clearfix ui-widget-header" );
|
387
409
|
|
388
|
-
|
389
|
-
|
410
|
+
// Prevent users from focusing disabled tabs via click
|
411
|
+
this.tablist
|
412
|
+
.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
|
390
413
|
if ( $( this ).is( ".ui-state-disabled" ) ) {
|
391
414
|
event.preventDefault();
|
392
415
|
}
|
393
|
-
})
|
416
|
+
} )
|
394
417
|
|
395
|
-
//
|
418
|
+
// Support: IE <9
|
396
419
|
// Preventing the default action in mousedown doesn't prevent IE
|
397
420
|
// from focusing the element, so if the anchor gets focused, blur.
|
398
421
|
// We don't have to worry about focusing the previously focused
|
399
422
|
// element since clicking on a non-focusable element should focus
|
400
423
|
// the body anyway.
|
401
|
-
.
|
424
|
+
.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
|
402
425
|
if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
|
403
426
|
this.blur();
|
404
427
|
}
|
405
|
-
});
|
428
|
+
} );
|
406
429
|
|
407
430
|
this.tabs = this.tablist.find( "> li:has(a[href])" )
|
408
|
-
.
|
409
|
-
.attr({
|
431
|
+
.attr( {
|
410
432
|
role: "tab",
|
411
433
|
tabIndex: -1
|
412
|
-
});
|
434
|
+
} );
|
435
|
+
this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
|
413
436
|
|
414
|
-
this.anchors = this.tabs.map(function() {
|
415
|
-
|
416
|
-
|
417
|
-
.
|
418
|
-
.attr({
|
437
|
+
this.anchors = this.tabs.map( function() {
|
438
|
+
return $( "a", this )[ 0 ];
|
439
|
+
} )
|
440
|
+
.attr( {
|
419
441
|
role: "presentation",
|
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,19 +496,20 @@ 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
|
-
|
510
|
+
_setOptionDisabled: function( disabled ) {
|
511
|
+
var currentItem, li, i;
|
512
|
+
|
488
513
|
if ( $.isArray( disabled ) ) {
|
489
514
|
if ( !disabled.length ) {
|
490
515
|
disabled = false;
|
@@ -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
|
+
$.ui.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
|
|
@@ -779,14 +801,14 @@ return $.widget( "ui.tabs", {
|
|
779
801
|
if ( $.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 ) {
|
@@ -808,7 +830,7 @@ return $.widget( "ui.tabs", {
|
|
808
830
|
disabled = [ index ];
|
809
831
|
}
|
810
832
|
}
|
811
|
-
this.
|
833
|
+
this._setOptionDisabled( disabled );
|
812
834
|
},
|
813
835
|
|
814
836
|
load: function( index, event ) {
|
@@ -826,7 +848,7 @@ return $.widget( "ui.tabs", {
|
|
826
848
|
that.panels.stop( false, true );
|
827
849
|
}
|
828
850
|
|
829
|
-
|
851
|
+
that._removeClass( tab, "ui-tabs-loading" );
|
830
852
|
panel.removeAttr( "aria-busy" );
|
831
853
|
|
832
854
|
if ( jqXHR === that.xhr ) {
|
@@ -834,45 +856,50 @@ return $.widget( "ui.tabs", {
|
|
834
856
|
}
|
835
857
|
};
|
836
858
|
|
837
|
-
//
|
859
|
+
// Not remote
|
838
860
|
if ( this._isLocal( anchor[ 0 ] ) ) {
|
839
861
|
return;
|
840
862
|
}
|
841
863
|
|
842
864
|
this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
|
843
865
|
|
844
|
-
//
|
866
|
+
// Support: jQuery <1.8
|
845
867
|
// jQuery <1.8 returns false if the request is canceled in beforeSend,
|
846
868
|
// but as of 1.8, $.ajax() always returns a jqXHR object.
|
847
869
|
if ( this.xhr && this.xhr.statusText !== "canceled" ) {
|
848
|
-
|
870
|
+
this._addClass( tab, "ui-tabs-loading" );
|
849
871
|
panel.attr( "aria-busy", "true" );
|
850
872
|
|
851
873
|
this.xhr
|
852
|
-
.done(function( response, status, jqXHR ) {
|
874
|
+
.done( function( response, status, jqXHR ) {
|
875
|
+
|
853
876
|
// support: jQuery <1.8
|
854
877
|
// http://bugs.jquery.com/ticket/11778
|
855
|
-
setTimeout(function() {
|
878
|
+
setTimeout( function() {
|
856
879
|
panel.html( response );
|
857
880
|
that._trigger( "load", event, eventData );
|
858
881
|
|
859
882
|
complete( jqXHR, status );
|
860
883
|
}, 1 );
|
861
|
-
})
|
862
|
-
.fail(function( jqXHR, status ) {
|
884
|
+
} )
|
885
|
+
.fail( function( jqXHR, status ) {
|
886
|
+
|
863
887
|
// support: jQuery <1.8
|
864
888
|
// http://bugs.jquery.com/ticket/11778
|
865
|
-
setTimeout(function() {
|
889
|
+
setTimeout( function() {
|
866
890
|
complete( jqXHR, status );
|
867
891
|
}, 1 );
|
868
|
-
});
|
892
|
+
} );
|
869
893
|
}
|
870
894
|
},
|
871
895
|
|
872
896
|
_ajaxSettings: function( anchor, event, eventData ) {
|
873
897
|
var that = this;
|
874
898
|
return {
|
875
|
-
|
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( /#.*$/, "" ),
|
876
903
|
beforeSend: function( jqXHR, settings ) {
|
877
904
|
return that._trigger( "beforeLoad", event,
|
878
905
|
$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
|
@@ -884,6 +911,21 @@ return $.widget( "ui.tabs", {
|
|
884
911
|
var id = $( tab ).attr( "aria-controls" );
|
885
912
|
return this.element.find( this._sanitizeSelector( "#" + id ) );
|
886
913
|
}
|
887
|
-
});
|
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;
|
888
930
|
|
889
|
-
}));
|
931
|
+
} ) );
|