jquery-ui-rails 5.0.4 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,40 +1,61 @@
|
|
1
|
-
//= require jquery-ui/
|
1
|
+
//= require jquery-ui/widgets/mouse
|
2
|
+
//= require jquery-ui/keycode
|
3
|
+
//= require jquery-ui/version
|
2
4
|
//= require jquery-ui/widget
|
3
|
-
//= require jquery-ui/mouse
|
4
5
|
|
5
6
|
/*!
|
6
|
-
* jQuery UI Slider 1.
|
7
|
+
* jQuery UI Slider 1.13.0
|
7
8
|
* http://jqueryui.com
|
8
9
|
*
|
9
10
|
* Copyright jQuery Foundation and other contributors
|
10
11
|
* Released under the MIT license.
|
11
12
|
* http://jquery.org/license
|
12
|
-
*
|
13
|
-
* http://api.jqueryui.com/slider/
|
14
13
|
*/
|
15
|
-
|
14
|
+
|
15
|
+
//>>label: Slider
|
16
|
+
//>>group: Widgets
|
17
|
+
//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
|
18
|
+
//>>docs: http://api.jqueryui.com/slider/
|
19
|
+
//>>demos: http://jqueryui.com/slider/
|
20
|
+
//>>css.structure: ../../themes/base/core.css
|
21
|
+
//>>css.structure: ../../themes/base/slider.css
|
22
|
+
//>>css.theme: ../../themes/base/theme.css
|
23
|
+
|
24
|
+
( function( factory ) {
|
25
|
+
"use strict";
|
26
|
+
|
16
27
|
if ( typeof define === "function" && define.amd ) {
|
17
28
|
|
18
29
|
// AMD. Register as an anonymous module.
|
19
|
-
define([
|
30
|
+
define( [
|
20
31
|
"jquery",
|
21
|
-
"./core",
|
22
32
|
"./mouse",
|
23
|
-
"
|
33
|
+
"../keycode",
|
34
|
+
"../version",
|
35
|
+
"../widget"
|
24
36
|
], factory );
|
25
37
|
} else {
|
26
38
|
|
27
39
|
// Browser globals
|
28
40
|
factory( jQuery );
|
29
41
|
}
|
30
|
-
}(function( $ ) {
|
42
|
+
} )( function( $ ) {
|
43
|
+
"use strict";
|
31
44
|
|
32
45
|
return $.widget( "ui.slider", $.ui.mouse, {
|
33
|
-
version: "1.
|
46
|
+
version: "1.13.0",
|
34
47
|
widgetEventPrefix: "slide",
|
35
48
|
|
36
49
|
options: {
|
37
50
|
animate: false,
|
51
|
+
classes: {
|
52
|
+
"ui-slider": "ui-corner-all",
|
53
|
+
"ui-slider-handle": "ui-corner-all",
|
54
|
+
|
55
|
+
// Note: ui-widget-header isn't the most fittingly semantic framework class for this
|
56
|
+
// element, but worked best visually with a variety of themes
|
57
|
+
"ui-slider-range": "ui-corner-all ui-widget-header"
|
58
|
+
},
|
38
59
|
distance: 0,
|
39
60
|
max: 100,
|
40
61
|
min: 0,
|
@@ -44,14 +65,14 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
44
65
|
value: 0,
|
45
66
|
values: null,
|
46
67
|
|
47
|
-
//
|
68
|
+
// Callbacks
|
48
69
|
change: null,
|
49
70
|
slide: null,
|
50
71
|
start: null,
|
51
72
|
stop: null
|
52
73
|
},
|
53
74
|
|
54
|
-
//
|
75
|
+
// Number of pages in a slider
|
55
76
|
// (how many times can you page up/down to go through the whole range)
|
56
77
|
numPages: 5,
|
57
78
|
|
@@ -64,15 +85,10 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
64
85
|
this._mouseInit();
|
65
86
|
this._calculateNewMax();
|
66
87
|
|
67
|
-
this.
|
68
|
-
|
69
|
-
" ui-slider-" + this.orientation +
|
70
|
-
" ui-widget" +
|
71
|
-
" ui-widget-content" +
|
72
|
-
" ui-corner-all");
|
88
|
+
this._addClass( "ui-slider ui-slider-" + this.orientation,
|
89
|
+
"ui-widget ui-widget-content" );
|
73
90
|
|
74
91
|
this._refresh();
|
75
|
-
this._setOption( "disabled", this.options.disabled );
|
76
92
|
|
77
93
|
this._animateOff = false;
|
78
94
|
},
|
@@ -87,8 +103,8 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
87
103
|
_createHandles: function() {
|
88
104
|
var i, handleCount,
|
89
105
|
options = this.options,
|
90
|
-
existingHandles = this.element.find( ".ui-slider-handle" )
|
91
|
-
handle = "<span
|
106
|
+
existingHandles = this.element.find( ".ui-slider-handle" ),
|
107
|
+
handle = "<span tabindex='0'></span>",
|
92
108
|
handles = [];
|
93
109
|
|
94
110
|
handleCount = ( options.values && options.values.length ) || 1;
|
@@ -104,47 +120,48 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
104
120
|
|
105
121
|
this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
|
106
122
|
|
123
|
+
this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
|
124
|
+
|
107
125
|
this.handle = this.handles.eq( 0 );
|
108
126
|
|
109
|
-
this.handles.each(function( i ) {
|
110
|
-
$( this )
|
111
|
-
|
127
|
+
this.handles.each( function( i ) {
|
128
|
+
$( this )
|
129
|
+
.data( "ui-slider-handle-index", i )
|
130
|
+
.attr( "tabIndex", 0 );
|
131
|
+
} );
|
112
132
|
},
|
113
133
|
|
114
134
|
_createRange: function() {
|
115
|
-
var options = this.options
|
116
|
-
classes = "";
|
135
|
+
var options = this.options;
|
117
136
|
|
118
137
|
if ( options.range ) {
|
119
138
|
if ( options.range === true ) {
|
120
139
|
if ( !options.values ) {
|
121
140
|
options.values = [ this._valueMin(), this._valueMin() ];
|
122
141
|
} else if ( options.values.length && options.values.length !== 2 ) {
|
123
|
-
options.values = [ options.values[0], options.values[0] ];
|
124
|
-
} else if (
|
125
|
-
options.values = options.values.slice(0);
|
142
|
+
options.values = [ options.values[ 0 ], options.values[ 0 ] ];
|
143
|
+
} else if ( Array.isArray( options.values ) ) {
|
144
|
+
options.values = options.values.slice( 0 );
|
126
145
|
}
|
127
146
|
}
|
128
147
|
|
129
148
|
if ( !this.range || !this.range.length ) {
|
130
|
-
this.range = $( "<div
|
149
|
+
this.range = $( "<div>" )
|
131
150
|
.appendTo( this.element );
|
132
151
|
|
133
|
-
|
134
|
-
// note: this isn't the most fittingly semantic framework class for this element,
|
135
|
-
// but worked best visually with a variety of themes
|
136
|
-
" ui-widget-header ui-corner-all";
|
152
|
+
this._addClass( this.range, "ui-slider-range" );
|
137
153
|
} else {
|
138
|
-
this.
|
139
|
-
// Handle range switching from true to min/max
|
140
|
-
.css({
|
141
|
-
"left": "",
|
142
|
-
"bottom": ""
|
143
|
-
});
|
144
|
-
}
|
154
|
+
this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
|
145
155
|
|
146
|
-
|
147
|
-
|
156
|
+
// Handle range switching from true to min/max
|
157
|
+
this.range.css( {
|
158
|
+
"left": "",
|
159
|
+
"bottom": ""
|
160
|
+
} );
|
161
|
+
}
|
162
|
+
if ( options.range === "min" || options.range === "max" ) {
|
163
|
+
this._addClass( this.range, "ui-slider-range-" + options.range );
|
164
|
+
}
|
148
165
|
} else {
|
149
166
|
if ( this.range ) {
|
150
167
|
this.range.remove();
|
@@ -166,14 +183,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
166
183
|
this.range.remove();
|
167
184
|
}
|
168
185
|
|
169
|
-
this.element
|
170
|
-
.removeClass( "ui-slider" +
|
171
|
-
" ui-slider-horizontal" +
|
172
|
-
" ui-slider-vertical" +
|
173
|
-
" ui-widget" +
|
174
|
-
" ui-widget-content" +
|
175
|
-
" ui-corner-all" );
|
176
|
-
|
177
186
|
this._mouseDestroy();
|
178
187
|
},
|
179
188
|
|
@@ -195,16 +204,16 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
195
204
|
position = { x: event.pageX, y: event.pageY };
|
196
205
|
normValue = this._normValueFromMouse( position );
|
197
206
|
distance = this._valueMax() - this._valueMin() + 1;
|
198
|
-
this.handles.each(function( i ) {
|
199
|
-
var thisDistance = Math.abs( normValue - that.values(i) );
|
200
|
-
if (( distance > thisDistance ) ||
|
207
|
+
this.handles.each( function( i ) {
|
208
|
+
var thisDistance = Math.abs( normValue - that.values( i ) );
|
209
|
+
if ( ( distance > thisDistance ) ||
|
201
210
|
( distance === thisDistance &&
|
202
|
-
(i === that._lastChangedValue || that.values(i) === o.min ))) {
|
211
|
+
( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
|
203
212
|
distance = thisDistance;
|
204
213
|
closestHandle = $( this );
|
205
214
|
index = i;
|
206
215
|
}
|
207
|
-
});
|
216
|
+
} );
|
208
217
|
|
209
218
|
allowed = this._start( event, index );
|
210
219
|
if ( allowed === false ) {
|
@@ -214,9 +223,8 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
214
223
|
|
215
224
|
this._handleIndex = index;
|
216
225
|
|
217
|
-
closestHandle
|
218
|
-
|
219
|
-
.focus();
|
226
|
+
this._addClass( closestHandle, null, "ui-state-active" );
|
227
|
+
closestHandle.trigger( "focus" );
|
220
228
|
|
221
229
|
offset = closestHandle.offset();
|
222
230
|
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
|
@@ -224,9 +232,9 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
224
232
|
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
|
225
233
|
top: event.pageY - offset.top -
|
226
234
|
( closestHandle.height() / 2 ) -
|
227
|
-
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
|
228
|
-
( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
|
229
|
-
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
|
235
|
+
( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
|
236
|
+
( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
|
237
|
+
( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
|
230
238
|
};
|
231
239
|
|
232
240
|
if ( !this.handles.hasClass( "ui-state-hover" ) ) {
|
@@ -250,7 +258,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
250
258
|
},
|
251
259
|
|
252
260
|
_mouseStop: function( event ) {
|
253
|
-
this.
|
261
|
+
this._removeClass( this.handles, null, "ui-state-active" );
|
254
262
|
this._mouseSliding = false;
|
255
263
|
|
256
264
|
this._stop( event, this._handleIndex );
|
@@ -276,10 +284,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
276
284
|
|
277
285
|
if ( this.orientation === "horizontal" ) {
|
278
286
|
pixelTotal = this.elementSize.width;
|
279
|
-
pixelMouse = position.x - this.elementOffset.left -
|
287
|
+
pixelMouse = position.x - this.elementOffset.left -
|
288
|
+
( this._clickOffset ? this._clickOffset.left : 0 );
|
280
289
|
} else {
|
281
290
|
pixelTotal = this.elementSize.height;
|
282
|
-
pixelMouse = position.y - this.elementOffset.top -
|
291
|
+
pixelMouse = position.y - this.elementOffset.top -
|
292
|
+
( this._clickOffset ? this._clickOffset.top : 0 );
|
283
293
|
}
|
284
294
|
|
285
295
|
percentMouse = ( pixelMouse / pixelTotal );
|
@@ -299,88 +309,73 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
299
309
|
return this._trimAlignValue( valueMouse );
|
300
310
|
},
|
301
311
|
|
302
|
-
|
312
|
+
_uiHash: function( index, value, values ) {
|
303
313
|
var uiHash = {
|
304
314
|
handle: this.handles[ index ],
|
305
|
-
|
315
|
+
handleIndex: index,
|
316
|
+
value: value !== undefined ? value : this.value()
|
306
317
|
};
|
307
|
-
|
308
|
-
|
309
|
-
uiHash.
|
318
|
+
|
319
|
+
if ( this._hasMultipleValues() ) {
|
320
|
+
uiHash.value = value !== undefined ? value : this.values( index );
|
321
|
+
uiHash.values = values || this.values();
|
310
322
|
}
|
311
|
-
|
323
|
+
|
324
|
+
return uiHash;
|
325
|
+
},
|
326
|
+
|
327
|
+
_hasMultipleValues: function() {
|
328
|
+
return this.options.values && this.options.values.length;
|
329
|
+
},
|
330
|
+
|
331
|
+
_start: function( event, index ) {
|
332
|
+
return this._trigger( "start", event, this._uiHash( index ) );
|
312
333
|
},
|
313
334
|
|
314
335
|
_slide: function( event, index, newVal ) {
|
315
|
-
var otherVal,
|
316
|
-
|
317
|
-
|
336
|
+
var allowed, otherVal,
|
337
|
+
currentValue = this.value(),
|
338
|
+
newValues = this.values();
|
318
339
|
|
319
|
-
if ( this.
|
340
|
+
if ( this._hasMultipleValues() ) {
|
320
341
|
otherVal = this.values( index ? 0 : 1 );
|
342
|
+
currentValue = this.values( index );
|
321
343
|
|
322
|
-
if (
|
323
|
-
|
324
|
-
) {
|
325
|
-
newVal = otherVal;
|
344
|
+
if ( this.options.values.length === 2 && this.options.range === true ) {
|
345
|
+
newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
|
326
346
|
}
|
327
347
|
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
348
|
+
newValues[ index ] = newVal;
|
349
|
+
}
|
350
|
+
|
351
|
+
if ( newVal === currentValue ) {
|
352
|
+
return;
|
353
|
+
}
|
354
|
+
|
355
|
+
allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
|
356
|
+
|
357
|
+
// A slide can be canceled by returning false from the slide callback
|
358
|
+
if ( allowed === false ) {
|
359
|
+
return;
|
360
|
+
}
|
361
|
+
|
362
|
+
if ( this._hasMultipleValues() ) {
|
363
|
+
this.values( index, newVal );
|
342
364
|
} else {
|
343
|
-
|
344
|
-
// A slide can be canceled by returning false from the slide callback
|
345
|
-
allowed = this._trigger( "slide", event, {
|
346
|
-
handle: this.handles[ index ],
|
347
|
-
value: newVal
|
348
|
-
} );
|
349
|
-
if ( allowed !== false ) {
|
350
|
-
this.value( newVal );
|
351
|
-
}
|
352
|
-
}
|
365
|
+
this.value( newVal );
|
353
366
|
}
|
354
367
|
},
|
355
368
|
|
356
369
|
_stop: function( event, index ) {
|
357
|
-
|
358
|
-
handle: this.handles[ index ],
|
359
|
-
value: this.value()
|
360
|
-
};
|
361
|
-
if ( this.options.values && this.options.values.length ) {
|
362
|
-
uiHash.value = this.values( index );
|
363
|
-
uiHash.values = this.values();
|
364
|
-
}
|
365
|
-
|
366
|
-
this._trigger( "stop", event, uiHash );
|
370
|
+
this._trigger( "stop", event, this._uiHash( index ) );
|
367
371
|
},
|
368
372
|
|
369
373
|
_change: function( event, index ) {
|
370
374
|
if ( !this._keySliding && !this._mouseSliding ) {
|
371
|
-
var uiHash = {
|
372
|
-
handle: this.handles[ index ],
|
373
|
-
value: this.value()
|
374
|
-
};
|
375
|
-
if ( this.options.values && this.options.values.length ) {
|
376
|
-
uiHash.value = this.values( index );
|
377
|
-
uiHash.values = this.values();
|
378
|
-
}
|
379
375
|
|
380
376
|
//store the last changed value index for reference when handles overlap
|
381
377
|
this._lastChangedValue = index;
|
382
|
-
|
383
|
-
this._trigger( "change", event, uiHash );
|
378
|
+
this._trigger( "change", event, this._uiHash( index ) );
|
384
379
|
}
|
385
380
|
},
|
386
381
|
|
@@ -408,7 +403,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
408
403
|
}
|
409
404
|
|
410
405
|
if ( arguments.length ) {
|
411
|
-
if (
|
406
|
+
if ( Array.isArray( arguments[ 0 ] ) ) {
|
412
407
|
vals = this.options.values;
|
413
408
|
newValues = arguments[ 0 ];
|
414
409
|
for ( i = 0; i < vals.length; i += 1 ) {
|
@@ -417,7 +412,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
417
412
|
}
|
418
413
|
this._refreshValue();
|
419
414
|
} else {
|
420
|
-
if ( this.
|
415
|
+
if ( this._hasMultipleValues() ) {
|
421
416
|
return this._values( index );
|
422
417
|
} else {
|
423
418
|
return this.value();
|
@@ -442,23 +437,21 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
442
437
|
}
|
443
438
|
}
|
444
439
|
|
445
|
-
if (
|
440
|
+
if ( Array.isArray( this.options.values ) ) {
|
446
441
|
valsLength = this.options.values.length;
|
447
442
|
}
|
448
443
|
|
449
|
-
if ( key === "disabled" ) {
|
450
|
-
this.element.toggleClass( "ui-state-disabled", !!value );
|
451
|
-
}
|
452
|
-
|
453
444
|
this._super( key, value );
|
454
445
|
|
455
446
|
switch ( key ) {
|
456
447
|
case "orientation":
|
457
448
|
this._detectOrientation();
|
458
|
-
this.
|
459
|
-
.
|
460
|
-
.addClass( "ui-slider-" + this.orientation );
|
449
|
+
this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
|
450
|
+
._addClass( "ui-slider-" + this.orientation );
|
461
451
|
this._refreshValue();
|
452
|
+
if ( this.options.range ) {
|
453
|
+
this._refreshRange( value );
|
454
|
+
}
|
462
455
|
|
463
456
|
// Reset positioning from previous orientation
|
464
457
|
this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
|
@@ -472,7 +465,9 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
472
465
|
case "values":
|
473
466
|
this._animateOff = true;
|
474
467
|
this._refreshValue();
|
475
|
-
|
468
|
+
|
469
|
+
// Start from the last handle to prevent unreachable handles (#9046)
|
470
|
+
for ( i = valsLength - 1; i >= 0; i-- ) {
|
476
471
|
this._change( null, i );
|
477
472
|
}
|
478
473
|
this._animateOff = false;
|
@@ -493,6 +488,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
493
488
|
}
|
494
489
|
},
|
495
490
|
|
491
|
+
_setOptionDisabled: function( value ) {
|
492
|
+
this._super( value );
|
493
|
+
|
494
|
+
this._toggleClass( null, "ui-state-disabled", !!value );
|
495
|
+
},
|
496
|
+
|
496
497
|
//internal value getter
|
497
498
|
// _value() returns value trimmed by min and max, aligned by step
|
498
499
|
_value: function() {
|
@@ -515,11 +516,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
515
516
|
val = this._trimAlignValue( val );
|
516
517
|
|
517
518
|
return val;
|
518
|
-
} else if ( this.
|
519
|
+
} else if ( this._hasMultipleValues() ) {
|
520
|
+
|
519
521
|
// .slice() creates a copy of the array
|
520
522
|
// this copy gets trimmed by min and max and then returned
|
521
523
|
vals = this.options.values.slice();
|
522
|
-
for ( i = 0; i < vals.length; i += 1) {
|
524
|
+
for ( i = 0; i < vals.length; i += 1 ) {
|
523
525
|
vals[ i ] = this._trimAlignValue( vals[ i ] );
|
524
526
|
}
|
525
527
|
|
@@ -529,7 +531,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
529
531
|
}
|
530
532
|
},
|
531
533
|
|
532
|
-
//
|
534
|
+
// Returns the step-aligned value that val is closest to, between (inclusive) min and max
|
533
535
|
_trimAlignValue: function( val ) {
|
534
536
|
if ( val <= this._valueMin() ) {
|
535
537
|
return this._valueMin();
|
@@ -538,24 +540,29 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
538
540
|
return this._valueMax();
|
539
541
|
}
|
540
542
|
var step = ( this.options.step > 0 ) ? this.options.step : 1,
|
541
|
-
valModStep = (val - this._valueMin()) % step,
|
543
|
+
valModStep = ( val - this._valueMin() ) % step,
|
542
544
|
alignValue = val - valModStep;
|
543
545
|
|
544
|
-
if ( Math.abs(valModStep) * 2 >= step ) {
|
546
|
+
if ( Math.abs( valModStep ) * 2 >= step ) {
|
545
547
|
alignValue += ( valModStep > 0 ) ? step : ( -step );
|
546
548
|
}
|
547
549
|
|
548
550
|
// Since JavaScript has problems with large floats, round
|
549
551
|
// the final value to 5 digits after the decimal point (see #4124)
|
550
|
-
return parseFloat( alignValue.toFixed(5) );
|
552
|
+
return parseFloat( alignValue.toFixed( 5 ) );
|
551
553
|
},
|
552
554
|
|
553
555
|
_calculateNewMax: function() {
|
554
556
|
var max = this.options.max,
|
555
557
|
min = this._valueMin(),
|
556
558
|
step = this.options.step,
|
557
|
-
aboveMin = Math.
|
559
|
+
aboveMin = Math.round( ( max - min ) / step ) * step;
|
558
560
|
max = aboveMin + min;
|
561
|
+
if ( max > this.options.max ) {
|
562
|
+
|
563
|
+
//If max is not divisible by step, rounding off may increase its value
|
564
|
+
max -= step;
|
565
|
+
}
|
559
566
|
this.max = parseFloat( max.toFixed( this._precision() ) );
|
560
567
|
},
|
561
568
|
|
@@ -581,6 +588,15 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
581
588
|
return this.max;
|
582
589
|
},
|
583
590
|
|
591
|
+
_refreshRange: function( orientation ) {
|
592
|
+
if ( orientation === "vertical" ) {
|
593
|
+
this.range.css( { "width": "", "left": "" } );
|
594
|
+
}
|
595
|
+
if ( orientation === "horizontal" ) {
|
596
|
+
this.range.css( { "height": "", "bottom": "" } );
|
597
|
+
}
|
598
|
+
},
|
599
|
+
|
584
600
|
_refreshValue: function() {
|
585
601
|
var lastValPercent, valPercent, value, valueMin, valueMax,
|
586
602
|
oRange = this.options.range,
|
@@ -589,30 +605,45 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
589
605
|
animate = ( !this._animateOff ) ? o.animate : false,
|
590
606
|
_set = {};
|
591
607
|
|
592
|
-
if ( this.
|
593
|
-
this.handles.each(function( i ) {
|
594
|
-
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() -
|
608
|
+
if ( this._hasMultipleValues() ) {
|
609
|
+
this.handles.each( function( i ) {
|
610
|
+
valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
|
611
|
+
that._valueMin() ) * 100;
|
595
612
|
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
596
613
|
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
597
614
|
if ( that.options.range === true ) {
|
598
615
|
if ( that.orientation === "horizontal" ) {
|
599
616
|
if ( i === 0 ) {
|
600
|
-
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
617
|
+
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
618
|
+
left: valPercent + "%"
|
619
|
+
}, o.animate );
|
601
620
|
}
|
602
621
|
if ( i === 1 ) {
|
603
|
-
that.range[ animate ? "animate" : "css" ]( {
|
622
|
+
that.range[ animate ? "animate" : "css" ]( {
|
623
|
+
width: ( valPercent - lastValPercent ) + "%"
|
624
|
+
}, {
|
625
|
+
queue: false,
|
626
|
+
duration: o.animate
|
627
|
+
} );
|
604
628
|
}
|
605
629
|
} else {
|
606
630
|
if ( i === 0 ) {
|
607
|
-
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
631
|
+
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
632
|
+
bottom: ( valPercent ) + "%"
|
633
|
+
}, o.animate );
|
608
634
|
}
|
609
635
|
if ( i === 1 ) {
|
610
|
-
that.range[ animate ? "animate" : "css" ]( {
|
636
|
+
that.range[ animate ? "animate" : "css" ]( {
|
637
|
+
height: ( valPercent - lastValPercent ) + "%"
|
638
|
+
}, {
|
639
|
+
queue: false,
|
640
|
+
duration: o.animate
|
641
|
+
} );
|
611
642
|
}
|
612
643
|
}
|
613
644
|
}
|
614
645
|
lastValPercent = valPercent;
|
615
|
-
});
|
646
|
+
} );
|
616
647
|
} else {
|
617
648
|
value = this.value();
|
618
649
|
valueMin = this._valueMin();
|
@@ -624,16 +655,24 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
624
655
|
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
625
656
|
|
626
657
|
if ( oRange === "min" && this.orientation === "horizontal" ) {
|
627
|
-
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
658
|
+
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
659
|
+
width: valPercent + "%"
|
660
|
+
}, o.animate );
|
628
661
|
}
|
629
662
|
if ( oRange === "max" && this.orientation === "horizontal" ) {
|
630
|
-
this.range[ animate ? "animate" : "css" ]( {
|
663
|
+
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
664
|
+
width: ( 100 - valPercent ) + "%"
|
665
|
+
}, o.animate );
|
631
666
|
}
|
632
667
|
if ( oRange === "min" && this.orientation === "vertical" ) {
|
633
|
-
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
668
|
+
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
669
|
+
height: valPercent + "%"
|
670
|
+
}, o.animate );
|
634
671
|
}
|
635
672
|
if ( oRange === "max" && this.orientation === "vertical" ) {
|
636
|
-
this.range[ animate ? "animate" : "css" ]( {
|
673
|
+
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
|
674
|
+
height: ( 100 - valPercent ) + "%"
|
675
|
+
}, o.animate );
|
637
676
|
}
|
638
677
|
}
|
639
678
|
},
|
@@ -655,7 +694,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
655
694
|
event.preventDefault();
|
656
695
|
if ( !this._keySliding ) {
|
657
696
|
this._keySliding = true;
|
658
|
-
$( event.target )
|
697
|
+
this._addClass( $( event.target ), null, "ui-state-active" );
|
659
698
|
allowed = this._start( event, index );
|
660
699
|
if ( allowed === false ) {
|
661
700
|
return;
|
@@ -665,7 +704,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
665
704
|
}
|
666
705
|
|
667
706
|
step = this.options.step;
|
668
|
-
if ( this.
|
707
|
+
if ( this._hasMultipleValues() ) {
|
669
708
|
curVal = newVal = this.values( index );
|
670
709
|
} else {
|
671
710
|
curVal = newVal = this.value();
|
@@ -685,7 +724,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
685
724
|
break;
|
686
725
|
case $.ui.keyCode.PAGE_DOWN:
|
687
726
|
newVal = this._trimAlignValue(
|
688
|
-
curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );
|
727
|
+
curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
|
689
728
|
break;
|
690
729
|
case $.ui.keyCode.UP:
|
691
730
|
case $.ui.keyCode.RIGHT:
|
@@ -712,10 +751,10 @@ return $.widget( "ui.slider", $.ui.mouse, {
|
|
712
751
|
this._keySliding = false;
|
713
752
|
this._stop( event, index );
|
714
753
|
this._change( event, index );
|
715
|
-
$( event.target )
|
754
|
+
this._removeClass( $( event.target ), null, "ui-state-active" );
|
716
755
|
}
|
717
756
|
}
|
718
757
|
}
|
719
|
-
});
|
758
|
+
} );
|
720
759
|
|
721
|
-
})
|
760
|
+
} );
|