jquery-ui-rails 4.2.1 → 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 +41 -2
- data/README.md +100 -83
- data/Rakefile +82 -49
- data/VERSIONS.md +9 -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 -0
- 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 -0
- data/app/assets/javascripts/jquery-ui/effect.js +975 -0
- 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 → jquery-ui/position.js} +120 -108
- 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 +754 -0
- data/app/assets/javascripts/{jquery.ui.accordion.js → jquery-ui/widgets/accordion.js} +257 -203
- data/app/assets/javascripts/{jquery.ui.autocomplete.js → jquery-ui/widgets/autocomplete.js} +202 -133
- 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/widgets/dialog.js +968 -0
- data/app/assets/javascripts/jquery-ui/widgets/draggable.js +1268 -0
- data/app/assets/javascripts/jquery-ui/widgets/droppable.js +508 -0
- data/app/assets/javascripts/{jquery.ui.menu.js → jquery-ui/widgets/menu.js} +276 -187
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +184 -0
- 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/widgets/selectmenu.js +702 -0
- data/app/assets/javascripts/{jquery.ui.slider.js → jquery-ui/widgets/slider.js} +254 -174
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1623 -0
- data/app/assets/javascripts/{jquery.ui.spinner.js → jquery-ui/widgets/spinner.js} +206 -119
- data/app/assets/javascripts/{jquery.ui.tabs.js → jquery-ui/widgets/tabs.js} +334 -255
- data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +530 -0
- data/app/assets/javascripts/jquery-ui.js +57 -0
- data/app/assets/stylesheets/jquery-ui/accordion.css +26 -0
- data/app/assets/stylesheets/{jquery.ui.all.css.erb → jquery-ui/all.css} +4 -4
- data/app/assets/stylesheets/{jquery.ui.autocomplete.css.erb → jquery-ui/autocomplete.css} +3 -5
- data/app/assets/stylesheets/jquery-ui/base.css +32 -0
- data/app/assets/stylesheets/jquery-ui/button.css +85 -0
- 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.erb → jquery-ui/core.css} +16 -9
- data/app/assets/stylesheets/{jquery.ui.datepicker.css.erb → jquery-ui/datepicker.css} +14 -5
- data/app/assets/stylesheets/{jquery.ui.dialog.css.erb → jquery-ui/dialog.css} +40 -12
- data/app/assets/stylesheets/jquery-ui/draggable.css +15 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +31 -0
- data/app/assets/stylesheets/{jquery.ui.resizable.css.erb → jquery-ui/resizable.css} +5 -4
- data/app/assets/stylesheets/{jquery.ui.selectable.css.erb → jquery-ui/selectable.css} +7 -4
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +53 -0
- data/app/assets/stylesheets/{jquery.ui.slider.css.erb → jquery-ui/slider.css} +7 -6
- data/app/assets/stylesheets/jquery-ui/sortable.css +15 -0
- data/app/assets/stylesheets/{jquery.ui.spinner.css.erb → jquery-ui/spinner.css} +9 -24
- data/app/assets/stylesheets/{jquery.ui.tabs.css.erb → jquery-ui/tabs.css} +3 -4
- data/app/assets/stylesheets/{jquery.ui.theme.css.erb → jquery-ui/theme.css.erb} +122 -96
- data/app/assets/stylesheets/{jquery.ui.tooltip.css.erb → jquery-ui/tooltip.css} +3 -6
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +180 -166
- data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
- 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.all.js +0 -34
- data/app/assets/javascripts/jquery.ui.button.js +0 -398
- data/app/assets/javascripts/jquery.ui.core.js +0 -320
- data/app/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/app/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/app/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/app/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker.js +0 -2040
- data/app/assets/javascripts/jquery.ui.dialog.js +0 -830
- data/app/assets/javascripts/jquery.ui.draggable.js +0 -962
- data/app/assets/javascripts/jquery.ui.droppable.js +0 -394
- data/app/assets/javascripts/jquery.ui.effect-blind.js +0 -84
- data/app/assets/javascripts/jquery.ui.effect-bounce.js +0 -115
- data/app/assets/javascripts/jquery.ui.effect-clip.js +0 -69
- data/app/assets/javascripts/jquery.ui.effect-drop.js +0 -67
- data/app/assets/javascripts/jquery.ui.effect-explode.js +0 -99
- data/app/assets/javascripts/jquery.ui.effect-fade.js +0 -32
- data/app/assets/javascripts/jquery.ui.effect-fold.js +0 -78
- data/app/assets/javascripts/jquery.ui.effect-highlight.js +0 -52
- data/app/assets/javascripts/jquery.ui.effect-pulsate.js +0 -65
- data/app/assets/javascripts/jquery.ui.effect-scale.js +0 -320
- data/app/assets/javascripts/jquery.ui.effect-shake.js +0 -76
- data/app/assets/javascripts/jquery.ui.effect-slide.js +0 -66
- data/app/assets/javascripts/jquery.ui.effect-transfer.js +0 -49
- data/app/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/app/assets/javascripts/jquery.ui.effect.js +0 -1289
- data/app/assets/javascripts/jquery.ui.mouse.js +0 -172
- data/app/assets/javascripts/jquery.ui.progressbar.js +0 -148
- data/app/assets/javascripts/jquery.ui.resizable.js +0 -982
- data/app/assets/javascripts/jquery.ui.selectable.js +0 -281
- data/app/assets/javascripts/jquery.ui.sortable.js +0 -1293
- data/app/assets/javascripts/jquery.ui.tooltip.js +0 -406
- data/app/assets/javascripts/jquery.ui.widget.js +0 -521
- data/app/assets/stylesheets/jquery.ui.accordion.css.erb +0 -42
- data/app/assets/stylesheets/jquery.ui.base.css.erb +0 -27
- data/app/assets/stylesheets/jquery.ui.button.css.erb +0 -118
- data/app/assets/stylesheets/jquery.ui.menu.css.erb +0 -83
- data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -37
@@ -0,0 +1,702 @@
|
|
1
|
+
//= require jquery-ui/widgets/menu
|
2
|
+
//= require jquery-ui/form-reset-mixin
|
3
|
+
//= require jquery-ui/keycode
|
4
|
+
//= require jquery-ui/labels
|
5
|
+
//= require jquery-ui/position
|
6
|
+
//= require jquery-ui/unique-id
|
7
|
+
//= require jquery-ui/version
|
8
|
+
//= require jquery-ui/widget
|
9
|
+
|
10
|
+
/*!
|
11
|
+
* jQuery UI Selectmenu 1.13.0
|
12
|
+
* http://jqueryui.com
|
13
|
+
*
|
14
|
+
* Copyright jQuery Foundation and other contributors
|
15
|
+
* Released under the MIT license.
|
16
|
+
* http://jquery.org/license
|
17
|
+
*/
|
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
|
+
|
33
|
+
if ( typeof define === "function" && define.amd ) {
|
34
|
+
|
35
|
+
// AMD. Register as an anonymous module.
|
36
|
+
define( [
|
37
|
+
"jquery",
|
38
|
+
"./menu",
|
39
|
+
"../form-reset-mixin",
|
40
|
+
"../keycode",
|
41
|
+
"../labels",
|
42
|
+
"../position",
|
43
|
+
"../unique-id",
|
44
|
+
"../version",
|
45
|
+
"../widget"
|
46
|
+
], factory );
|
47
|
+
} else {
|
48
|
+
|
49
|
+
// Browser globals
|
50
|
+
factory( jQuery );
|
51
|
+
}
|
52
|
+
} )( function( $ ) {
|
53
|
+
"use strict";
|
54
|
+
|
55
|
+
return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
|
56
|
+
version: "1.13.0",
|
57
|
+
defaultElement: "<select>",
|
58
|
+
options: {
|
59
|
+
appendTo: null,
|
60
|
+
classes: {
|
61
|
+
"ui-selectmenu-button-open": "ui-corner-top",
|
62
|
+
"ui-selectmenu-button-closed": "ui-corner-all"
|
63
|
+
},
|
64
|
+
disabled: null,
|
65
|
+
icons: {
|
66
|
+
button: "ui-icon-triangle-1-s"
|
67
|
+
},
|
68
|
+
position: {
|
69
|
+
my: "left top",
|
70
|
+
at: "left bottom",
|
71
|
+
collision: "none"
|
72
|
+
},
|
73
|
+
width: false,
|
74
|
+
|
75
|
+
// Callbacks
|
76
|
+
change: null,
|
77
|
+
close: null,
|
78
|
+
focus: null,
|
79
|
+
open: null,
|
80
|
+
select: null
|
81
|
+
},
|
82
|
+
|
83
|
+
_create: function() {
|
84
|
+
var selectmenuId = this.element.uniqueId().attr( "id" );
|
85
|
+
this.ids = {
|
86
|
+
element: selectmenuId,
|
87
|
+
button: selectmenuId + "-button",
|
88
|
+
menu: selectmenuId + "-menu"
|
89
|
+
};
|
90
|
+
|
91
|
+
this._drawButton();
|
92
|
+
this._drawMenu();
|
93
|
+
this._bindFormResetHandler();
|
94
|
+
|
95
|
+
this._rendered = false;
|
96
|
+
this.menuItems = $();
|
97
|
+
},
|
98
|
+
|
99
|
+
_drawButton: function() {
|
100
|
+
var icon,
|
101
|
+
that = this,
|
102
|
+
item = this._parseOption(
|
103
|
+
this.element.find( "option:selected" ),
|
104
|
+
this.element[ 0 ].selectedIndex
|
105
|
+
);
|
106
|
+
|
107
|
+
// Associate existing label with the new button
|
108
|
+
this.labels = this.element.labels().attr( "for", this.ids.button );
|
109
|
+
this._on( this.labels, {
|
110
|
+
click: function( event ) {
|
111
|
+
this.button.trigger( "focus" );
|
112
|
+
event.preventDefault();
|
113
|
+
}
|
114
|
+
} );
|
115
|
+
|
116
|
+
// Hide original select element
|
117
|
+
this.element.hide();
|
118
|
+
|
119
|
+
// Create button
|
120
|
+
this.button = $( "<span>", {
|
121
|
+
tabindex: this.options.disabled ? -1 : 0,
|
122
|
+
id: this.ids.button,
|
123
|
+
role: "combobox",
|
124
|
+
"aria-expanded": "false",
|
125
|
+
"aria-autocomplete": "list",
|
126
|
+
"aria-owns": this.ids.menu,
|
127
|
+
"aria-haspopup": "true",
|
128
|
+
title: this.element.attr( "title" )
|
129
|
+
} )
|
130
|
+
.insertAfter( this.element );
|
131
|
+
|
132
|
+
this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
|
133
|
+
"ui-button ui-widget" );
|
134
|
+
|
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 )
|
138
|
+
.appendTo( this.button );
|
139
|
+
|
140
|
+
if ( this.options.width !== false ) {
|
141
|
+
this._resizeButton();
|
142
|
+
}
|
143
|
+
|
144
|
+
this._on( this.button, this._buttonEvents );
|
145
|
+
this.button.one( "focusin", function() {
|
146
|
+
|
147
|
+
// Delay rendering the menu items until the button receives focus.
|
148
|
+
// The menu may have already been rendered via a programmatic open.
|
149
|
+
if ( !that._rendered ) {
|
150
|
+
that._refreshMenu();
|
151
|
+
}
|
152
|
+
} );
|
153
|
+
},
|
154
|
+
|
155
|
+
_drawMenu: function() {
|
156
|
+
var that = this;
|
157
|
+
|
158
|
+
// Create menu
|
159
|
+
this.menu = $( "<ul>", {
|
160
|
+
"aria-hidden": "true",
|
161
|
+
"aria-labelledby": this.ids.button,
|
162
|
+
id: this.ids.menu
|
163
|
+
} );
|
164
|
+
|
165
|
+
// Wrap menu
|
166
|
+
this.menuWrap = $( "<div>" ).append( this.menu );
|
167
|
+
this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
|
168
|
+
this.menuWrap.appendTo( this._appendTo() );
|
169
|
+
|
170
|
+
// Initialize menu widget
|
171
|
+
this.menuInstance = this.menu
|
172
|
+
.menu( {
|
173
|
+
classes: {
|
174
|
+
"ui-menu": "ui-corner-bottom"
|
175
|
+
},
|
176
|
+
role: "listbox",
|
177
|
+
select: function( event, ui ) {
|
178
|
+
event.preventDefault();
|
179
|
+
|
180
|
+
// Support: IE8
|
181
|
+
// If the item was selected via a click, the text selection
|
182
|
+
// will be destroyed in IE
|
183
|
+
that._setSelection();
|
184
|
+
|
185
|
+
that._select( ui.item.data( "ui-selectmenu-item" ), event );
|
186
|
+
},
|
187
|
+
focus: function( event, ui ) {
|
188
|
+
var item = ui.item.data( "ui-selectmenu-item" );
|
189
|
+
|
190
|
+
// Prevent inital focus from firing and check if its a newly focused item
|
191
|
+
if ( that.focusIndex != null && item.index !== that.focusIndex ) {
|
192
|
+
that._trigger( "focus", event, { item: item } );
|
193
|
+
if ( !that.isOpen ) {
|
194
|
+
that._select( item, event );
|
195
|
+
}
|
196
|
+
}
|
197
|
+
that.focusIndex = item.index;
|
198
|
+
|
199
|
+
that.button.attr( "aria-activedescendant",
|
200
|
+
that.menuItems.eq( item.index ).attr( "id" ) );
|
201
|
+
}
|
202
|
+
} )
|
203
|
+
.menu( "instance" );
|
204
|
+
|
205
|
+
// Don't close the menu on mouseleave
|
206
|
+
this.menuInstance._off( this.menu, "mouseleave" );
|
207
|
+
|
208
|
+
// Cancel the menu's collapseAll on document click
|
209
|
+
this.menuInstance._closeOnDocumentClick = function() {
|
210
|
+
return false;
|
211
|
+
};
|
212
|
+
|
213
|
+
// Selects often contain empty items, but never contain dividers
|
214
|
+
this.menuInstance._isDivider = function() {
|
215
|
+
return false;
|
216
|
+
};
|
217
|
+
},
|
218
|
+
|
219
|
+
refresh: function() {
|
220
|
+
this._refreshMenu();
|
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 ) {
|
229
|
+
this._resizeButton();
|
230
|
+
}
|
231
|
+
},
|
232
|
+
|
233
|
+
_refreshMenu: function() {
|
234
|
+
var item,
|
235
|
+
options = this.element.find( "option" );
|
236
|
+
|
237
|
+
this.menu.empty();
|
238
|
+
|
239
|
+
this._parseOptions( options );
|
240
|
+
this._renderMenu( this.menu, this.items );
|
241
|
+
|
242
|
+
this.menuInstance.refresh();
|
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
|
+
}
|
252
|
+
|
253
|
+
item = this._getSelectedItem();
|
254
|
+
|
255
|
+
// Update the menu to have the correct item focused
|
256
|
+
this.menuInstance.focus( null, item );
|
257
|
+
this._setAria( item.data( "ui-selectmenu-item" ) );
|
258
|
+
|
259
|
+
// Set disabled state
|
260
|
+
this._setOption( "disabled", this.element.prop( "disabled" ) );
|
261
|
+
},
|
262
|
+
|
263
|
+
open: function( event ) {
|
264
|
+
if ( this.options.disabled ) {
|
265
|
+
return;
|
266
|
+
}
|
267
|
+
|
268
|
+
// If this is the first time the menu is being opened, render the items
|
269
|
+
if ( !this._rendered ) {
|
270
|
+
this._refreshMenu();
|
271
|
+
} else {
|
272
|
+
|
273
|
+
// Menu clears focus on close, reset focus to selected item
|
274
|
+
this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
|
275
|
+
this.menuInstance.focus( null, this._getSelectedItem() );
|
276
|
+
}
|
277
|
+
|
278
|
+
// If there are no options, don't open the menu
|
279
|
+
if ( !this.menuItems.length ) {
|
280
|
+
return;
|
281
|
+
}
|
282
|
+
|
283
|
+
this.isOpen = true;
|
284
|
+
this._toggleAttr();
|
285
|
+
this._resizeMenu();
|
286
|
+
this._position();
|
287
|
+
|
288
|
+
this._on( this.document, this._documentClick );
|
289
|
+
|
290
|
+
this._trigger( "open", event );
|
291
|
+
},
|
292
|
+
|
293
|
+
_position: function() {
|
294
|
+
this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
|
295
|
+
},
|
296
|
+
|
297
|
+
close: function( event ) {
|
298
|
+
if ( !this.isOpen ) {
|
299
|
+
return;
|
300
|
+
}
|
301
|
+
|
302
|
+
this.isOpen = false;
|
303
|
+
this._toggleAttr();
|
304
|
+
|
305
|
+
this.range = null;
|
306
|
+
this._off( this.document );
|
307
|
+
|
308
|
+
this._trigger( "close", event );
|
309
|
+
},
|
310
|
+
|
311
|
+
widget: function() {
|
312
|
+
return this.button;
|
313
|
+
},
|
314
|
+
|
315
|
+
menuWidget: function() {
|
316
|
+
return this.menu;
|
317
|
+
},
|
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
|
+
|
328
|
+
_renderMenu: function( ul, items ) {
|
329
|
+
var that = this,
|
330
|
+
currentOptgroup = "";
|
331
|
+
|
332
|
+
$.each( items, function( index, item ) {
|
333
|
+
var li;
|
334
|
+
|
335
|
+
if ( item.optgroup !== currentOptgroup ) {
|
336
|
+
li = $( "<li>", {
|
337
|
+
text: item.optgroup
|
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 );
|
345
|
+
|
346
|
+
currentOptgroup = item.optgroup;
|
347
|
+
}
|
348
|
+
|
349
|
+
that._renderItemData( ul, item );
|
350
|
+
} );
|
351
|
+
},
|
352
|
+
|
353
|
+
_renderItemData: function( ul, item ) {
|
354
|
+
return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
|
355
|
+
},
|
356
|
+
|
357
|
+
_renderItem: function( ul, item ) {
|
358
|
+
var li = $( "<li>" ),
|
359
|
+
wrapper = $( "<div>", {
|
360
|
+
title: item.element.attr( "title" )
|
361
|
+
} );
|
362
|
+
|
363
|
+
if ( item.disabled ) {
|
364
|
+
this._addClass( li, null, "ui-state-disabled" );
|
365
|
+
}
|
366
|
+
this._setText( wrapper, item.label );
|
367
|
+
|
368
|
+
return li.append( wrapper ).appendTo( ul );
|
369
|
+
},
|
370
|
+
|
371
|
+
_setText: function( element, value ) {
|
372
|
+
if ( value ) {
|
373
|
+
element.text( value );
|
374
|
+
} else {
|
375
|
+
element.html( " " );
|
376
|
+
}
|
377
|
+
},
|
378
|
+
|
379
|
+
_move: function( direction, event ) {
|
380
|
+
var item, next,
|
381
|
+
filter = ".ui-menu-item";
|
382
|
+
|
383
|
+
if ( this.isOpen ) {
|
384
|
+
item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
385
|
+
} else {
|
386
|
+
item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
387
|
+
filter += ":not(.ui-state-disabled)";
|
388
|
+
}
|
389
|
+
|
390
|
+
if ( direction === "first" || direction === "last" ) {
|
391
|
+
next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
|
392
|
+
} else {
|
393
|
+
next = item[ direction + "All" ]( filter ).eq( 0 );
|
394
|
+
}
|
395
|
+
|
396
|
+
if ( next.length ) {
|
397
|
+
this.menuInstance.focus( event, next );
|
398
|
+
}
|
399
|
+
},
|
400
|
+
|
401
|
+
_getSelectedItem: function() {
|
402
|
+
return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
|
403
|
+
},
|
404
|
+
|
405
|
+
_toggle: function( event ) {
|
406
|
+
this[ this.isOpen ? "close" : "open" ]( event );
|
407
|
+
},
|
408
|
+
|
409
|
+
_setSelection: function() {
|
410
|
+
var selection;
|
411
|
+
|
412
|
+
if ( !this.range ) {
|
413
|
+
return;
|
414
|
+
}
|
415
|
+
|
416
|
+
if ( window.getSelection ) {
|
417
|
+
selection = window.getSelection();
|
418
|
+
selection.removeAllRanges();
|
419
|
+
selection.addRange( this.range );
|
420
|
+
|
421
|
+
// Support: IE8
|
422
|
+
} else {
|
423
|
+
this.range.select();
|
424
|
+
}
|
425
|
+
|
426
|
+
// Support: IE
|
427
|
+
// Setting the text selection kills the button focus in IE, but
|
428
|
+
// restoring the focus doesn't kill the selection.
|
429
|
+
this.button.focus();
|
430
|
+
},
|
431
|
+
|
432
|
+
_documentClick: {
|
433
|
+
mousedown: function( event ) {
|
434
|
+
if ( !this.isOpen ) {
|
435
|
+
return;
|
436
|
+
}
|
437
|
+
|
438
|
+
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
|
439
|
+
$.escapeSelector( this.ids.button ) ).length ) {
|
440
|
+
this.close( event );
|
441
|
+
}
|
442
|
+
}
|
443
|
+
},
|
444
|
+
|
445
|
+
_buttonEvents: {
|
446
|
+
|
447
|
+
// Prevent text selection from being reset when interacting with the selectmenu (#10144)
|
448
|
+
mousedown: function() {
|
449
|
+
var selection;
|
450
|
+
|
451
|
+
if ( window.getSelection ) {
|
452
|
+
selection = window.getSelection();
|
453
|
+
if ( selection.rangeCount ) {
|
454
|
+
this.range = selection.getRangeAt( 0 );
|
455
|
+
}
|
456
|
+
|
457
|
+
// Support: IE8
|
458
|
+
} else {
|
459
|
+
this.range = document.selection.createRange();
|
460
|
+
}
|
461
|
+
},
|
462
|
+
|
463
|
+
click: function( event ) {
|
464
|
+
this._setSelection();
|
465
|
+
this._toggle( event );
|
466
|
+
},
|
467
|
+
|
468
|
+
keydown: function( event ) {
|
469
|
+
var preventDefault = true;
|
470
|
+
switch ( event.keyCode ) {
|
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 {
|
485
|
+
this._move( "prev", event );
|
486
|
+
}
|
487
|
+
break;
|
488
|
+
case $.ui.keyCode.DOWN:
|
489
|
+
if ( event.altKey ) {
|
490
|
+
this._toggle( event );
|
491
|
+
} else {
|
492
|
+
this._move( "next", event );
|
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;
|
519
|
+
}
|
520
|
+
|
521
|
+
if ( preventDefault ) {
|
522
|
+
event.preventDefault();
|
523
|
+
}
|
524
|
+
}
|
525
|
+
},
|
526
|
+
|
527
|
+
_selectFocusedItem: function( event ) {
|
528
|
+
var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
|
529
|
+
if ( !item.hasClass( "ui-state-disabled" ) ) {
|
530
|
+
this._select( item.data( "ui-selectmenu-item" ), event );
|
531
|
+
}
|
532
|
+
},
|
533
|
+
|
534
|
+
_select: function( item, event ) {
|
535
|
+
var oldIndex = this.element[ 0 ].selectedIndex;
|
536
|
+
|
537
|
+
// Change native select element
|
538
|
+
this.element[ 0 ].selectedIndex = item.index;
|
539
|
+
this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
|
540
|
+
this._setAria( item );
|
541
|
+
this._trigger( "select", event, { item: item } );
|
542
|
+
|
543
|
+
if ( item.index !== oldIndex ) {
|
544
|
+
this._trigger( "change", event, { item: item } );
|
545
|
+
}
|
546
|
+
|
547
|
+
this.close( event );
|
548
|
+
},
|
549
|
+
|
550
|
+
_setAria: function( item ) {
|
551
|
+
var id = this.menuItems.eq( item.index ).attr( "id" );
|
552
|
+
|
553
|
+
this.button.attr( {
|
554
|
+
"aria-labelledby": id,
|
555
|
+
"aria-activedescendant": id
|
556
|
+
} );
|
557
|
+
this.menu.attr( "aria-activedescendant", id );
|
558
|
+
},
|
559
|
+
|
560
|
+
_setOption: function( key, value ) {
|
561
|
+
if ( key === "icons" ) {
|
562
|
+
var icon = this.button.find( "span.ui-icon" );
|
563
|
+
this._removeClass( icon, null, this.options.icons.button )
|
564
|
+
._addClass( icon, null, value.button );
|
565
|
+
}
|
566
|
+
|
567
|
+
this._super( key, value );
|
568
|
+
|
569
|
+
if ( key === "appendTo" ) {
|
570
|
+
this.menuWrap.appendTo( this._appendTo() );
|
571
|
+
}
|
572
|
+
|
573
|
+
if ( key === "width" ) {
|
574
|
+
this._resizeButton();
|
575
|
+
}
|
576
|
+
},
|
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
|
+
|
594
|
+
_appendTo: function() {
|
595
|
+
var element = this.options.appendTo;
|
596
|
+
|
597
|
+
if ( element ) {
|
598
|
+
element = element.jquery || element.nodeType ?
|
599
|
+
$( element ) :
|
600
|
+
this.document.find( element ).eq( 0 );
|
601
|
+
}
|
602
|
+
|
603
|
+
if ( !element || !element[ 0 ] ) {
|
604
|
+
element = this.element.closest( ".ui-front, dialog" );
|
605
|
+
}
|
606
|
+
|
607
|
+
if ( !element.length ) {
|
608
|
+
element = this.document[ 0 ].body;
|
609
|
+
}
|
610
|
+
|
611
|
+
return element;
|
612
|
+
},
|
613
|
+
|
614
|
+
_toggleAttr: function() {
|
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
|
+
|
626
|
+
this.menu.attr( "aria-hidden", !this.isOpen );
|
627
|
+
},
|
628
|
+
|
629
|
+
_resizeButton: function() {
|
630
|
+
var width = this.options.width;
|
631
|
+
|
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 ) {
|
640
|
+
width = this.element.show().outerWidth();
|
641
|
+
this.element.hide();
|
642
|
+
}
|
643
|
+
|
644
|
+
this.button.outerWidth( width );
|
645
|
+
},
|
646
|
+
|
647
|
+
_resizeMenu: function() {
|
648
|
+
this.menu.outerWidth( Math.max(
|
649
|
+
this.button.outerWidth(),
|
650
|
+
|
651
|
+
// Support: IE10
|
652
|
+
// IE10 wraps long text (possibly a rounding bug)
|
653
|
+
// so we add 1px to avoid the wrapping
|
654
|
+
this.menu.width( "" ).outerWidth() + 1
|
655
|
+
) );
|
656
|
+
},
|
657
|
+
|
658
|
+
_getCreateOptions: function() {
|
659
|
+
var options = this._super();
|
660
|
+
|
661
|
+
options.disabled = this.element.prop( "disabled" );
|
662
|
+
|
663
|
+
return options;
|
664
|
+
},
|
665
|
+
|
666
|
+
_parseOptions: function( options ) {
|
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
|
+
} );
|
676
|
+
this.items = data;
|
677
|
+
},
|
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
|
+
|
692
|
+
_destroy: function() {
|
693
|
+
this._unbindFormResetHandler();
|
694
|
+
this.menuWrap.remove();
|
695
|
+
this.button.remove();
|
696
|
+
this.element.show();
|
697
|
+
this.element.removeUniqueId();
|
698
|
+
this.labels.attr( "for", this.ids.element );
|
699
|
+
}
|
700
|
+
} ] );
|
701
|
+
|
702
|
+
} );
|