jquery-ui-rails 5.0.5 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
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 +16 -0
- data/README.md +67 -50
- data/Rakefile +51 -27
- data/VERSIONS.md +2 -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 +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/javascripts/jquery-ui.js +52 -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 +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,51 +1,65 @@
|
|
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.12.1
|
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 ) {
|
16
27
|
if ( typeof define === "function" && define.amd ) {
|
17
28
|
|
18
29
|
// AMD. Register as an anonymous module.
|
19
|
-
define([
|
30
|
+
define( [
|
20
31
|
"jquery",
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
32
|
+
"../keycode",
|
33
|
+
"../position",
|
34
|
+
"../safe-active-element",
|
35
|
+
"../unique-id",
|
36
|
+
"../version",
|
37
|
+
"../widget"
|
24
38
|
], factory );
|
25
39
|
} else {
|
26
40
|
|
27
41
|
// Browser globals
|
28
42
|
factory( jQuery );
|
29
43
|
}
|
30
|
-
}(function( $ ) {
|
44
|
+
}( function( $ ) {
|
31
45
|
|
32
46
|
return $.widget( "ui.menu", {
|
33
|
-
version: "1.
|
47
|
+
version: "1.12.1",
|
34
48
|
defaultElement: "<ul>",
|
35
49
|
delay: 300,
|
36
50
|
options: {
|
37
51
|
icons: {
|
38
|
-
submenu: "ui-icon-
|
52
|
+
submenu: "ui-icon-caret-1-e"
|
39
53
|
},
|
40
54
|
items: "> *",
|
41
55
|
menus: "ul",
|
42
56
|
position: {
|
43
|
-
my: "left
|
57
|
+
my: "left top",
|
44
58
|
at: "right top"
|
45
59
|
},
|
46
60
|
role: "menu",
|
47
61
|
|
48
|
-
//
|
62
|
+
// Callbacks
|
49
63
|
blur: null,
|
50
64
|
focus: null,
|
51
65
|
select: null
|
@@ -59,20 +73,14 @@ return $.widget( "ui.menu", {
|
|
59
73
|
this.mouseHandled = false;
|
60
74
|
this.element
|
61
75
|
.uniqueId()
|
62
|
-
.
|
63
|
-
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
|
64
|
-
.attr({
|
76
|
+
.attr( {
|
65
77
|
role: this.options.role,
|
66
78
|
tabIndex: 0
|
67
|
-
});
|
79
|
+
} );
|
68
80
|
|
69
|
-
|
70
|
-
|
71
|
-
.addClass( "ui-state-disabled" )
|
72
|
-
.attr( "aria-disabled", "true" );
|
73
|
-
}
|
81
|
+
this._addClass( "ui-menu", "ui-widget ui-widget-content" );
|
82
|
+
this._on( {
|
74
83
|
|
75
|
-
this._on({
|
76
84
|
// Prevent focus from sticking to links inside menu after clicking
|
77
85
|
// them (focus should always stay on UL during navigation).
|
78
86
|
"mousedown .ui-menu-item": function( event ) {
|
@@ -80,6 +88,7 @@ return $.widget( "ui.menu", {
|
|
80
88
|
},
|
81
89
|
"click .ui-menu-item": function( event ) {
|
82
90
|
var target = $( event.target );
|
91
|
+
var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
|
83
92
|
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
84
93
|
this.select( event );
|
85
94
|
|
@@ -91,7 +100,8 @@ return $.widget( "ui.menu", {
|
|
91
100
|
// Open submenu on click
|
92
101
|
if ( target.has( ".ui-menu" ).length ) {
|
93
102
|
this.expand( event );
|
94
|
-
} else if ( !this.element.is( ":focus" ) &&
|
103
|
+
} else if ( !this.element.is( ":focus" ) &&
|
104
|
+
active.closest( ".ui-menu" ).length ) {
|
95
105
|
|
96
106
|
// Redirect focus to the menu
|
97
107
|
this.element.trigger( "focus", [ true ] );
|
@@ -105,21 +115,32 @@ return $.widget( "ui.menu", {
|
|
105
115
|
}
|
106
116
|
},
|
107
117
|
"mouseenter .ui-menu-item": function( event ) {
|
118
|
+
|
108
119
|
// Ignore mouse events while typeahead is active, see #10458.
|
109
120
|
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
|
110
121
|
// is over an item in the menu
|
111
122
|
if ( this.previousFilter ) {
|
112
123
|
return;
|
113
124
|
}
|
114
|
-
|
125
|
+
|
126
|
+
var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
|
127
|
+
target = $( event.currentTarget );
|
128
|
+
|
129
|
+
// Ignore bubbled events on parent items, see #11641
|
130
|
+
if ( actualTarget[ 0 ] !== target[ 0 ] ) {
|
131
|
+
return;
|
132
|
+
}
|
133
|
+
|
115
134
|
// Remove ui-state-active class from siblings of the newly focused menu item
|
116
135
|
// to avoid a jump caused by adjacent elements both having a class with a border
|
117
|
-
target.siblings(
|
136
|
+
this._removeClass( target.siblings().children( ".ui-state-active" ),
|
137
|
+
null, "ui-state-active" );
|
118
138
|
this.focus( event, target );
|
119
139
|
},
|
120
140
|
mouseleave: "collapseAll",
|
121
141
|
"mouseleave .ui-menu": "collapseAll",
|
122
142
|
focus: function( event, keepActiveItem ) {
|
143
|
+
|
123
144
|
// If there's already an active item, keep it active
|
124
145
|
// If not, activate the first item
|
125
146
|
var item = this.active || this.element.find( this.options.items ).eq( 0 );
|
@@ -129,14 +150,18 @@ return $.widget( "ui.menu", {
|
|
129
150
|
}
|
130
151
|
},
|
131
152
|
blur: function( event ) {
|
132
|
-
this._delay(function() {
|
133
|
-
|
153
|
+
this._delay( function() {
|
154
|
+
var notContained = !$.contains(
|
155
|
+
this.element[ 0 ],
|
156
|
+
$.ui.safeActiveElement( this.document[ 0 ] )
|
157
|
+
);
|
158
|
+
if ( notContained ) {
|
134
159
|
this.collapseAll( event );
|
135
160
|
}
|
136
|
-
});
|
161
|
+
} );
|
137
162
|
},
|
138
163
|
keydown: "_keydown"
|
139
|
-
});
|
164
|
+
} );
|
140
165
|
|
141
166
|
this.refresh();
|
142
167
|
|
@@ -150,43 +175,31 @@ return $.widget( "ui.menu", {
|
|
150
175
|
// Reset the mouseHandled flag
|
151
176
|
this.mouseHandled = false;
|
152
177
|
}
|
153
|
-
});
|
178
|
+
} );
|
154
179
|
},
|
155
180
|
|
156
181
|
_destroy: function() {
|
182
|
+
var items = this.element.find( ".ui-menu-item" )
|
183
|
+
.removeAttr( "role aria-disabled" ),
|
184
|
+
submenus = items.children( ".ui-menu-item-wrapper" )
|
185
|
+
.removeUniqueId()
|
186
|
+
.removeAttr( "tabIndex role aria-haspopup" );
|
187
|
+
|
157
188
|
// Destroy (sub)menus
|
158
189
|
this.element
|
159
190
|
.removeAttr( "aria-activedescendant" )
|
160
191
|
.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" )
|
192
|
+
.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
|
193
|
+
"tabIndex" )
|
168
194
|
.removeUniqueId()
|
169
195
|
.show();
|
170
196
|
|
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" );
|
197
|
+
submenus.children().each( function() {
|
198
|
+
var elem = $( this );
|
199
|
+
if ( elem.data( "ui-menu-submenu-caret" ) ) {
|
200
|
+
elem.remove();
|
201
|
+
}
|
202
|
+
} );
|
190
203
|
},
|
191
204
|
|
192
205
|
_keydown: function( event ) {
|
@@ -230,9 +243,12 @@ return $.widget( "ui.menu", {
|
|
230
243
|
default:
|
231
244
|
preventDefault = false;
|
232
245
|
prev = this.previousFilter || "";
|
233
|
-
character = String.fromCharCode( event.keyCode );
|
234
246
|
skip = false;
|
235
247
|
|
248
|
+
// Support number pad values
|
249
|
+
character = event.keyCode >= 96 && event.keyCode <= 105 ?
|
250
|
+
( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
|
251
|
+
|
236
252
|
clearTimeout( this.filterTimer );
|
237
253
|
|
238
254
|
if ( character === prev ) {
|
@@ -256,7 +272,7 @@ return $.widget( "ui.menu", {
|
|
256
272
|
if ( match.length ) {
|
257
273
|
this.focus( event, match );
|
258
274
|
this.previousFilter = character;
|
259
|
-
this.filterTimer = this._delay(function() {
|
275
|
+
this.filterTimer = this._delay( function() {
|
260
276
|
delete this.previousFilter;
|
261
277
|
}, 1000 );
|
262
278
|
} else {
|
@@ -270,8 +286,8 @@ return $.widget( "ui.menu", {
|
|
270
286
|
},
|
271
287
|
|
272
288
|
_activate: function( event ) {
|
273
|
-
if ( !this.active.is( ".ui-state-disabled" ) ) {
|
274
|
-
if ( this.active.
|
289
|
+
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
|
290
|
+
if ( this.active.children( "[aria-haspopup='true']" ).length ) {
|
275
291
|
this.expand( event );
|
276
292
|
} else {
|
277
293
|
this.select( event );
|
@@ -280,54 +296,57 @@ return $.widget( "ui.menu", {
|
|
280
296
|
},
|
281
297
|
|
282
298
|
refresh: function() {
|
283
|
-
var menus, items,
|
299
|
+
var menus, items, newSubmenus, newItems, newWrappers,
|
284
300
|
that = this,
|
285
301
|
icon = this.options.icons.submenu,
|
286
302
|
submenus = this.element.find( this.options.menus );
|
287
303
|
|
288
|
-
this.
|
304
|
+
this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
|
289
305
|
|
290
306
|
// Initialize nested menus
|
291
|
-
submenus.filter( ":not(.ui-menu)" )
|
292
|
-
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
|
307
|
+
newSubmenus = submenus.filter( ":not(.ui-menu)" )
|
293
308
|
.hide()
|
294
|
-
.attr({
|
309
|
+
.attr( {
|
295
310
|
role: this.options.role,
|
296
311
|
"aria-hidden": "true",
|
297
312
|
"aria-expanded": "false"
|
298
|
-
})
|
299
|
-
.each(function() {
|
313
|
+
} )
|
314
|
+
.each( function() {
|
300
315
|
var menu = $( this ),
|
301
|
-
item = menu.
|
302
|
-
|
303
|
-
.addClass( "ui-menu-icon ui-icon " + icon )
|
304
|
-
.data( "ui-menu-submenu-carat", true );
|
316
|
+
item = menu.prev(),
|
317
|
+
submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
|
305
318
|
|
319
|
+
that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
|
306
320
|
item
|
307
321
|
.attr( "aria-haspopup", "true" )
|
308
|
-
.prepend(
|
322
|
+
.prepend( submenuCaret );
|
309
323
|
menu.attr( "aria-labelledby", item.attr( "id" ) );
|
310
|
-
});
|
324
|
+
} );
|
325
|
+
|
326
|
+
this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
|
311
327
|
|
312
328
|
menus = submenus.add( this.element );
|
313
329
|
items = menus.find( this.options.items );
|
314
330
|
|
315
331
|
// Initialize menu-items containing spaces and/or dashes only as dividers
|
316
|
-
items.not( ".ui-menu-item" ).each(function() {
|
332
|
+
items.not( ".ui-menu-item" ).each( function() {
|
317
333
|
var item = $( this );
|
318
334
|
if ( that._isDivider( item ) ) {
|
319
|
-
|
335
|
+
that._addClass( item, "ui-menu-divider", "ui-widget-content" );
|
320
336
|
}
|
321
|
-
});
|
337
|
+
} );
|
322
338
|
|
323
339
|
// Don't refresh list items that are already adapted
|
324
|
-
items.not( ".ui-menu-item, .ui-menu-divider" )
|
325
|
-
|
326
|
-
.
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
340
|
+
newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
|
341
|
+
newWrappers = newItems.children()
|
342
|
+
.not( ".ui-menu" )
|
343
|
+
.uniqueId()
|
344
|
+
.attr( {
|
345
|
+
tabIndex: -1,
|
346
|
+
role: this._itemRole()
|
347
|
+
} );
|
348
|
+
this._addClass( newItems, "ui-menu-item" )
|
349
|
+
._addClass( newWrappers, "ui-menu-item-wrapper" );
|
331
350
|
|
332
351
|
// Add aria-disabled attribute to any disabled menu item
|
333
352
|
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
|
@@ -347,26 +366,31 @@ return $.widget( "ui.menu", {
|
|
347
366
|
|
348
367
|
_setOption: function( key, value ) {
|
349
368
|
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 );
|
369
|
+
var icons = this.element.find( ".ui-menu-icon" );
|
370
|
+
this._removeClass( icons, null, this.options.icons.submenu )
|
371
|
+
._addClass( icons, null, value.submenu );
|
358
372
|
}
|
359
373
|
this._super( key, value );
|
360
374
|
},
|
361
375
|
|
376
|
+
_setOptionDisabled: function( value ) {
|
377
|
+
this._super( value );
|
378
|
+
|
379
|
+
this.element.attr( "aria-disabled", String( value ) );
|
380
|
+
this._toggleClass( null, "ui-state-disabled", !!value );
|
381
|
+
},
|
382
|
+
|
362
383
|
focus: function( event, item ) {
|
363
|
-
var nested, focused;
|
384
|
+
var nested, focused, activeParent;
|
364
385
|
this.blur( event, event && event.type === "focus" );
|
365
386
|
|
366
387
|
this._scrollIntoView( item );
|
367
388
|
|
368
389
|
this.active = item.first();
|
369
|
-
|
390
|
+
|
391
|
+
focused = this.active.children( ".ui-menu-item-wrapper" );
|
392
|
+
this._addClass( focused, null, "ui-state-active" );
|
393
|
+
|
370
394
|
// Only update aria-activedescendant if there's a role
|
371
395
|
// otherwise we assume focus is managed elsewhere
|
372
396
|
if ( this.options.role ) {
|
@@ -374,22 +398,23 @@ return $.widget( "ui.menu", {
|
|
374
398
|
}
|
375
399
|
|
376
400
|
// Highlight active parent menu item, if any
|
377
|
-
this.active
|
401
|
+
activeParent = this.active
|
378
402
|
.parent()
|
379
|
-
|
380
|
-
|
403
|
+
.closest( ".ui-menu-item" )
|
404
|
+
.children( ".ui-menu-item-wrapper" );
|
405
|
+
this._addClass( activeParent, null, "ui-state-active" );
|
381
406
|
|
382
407
|
if ( event && event.type === "keydown" ) {
|
383
408
|
this._close();
|
384
409
|
} else {
|
385
|
-
this.timer = this._delay(function() {
|
410
|
+
this.timer = this._delay( function() {
|
386
411
|
this._close();
|
387
412
|
}, this.delay );
|
388
413
|
}
|
389
414
|
|
390
415
|
nested = item.children( ".ui-menu" );
|
391
416
|
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
|
392
|
-
this._startOpening(nested);
|
417
|
+
this._startOpening( nested );
|
393
418
|
}
|
394
419
|
this.activeMenu = item.parent();
|
395
420
|
|
@@ -399,8 +424,8 @@ return $.widget( "ui.menu", {
|
|
399
424
|
_scrollIntoView: function( item ) {
|
400
425
|
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
|
401
426
|
if ( this._hasScroll() ) {
|
402
|
-
borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
|
403
|
-
paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
|
427
|
+
borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
|
428
|
+
paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
|
404
429
|
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
|
405
430
|
scroll = this.activeMenu.scrollTop();
|
406
431
|
elementHeight = this.activeMenu.height();
|
@@ -423,29 +448,30 @@ return $.widget( "ui.menu", {
|
|
423
448
|
return;
|
424
449
|
}
|
425
450
|
|
426
|
-
this.active.
|
427
|
-
|
451
|
+
this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
|
452
|
+
null, "ui-state-active" );
|
428
453
|
|
429
454
|
this._trigger( "blur", event, { item: this.active } );
|
455
|
+
this.active = null;
|
430
456
|
},
|
431
457
|
|
432
458
|
_startOpening: function( submenu ) {
|
433
459
|
clearTimeout( this.timer );
|
434
460
|
|
435
461
|
// 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
|
462
|
+
// shift in the submenu position when mousing over the caret icon
|
437
463
|
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
|
438
464
|
return;
|
439
465
|
}
|
440
466
|
|
441
|
-
this.timer = this._delay(function() {
|
467
|
+
this.timer = this._delay( function() {
|
442
468
|
this._close();
|
443
469
|
this._open( submenu );
|
444
470
|
}, this.delay );
|
445
471
|
},
|
446
472
|
|
447
473
|
_open: function( submenu ) {
|
448
|
-
var position = $.extend({
|
474
|
+
var position = $.extend( {
|
449
475
|
of: this.active
|
450
476
|
}, this.options.position );
|
451
477
|
|
@@ -463,12 +489,14 @@ return $.widget( "ui.menu", {
|
|
463
489
|
|
464
490
|
collapseAll: function( event, all ) {
|
465
491
|
clearTimeout( this.timer );
|
466
|
-
this.timer = this._delay(function() {
|
492
|
+
this.timer = this._delay( function() {
|
493
|
+
|
467
494
|
// If we were passed an event, look for the submenu that contains the event
|
468
495
|
var currentMenu = all ? this.element :
|
469
496
|
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
|
470
497
|
|
471
|
-
// If we found no valid submenu ancestor, use the main menu to close all
|
498
|
+
// If we found no valid submenu ancestor, use the main menu to close all
|
499
|
+
// sub menus anyway
|
472
500
|
if ( !currentMenu.length ) {
|
473
501
|
currentMenu = this.element;
|
474
502
|
}
|
@@ -476,6 +504,10 @@ return $.widget( "ui.menu", {
|
|
476
504
|
this._close( currentMenu );
|
477
505
|
|
478
506
|
this.blur( event );
|
507
|
+
|
508
|
+
// Work around active item staying active after menu is blurred
|
509
|
+
this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
|
510
|
+
|
479
511
|
this.activeMenu = currentMenu;
|
480
512
|
}, this.delay );
|
481
513
|
},
|
@@ -487,14 +519,10 @@ return $.widget( "ui.menu", {
|
|
487
519
|
startMenu = this.active ? this.active.parent() : this.element;
|
488
520
|
}
|
489
521
|
|
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" );
|
522
|
+
startMenu.find( ".ui-menu" )
|
523
|
+
.hide()
|
524
|
+
.attr( "aria-hidden", "true" )
|
525
|
+
.attr( "aria-expanded", "false" );
|
498
526
|
},
|
499
527
|
|
500
528
|
_closeOnDocumentClick: function( event ) {
|
@@ -520,16 +548,16 @@ return $.widget( "ui.menu", {
|
|
520
548
|
var newItem = this.active &&
|
521
549
|
this.active
|
522
550
|
.children( ".ui-menu " )
|
523
|
-
|
524
|
-
|
551
|
+
.find( this.options.items )
|
552
|
+
.first();
|
525
553
|
|
526
554
|
if ( newItem && newItem.length ) {
|
527
555
|
this._open( newItem.parent() );
|
528
556
|
|
529
557
|
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
|
530
|
-
this._delay(function() {
|
558
|
+
this._delay( function() {
|
531
559
|
this.focus( event, newItem );
|
532
|
-
});
|
560
|
+
} );
|
533
561
|
}
|
534
562
|
},
|
535
563
|
|
@@ -582,10 +610,10 @@ return $.widget( "ui.menu", {
|
|
582
610
|
if ( this._hasScroll() ) {
|
583
611
|
base = this.active.offset().top;
|
584
612
|
height = this.element.height();
|
585
|
-
this.active.nextAll( ".ui-menu-item" ).each(function() {
|
613
|
+
this.active.nextAll( ".ui-menu-item" ).each( function() {
|
586
614
|
item = $( this );
|
587
615
|
return item.offset().top - base - height < 0;
|
588
|
-
});
|
616
|
+
} );
|
589
617
|
|
590
618
|
this.focus( event, item );
|
591
619
|
} else {
|
@@ -606,10 +634,10 @@ return $.widget( "ui.menu", {
|
|
606
634
|
if ( this._hasScroll() ) {
|
607
635
|
base = this.active.offset().top;
|
608
636
|
height = this.element.height();
|
609
|
-
this.active.prevAll( ".ui-menu-item" ).each(function() {
|
637
|
+
this.active.prevAll( ".ui-menu-item" ).each( function() {
|
610
638
|
item = $( this );
|
611
639
|
return item.offset().top - base + height > 0;
|
612
|
-
});
|
640
|
+
} );
|
613
641
|
|
614
642
|
this.focus( event, item );
|
615
643
|
} else {
|
@@ -622,6 +650,7 @@ return $.widget( "ui.menu", {
|
|
622
650
|
},
|
623
651
|
|
624
652
|
select: function( event ) {
|
653
|
+
|
625
654
|
// TODO: It should never be possible to not have an active item at this
|
626
655
|
// point, but the tests don't trigger mouseenter before click.
|
627
656
|
this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
|
@@ -632,19 +661,20 @@ return $.widget( "ui.menu", {
|
|
632
661
|
this._trigger( "select", event, ui );
|
633
662
|
},
|
634
663
|
|
635
|
-
_filterMenuItems: function(character) {
|
664
|
+
_filterMenuItems: function( character ) {
|
636
665
|
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
|
637
666
|
regex = new RegExp( "^" + escapedCharacter, "i" );
|
638
667
|
|
639
668
|
return this.activeMenu
|
640
669
|
.find( this.options.items )
|
641
670
|
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
671
|
+
// Only match on items, not dividers or other content (#10571)
|
672
|
+
.filter( ".ui-menu-item" )
|
673
|
+
.filter( function() {
|
674
|
+
return regex.test(
|
675
|
+
$.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
|
676
|
+
} );
|
647
677
|
}
|
648
|
-
});
|
678
|
+
} );
|
649
679
|
|
650
|
-
}));
|
680
|
+
} ) );
|