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,41 +1,66 @@
|
|
1
|
-
//= require jquery-ui/
|
2
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/widgets/menu
|
2
|
+
//= require jquery-ui/form-reset-mixin
|
3
|
+
//= require jquery-ui/keycode
|
4
|
+
//= require jquery-ui/labels
|
3
5
|
//= require jquery-ui/position
|
4
|
-
//= require jquery-ui/
|
6
|
+
//= require jquery-ui/unique-id
|
7
|
+
//= require jquery-ui/version
|
8
|
+
//= require jquery-ui/widget
|
5
9
|
|
6
10
|
/*!
|
7
|
-
* jQuery UI Selectmenu 1.
|
11
|
+
* jQuery UI Selectmenu 1.13.0
|
8
12
|
* http://jqueryui.com
|
9
13
|
*
|
10
14
|
* Copyright jQuery Foundation and other contributors
|
11
15
|
* Released under the MIT license.
|
12
16
|
* http://jquery.org/license
|
13
|
-
*
|
14
|
-
* http://api.jqueryui.com/selectmenu
|
15
17
|
*/
|
16
|
-
|
18
|
+
|
19
|
+
//>>label: Selectmenu
|
20
|
+
//>>group: Widgets
|
21
|
+
/* eslint-disable max-len */
|
22
|
+
//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
|
23
|
+
/* eslint-enable max-len */
|
24
|
+
//>>docs: http://api.jqueryui.com/selectmenu/
|
25
|
+
//>>demos: http://jqueryui.com/selectmenu/
|
26
|
+
//>>css.structure: ../../themes/base/core.css
|
27
|
+
//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
|
28
|
+
//>>css.theme: ../../themes/base/theme.css
|
29
|
+
|
30
|
+
( function( factory ) {
|
31
|
+
"use strict";
|
32
|
+
|
17
33
|
if ( typeof define === "function" && define.amd ) {
|
18
34
|
|
19
35
|
// AMD. Register as an anonymous module.
|
20
|
-
define([
|
36
|
+
define( [
|
21
37
|
"jquery",
|
22
|
-
"./
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
38
|
+
"./menu",
|
39
|
+
"../form-reset-mixin",
|
40
|
+
"../keycode",
|
41
|
+
"../labels",
|
42
|
+
"../position",
|
43
|
+
"../unique-id",
|
44
|
+
"../version",
|
45
|
+
"../widget"
|
26
46
|
], factory );
|
27
47
|
} else {
|
28
48
|
|
29
49
|
// Browser globals
|
30
50
|
factory( jQuery );
|
31
51
|
}
|
32
|
-
}(function( $ ) {
|
52
|
+
} )( function( $ ) {
|
53
|
+
"use strict";
|
33
54
|
|
34
|
-
return $.widget( "ui.selectmenu", {
|
35
|
-
version: "1.
|
55
|
+
return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
|
56
|
+
version: "1.13.0",
|
36
57
|
defaultElement: "<select>",
|
37
58
|
options: {
|
38
59
|
appendTo: null,
|
60
|
+
classes: {
|
61
|
+
"ui-selectmenu-button-open": "ui-corner-top",
|
62
|
+
"ui-selectmenu-button-closed": "ui-corner-all"
|
63
|
+
},
|
39
64
|
disabled: null,
|
40
65
|
icons: {
|
41
66
|
button: "ui-icon-triangle-1-s"
|
@@ -45,9 +70,9 @@ return $.widget( "ui.selectmenu", {
|
|
45
70
|
at: "left bottom",
|
46
71
|
collision: "none"
|
47
72
|
},
|
48
|
-
width:
|
73
|
+
width: false,
|
49
74
|
|
50
|
-
//
|
75
|
+
// Callbacks
|
51
76
|
change: null,
|
52
77
|
close: null,
|
53
78
|
focus: null,
|
@@ -65,64 +90,66 @@ return $.widget( "ui.selectmenu", {
|
|
65
90
|
|
66
91
|
this._drawButton();
|
67
92
|
this._drawMenu();
|
93
|
+
this._bindFormResetHandler();
|
68
94
|
|
69
|
-
|
70
|
-
|
71
|
-
}
|
95
|
+
this._rendered = false;
|
96
|
+
this.menuItems = $();
|
72
97
|
},
|
73
98
|
|
74
99
|
_drawButton: function() {
|
75
|
-
var
|
100
|
+
var icon,
|
101
|
+
that = this,
|
102
|
+
item = this._parseOption(
|
103
|
+
this.element.find( "option:selected" ),
|
104
|
+
this.element[ 0 ].selectedIndex
|
105
|
+
);
|
76
106
|
|
77
107
|
// Associate existing label with the new button
|
78
|
-
this.
|
79
|
-
this._on( this.
|
108
|
+
this.labels = this.element.labels().attr( "for", this.ids.button );
|
109
|
+
this._on( this.labels, {
|
80
110
|
click: function( event ) {
|
81
|
-
this.button.focus
|
111
|
+
this.button.trigger( "focus" );
|
82
112
|
event.preventDefault();
|
83
113
|
}
|
84
|
-
});
|
114
|
+
} );
|
85
115
|
|
86
116
|
// Hide original select element
|
87
117
|
this.element.hide();
|
88
118
|
|
89
119
|
// Create button
|
90
120
|
this.button = $( "<span>", {
|
91
|
-
"class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
|
92
121
|
tabindex: this.options.disabled ? -1 : 0,
|
93
122
|
id: this.ids.button,
|
94
123
|
role: "combobox",
|
95
124
|
"aria-expanded": "false",
|
96
125
|
"aria-autocomplete": "list",
|
97
126
|
"aria-owns": this.ids.menu,
|
98
|
-
"aria-haspopup": "true"
|
99
|
-
|
127
|
+
"aria-haspopup": "true",
|
128
|
+
title: this.element.attr( "title" )
|
129
|
+
} )
|
100
130
|
.insertAfter( this.element );
|
101
131
|
|
102
|
-
|
103
|
-
"
|
104
|
-
})
|
105
|
-
.prependTo( this.button );
|
132
|
+
this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
|
133
|
+
"ui-button ui-widget" );
|
106
134
|
|
107
|
-
|
108
|
-
|
109
|
-
|
135
|
+
icon = $( "<span>" ).appendTo( this.button );
|
136
|
+
this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
|
137
|
+
this.buttonItem = this._renderButtonItem( item )
|
110
138
|
.appendTo( this.button );
|
111
139
|
|
112
|
-
|
113
|
-
|
140
|
+
if ( this.options.width !== false ) {
|
141
|
+
this._resizeButton();
|
142
|
+
}
|
114
143
|
|
115
144
|
this._on( this.button, this._buttonEvents );
|
116
145
|
this.button.one( "focusin", function() {
|
117
146
|
|
118
147
|
// Delay rendering the menu items until the button receives focus.
|
119
148
|
// The menu may have already been rendered via a programmatic open.
|
120
|
-
if ( !that.
|
149
|
+
if ( !that._rendered ) {
|
121
150
|
that._refreshMenu();
|
122
151
|
}
|
123
|
-
});
|
124
|
-
this._hoverable( this.button );
|
125
|
-
this._focusable( this.button );
|
152
|
+
} );
|
126
153
|
},
|
127
154
|
|
128
155
|
_drawMenu: function() {
|
@@ -133,23 +160,24 @@ return $.widget( "ui.selectmenu", {
|
|
133
160
|
"aria-hidden": "true",
|
134
161
|
"aria-labelledby": this.ids.button,
|
135
162
|
id: this.ids.menu
|
136
|
-
});
|
163
|
+
} );
|
137
164
|
|
138
165
|
// Wrap menu
|
139
|
-
this.menuWrap = $( "<div>"
|
140
|
-
|
141
|
-
|
142
|
-
.append( this.menu )
|
143
|
-
.appendTo( this._appendTo() );
|
166
|
+
this.menuWrap = $( "<div>" ).append( this.menu );
|
167
|
+
this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
|
168
|
+
this.menuWrap.appendTo( this._appendTo() );
|
144
169
|
|
145
170
|
// Initialize menu widget
|
146
171
|
this.menuInstance = this.menu
|
147
|
-
.menu({
|
172
|
+
.menu( {
|
173
|
+
classes: {
|
174
|
+
"ui-menu": "ui-corner-bottom"
|
175
|
+
},
|
148
176
|
role: "listbox",
|
149
177
|
select: function( event, ui ) {
|
150
178
|
event.preventDefault();
|
151
179
|
|
152
|
-
//
|
180
|
+
// Support: IE8
|
153
181
|
// If the item was selected via a click, the text selection
|
154
182
|
// will be destroyed in IE
|
155
183
|
that._setSelection();
|
@@ -171,14 +199,9 @@ return $.widget( "ui.selectmenu", {
|
|
171
199
|
that.button.attr( "aria-activedescendant",
|
172
200
|
that.menuItems.eq( item.index ).attr( "id" ) );
|
173
201
|
}
|
174
|
-
})
|
202
|
+
} )
|
175
203
|
.menu( "instance" );
|
176
204
|
|
177
|
-
// Adjust menu styles to dropdown
|
178
|
-
this.menu
|
179
|
-
.addClass( "ui-corner-bottom" )
|
180
|
-
.removeClass( "ui-corner-all" );
|
181
|
-
|
182
205
|
// Don't close the menu on mouseleave
|
183
206
|
this.menuInstance._off( this.menu, "mouseleave" );
|
184
207
|
|
@@ -195,27 +218,37 @@ return $.widget( "ui.selectmenu", {
|
|
195
218
|
|
196
219
|
refresh: function() {
|
197
220
|
this._refreshMenu();
|
198
|
-
this.
|
199
|
-
|
221
|
+
this.buttonItem.replaceWith(
|
222
|
+
this.buttonItem = this._renderButtonItem(
|
223
|
+
|
224
|
+
// Fall back to an empty object in case there are no options
|
225
|
+
this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
|
226
|
+
)
|
227
|
+
);
|
228
|
+
if ( this.options.width === null ) {
|
200
229
|
this._resizeButton();
|
201
230
|
}
|
202
231
|
},
|
203
232
|
|
204
233
|
_refreshMenu: function() {
|
205
|
-
this.menu.empty();
|
206
|
-
|
207
234
|
var item,
|
208
235
|
options = this.element.find( "option" );
|
209
236
|
|
210
|
-
|
211
|
-
return;
|
212
|
-
}
|
237
|
+
this.menu.empty();
|
213
238
|
|
214
239
|
this._parseOptions( options );
|
215
240
|
this._renderMenu( this.menu, this.items );
|
216
241
|
|
217
242
|
this.menuInstance.refresh();
|
218
|
-
this.menuItems = this.menu.find( "li" )
|
243
|
+
this.menuItems = this.menu.find( "li" )
|
244
|
+
.not( ".ui-selectmenu-optgroup" )
|
245
|
+
.find( ".ui-menu-item-wrapper" );
|
246
|
+
|
247
|
+
this._rendered = true;
|
248
|
+
|
249
|
+
if ( !options.length ) {
|
250
|
+
return;
|
251
|
+
}
|
219
252
|
|
220
253
|
item = this._getSelectedItem();
|
221
254
|
|
@@ -233,15 +266,20 @@ return $.widget( "ui.selectmenu", {
|
|
233
266
|
}
|
234
267
|
|
235
268
|
// If this is the first time the menu is being opened, render the items
|
236
|
-
if ( !this.
|
269
|
+
if ( !this._rendered ) {
|
237
270
|
this._refreshMenu();
|
238
271
|
} else {
|
239
272
|
|
240
273
|
// Menu clears focus on close, reset focus to selected item
|
241
|
-
this.menu.find( ".ui-state-
|
274
|
+
this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
|
242
275
|
this.menuInstance.focus( null, this._getSelectedItem() );
|
243
276
|
}
|
244
277
|
|
278
|
+
// If there are no options, don't open the menu
|
279
|
+
if ( !this.menuItems.length ) {
|
280
|
+
return;
|
281
|
+
}
|
282
|
+
|
245
283
|
this.isOpen = true;
|
246
284
|
this._toggleAttr();
|
247
285
|
this._resizeMenu();
|
@@ -278,26 +316,38 @@ return $.widget( "ui.selectmenu", {
|
|
278
316
|
return this.menu;
|
279
317
|
},
|
280
318
|
|
319
|
+
_renderButtonItem: function( item ) {
|
320
|
+
var buttonItem = $( "<span>" );
|
321
|
+
|
322
|
+
this._setText( buttonItem, item.label );
|
323
|
+
this._addClass( buttonItem, "ui-selectmenu-text" );
|
324
|
+
|
325
|
+
return buttonItem;
|
326
|
+
},
|
327
|
+
|
281
328
|
_renderMenu: function( ul, items ) {
|
282
329
|
var that = this,
|
283
330
|
currentOptgroup = "";
|
284
331
|
|
285
332
|
$.each( items, function( index, item ) {
|
333
|
+
var li;
|
334
|
+
|
286
335
|
if ( item.optgroup !== currentOptgroup ) {
|
287
|
-
$( "<li>", {
|
288
|
-
"class": "ui-selectmenu-optgroup ui-menu-divider" +
|
289
|
-
( item.element.parent( "optgroup" ).prop( "disabled" ) ?
|
290
|
-
" ui-state-disabled" :
|
291
|
-
"" ),
|
336
|
+
li = $( "<li>", {
|
292
337
|
text: item.optgroup
|
293
|
-
})
|
294
|
-
|
338
|
+
} );
|
339
|
+
that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
|
340
|
+
( item.element.parent( "optgroup" ).prop( "disabled" ) ?
|
341
|
+
" ui-state-disabled" :
|
342
|
+
"" ) );
|
343
|
+
|
344
|
+
li.appendTo( ul );
|
295
345
|
|
296
346
|
currentOptgroup = item.optgroup;
|
297
347
|
}
|
298
348
|
|
299
349
|
that._renderItemData( ul, item );
|
300
|
-
});
|
350
|
+
} );
|
301
351
|
},
|
302
352
|
|
303
353
|
_renderItemData: function( ul, item ) {
|
@@ -305,14 +355,17 @@ return $.widget( "ui.selectmenu", {
|
|
305
355
|
},
|
306
356
|
|
307
357
|
_renderItem: function( ul, item ) {
|
308
|
-
var li = $( "<li>" )
|
358
|
+
var li = $( "<li>" ),
|
359
|
+
wrapper = $( "<div>", {
|
360
|
+
title: item.element.attr( "title" )
|
361
|
+
} );
|
309
362
|
|
310
363
|
if ( item.disabled ) {
|
311
|
-
|
364
|
+
this._addClass( li, null, "ui-state-disabled" );
|
312
365
|
}
|
313
|
-
this._setText(
|
366
|
+
this._setText( wrapper, item.label );
|
314
367
|
|
315
|
-
return li.appendTo( ul );
|
368
|
+
return li.append( wrapper ).appendTo( ul );
|
316
369
|
},
|
317
370
|
|
318
371
|
_setText: function( element, value ) {
|
@@ -328,9 +381,9 @@ return $.widget( "ui.selectmenu", {
|
|
328
381
|
filter = ".ui-menu-item";
|
329
382
|
|
330
383
|
if ( this.isOpen ) {
|
331
|
-
item = this.menuItems.eq( this.focusIndex );
|
384
|
+
item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
332
385
|
} else {
|
333
|
-
item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
|
386
|
+
item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
334
387
|
filter += ":not(.ui-state-disabled)";
|
335
388
|
}
|
336
389
|
|
@@ -346,7 +399,7 @@ return $.widget( "ui.selectmenu", {
|
|
346
399
|
},
|
347
400
|
|
348
401
|
_getSelectedItem: function() {
|
349
|
-
return this.menuItems.eq( this.element[ 0 ].selectedIndex );
|
402
|
+
return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
350
403
|
},
|
351
404
|
|
352
405
|
_toggle: function( event ) {
|
@@ -365,12 +418,12 @@ return $.widget( "ui.selectmenu", {
|
|
365
418
|
selection.removeAllRanges();
|
366
419
|
selection.addRange( this.range );
|
367
420
|
|
368
|
-
//
|
421
|
+
// Support: IE8
|
369
422
|
} else {
|
370
423
|
this.range.select();
|
371
424
|
}
|
372
425
|
|
373
|
-
//
|
426
|
+
// Support: IE
|
374
427
|
// Setting the text selection kills the button focus in IE, but
|
375
428
|
// restoring the focus doesn't kill the selection.
|
376
429
|
this.button.focus();
|
@@ -382,7 +435,8 @@ return $.widget( "ui.selectmenu", {
|
|
382
435
|
return;
|
383
436
|
}
|
384
437
|
|
385
|
-
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
|
438
|
+
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
|
439
|
+
$.escapeSelector( this.ids.button ) ).length ) {
|
386
440
|
this.close( event );
|
387
441
|
}
|
388
442
|
}
|
@@ -400,7 +454,7 @@ return $.widget( "ui.selectmenu", {
|
|
400
454
|
this.range = selection.getRangeAt( 0 );
|
401
455
|
}
|
402
456
|
|
403
|
-
//
|
457
|
+
// Support: IE8
|
404
458
|
} else {
|
405
459
|
this.range = document.selection.createRange();
|
406
460
|
}
|
@@ -414,54 +468,54 @@ return $.widget( "ui.selectmenu", {
|
|
414
468
|
keydown: function( event ) {
|
415
469
|
var preventDefault = true;
|
416
470
|
switch ( event.keyCode ) {
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
this._move( "prev", event );
|
432
|
-
}
|
433
|
-
break;
|
434
|
-
case $.ui.keyCode.DOWN:
|
435
|
-
if ( event.altKey ) {
|
436
|
-
this._toggle( event );
|
437
|
-
} else {
|
438
|
-
this._move( "next", event );
|
439
|
-
}
|
440
|
-
break;
|
441
|
-
case $.ui.keyCode.SPACE:
|
442
|
-
if ( this.isOpen ) {
|
443
|
-
this._selectFocusedItem( event );
|
444
|
-
} else {
|
445
|
-
this._toggle( event );
|
446
|
-
}
|
447
|
-
break;
|
448
|
-
case $.ui.keyCode.LEFT:
|
471
|
+
case $.ui.keyCode.TAB:
|
472
|
+
case $.ui.keyCode.ESCAPE:
|
473
|
+
this.close( event );
|
474
|
+
preventDefault = false;
|
475
|
+
break;
|
476
|
+
case $.ui.keyCode.ENTER:
|
477
|
+
if ( this.isOpen ) {
|
478
|
+
this._selectFocusedItem( event );
|
479
|
+
}
|
480
|
+
break;
|
481
|
+
case $.ui.keyCode.UP:
|
482
|
+
if ( event.altKey ) {
|
483
|
+
this._toggle( event );
|
484
|
+
} else {
|
449
485
|
this._move( "prev", event );
|
450
|
-
|
451
|
-
|
486
|
+
}
|
487
|
+
break;
|
488
|
+
case $.ui.keyCode.DOWN:
|
489
|
+
if ( event.altKey ) {
|
490
|
+
this._toggle( event );
|
491
|
+
} else {
|
452
492
|
this._move( "next", event );
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
493
|
+
}
|
494
|
+
break;
|
495
|
+
case $.ui.keyCode.SPACE:
|
496
|
+
if ( this.isOpen ) {
|
497
|
+
this._selectFocusedItem( event );
|
498
|
+
} else {
|
499
|
+
this._toggle( event );
|
500
|
+
}
|
501
|
+
break;
|
502
|
+
case $.ui.keyCode.LEFT:
|
503
|
+
this._move( "prev", event );
|
504
|
+
break;
|
505
|
+
case $.ui.keyCode.RIGHT:
|
506
|
+
this._move( "next", event );
|
507
|
+
break;
|
508
|
+
case $.ui.keyCode.HOME:
|
509
|
+
case $.ui.keyCode.PAGE_UP:
|
510
|
+
this._move( "first", event );
|
511
|
+
break;
|
512
|
+
case $.ui.keyCode.END:
|
513
|
+
case $.ui.keyCode.PAGE_DOWN:
|
514
|
+
this._move( "last", event );
|
515
|
+
break;
|
516
|
+
default:
|
517
|
+
this.menu.trigger( event );
|
518
|
+
preventDefault = false;
|
465
519
|
}
|
466
520
|
|
467
521
|
if ( preventDefault ) {
|
@@ -471,7 +525,7 @@ return $.widget( "ui.selectmenu", {
|
|
471
525
|
},
|
472
526
|
|
473
527
|
_selectFocusedItem: function( event ) {
|
474
|
-
var item = this.menuItems.eq( this.focusIndex );
|
528
|
+
var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
475
529
|
if ( !item.hasClass( "ui-state-disabled" ) ) {
|
476
530
|
this._select( item.data( "ui-selectmenu-item" ), event );
|
477
531
|
}
|
@@ -482,7 +536,7 @@ return $.widget( "ui.selectmenu", {
|
|
482
536
|
|
483
537
|
// Change native select element
|
484
538
|
this.element[ 0 ].selectedIndex = item.index;
|
485
|
-
this.
|
539
|
+
this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
|
486
540
|
this._setAria( item );
|
487
541
|
this._trigger( "select", event, { item: item } );
|
488
542
|
|
@@ -496,18 +550,18 @@ return $.widget( "ui.selectmenu", {
|
|
496
550
|
_setAria: function( item ) {
|
497
551
|
var id = this.menuItems.eq( item.index ).attr( "id" );
|
498
552
|
|
499
|
-
this.button.attr({
|
553
|
+
this.button.attr( {
|
500
554
|
"aria-labelledby": id,
|
501
555
|
"aria-activedescendant": id
|
502
|
-
});
|
556
|
+
} );
|
503
557
|
this.menu.attr( "aria-activedescendant", id );
|
504
558
|
},
|
505
559
|
|
506
560
|
_setOption: function( key, value ) {
|
507
561
|
if ( key === "icons" ) {
|
508
|
-
this.button.find( "span.ui-icon" )
|
509
|
-
|
510
|
-
.
|
562
|
+
var icon = this.button.find( "span.ui-icon" );
|
563
|
+
this._removeClass( icon, null, this.options.icons.button )
|
564
|
+
._addClass( icon, null, value.button );
|
511
565
|
}
|
512
566
|
|
513
567
|
this._super( key, value );
|
@@ -516,26 +570,27 @@ return $.widget( "ui.selectmenu", {
|
|
516
570
|
this.menuWrap.appendTo( this._appendTo() );
|
517
571
|
}
|
518
572
|
|
519
|
-
if ( key === "disabled" ) {
|
520
|
-
this.menuInstance.option( "disabled", value );
|
521
|
-
this.button
|
522
|
-
.toggleClass( "ui-state-disabled", value )
|
523
|
-
.attr( "aria-disabled", value );
|
524
|
-
|
525
|
-
this.element.prop( "disabled", value );
|
526
|
-
if ( value ) {
|
527
|
-
this.button.attr( "tabindex", -1 );
|
528
|
-
this.close();
|
529
|
-
} else {
|
530
|
-
this.button.attr( "tabindex", 0 );
|
531
|
-
}
|
532
|
-
}
|
533
|
-
|
534
573
|
if ( key === "width" ) {
|
535
574
|
this._resizeButton();
|
536
575
|
}
|
537
576
|
},
|
538
577
|
|
578
|
+
_setOptionDisabled: function( value ) {
|
579
|
+
this._super( value );
|
580
|
+
|
581
|
+
this.menuInstance.option( "disabled", value );
|
582
|
+
this.button.attr( "aria-disabled", value );
|
583
|
+
this._toggleClass( this.button, null, "ui-state-disabled", value );
|
584
|
+
|
585
|
+
this.element.prop( "disabled", value );
|
586
|
+
if ( value ) {
|
587
|
+
this.button.attr( "tabindex", -1 );
|
588
|
+
this.close();
|
589
|
+
} else {
|
590
|
+
this.button.attr( "tabindex", 0 );
|
591
|
+
}
|
592
|
+
},
|
593
|
+
|
539
594
|
_appendTo: function() {
|
540
595
|
var element = this.options.appendTo;
|
541
596
|
|
@@ -546,7 +601,7 @@ return $.widget( "ui.selectmenu", {
|
|
546
601
|
}
|
547
602
|
|
548
603
|
if ( !element || !element[ 0 ] ) {
|
549
|
-
element = this.element.closest( ".ui-front" );
|
604
|
+
element = this.element.closest( ".ui-front, dialog" );
|
550
605
|
}
|
551
606
|
|
552
607
|
if ( !element.length ) {
|
@@ -557,18 +612,31 @@ return $.widget( "ui.selectmenu", {
|
|
557
612
|
},
|
558
613
|
|
559
614
|
_toggleAttr: function() {
|
560
|
-
this.button
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
615
|
+
this.button.attr( "aria-expanded", this.isOpen );
|
616
|
+
|
617
|
+
// We can't use two _toggleClass() calls here, because we need to make sure
|
618
|
+
// we always remove classes first and add them second, otherwise if both classes have the
|
619
|
+
// same theme class, it will be removed after we add it.
|
620
|
+
this._removeClass( this.button, "ui-selectmenu-button-" +
|
621
|
+
( this.isOpen ? "closed" : "open" ) )
|
622
|
+
._addClass( this.button, "ui-selectmenu-button-" +
|
623
|
+
( this.isOpen ? "open" : "closed" ) )
|
624
|
+
._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
|
625
|
+
|
565
626
|
this.menu.attr( "aria-hidden", !this.isOpen );
|
566
627
|
},
|
567
628
|
|
568
629
|
_resizeButton: function() {
|
569
630
|
var width = this.options.width;
|
570
631
|
|
571
|
-
|
632
|
+
// For `width: false`, just remove inline style and stop
|
633
|
+
if ( width === false ) {
|
634
|
+
this.button.css( "width", "" );
|
635
|
+
return;
|
636
|
+
}
|
637
|
+
|
638
|
+
// For `width: null`, match the width of the original element
|
639
|
+
if ( width === null ) {
|
572
640
|
width = this.element.show().outerWidth();
|
573
641
|
this.element.hide();
|
574
642
|
}
|
@@ -580,7 +648,7 @@ return $.widget( "ui.selectmenu", {
|
|
580
648
|
this.menu.outerWidth( Math.max(
|
581
649
|
this.button.outerWidth(),
|
582
650
|
|
583
|
-
//
|
651
|
+
// Support: IE10
|
584
652
|
// IE10 wraps long text (possibly a rounding bug)
|
585
653
|
// so we add 1px to avoid the wrapping
|
586
654
|
this.menu.width( "" ).outerWidth() + 1
|
@@ -588,33 +656,47 @@ return $.widget( "ui.selectmenu", {
|
|
588
656
|
},
|
589
657
|
|
590
658
|
_getCreateOptions: function() {
|
591
|
-
|
659
|
+
var options = this._super();
|
660
|
+
|
661
|
+
options.disabled = this.element.prop( "disabled" );
|
662
|
+
|
663
|
+
return options;
|
592
664
|
},
|
593
665
|
|
594
666
|
_parseOptions: function( options ) {
|
595
|
-
var
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
optgroup: optgroup.attr( "label" ) || "",
|
605
|
-
disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
|
606
|
-
});
|
607
|
-
});
|
667
|
+
var that = this,
|
668
|
+
data = [];
|
669
|
+
options.each( function( index, item ) {
|
670
|
+
if ( item.hidden ) {
|
671
|
+
return;
|
672
|
+
}
|
673
|
+
|
674
|
+
data.push( that._parseOption( $( item ), index ) );
|
675
|
+
} );
|
608
676
|
this.items = data;
|
609
677
|
},
|
610
678
|
|
679
|
+
_parseOption: function( option, index ) {
|
680
|
+
var optgroup = option.parent( "optgroup" );
|
681
|
+
|
682
|
+
return {
|
683
|
+
element: option,
|
684
|
+
index: index,
|
685
|
+
value: option.val(),
|
686
|
+
label: option.text(),
|
687
|
+
optgroup: optgroup.attr( "label" ) || "",
|
688
|
+
disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
|
689
|
+
};
|
690
|
+
},
|
691
|
+
|
611
692
|
_destroy: function() {
|
693
|
+
this._unbindFormResetHandler();
|
612
694
|
this.menuWrap.remove();
|
613
695
|
this.button.remove();
|
614
696
|
this.element.show();
|
615
697
|
this.element.removeUniqueId();
|
616
|
-
this.
|
698
|
+
this.labels.attr( "for", this.ids.element );
|
617
699
|
}
|
618
|
-
});
|
700
|
+
} ] );
|
619
701
|
|
620
|
-
})
|
702
|
+
} );
|