jquery-ui-rails 5.0.4 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,51 +1,68 @@
|
|
1
|
-
//= require jquery-ui/
|
2
|
-
//= require jquery-ui/widget
|
1
|
+
//= require jquery-ui/keycode
|
3
2
|
//= require jquery-ui/position
|
3
|
+
//= require jquery-ui/safe-active-element
|
4
|
+
//= require jquery-ui/unique-id
|
5
|
+
//= require jquery-ui/version
|
6
|
+
//= require jquery-ui/widget
|
4
7
|
|
5
8
|
/*!
|
6
|
-
* jQuery UI Menu 1.
|
9
|
+
* jQuery UI Menu 1.13.0
|
7
10
|
* http://jqueryui.com
|
8
11
|
*
|
9
12
|
* Copyright jQuery Foundation and other contributors
|
10
13
|
* Released under the MIT license.
|
11
14
|
* http://jquery.org/license
|
12
|
-
*
|
13
|
-
* http://api.jqueryui.com/menu/
|
14
15
|
*/
|
15
|
-
|
16
|
+
|
17
|
+
//>>label: Menu
|
18
|
+
//>>group: Widgets
|
19
|
+
//>>description: Creates nestable menus.
|
20
|
+
//>>docs: http://api.jqueryui.com/menu/
|
21
|
+
//>>demos: http://jqueryui.com/menu/
|
22
|
+
//>>css.structure: ../../themes/base/core.css
|
23
|
+
//>>css.structure: ../../themes/base/menu.css
|
24
|
+
//>>css.theme: ../../themes/base/theme.css
|
25
|
+
|
26
|
+
( function( factory ) {
|
27
|
+
"use strict";
|
28
|
+
|
16
29
|
if ( typeof define === "function" && define.amd ) {
|
17
30
|
|
18
31
|
// AMD. Register as an anonymous module.
|
19
|
-
define([
|
32
|
+
define( [
|
20
33
|
"jquery",
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
34
|
+
"../keycode",
|
35
|
+
"../position",
|
36
|
+
"../safe-active-element",
|
37
|
+
"../unique-id",
|
38
|
+
"../version",
|
39
|
+
"../widget"
|
24
40
|
], factory );
|
25
41
|
} else {
|
26
42
|
|
27
43
|
// Browser globals
|
28
44
|
factory( jQuery );
|
29
45
|
}
|
30
|
-
}(function( $ ) {
|
46
|
+
} )( function( $ ) {
|
47
|
+
"use strict";
|
31
48
|
|
32
49
|
return $.widget( "ui.menu", {
|
33
|
-
version: "1.
|
50
|
+
version: "1.13.0",
|
34
51
|
defaultElement: "<ul>",
|
35
52
|
delay: 300,
|
36
53
|
options: {
|
37
54
|
icons: {
|
38
|
-
submenu: "ui-icon-
|
55
|
+
submenu: "ui-icon-caret-1-e"
|
39
56
|
},
|
40
57
|
items: "> *",
|
41
58
|
menus: "ul",
|
42
59
|
position: {
|
43
|
-
my: "left
|
60
|
+
my: "left top",
|
44
61
|
at: "right top"
|
45
62
|
},
|
46
63
|
role: "menu",
|
47
64
|
|
48
|
-
//
|
65
|
+
// Callbacks
|
49
66
|
blur: null,
|
50
67
|
focus: null,
|
51
68
|
select: null
|
@@ -57,29 +74,27 @@ return $.widget( "ui.menu", {
|
|
57
74
|
// Flag used to prevent firing of the click handler
|
58
75
|
// as the event bubbles up through nested menus
|
59
76
|
this.mouseHandled = false;
|
77
|
+
this.lastMousePosition = { x: null, y: null };
|
60
78
|
this.element
|
61
79
|
.uniqueId()
|
62
|
-
.
|
63
|
-
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
|
64
|
-
.attr({
|
80
|
+
.attr( {
|
65
81
|
role: this.options.role,
|
66
82
|
tabIndex: 0
|
67
|
-
});
|
83
|
+
} );
|
68
84
|
|
69
|
-
|
70
|
-
|
71
|
-
.addClass( "ui-state-disabled" )
|
72
|
-
.attr( "aria-disabled", "true" );
|
73
|
-
}
|
85
|
+
this._addClass( "ui-menu", "ui-widget ui-widget-content" );
|
86
|
+
this._on( {
|
74
87
|
|
75
|
-
this._on({
|
76
88
|
// Prevent focus from sticking to links inside menu after clicking
|
77
89
|
// them (focus should always stay on UL during navigation).
|
78
90
|
"mousedown .ui-menu-item": function( event ) {
|
79
91
|
event.preventDefault();
|
92
|
+
|
93
|
+
this._activateItem( event );
|
80
94
|
},
|
81
95
|
"click .ui-menu-item": function( event ) {
|
82
96
|
var target = $( event.target );
|
97
|
+
var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
|
83
98
|
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
84
99
|
this.select( event );
|
85
100
|
|
@@ -91,7 +106,8 @@ return $.widget( "ui.menu", {
|
|
91
106
|
// Open submenu on click
|
92
107
|
if ( target.has( ".ui-menu" ).length ) {
|
93
108
|
this.expand( event );
|
94
|
-
} else if ( !this.element.is( ":focus" ) &&
|
109
|
+
} else if ( !this.element.is( ":focus" ) &&
|
110
|
+
active.closest( ".ui-menu" ).length ) {
|
95
111
|
|
96
112
|
// Redirect focus to the menu
|
97
113
|
this.element.trigger( "focus", [ true ] );
|
@@ -104,39 +120,33 @@ return $.widget( "ui.menu", {
|
|
104
120
|
}
|
105
121
|
}
|
106
122
|
},
|
107
|
-
"mouseenter .ui-menu-item":
|
108
|
-
|
109
|
-
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
|
110
|
-
// is over an item in the menu
|
111
|
-
if ( this.previousFilter ) {
|
112
|
-
return;
|
113
|
-
}
|
114
|
-
var target = $( event.currentTarget );
|
115
|
-
// Remove ui-state-active class from siblings of the newly focused menu item
|
116
|
-
// to avoid a jump caused by adjacent elements both having a class with a border
|
117
|
-
target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
|
118
|
-
this.focus( event, target );
|
119
|
-
},
|
123
|
+
"mouseenter .ui-menu-item": "_activateItem",
|
124
|
+
"mousemove .ui-menu-item": "_activateItem",
|
120
125
|
mouseleave: "collapseAll",
|
121
126
|
"mouseleave .ui-menu": "collapseAll",
|
122
127
|
focus: function( event, keepActiveItem ) {
|
128
|
+
|
123
129
|
// If there's already an active item, keep it active
|
124
130
|
// If not, activate the first item
|
125
|
-
var item = this.active || this.
|
131
|
+
var item = this.active || this._menuItems().first();
|
126
132
|
|
127
133
|
if ( !keepActiveItem ) {
|
128
134
|
this.focus( event, item );
|
129
135
|
}
|
130
136
|
},
|
131
137
|
blur: function( event ) {
|
132
|
-
this._delay(function() {
|
133
|
-
|
138
|
+
this._delay( function() {
|
139
|
+
var notContained = !$.contains(
|
140
|
+
this.element[ 0 ],
|
141
|
+
$.ui.safeActiveElement( this.document[ 0 ] )
|
142
|
+
);
|
143
|
+
if ( notContained ) {
|
134
144
|
this.collapseAll( event );
|
135
145
|
}
|
136
|
-
});
|
146
|
+
} );
|
137
147
|
},
|
138
148
|
keydown: "_keydown"
|
139
|
-
});
|
149
|
+
} );
|
140
150
|
|
141
151
|
this.refresh();
|
142
152
|
|
@@ -144,49 +154,77 @@ return $.widget( "ui.menu", {
|
|
144
154
|
this._on( this.document, {
|
145
155
|
click: function( event ) {
|
146
156
|
if ( this._closeOnDocumentClick( event ) ) {
|
147
|
-
this.collapseAll( event );
|
157
|
+
this.collapseAll( event, true );
|
148
158
|
}
|
149
159
|
|
150
160
|
// Reset the mouseHandled flag
|
151
161
|
this.mouseHandled = false;
|
152
162
|
}
|
153
|
-
});
|
163
|
+
} );
|
164
|
+
},
|
165
|
+
|
166
|
+
_activateItem: function( event ) {
|
167
|
+
|
168
|
+
// Ignore mouse events while typeahead is active, see #10458.
|
169
|
+
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
|
170
|
+
// is over an item in the menu
|
171
|
+
if ( this.previousFilter ) {
|
172
|
+
return;
|
173
|
+
}
|
174
|
+
|
175
|
+
// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
|
176
|
+
if ( event.clientX === this.lastMousePosition.x &&
|
177
|
+
event.clientY === this.lastMousePosition.y ) {
|
178
|
+
return;
|
179
|
+
}
|
180
|
+
|
181
|
+
this.lastMousePosition = {
|
182
|
+
x: event.clientX,
|
183
|
+
y: event.clientY
|
184
|
+
};
|
185
|
+
|
186
|
+
var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
|
187
|
+
target = $( event.currentTarget );
|
188
|
+
|
189
|
+
// Ignore bubbled events on parent items, see #11641
|
190
|
+
if ( actualTarget[ 0 ] !== target[ 0 ] ) {
|
191
|
+
return;
|
192
|
+
}
|
193
|
+
|
194
|
+
// If the item is already active, there's nothing to do
|
195
|
+
if ( target.is( ".ui-state-active" ) ) {
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
|
199
|
+
// Remove ui-state-active class from siblings of the newly focused menu item
|
200
|
+
// to avoid a jump caused by adjacent elements both having a class with a border
|
201
|
+
this._removeClass( target.siblings().children( ".ui-state-active" ),
|
202
|
+
null, "ui-state-active" );
|
203
|
+
this.focus( event, target );
|
154
204
|
},
|
155
205
|
|
156
206
|
_destroy: function() {
|
207
|
+
var items = this.element.find( ".ui-menu-item" )
|
208
|
+
.removeAttr( "role aria-disabled" ),
|
209
|
+
submenus = items.children( ".ui-menu-item-wrapper" )
|
210
|
+
.removeUniqueId()
|
211
|
+
.removeAttr( "tabIndex role aria-haspopup" );
|
212
|
+
|
157
213
|
// Destroy (sub)menus
|
158
214
|
this.element
|
159
215
|
.removeAttr( "aria-activedescendant" )
|
160
216
|
.find( ".ui-menu" ).addBack()
|
161
|
-
.
|
162
|
-
|
163
|
-
.removeAttr( "tabIndex" )
|
164
|
-
.removeAttr( "aria-labelledby" )
|
165
|
-
.removeAttr( "aria-expanded" )
|
166
|
-
.removeAttr( "aria-hidden" )
|
167
|
-
.removeAttr( "aria-disabled" )
|
217
|
+
.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
|
218
|
+
"tabIndex" )
|
168
219
|
.removeUniqueId()
|
169
220
|
.show();
|
170
221
|
|
171
|
-
|
172
|
-
|
173
|
-
.
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
.removeClass( "ui-state-hover" )
|
178
|
-
.removeAttr( "tabIndex" )
|
179
|
-
.removeAttr( "role" )
|
180
|
-
.removeAttr( "aria-haspopup" )
|
181
|
-
.children().each( function() {
|
182
|
-
var elem = $( this );
|
183
|
-
if ( elem.data( "ui-menu-submenu-carat" ) ) {
|
184
|
-
elem.remove();
|
185
|
-
}
|
186
|
-
});
|
187
|
-
|
188
|
-
// Destroy menu dividers
|
189
|
-
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
|
222
|
+
submenus.children().each( function() {
|
223
|
+
var elem = $( this );
|
224
|
+
if ( elem.data( "ui-menu-submenu-caret" ) ) {
|
225
|
+
elem.remove();
|
226
|
+
}
|
227
|
+
} );
|
190
228
|
},
|
191
229
|
|
192
230
|
_keydown: function( event ) {
|
@@ -230,9 +268,12 @@ return $.widget( "ui.menu", {
|
|
230
268
|
default:
|
231
269
|
preventDefault = false;
|
232
270
|
prev = this.previousFilter || "";
|
233
|
-
character = String.fromCharCode( event.keyCode );
|
234
271
|
skip = false;
|
235
272
|
|
273
|
+
// Support number pad values
|
274
|
+
character = event.keyCode >= 96 && event.keyCode <= 105 ?
|
275
|
+
( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
|
276
|
+
|
236
277
|
clearTimeout( this.filterTimer );
|
237
278
|
|
238
279
|
if ( character === prev ) {
|
@@ -256,7 +297,7 @@ return $.widget( "ui.menu", {
|
|
256
297
|
if ( match.length ) {
|
257
298
|
this.focus( event, match );
|
258
299
|
this.previousFilter = character;
|
259
|
-
this.filterTimer = this._delay(function() {
|
300
|
+
this.filterTimer = this._delay( function() {
|
260
301
|
delete this.previousFilter;
|
261
302
|
}, 1000 );
|
262
303
|
} else {
|
@@ -270,8 +311,8 @@ return $.widget( "ui.menu", {
|
|
270
311
|
},
|
271
312
|
|
272
313
|
_activate: function( event ) {
|
273
|
-
if ( !this.active.is( ".ui-state-disabled" ) ) {
|
274
|
-
if ( this.active.
|
314
|
+
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
|
315
|
+
if ( this.active.children( "[aria-haspopup='true']" ).length ) {
|
275
316
|
this.expand( event );
|
276
317
|
} else {
|
277
318
|
this.select( event );
|
@@ -280,54 +321,57 @@ return $.widget( "ui.menu", {
|
|
280
321
|
},
|
281
322
|
|
282
323
|
refresh: function() {
|
283
|
-
var menus, items,
|
324
|
+
var menus, items, newSubmenus, newItems, newWrappers,
|
284
325
|
that = this,
|
285
326
|
icon = this.options.icons.submenu,
|
286
327
|
submenus = this.element.find( this.options.menus );
|
287
328
|
|
288
|
-
this.
|
329
|
+
this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
|
289
330
|
|
290
331
|
// Initialize nested menus
|
291
|
-
submenus.filter( ":not(.ui-menu)" )
|
292
|
-
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
|
332
|
+
newSubmenus = submenus.filter( ":not(.ui-menu)" )
|
293
333
|
.hide()
|
294
|
-
.attr({
|
334
|
+
.attr( {
|
295
335
|
role: this.options.role,
|
296
336
|
"aria-hidden": "true",
|
297
337
|
"aria-expanded": "false"
|
298
|
-
})
|
299
|
-
.each(function() {
|
338
|
+
} )
|
339
|
+
.each( function() {
|
300
340
|
var menu = $( this ),
|
301
|
-
item = menu.
|
302
|
-
|
303
|
-
.addClass( "ui-menu-icon ui-icon " + icon )
|
304
|
-
.data( "ui-menu-submenu-carat", true );
|
341
|
+
item = menu.prev(),
|
342
|
+
submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
|
305
343
|
|
344
|
+
that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
|
306
345
|
item
|
307
346
|
.attr( "aria-haspopup", "true" )
|
308
|
-
.prepend(
|
347
|
+
.prepend( submenuCaret );
|
309
348
|
menu.attr( "aria-labelledby", item.attr( "id" ) );
|
310
|
-
});
|
349
|
+
} );
|
350
|
+
|
351
|
+
this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
|
311
352
|
|
312
353
|
menus = submenus.add( this.element );
|
313
354
|
items = menus.find( this.options.items );
|
314
355
|
|
315
356
|
// Initialize menu-items containing spaces and/or dashes only as dividers
|
316
|
-
items.not( ".ui-menu-item" ).each(function() {
|
357
|
+
items.not( ".ui-menu-item" ).each( function() {
|
317
358
|
var item = $( this );
|
318
359
|
if ( that._isDivider( item ) ) {
|
319
|
-
|
360
|
+
that._addClass( item, "ui-menu-divider", "ui-widget-content" );
|
320
361
|
}
|
321
|
-
});
|
362
|
+
} );
|
322
363
|
|
323
364
|
// Don't refresh list items that are already adapted
|
324
|
-
items.not( ".ui-menu-item, .ui-menu-divider" )
|
325
|
-
|
326
|
-
.
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
365
|
+
newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
|
366
|
+
newWrappers = newItems.children()
|
367
|
+
.not( ".ui-menu" )
|
368
|
+
.uniqueId()
|
369
|
+
.attr( {
|
370
|
+
tabIndex: -1,
|
371
|
+
role: this._itemRole()
|
372
|
+
} );
|
373
|
+
this._addClass( newItems, "ui-menu-item" )
|
374
|
+
._addClass( newWrappers, "ui-menu-item-wrapper" );
|
331
375
|
|
332
376
|
// Add aria-disabled attribute to any disabled menu item
|
333
377
|
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
|
@@ -347,26 +391,31 @@ return $.widget( "ui.menu", {
|
|
347
391
|
|
348
392
|
_setOption: function( key, value ) {
|
349
393
|
if ( key === "icons" ) {
|
350
|
-
this.element.find( ".ui-menu-icon" )
|
351
|
-
|
352
|
-
.
|
353
|
-
}
|
354
|
-
if ( key === "disabled" ) {
|
355
|
-
this.element
|
356
|
-
.toggleClass( "ui-state-disabled", !!value )
|
357
|
-
.attr( "aria-disabled", value );
|
394
|
+
var icons = this.element.find( ".ui-menu-icon" );
|
395
|
+
this._removeClass( icons, null, this.options.icons.submenu )
|
396
|
+
._addClass( icons, null, value.submenu );
|
358
397
|
}
|
359
398
|
this._super( key, value );
|
360
399
|
},
|
361
400
|
|
401
|
+
_setOptionDisabled: function( value ) {
|
402
|
+
this._super( value );
|
403
|
+
|
404
|
+
this.element.attr( "aria-disabled", String( value ) );
|
405
|
+
this._toggleClass( null, "ui-state-disabled", !!value );
|
406
|
+
},
|
407
|
+
|
362
408
|
focus: function( event, item ) {
|
363
|
-
var nested, focused;
|
409
|
+
var nested, focused, activeParent;
|
364
410
|
this.blur( event, event && event.type === "focus" );
|
365
411
|
|
366
412
|
this._scrollIntoView( item );
|
367
413
|
|
368
414
|
this.active = item.first();
|
369
|
-
|
415
|
+
|
416
|
+
focused = this.active.children( ".ui-menu-item-wrapper" );
|
417
|
+
this._addClass( focused, null, "ui-state-active" );
|
418
|
+
|
370
419
|
// Only update aria-activedescendant if there's a role
|
371
420
|
// otherwise we assume focus is managed elsewhere
|
372
421
|
if ( this.options.role ) {
|
@@ -374,22 +423,23 @@ return $.widget( "ui.menu", {
|
|
374
423
|
}
|
375
424
|
|
376
425
|
// Highlight active parent menu item, if any
|
377
|
-
this.active
|
426
|
+
activeParent = this.active
|
378
427
|
.parent()
|
379
|
-
|
380
|
-
|
428
|
+
.closest( ".ui-menu-item" )
|
429
|
+
.children( ".ui-menu-item-wrapper" );
|
430
|
+
this._addClass( activeParent, null, "ui-state-active" );
|
381
431
|
|
382
432
|
if ( event && event.type === "keydown" ) {
|
383
433
|
this._close();
|
384
434
|
} else {
|
385
|
-
this.timer = this._delay(function() {
|
435
|
+
this.timer = this._delay( function() {
|
386
436
|
this._close();
|
387
437
|
}, this.delay );
|
388
438
|
}
|
389
439
|
|
390
440
|
nested = item.children( ".ui-menu" );
|
391
441
|
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
|
392
|
-
this._startOpening(nested);
|
442
|
+
this._startOpening( nested );
|
393
443
|
}
|
394
444
|
this.activeMenu = item.parent();
|
395
445
|
|
@@ -399,8 +449,8 @@ return $.widget( "ui.menu", {
|
|
399
449
|
_scrollIntoView: function( item ) {
|
400
450
|
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
|
401
451
|
if ( this._hasScroll() ) {
|
402
|
-
borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
|
403
|
-
paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
|
452
|
+
borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
|
453
|
+
paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
|
404
454
|
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
|
405
455
|
scroll = this.activeMenu.scrollTop();
|
406
456
|
elementHeight = this.activeMenu.height();
|
@@ -423,29 +473,30 @@ return $.widget( "ui.menu", {
|
|
423
473
|
return;
|
424
474
|
}
|
425
475
|
|
426
|
-
this.active.
|
427
|
-
|
476
|
+
this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
|
477
|
+
null, "ui-state-active" );
|
428
478
|
|
429
479
|
this._trigger( "blur", event, { item: this.active } );
|
480
|
+
this.active = null;
|
430
481
|
},
|
431
482
|
|
432
483
|
_startOpening: function( submenu ) {
|
433
484
|
clearTimeout( this.timer );
|
434
485
|
|
435
486
|
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
|
436
|
-
// shift in the submenu position when mousing over the
|
487
|
+
// shift in the submenu position when mousing over the caret icon
|
437
488
|
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
|
438
489
|
return;
|
439
490
|
}
|
440
491
|
|
441
|
-
this.timer = this._delay(function() {
|
492
|
+
this.timer = this._delay( function() {
|
442
493
|
this._close();
|
443
494
|
this._open( submenu );
|
444
495
|
}, this.delay );
|
445
496
|
},
|
446
497
|
|
447
498
|
_open: function( submenu ) {
|
448
|
-
var position = $.extend({
|
499
|
+
var position = $.extend( {
|
449
500
|
of: this.active
|
450
501
|
}, this.options.position );
|
451
502
|
|
@@ -463,12 +514,14 @@ return $.widget( "ui.menu", {
|
|
463
514
|
|
464
515
|
collapseAll: function( event, all ) {
|
465
516
|
clearTimeout( this.timer );
|
466
|
-
this.timer = this._delay(function() {
|
517
|
+
this.timer = this._delay( function() {
|
518
|
+
|
467
519
|
// If we were passed an event, look for the submenu that contains the event
|
468
520
|
var currentMenu = all ? this.element :
|
469
521
|
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
|
470
522
|
|
471
|
-
// If we found no valid submenu ancestor, use the main menu to close all
|
523
|
+
// If we found no valid submenu ancestor, use the main menu to close all
|
524
|
+
// sub menus anyway
|
472
525
|
if ( !currentMenu.length ) {
|
473
526
|
currentMenu = this.element;
|
474
527
|
}
|
@@ -476,8 +529,12 @@ return $.widget( "ui.menu", {
|
|
476
529
|
this._close( currentMenu );
|
477
530
|
|
478
531
|
this.blur( event );
|
532
|
+
|
533
|
+
// Work around active item staying active after menu is blurred
|
534
|
+
this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
|
535
|
+
|
479
536
|
this.activeMenu = currentMenu;
|
480
|
-
}, this.delay );
|
537
|
+
}, all ? 0 : this.delay );
|
481
538
|
},
|
482
539
|
|
483
540
|
// With no arguments, closes the currently active menu - if nothing is active
|
@@ -487,14 +544,10 @@ return $.widget( "ui.menu", {
|
|
487
544
|
startMenu = this.active ? this.active.parent() : this.element;
|
488
545
|
}
|
489
546
|
|
490
|
-
startMenu
|
491
|
-
.
|
492
|
-
|
493
|
-
|
494
|
-
.attr( "aria-expanded", "false" )
|
495
|
-
.end()
|
496
|
-
.find( ".ui-state-active" ).not( ".ui-state-focus" )
|
497
|
-
.removeClass( "ui-state-active" );
|
547
|
+
startMenu.find( ".ui-menu" )
|
548
|
+
.hide()
|
549
|
+
.attr( "aria-hidden", "true" )
|
550
|
+
.attr( "aria-expanded", "false" );
|
498
551
|
},
|
499
552
|
|
500
553
|
_closeOnDocumentClick: function( event ) {
|
@@ -517,19 +570,15 @@ return $.widget( "ui.menu", {
|
|
517
570
|
},
|
518
571
|
|
519
572
|
expand: function( event ) {
|
520
|
-
var newItem = this.active &&
|
521
|
-
this.active
|
522
|
-
.children( ".ui-menu " )
|
523
|
-
.find( this.options.items )
|
524
|
-
.first();
|
573
|
+
var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
|
525
574
|
|
526
575
|
if ( newItem && newItem.length ) {
|
527
576
|
this._open( newItem.parent() );
|
528
577
|
|
529
578
|
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
|
530
|
-
this._delay(function() {
|
579
|
+
this._delay( function() {
|
531
580
|
this.focus( event, newItem );
|
532
|
-
});
|
581
|
+
} );
|
533
582
|
}
|
534
583
|
},
|
535
584
|
|
@@ -549,21 +598,27 @@ return $.widget( "ui.menu", {
|
|
549
598
|
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
|
550
599
|
},
|
551
600
|
|
601
|
+
_menuItems: function( menu ) {
|
602
|
+
return ( menu || this.element )
|
603
|
+
.find( this.options.items )
|
604
|
+
.filter( ".ui-menu-item" );
|
605
|
+
},
|
606
|
+
|
552
607
|
_move: function( direction, filter, event ) {
|
553
608
|
var next;
|
554
609
|
if ( this.active ) {
|
555
610
|
if ( direction === "first" || direction === "last" ) {
|
556
611
|
next = this.active
|
557
612
|
[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
|
558
|
-
.
|
613
|
+
.last();
|
559
614
|
} else {
|
560
615
|
next = this.active
|
561
616
|
[ direction + "All" ]( ".ui-menu-item" )
|
562
|
-
.
|
617
|
+
.first();
|
563
618
|
}
|
564
619
|
}
|
565
620
|
if ( !next || !next.length || !this.active ) {
|
566
|
-
next = this.
|
621
|
+
next = this._menuItems( this.activeMenu )[ filter ]();
|
567
622
|
}
|
568
623
|
|
569
624
|
this.focus( event, next );
|
@@ -581,15 +636,21 @@ return $.widget( "ui.menu", {
|
|
581
636
|
}
|
582
637
|
if ( this._hasScroll() ) {
|
583
638
|
base = this.active.offset().top;
|
584
|
-
height = this.element.
|
585
|
-
|
639
|
+
height = this.element.innerHeight();
|
640
|
+
|
641
|
+
// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
|
642
|
+
if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
|
643
|
+
height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
|
644
|
+
}
|
645
|
+
|
646
|
+
this.active.nextAll( ".ui-menu-item" ).each( function() {
|
586
647
|
item = $( this );
|
587
648
|
return item.offset().top - base - height < 0;
|
588
|
-
});
|
649
|
+
} );
|
589
650
|
|
590
651
|
this.focus( event, item );
|
591
652
|
} else {
|
592
|
-
this.focus( event, this.
|
653
|
+
this.focus( event, this._menuItems( this.activeMenu )
|
593
654
|
[ !this.active ? "first" : "last" ]() );
|
594
655
|
}
|
595
656
|
},
|
@@ -605,15 +666,21 @@ return $.widget( "ui.menu", {
|
|
605
666
|
}
|
606
667
|
if ( this._hasScroll() ) {
|
607
668
|
base = this.active.offset().top;
|
608
|
-
height = this.element.
|
609
|
-
|
669
|
+
height = this.element.innerHeight();
|
670
|
+
|
671
|
+
// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
|
672
|
+
if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
|
673
|
+
height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
|
674
|
+
}
|
675
|
+
|
676
|
+
this.active.prevAll( ".ui-menu-item" ).each( function() {
|
610
677
|
item = $( this );
|
611
678
|
return item.offset().top - base + height > 0;
|
612
|
-
});
|
679
|
+
} );
|
613
680
|
|
614
681
|
this.focus( event, item );
|
615
682
|
} else {
|
616
|
-
this.focus( event, this.
|
683
|
+
this.focus( event, this._menuItems( this.activeMenu ).first() );
|
617
684
|
}
|
618
685
|
},
|
619
686
|
|
@@ -622,6 +689,7 @@ return $.widget( "ui.menu", {
|
|
622
689
|
},
|
623
690
|
|
624
691
|
select: function( event ) {
|
692
|
+
|
625
693
|
// TODO: It should never be possible to not have an active item at this
|
626
694
|
// point, but the tests don't trigger mouseenter before click.
|
627
695
|
this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
|
@@ -632,19 +700,21 @@ return $.widget( "ui.menu", {
|
|
632
700
|
this._trigger( "select", event, ui );
|
633
701
|
},
|
634
702
|
|
635
|
-
_filterMenuItems: function(character) {
|
703
|
+
_filterMenuItems: function( character ) {
|
636
704
|
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
|
637
705
|
regex = new RegExp( "^" + escapedCharacter, "i" );
|
638
706
|
|
639
707
|
return this.activeMenu
|
640
708
|
.find( this.options.items )
|
641
709
|
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
710
|
+
// Only match on items, not dividers or other content (#10571)
|
711
|
+
.filter( ".ui-menu-item" )
|
712
|
+
.filter( function() {
|
713
|
+
return regex.test(
|
714
|
+
String.prototype.trim.call(
|
715
|
+
$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
|
716
|
+
} );
|
647
717
|
}
|
648
|
-
});
|
718
|
+
} );
|
649
719
|
|
650
|
-
})
|
720
|
+
} );
|