jquery-ui-rails 5.0.5 → 6.0.0
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 +12 -0
- data/README.md +47 -30
- data/Rakefile +48 -27
- data/VERSIONS.md +1 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui.js +52 -33
- data/app/assets/javascripts/jquery-ui/core.js +37 -304
- data/app/assets/javascripts/jquery-ui/data.js +41 -0
- data/app/assets/javascripts/jquery-ui/disable-selection.js +48 -0
- data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
- data/app/assets/javascripts/jquery-ui/effect.js +620 -284
- data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +73 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +113 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +68 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +72 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +114 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +50 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +92 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +60 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +46 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +67 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +60 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +77 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-size.js +194 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +79 -0
- data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +43 -0
- data/app/assets/javascripts/jquery-ui/escape-selector.js +23 -0
- data/app/assets/javascripts/jquery-ui/focusable.js +86 -0
- data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +80 -0
- data/app/assets/javascripts/jquery-ui/form.js +22 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +48 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +49 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +49 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +50 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +45 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +44 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +61 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +53 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +37 -0
- data/app/assets/javascripts/jquery-ui/ie.js +17 -0
- data/app/assets/javascripts/jquery-ui/jquery-1-7.js +91 -0
- data/app/assets/javascripts/jquery-ui/keycode.js +47 -0
- data/app/assets/javascripts/jquery-ui/labels.js +65 -0
- data/app/assets/javascripts/jquery-ui/plugin.js +46 -0
- data/app/assets/javascripts/jquery-ui/position.js +92 -109
- data/app/assets/javascripts/jquery-ui/safe-active-element.js +42 -0
- data/app/assets/javascripts/jquery-ui/safe-blur.js +23 -0
- data/app/assets/javascripts/jquery-ui/scroll-parent.js +47 -0
- data/app/assets/javascripts/jquery-ui/tabbable.js +38 -0
- data/app/assets/javascripts/jquery-ui/unique-id.js +51 -0
- data/app/assets/javascripts/jquery-ui/version.js +17 -0
- data/app/assets/javascripts/jquery-ui/widget.js +328 -151
- data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +187 -162
- data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +148 -92
- data/app/assets/javascripts/jquery-ui/widgets/button.js +391 -0
- data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +291 -0
- data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +300 -0
- data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2123 -0
- data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +229 -158
- data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +416 -293
- data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +167 -83
- data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +164 -134
- data/app/assets/javascripts/jquery-ui/widgets/mouse.js +230 -0
- data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +60 -41
- data/app/assets/javascripts/jquery-ui/{resizable.js → widgets/resizable.js} +413 -362
- data/app/assets/javascripts/jquery-ui/widgets/selectable.js +314 -0
- data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +253 -176
- data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +193 -157
- data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1561 -0
- data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +175 -112
- data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +237 -195
- data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +136 -87
- data/app/assets/stylesheets/jquery-ui/accordion.css +1 -15
- data/app/assets/stylesheets/jquery-ui/all.css +1 -1
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -3
- data/app/assets/stylesheets/jquery-ui/base.css +3 -1
- data/app/assets/stylesheets/jquery-ui/button.css +35 -68
- data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
- data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
- data/app/assets/stylesheets/jquery-ui/core.css +11 -7
- data/app/assets/stylesheets/jquery-ui/datepicker.css +11 -2
- data/app/assets/stylesheets/jquery-ui/dialog.css +38 -11
- data/app/assets/stylesheets/jquery-ui/draggable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/menu.css +7 -7
- data/app/assets/stylesheets/jquery-ui/progressbar.css +1 -2
- data/app/assets/stylesheets/jquery-ui/resizable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +11 -22
- data/app/assets/stylesheets/jquery-ui/slider.css +1 -2
- data/app/assets/stylesheets/jquery-ui/sortable.css +1 -2
- data/app/assets/stylesheets/jquery-ui/spinner.css +7 -22
- data/app/assets/stylesheets/jquery-ui/tabs.css +1 -2
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +113 -87
- data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +150 -144
- data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/javascripts/jquery-ui/button.js +0 -414
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +0 -73
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +0 -39
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +0 -36
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +0 -35
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +0 -40
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +0 -38
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +0 -37
- data/app/assets/javascripts/jquery-ui/datepicker.js +0 -2086
- data/app/assets/javascripts/jquery-ui/effect-blind.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-bounce.js +0 -125
- data/app/assets/javascripts/jquery-ui/effect-clip.js +0 -79
- data/app/assets/javascripts/jquery-ui/effect-drop.js +0 -77
- data/app/assets/javascripts/jquery-ui/effect-explode.js +0 -109
- data/app/assets/javascripts/jquery-ui/effect-fade.js +0 -42
- data/app/assets/javascripts/jquery-ui/effect-fold.js +0 -88
- data/app/assets/javascripts/jquery-ui/effect-highlight.js +0 -62
- data/app/assets/javascripts/jquery-ui/effect-puff.js +0 -63
- data/app/assets/javascripts/jquery-ui/effect-pulsate.js +0 -75
- data/app/assets/javascripts/jquery-ui/effect-scale.js +0 -92
- data/app/assets/javascripts/jquery-ui/effect-shake.js +0 -86
- data/app/assets/javascripts/jquery-ui/effect-size.js +0 -235
- data/app/assets/javascripts/jquery-ui/effect-slide.js +0 -76
- data/app/assets/javascripts/jquery-ui/effect-transfer.js +0 -59
- data/app/assets/javascripts/jquery-ui/mouse.js +0 -202
- data/app/assets/javascripts/jquery-ui/selectable.js +0 -291
- data/app/assets/javascripts/jquery-ui/sortable.js +0 -1319
@@ -1,35 +1,47 @@
|
|
1
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/widgets/button
|
2
|
+
//= require jquery-ui/version
|
3
|
+
//= require jquery-ui/keycode
|
4
|
+
//= require jquery-ui/safe-active-element
|
2
5
|
//= require jquery-ui/widget
|
3
|
-
//= require jquery-ui/button
|
4
6
|
|
5
7
|
/*!
|
6
|
-
* jQuery UI Spinner 1.
|
8
|
+
* jQuery UI Spinner 1.12.1
|
7
9
|
* http://jqueryui.com
|
8
10
|
*
|
9
11
|
* Copyright jQuery Foundation and other contributors
|
10
12
|
* Released under the MIT license.
|
11
13
|
* http://jquery.org/license
|
12
|
-
*
|
13
|
-
* http://api.jqueryui.com/spinner/
|
14
14
|
*/
|
15
|
-
|
15
|
+
|
16
|
+
//>>label: Spinner
|
17
|
+
//>>group: Widgets
|
18
|
+
//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
|
19
|
+
//>>docs: http://api.jqueryui.com/spinner/
|
20
|
+
//>>demos: http://jqueryui.com/spinner/
|
21
|
+
//>>css.structure: ../../themes/base/core.css
|
22
|
+
//>>css.structure: ../../themes/base/spinner.css
|
23
|
+
//>>css.theme: ../../themes/base/theme.css
|
24
|
+
|
25
|
+
( function( factory ) {
|
16
26
|
if ( typeof define === "function" && define.amd ) {
|
17
27
|
|
18
28
|
// AMD. Register as an anonymous module.
|
19
|
-
define([
|
29
|
+
define( [
|
20
30
|
"jquery",
|
21
|
-
"./
|
22
|
-
"
|
23
|
-
"
|
31
|
+
"./button",
|
32
|
+
"../version",
|
33
|
+
"../keycode",
|
34
|
+
"../safe-active-element",
|
35
|
+
"../widget"
|
24
36
|
], factory );
|
25
37
|
} else {
|
26
38
|
|
27
39
|
// Browser globals
|
28
40
|
factory( jQuery );
|
29
41
|
}
|
30
|
-
}(function( $ ) {
|
42
|
+
}( function( $ ) {
|
31
43
|
|
32
|
-
function
|
44
|
+
function spinnerModifer( fn ) {
|
33
45
|
return function() {
|
34
46
|
var previous = this.element.val();
|
35
47
|
fn.apply( this, arguments );
|
@@ -40,11 +52,16 @@ function spinner_modifier( fn ) {
|
|
40
52
|
};
|
41
53
|
}
|
42
54
|
|
43
|
-
|
44
|
-
version: "1.
|
55
|
+
$.widget( "ui.spinner", {
|
56
|
+
version: "1.12.1",
|
45
57
|
defaultElement: "<input>",
|
46
58
|
widgetEventPrefix: "spin",
|
47
59
|
options: {
|
60
|
+
classes: {
|
61
|
+
"ui-spinner": "ui-corner-all",
|
62
|
+
"ui-spinner-down": "ui-corner-br",
|
63
|
+
"ui-spinner-up": "ui-corner-tr"
|
64
|
+
},
|
48
65
|
culture: null,
|
49
66
|
icons: {
|
50
67
|
down: "ui-icon-triangle-1-s",
|
@@ -64,6 +81,7 @@ return $.widget( "ui.spinner", {
|
|
64
81
|
},
|
65
82
|
|
66
83
|
_create: function() {
|
84
|
+
|
67
85
|
// handle string values that need to be parsed
|
68
86
|
this._setOption( "max", this.options.max );
|
69
87
|
this._setOption( "min", this.options.min );
|
@@ -72,6 +90,7 @@ return $.widget( "ui.spinner", {
|
|
72
90
|
// Only format if there is a value, prevents the field from being marked
|
73
91
|
// as invalid in Firefox, see #9573.
|
74
92
|
if ( this.value() !== "" ) {
|
93
|
+
|
75
94
|
// Format the value, but don't constrain.
|
76
95
|
this._value( this.element.val(), true );
|
77
96
|
}
|
@@ -80,26 +99,26 @@ return $.widget( "ui.spinner", {
|
|
80
99
|
this._on( this._events );
|
81
100
|
this._refresh();
|
82
101
|
|
83
|
-
//
|
102
|
+
// Turning off autocomplete prevents the browser from remembering the
|
84
103
|
// value when navigating through history, so we re-enable autocomplete
|
85
104
|
// if the page is unloaded before the widget is destroyed. #7790
|
86
105
|
this._on( this.window, {
|
87
106
|
beforeunload: function() {
|
88
107
|
this.element.removeAttr( "autocomplete" );
|
89
108
|
}
|
90
|
-
});
|
109
|
+
} );
|
91
110
|
},
|
92
111
|
|
93
112
|
_getCreateOptions: function() {
|
94
|
-
var options =
|
95
|
-
|
113
|
+
var options = this._super();
|
114
|
+
var element = this.element;
|
96
115
|
|
97
116
|
$.each( [ "min", "max", "step" ], function( i, option ) {
|
98
117
|
var value = element.attr( option );
|
99
|
-
if ( value
|
118
|
+
if ( value != null && value.length ) {
|
100
119
|
options[ option ] = value;
|
101
120
|
}
|
102
|
-
});
|
121
|
+
} );
|
103
122
|
|
104
123
|
return options;
|
105
124
|
},
|
@@ -134,9 +153,9 @@ return $.widget( "ui.spinner", {
|
|
134
153
|
return false;
|
135
154
|
}
|
136
155
|
|
137
|
-
this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
|
156
|
+
this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
|
138
157
|
clearTimeout( this.mousewheelTimer );
|
139
|
-
this.mousewheelTimer = this._delay(function() {
|
158
|
+
this.mousewheelTimer = this._delay( function() {
|
140
159
|
if ( this.spinning ) {
|
141
160
|
this._stop( event );
|
142
161
|
}
|
@@ -151,44 +170,47 @@ return $.widget( "ui.spinner", {
|
|
151
170
|
// If the input is focused then this.previous is properly set from
|
152
171
|
// when the input first received focus. If the input is not focused
|
153
172
|
// then we need to set this.previous based on the value before spinning.
|
154
|
-
previous = this.element[0] === this.document[0]
|
173
|
+
previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
|
155
174
|
this.previous : this.element.val();
|
156
175
|
function checkFocus() {
|
157
|
-
var isActive = this.element[0] === this.document[0]
|
176
|
+
var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
|
158
177
|
if ( !isActive ) {
|
159
|
-
this.element.focus
|
178
|
+
this.element.trigger( "focus" );
|
160
179
|
this.previous = previous;
|
180
|
+
|
161
181
|
// support: IE
|
162
182
|
// IE sets focus asynchronously, so we need to check if focus
|
163
183
|
// moved off of the input because the user clicked on the button.
|
164
|
-
this._delay(function() {
|
184
|
+
this._delay( function() {
|
165
185
|
this.previous = previous;
|
166
|
-
});
|
186
|
+
} );
|
167
187
|
}
|
168
188
|
}
|
169
189
|
|
170
|
-
//
|
190
|
+
// Ensure focus is on (or stays on) the text field
|
171
191
|
event.preventDefault();
|
172
192
|
checkFocus.call( this );
|
173
193
|
|
174
|
-
//
|
194
|
+
// Support: IE
|
175
195
|
// IE doesn't prevent moving focus even with event.preventDefault()
|
176
196
|
// so we set a flag to know when we should ignore the blur event
|
177
197
|
// and check (again) if focus moved off of the input.
|
178
198
|
this.cancelBlur = true;
|
179
|
-
this._delay(function() {
|
199
|
+
this._delay( function() {
|
180
200
|
delete this.cancelBlur;
|
181
201
|
checkFocus.call( this );
|
182
|
-
});
|
202
|
+
} );
|
183
203
|
|
184
204
|
if ( this._start( event ) === false ) {
|
185
205
|
return;
|
186
206
|
}
|
187
207
|
|
188
|
-
this._repeat( null, $( event.currentTarget )
|
208
|
+
this._repeat( null, $( event.currentTarget )
|
209
|
+
.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
|
189
210
|
},
|
190
211
|
"mouseup .ui-spinner-button": "_stop",
|
191
212
|
"mouseenter .ui-spinner-button": function( event ) {
|
213
|
+
|
192
214
|
// button will add ui-state-active if mouse was down while mouseleave and kept down
|
193
215
|
if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
|
194
216
|
return;
|
@@ -197,41 +219,66 @@ return $.widget( "ui.spinner", {
|
|
197
219
|
if ( this._start( event ) === false ) {
|
198
220
|
return false;
|
199
221
|
}
|
200
|
-
this._repeat( null, $( event.currentTarget )
|
222
|
+
this._repeat( null, $( event.currentTarget )
|
223
|
+
.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
|
201
224
|
},
|
225
|
+
|
202
226
|
// TODO: do we really want to consider this a stop?
|
203
227
|
// shouldn't we just stop the repeater and wait until mouseup before
|
204
228
|
// we trigger the stop event?
|
205
229
|
"mouseleave .ui-spinner-button": "_stop"
|
206
230
|
},
|
207
231
|
|
208
|
-
|
209
|
-
|
210
|
-
|
232
|
+
// Support mobile enhanced option and make backcompat more sane
|
233
|
+
_enhance: function() {
|
234
|
+
this.uiSpinner = this.element
|
211
235
|
.attr( "autocomplete", "off" )
|
212
|
-
.wrap(
|
236
|
+
.wrap( "<span>" )
|
213
237
|
.parent()
|
214
|
-
|
215
|
-
|
238
|
+
|
239
|
+
// Add buttons
|
240
|
+
.append(
|
241
|
+
"<a></a><a></a>"
|
242
|
+
);
|
243
|
+
},
|
244
|
+
|
245
|
+
_draw: function() {
|
246
|
+
this._enhance();
|
247
|
+
|
248
|
+
this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
|
249
|
+
this._addClass( "ui-spinner-input" );
|
216
250
|
|
217
251
|
this.element.attr( "role", "spinbutton" );
|
218
252
|
|
219
|
-
//
|
220
|
-
this.buttons = uiSpinner.
|
253
|
+
// Button bindings
|
254
|
+
this.buttons = this.uiSpinner.children( "a" )
|
221
255
|
.attr( "tabIndex", -1 )
|
222
|
-
.
|
223
|
-
.
|
256
|
+
.attr( "aria-hidden", true )
|
257
|
+
.button( {
|
258
|
+
classes: {
|
259
|
+
"ui-button": ""
|
260
|
+
}
|
261
|
+
} );
|
262
|
+
|
263
|
+
// TODO: Right now button does not support classes this is already updated in button PR
|
264
|
+
this._removeClass( this.buttons, "ui-corner-all" );
|
265
|
+
|
266
|
+
this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
|
267
|
+
this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
|
268
|
+
this.buttons.first().button( {
|
269
|
+
"icon": this.options.icons.up,
|
270
|
+
"showLabel": false
|
271
|
+
} );
|
272
|
+
this.buttons.last().button( {
|
273
|
+
"icon": this.options.icons.down,
|
274
|
+
"showLabel": false
|
275
|
+
} );
|
224
276
|
|
225
277
|
// IE 6 doesn't understand height: 50% for the buttons
|
226
278
|
// unless the wrapper has an explicit height
|
227
|
-
if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
|
228
|
-
uiSpinner.height() > 0 ) {
|
229
|
-
uiSpinner.height( uiSpinner.height() );
|
230
|
-
}
|
231
|
-
|
232
|
-
// disable spinner if element was already disabled
|
233
|
-
if ( this.options.disabled ) {
|
234
|
-
this.disable();
|
279
|
+
if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
|
280
|
+
this.uiSpinner.height() > 0 ) {
|
281
|
+
this.uiSpinner.height( this.uiSpinner.height() );
|
235
282
|
}
|
236
283
|
},
|
237
284
|
|
@@ -257,20 +304,6 @@ return $.widget( "ui.spinner", {
|
|
257
304
|
return false;
|
258
305
|
},
|
259
306
|
|
260
|
-
_uiSpinnerHtml: function() {
|
261
|
-
return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
|
262
|
-
},
|
263
|
-
|
264
|
-
_buttonHtml: function() {
|
265
|
-
return "" +
|
266
|
-
"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
|
267
|
-
"<span class='ui-icon " + this.options.icons.up + "'>▲</span>" +
|
268
|
-
"</a>" +
|
269
|
-
"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
|
270
|
-
"<span class='ui-icon " + this.options.icons.down + "'>▼</span>" +
|
271
|
-
"</a>";
|
272
|
-
},
|
273
|
-
|
274
307
|
_start: function( event ) {
|
275
308
|
if ( !this.spinning && this._trigger( "start", event ) === false ) {
|
276
309
|
return false;
|
@@ -287,7 +320,7 @@ return $.widget( "ui.spinner", {
|
|
287
320
|
i = i || 500;
|
288
321
|
|
289
322
|
clearTimeout( this.timer );
|
290
|
-
this.timer = this._delay(function() {
|
323
|
+
this.timer = this._delay( function() {
|
291
324
|
this._repeat( 40, steps, event );
|
292
325
|
}, i );
|
293
326
|
|
@@ -303,7 +336,7 @@ return $.widget( "ui.spinner", {
|
|
303
336
|
|
304
337
|
value = this._adjustValue( value + step * this._increment( this.counter ) );
|
305
338
|
|
306
|
-
if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
|
339
|
+
if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
|
307
340
|
this._value( value );
|
308
341
|
this.counter++;
|
309
342
|
}
|
@@ -339,20 +372,22 @@ return $.widget( "ui.spinner", {
|
|
339
372
|
var base, aboveMin,
|
340
373
|
options = this.options;
|
341
374
|
|
342
|
-
//
|
375
|
+
// Make sure we're at a valid step
|
343
376
|
// - find out where we are relative to the base (min or 0)
|
344
377
|
base = options.min !== null ? options.min : 0;
|
345
378
|
aboveMin = value - base;
|
379
|
+
|
346
380
|
// - round to the nearest step
|
347
|
-
aboveMin = Math.round(aboveMin / options.step) * options.step;
|
381
|
+
aboveMin = Math.round( aboveMin / options.step ) * options.step;
|
382
|
+
|
348
383
|
// - rounding is based on 0, so adjust back to our base
|
349
384
|
value = base + aboveMin;
|
350
385
|
|
351
|
-
//
|
386
|
+
// Fix precision from bad JS floating point math
|
352
387
|
value = parseFloat( value.toFixed( this._precision() ) );
|
353
388
|
|
354
|
-
//
|
355
|
-
if ( options.max !== null && value > options.max) {
|
389
|
+
// Clamp the value
|
390
|
+
if ( options.max !== null && value > options.max ) {
|
356
391
|
return options.max;
|
357
392
|
}
|
358
393
|
if ( options.min !== null && value < options.min ) {
|
@@ -375,8 +410,10 @@ return $.widget( "ui.spinner", {
|
|
375
410
|
},
|
376
411
|
|
377
412
|
_setOption: function( key, value ) {
|
413
|
+
var prevValue, first, last;
|
414
|
+
|
378
415
|
if ( key === "culture" || key === "numberFormat" ) {
|
379
|
-
|
416
|
+
prevValue = this._parse( this.element.val() );
|
380
417
|
this.options[ key ] = value;
|
381
418
|
this.element.val( this._format( prevValue ) );
|
382
419
|
return;
|
@@ -388,26 +425,28 @@ return $.widget( "ui.spinner", {
|
|
388
425
|
}
|
389
426
|
}
|
390
427
|
if ( key === "icons" ) {
|
391
|
-
this.buttons.first().find( ".ui-icon" )
|
392
|
-
|
393
|
-
|
394
|
-
this.buttons.last().find( ".ui-icon" )
|
395
|
-
|
396
|
-
|
428
|
+
first = this.buttons.first().find( ".ui-icon" );
|
429
|
+
this._removeClass( first, null, this.options.icons.up );
|
430
|
+
this._addClass( first, null, value.up );
|
431
|
+
last = this.buttons.last().find( ".ui-icon" );
|
432
|
+
this._removeClass( last, null, this.options.icons.down );
|
433
|
+
this._addClass( last, null, value.down );
|
397
434
|
}
|
398
435
|
|
399
436
|
this._super( key, value );
|
437
|
+
},
|
400
438
|
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
439
|
+
_setOptionDisabled: function( value ) {
|
440
|
+
this._super( value );
|
441
|
+
|
442
|
+
this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
|
443
|
+
this.element.prop( "disabled", !!value );
|
444
|
+
this.buttons.button( value ? "disable" : "enable" );
|
406
445
|
},
|
407
446
|
|
408
|
-
_setOptions:
|
447
|
+
_setOptions: spinnerModifer( function( options ) {
|
409
448
|
this._super( options );
|
410
|
-
}),
|
449
|
+
} ),
|
411
450
|
|
412
451
|
_parse: function( val ) {
|
413
452
|
if ( typeof val === "string" && val !== "" ) {
|
@@ -427,27 +466,28 @@ return $.widget( "ui.spinner", {
|
|
427
466
|
},
|
428
467
|
|
429
468
|
_refresh: function() {
|
430
|
-
this.element.attr({
|
469
|
+
this.element.attr( {
|
431
470
|
"aria-valuemin": this.options.min,
|
432
471
|
"aria-valuemax": this.options.max,
|
472
|
+
|
433
473
|
// TODO: what should we do with values that can't be parsed?
|
434
474
|
"aria-valuenow": this._parse( this.element.val() )
|
435
|
-
});
|
475
|
+
} );
|
436
476
|
},
|
437
477
|
|
438
478
|
isValid: function() {
|
439
479
|
var value = this.value();
|
440
480
|
|
441
|
-
//
|
481
|
+
// Null is invalid
|
442
482
|
if ( value === null ) {
|
443
483
|
return false;
|
444
484
|
}
|
445
485
|
|
446
|
-
//
|
486
|
+
// If value gets adjusted, it's invalid
|
447
487
|
return value === this._adjustValue( value );
|
448
488
|
},
|
449
489
|
|
450
|
-
//
|
490
|
+
// Update the value without triggering change
|
451
491
|
_value: function( value, allowAny ) {
|
452
492
|
var parsed;
|
453
493
|
if ( value !== "" ) {
|
@@ -465,54 +505,77 @@ return $.widget( "ui.spinner", {
|
|
465
505
|
|
466
506
|
_destroy: function() {
|
467
507
|
this.element
|
468
|
-
.removeClass( "ui-spinner-input" )
|
469
508
|
.prop( "disabled", false )
|
470
|
-
.removeAttr( "autocomplete" )
|
471
|
-
|
472
|
-
.removeAttr( "aria-valuemin" )
|
473
|
-
.removeAttr( "aria-valuemax" )
|
474
|
-
.removeAttr( "aria-valuenow" );
|
509
|
+
.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
|
510
|
+
|
475
511
|
this.uiSpinner.replaceWith( this.element );
|
476
512
|
},
|
477
513
|
|
478
|
-
stepUp:
|
514
|
+
stepUp: spinnerModifer( function( steps ) {
|
479
515
|
this._stepUp( steps );
|
480
|
-
}),
|
516
|
+
} ),
|
481
517
|
_stepUp: function( steps ) {
|
482
518
|
if ( this._start() ) {
|
483
|
-
this._spin( (steps || 1) * this.options.step );
|
519
|
+
this._spin( ( steps || 1 ) * this.options.step );
|
484
520
|
this._stop();
|
485
521
|
}
|
486
522
|
},
|
487
523
|
|
488
|
-
stepDown:
|
524
|
+
stepDown: spinnerModifer( function( steps ) {
|
489
525
|
this._stepDown( steps );
|
490
|
-
}),
|
526
|
+
} ),
|
491
527
|
_stepDown: function( steps ) {
|
492
528
|
if ( this._start() ) {
|
493
|
-
this._spin( (steps || 1) * -this.options.step );
|
529
|
+
this._spin( ( steps || 1 ) * -this.options.step );
|
494
530
|
this._stop();
|
495
531
|
}
|
496
532
|
},
|
497
533
|
|
498
|
-
pageUp:
|
499
|
-
this._stepUp( (pages || 1) * this.options.page );
|
500
|
-
}),
|
534
|
+
pageUp: spinnerModifer( function( pages ) {
|
535
|
+
this._stepUp( ( pages || 1 ) * this.options.page );
|
536
|
+
} ),
|
501
537
|
|
502
|
-
pageDown:
|
503
|
-
this._stepDown( (pages || 1) * this.options.page );
|
504
|
-
}),
|
538
|
+
pageDown: spinnerModifer( function( pages ) {
|
539
|
+
this._stepDown( ( pages || 1 ) * this.options.page );
|
540
|
+
} ),
|
505
541
|
|
506
542
|
value: function( newVal ) {
|
507
543
|
if ( !arguments.length ) {
|
508
544
|
return this._parse( this.element.val() );
|
509
545
|
}
|
510
|
-
|
546
|
+
spinnerModifer( this._value ).call( this, newVal );
|
511
547
|
},
|
512
548
|
|
513
549
|
widget: function() {
|
514
550
|
return this.uiSpinner;
|
515
551
|
}
|
516
|
-
});
|
552
|
+
} );
|
553
|
+
|
554
|
+
// DEPRECATED
|
555
|
+
// TODO: switch return back to widget declaration at top of file when this is removed
|
556
|
+
if ( $.uiBackCompat !== false ) {
|
557
|
+
|
558
|
+
// Backcompat for spinner html extension points
|
559
|
+
$.widget( "ui.spinner", $.ui.spinner, {
|
560
|
+
_enhance: function() {
|
561
|
+
this.uiSpinner = this.element
|
562
|
+
.attr( "autocomplete", "off" )
|
563
|
+
.wrap( this._uiSpinnerHtml() )
|
564
|
+
.parent()
|
565
|
+
|
566
|
+
// Add buttons
|
567
|
+
.append( this._buttonHtml() );
|
568
|
+
},
|
569
|
+
_uiSpinnerHtml: function() {
|
570
|
+
return "<span>";
|
571
|
+
},
|
572
|
+
|
573
|
+
_buttonHtml: function() {
|
574
|
+
return "<a></a><a></a>";
|
575
|
+
}
|
576
|
+
} );
|
577
|
+
}
|
578
|
+
|
579
|
+
return $.ui.spinner;
|
517
580
|
|
518
|
-
}));
|
581
|
+
} ) );
|