jquery-ui-rails 4.0.0 → 5.0.4
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.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/.travis.yml +0 -1
- data/Gemfile +1 -1
- data/History.md +62 -0
- data/README.md +86 -74
- data/Rakefile +69 -37
- data/VERSIONS.md +36 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/{vendor/assets/javascripts/jquery.ui.accordion.js → app/assets/javascripts/jquery-ui/accordion.js} +90 -74
- data/{vendor/assets/javascripts/jquery.ui.autocomplete.js → app/assets/javascripts/jquery-ui/autocomplete.js} +105 -91
- data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js} +60 -68
- data/{vendor/assets/javascripts/jquery.ui.core.js → app/assets/javascripts/jquery-ui/core.js} +112 -132
- data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ar.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
- data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
- data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
- data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
- data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
- data/{vendor/assets/javascripts/jquery.ui.datepicker.js → app/assets/javascripts/jquery-ui/datepicker.js} +120 -80
- data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js} +298 -190
- data/app/assets/javascripts/jquery-ui/draggable.js +1132 -0
- data/app/assets/javascripts/jquery-ui/droppable.js +418 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-blind.js → app/assets/javascripts/jquery-ui/effect-blind.js} +21 -13
- data/{vendor/assets/javascripts/jquery.ui.effect-bounce.js → app/assets/javascripts/jquery-ui/effect-bounce.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-clip.js → app/assets/javascripts/jquery-ui/effect-clip.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-drop.js → app/assets/javascripts/jquery-ui/effect-drop.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-explode.js → app/assets/javascripts/jquery-ui/effect-explode.js} +21 -11
- data/app/assets/javascripts/jquery-ui/effect-fade.js +42 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-fold.js → app/assets/javascripts/jquery-ui/effect-fold.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-highlight.js → app/assets/javascripts/jquery-ui/effect-highlight.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-pulsate.js → app/assets/javascripts/jquery-ui/effect-pulsate.js} +19 -9
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/{vendor/assets/javascripts/jquery.ui.effect-shake.js → app/assets/javascripts/jquery-ui/effect-shake.js} +20 -10
- data/{vendor/assets/javascripts/jquery.ui.effect-scale.js → app/assets/javascripts/jquery-ui/effect-size.js} +20 -105
- data/{vendor/assets/javascripts/jquery.ui.effect-slide.js → app/assets/javascripts/jquery-ui/effect-slide.js} +19 -9
- data/{vendor/assets/javascripts/jquery.ui.effect-transfer.js → app/assets/javascripts/jquery-ui/effect-transfer.js} +23 -13
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/{vendor/assets/javascripts/jquery.ui.effect.js → app/assets/javascripts/jquery-ui/effect.js} +125 -92
- data/{vendor/assets/javascripts/jquery.ui.menu.js → app/assets/javascripts/jquery-ui/menu.js} +127 -102
- data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js} +57 -27
- data/{vendor/assets/javascripts/jquery.ui.position.js → app/assets/javascripts/jquery-ui/position.js} +47 -27
- data/{vendor/assets/javascripts/jquery.ui.progressbar.js → app/assets/javascripts/jquery-ui/progressbar.js} +27 -13
- data/{vendor/assets/javascripts/jquery.ui.resizable.js → app/assets/javascripts/jquery-ui/resizable.js} +454 -243
- data/{vendor/assets/javascripts/jquery.ui.selectable.js → app/assets/javascripts/jquery-ui/selectable.js} +26 -16
- data/app/assets/javascripts/jquery-ui/selectmenu.js +620 -0
- data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js} +159 -91
- data/{vendor/assets/javascripts/jquery.ui.sortable.js → app/assets/javascripts/jquery-ui/sortable.js} +168 -114
- data/{vendor/assets/javascripts/jquery.ui.spinner.js → app/assets/javascripts/jquery-ui/spinner.js} +54 -32
- data/{vendor/assets/javascripts/jquery.ui.tabs.js → app/assets/javascripts/jquery-ui/tabs.js} +108 -73
- data/{vendor/assets/javascripts/jquery.ui.tooltip.js → app/assets/javascripts/jquery-ui/tooltip.js} +134 -75
- data/{vendor/assets/javascripts/jquery.ui.widget.js → app/assets/javascripts/jquery-ui/widget.js} +81 -44
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/{vendor/assets/stylesheets/jquery.ui.accordion.css.erb → app/assets/stylesheets/jquery-ui/accordion.css} +7 -9
- data/app/assets/stylesheets/jquery-ui/all.css +14 -0
- data/app/assets/stylesheets/jquery-ui/autocomplete.css +21 -0
- data/app/assets/stylesheets/jquery-ui/base.css +30 -0
- data/{vendor/assets/stylesheets/jquery.ui.button.css.erb → app/assets/stylesheets/jquery-ui/button.css} +5 -5
- data/{vendor/assets/stylesheets/jquery.ui.core.css.erb → app/assets/stylesheets/jquery-ui/core.css} +8 -4
- data/{vendor/assets/stylesheets/jquery.ui.datepicker.css.erb → app/assets/stylesheets/jquery-ui/datepicker.css} +6 -9
- data/{vendor/assets/stylesheets/jquery.ui.dialog.css.erb → app/assets/stylesheets/jquery-ui/dialog.css} +10 -8
- data/app/assets/stylesheets/jquery-ui/draggable.css +16 -0
- data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
- data/app/assets/stylesheets/jquery-ui/progressbar.css +32 -0
- data/{vendor/assets/stylesheets/jquery.ui.resizable.css.erb → app/assets/stylesheets/jquery-ui/resizable.css} +6 -6
- data/app/assets/stylesheets/jquery-ui/selectable.css +21 -0
- data/app/assets/stylesheets/jquery-ui/selectmenu.css +64 -0
- data/{vendor/assets/stylesheets/jquery.ui.slider.css.erb → app/assets/stylesheets/jquery-ui/slider.css} +8 -6
- data/app/assets/stylesheets/jquery-ui/sortable.css +16 -0
- data/{vendor/assets/stylesheets/jquery.ui.spinner.css.erb → app/assets/stylesheets/jquery-ui/spinner.css} +8 -8
- data/{vendor/assets/stylesheets/jquery.ui.tabs.css.erb → app/assets/stylesheets/jquery-ui/tabs.css} +11 -12
- data/{vendor/assets/stylesheets/jquery.ui.theme.css.erb → app/assets/stylesheets/jquery-ui/theme.css.erb} +29 -11
- data/{vendor/assets/stylesheets/jquery.ui.tooltip.css.erb → app/assets/stylesheets/jquery-ui/tooltip.css} +6 -4
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/lib/jquery/ui/rails/version.rb +2 -1
- metadata +155 -161
- data/vendor/assets/javascripts/jquery.ui.all.js +0 -34
- data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/vendor/assets/javascripts/jquery.ui.draggable.js +0 -950
- data/vendor/assets/javascripts/jquery.ui.droppable.js +0 -376
- data/vendor/assets/javascripts/jquery.ui.effect-fade.js +0 -32
- data/vendor/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/vendor/assets/stylesheets/jquery.ui.all.css.erb +0 -14
- data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
- data/vendor/assets/stylesheets/jquery.ui.base.css.erb +0 -27
- data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +0 -81
- data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -32
- data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +0 -19
data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js}
RENAMED
@@ -1,30 +1,36 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Slider 1.
|
6
|
+
* jQuery UI Slider 1.11.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
|
-
* Copyright
|
9
|
+
* Copyright jQuery Foundation and other contributors
|
10
10
|
* Released under the MIT license.
|
11
11
|
* http://jquery.org/license
|
12
12
|
*
|
13
13
|
* http://api.jqueryui.com/slider/
|
14
|
-
*
|
15
|
-
* Depends:
|
16
|
-
* jquery.ui.core.js
|
17
|
-
* jquery.ui.mouse.js
|
18
|
-
* jquery.ui.widget.js
|
19
14
|
*/
|
20
|
-
(function(
|
21
|
-
|
22
|
-
|
23
|
-
//
|
24
|
-
|
15
|
+
(function( factory ) {
|
16
|
+
if ( typeof define === "function" && define.amd ) {
|
17
|
+
|
18
|
+
// AMD. Register as an anonymous module.
|
19
|
+
define([
|
20
|
+
"jquery",
|
21
|
+
"./core",
|
22
|
+
"./mouse",
|
23
|
+
"./widget"
|
24
|
+
], factory );
|
25
|
+
} else {
|
26
|
+
|
27
|
+
// Browser globals
|
28
|
+
factory( jQuery );
|
29
|
+
}
|
30
|
+
}(function( $ ) {
|
25
31
|
|
26
|
-
$.widget( "ui.slider", $.ui.mouse, {
|
27
|
-
version: "1.
|
32
|
+
return $.widget( "ui.slider", $.ui.mouse, {
|
33
|
+
version: "1.11.3",
|
28
34
|
widgetEventPrefix: "slide",
|
29
35
|
|
30
36
|
options: {
|
@@ -45,19 +51,18 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
45
51
|
stop: null
|
46
52
|
},
|
47
53
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
52
|
-
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
|
53
|
-
handles = [];
|
54
|
+
// number of pages in a slider
|
55
|
+
// (how many times can you page up/down to go through the whole range)
|
56
|
+
numPages: 5,
|
54
57
|
|
58
|
+
_create: function() {
|
55
59
|
this._keySliding = false;
|
56
60
|
this._mouseSliding = false;
|
57
61
|
this._animateOff = true;
|
58
62
|
this._handleIndex = null;
|
59
63
|
this._detectOrientation();
|
60
64
|
this._mouseInit();
|
65
|
+
this._calculateNewMax();
|
61
66
|
|
62
67
|
this.element
|
63
68
|
.addClass( "ui-slider" +
|
@@ -66,29 +71,32 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
66
71
|
" ui-widget-content" +
|
67
72
|
" ui-corner-all");
|
68
73
|
|
69
|
-
this.
|
74
|
+
this._refresh();
|
75
|
+
this._setOption( "disabled", this.options.disabled );
|
70
76
|
|
71
|
-
|
72
|
-
|
73
|
-
if ( !o.values ) {
|
74
|
-
o.values = [ this._valueMin(), this._valueMin() ];
|
75
|
-
} else if ( o.values.length && o.values.length !== 2 ) {
|
76
|
-
o.values = [ o.values[0], o.values[0] ];
|
77
|
-
} else if ( $.isArray( o.values ) ) {
|
78
|
-
o.values = o.values.slice(0);
|
79
|
-
}
|
80
|
-
}
|
77
|
+
this._animateOff = false;
|
78
|
+
},
|
81
79
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
80
|
+
_refresh: function() {
|
81
|
+
this._createRange();
|
82
|
+
this._createHandles();
|
83
|
+
this._setupEvents();
|
84
|
+
this._refreshValue();
|
85
|
+
},
|
86
|
+
|
87
|
+
_createHandles: function() {
|
88
|
+
var i, handleCount,
|
89
|
+
options = this.options,
|
90
|
+
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
91
|
+
handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
|
92
|
+
handles = [];
|
90
93
|
|
91
|
-
handleCount = (
|
94
|
+
handleCount = ( options.values && options.values.length ) || 1;
|
95
|
+
|
96
|
+
if ( existingHandles.length > handleCount ) {
|
97
|
+
existingHandles.slice( handleCount ).remove();
|
98
|
+
existingHandles = existingHandles.slice( 0, handleCount );
|
99
|
+
}
|
92
100
|
|
93
101
|
for ( i = existingHandles.length; i < handleCount; i++ ) {
|
94
102
|
handles.push( handle );
|
@@ -98,46 +106,65 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
98
106
|
|
99
107
|
this.handle = this.handles.eq( 0 );
|
100
108
|
|
101
|
-
this.handles.add( this.range ).filter( "a" )
|
102
|
-
.click(function( event ) {
|
103
|
-
event.preventDefault();
|
104
|
-
})
|
105
|
-
.mouseenter(function() {
|
106
|
-
if ( !o.disabled ) {
|
107
|
-
$( this ).addClass( "ui-state-hover" );
|
108
|
-
}
|
109
|
-
})
|
110
|
-
.mouseleave(function() {
|
111
|
-
$( this ).removeClass( "ui-state-hover" );
|
112
|
-
})
|
113
|
-
.focus(function() {
|
114
|
-
if ( !o.disabled ) {
|
115
|
-
$( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
|
116
|
-
$( this ).addClass( "ui-state-focus" );
|
117
|
-
} else {
|
118
|
-
$( this ).blur();
|
119
|
-
}
|
120
|
-
})
|
121
|
-
.blur(function() {
|
122
|
-
$( this ).removeClass( "ui-state-focus" );
|
123
|
-
});
|
124
|
-
|
125
109
|
this.handles.each(function( i ) {
|
126
110
|
$( this ).data( "ui-slider-handle-index", i );
|
127
111
|
});
|
112
|
+
},
|
128
113
|
|
129
|
-
|
114
|
+
_createRange: function() {
|
115
|
+
var options = this.options,
|
116
|
+
classes = "";
|
117
|
+
|
118
|
+
if ( options.range ) {
|
119
|
+
if ( options.range === true ) {
|
120
|
+
if ( !options.values ) {
|
121
|
+
options.values = [ this._valueMin(), this._valueMin() ];
|
122
|
+
} else if ( options.values.length && options.values.length !== 2 ) {
|
123
|
+
options.values = [ options.values[0], options.values[0] ];
|
124
|
+
} else if ( $.isArray( options.values ) ) {
|
125
|
+
options.values = options.values.slice(0);
|
126
|
+
}
|
127
|
+
}
|
130
128
|
|
131
|
-
|
129
|
+
if ( !this.range || !this.range.length ) {
|
130
|
+
this.range = $( "<div></div>" )
|
131
|
+
.appendTo( this.element );
|
132
132
|
|
133
|
-
|
133
|
+
classes = "ui-slider-range" +
|
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";
|
137
|
+
} else {
|
138
|
+
this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
|
139
|
+
// Handle range switching from true to min/max
|
140
|
+
.css({
|
141
|
+
"left": "",
|
142
|
+
"bottom": ""
|
143
|
+
});
|
144
|
+
}
|
134
145
|
|
135
|
-
|
146
|
+
this.range.addClass( classes +
|
147
|
+
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
|
148
|
+
} else {
|
149
|
+
if ( this.range ) {
|
150
|
+
this.range.remove();
|
151
|
+
}
|
152
|
+
this.range = null;
|
153
|
+
}
|
154
|
+
},
|
155
|
+
|
156
|
+
_setupEvents: function() {
|
157
|
+
this._off( this.handles );
|
158
|
+
this._on( this.handles, this._handleEvents );
|
159
|
+
this._hoverable( this.handles );
|
160
|
+
this._focusable( this.handles );
|
136
161
|
},
|
137
162
|
|
138
163
|
_destroy: function() {
|
139
164
|
this.handles.remove();
|
140
|
-
this.range
|
165
|
+
if ( this.range ) {
|
166
|
+
this.range.remove();
|
167
|
+
}
|
141
168
|
|
142
169
|
this.element
|
143
170
|
.removeClass( "ui-slider" +
|
@@ -309,7 +336,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
309
336
|
} );
|
310
337
|
otherVal = this.values( index ? 0 : 1 );
|
311
338
|
if ( allowed !== false ) {
|
312
|
-
this.values( index, newVal
|
339
|
+
this.values( index, newVal );
|
313
340
|
}
|
314
341
|
}
|
315
342
|
} else {
|
@@ -405,28 +432,36 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
405
432
|
var i,
|
406
433
|
valsLength = 0;
|
407
434
|
|
435
|
+
if ( key === "range" && this.options.range === true ) {
|
436
|
+
if ( value === "min" ) {
|
437
|
+
this.options.value = this._values( 0 );
|
438
|
+
this.options.values = null;
|
439
|
+
} else if ( value === "max" ) {
|
440
|
+
this.options.value = this._values( this.options.values.length - 1 );
|
441
|
+
this.options.values = null;
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
408
445
|
if ( $.isArray( this.options.values ) ) {
|
409
446
|
valsLength = this.options.values.length;
|
410
447
|
}
|
411
448
|
|
412
|
-
|
449
|
+
if ( key === "disabled" ) {
|
450
|
+
this.element.toggleClass( "ui-state-disabled", !!value );
|
451
|
+
}
|
452
|
+
|
453
|
+
this._super( key, value );
|
413
454
|
|
414
455
|
switch ( key ) {
|
415
|
-
case "disabled":
|
416
|
-
if ( value ) {
|
417
|
-
this.handles.filter( ".ui-state-focus" ).blur();
|
418
|
-
this.handles.removeClass( "ui-state-hover" );
|
419
|
-
this.handles.prop( "disabled", true );
|
420
|
-
} else {
|
421
|
-
this.handles.prop( "disabled", false );
|
422
|
-
}
|
423
|
-
break;
|
424
456
|
case "orientation":
|
425
457
|
this._detectOrientation();
|
426
458
|
this.element
|
427
459
|
.removeClass( "ui-slider-horizontal ui-slider-vertical" )
|
428
460
|
.addClass( "ui-slider-" + this.orientation );
|
429
461
|
this._refreshValue();
|
462
|
+
|
463
|
+
// Reset positioning from previous orientation
|
464
|
+
this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
|
430
465
|
break;
|
431
466
|
case "value":
|
432
467
|
this._animateOff = true;
|
@@ -442,12 +477,19 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
442
477
|
}
|
443
478
|
this._animateOff = false;
|
444
479
|
break;
|
480
|
+
case "step":
|
445
481
|
case "min":
|
446
482
|
case "max":
|
447
483
|
this._animateOff = true;
|
484
|
+
this._calculateNewMax();
|
448
485
|
this._refreshValue();
|
449
486
|
this._animateOff = false;
|
450
487
|
break;
|
488
|
+
case "range":
|
489
|
+
this._animateOff = true;
|
490
|
+
this._refresh();
|
491
|
+
this._animateOff = false;
|
492
|
+
break;
|
451
493
|
}
|
452
494
|
},
|
453
495
|
|
@@ -473,15 +515,17 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
473
515
|
val = this._trimAlignValue( val );
|
474
516
|
|
475
517
|
return val;
|
476
|
-
} else {
|
518
|
+
} else if ( this.options.values && this.options.values.length ) {
|
477
519
|
// .slice() creates a copy of the array
|
478
520
|
// this copy gets trimmed by min and max and then returned
|
479
521
|
vals = this.options.values.slice();
|
480
|
-
for ( i = 0; i < vals.length; i+= 1) {
|
522
|
+
for ( i = 0; i < vals.length; i += 1) {
|
481
523
|
vals[ i ] = this._trimAlignValue( vals[ i ] );
|
482
524
|
}
|
483
525
|
|
484
526
|
return vals;
|
527
|
+
} else {
|
528
|
+
return [];
|
485
529
|
}
|
486
530
|
},
|
487
531
|
|
@@ -506,12 +550,35 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
506
550
|
return parseFloat( alignValue.toFixed(5) );
|
507
551
|
},
|
508
552
|
|
553
|
+
_calculateNewMax: function() {
|
554
|
+
var max = this.options.max,
|
555
|
+
min = this._valueMin(),
|
556
|
+
step = this.options.step,
|
557
|
+
aboveMin = Math.floor( ( max - min ) / step ) * step;
|
558
|
+
max = aboveMin + min;
|
559
|
+
this.max = parseFloat( max.toFixed( this._precision() ) );
|
560
|
+
},
|
561
|
+
|
562
|
+
_precision: function() {
|
563
|
+
var precision = this._precisionOf( this.options.step );
|
564
|
+
if ( this.options.min !== null ) {
|
565
|
+
precision = Math.max( precision, this._precisionOf( this.options.min ) );
|
566
|
+
}
|
567
|
+
return precision;
|
568
|
+
},
|
569
|
+
|
570
|
+
_precisionOf: function( num ) {
|
571
|
+
var str = num.toString(),
|
572
|
+
decimal = str.indexOf( "." );
|
573
|
+
return decimal === -1 ? 0 : str.length - decimal - 1;
|
574
|
+
},
|
575
|
+
|
509
576
|
_valueMin: function() {
|
510
577
|
return this.options.min;
|
511
578
|
},
|
512
579
|
|
513
580
|
_valueMax: function() {
|
514
|
-
return this.
|
581
|
+
return this.max;
|
515
582
|
},
|
516
583
|
|
517
584
|
_refreshValue: function() {
|
@@ -573,7 +640,6 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
573
640
|
|
574
641
|
_handleEvents: {
|
575
642
|
keydown: function( event ) {
|
576
|
-
/*jshint maxcomplexity:25*/
|
577
643
|
var allowed, curVal, newVal, step,
|
578
644
|
index = $( event.target ).data( "ui-slider-handle-index" );
|
579
645
|
|
@@ -613,10 +679,13 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
613
679
|
newVal = this._valueMax();
|
614
680
|
break;
|
615
681
|
case $.ui.keyCode.PAGE_UP:
|
616
|
-
newVal = this._trimAlignValue(
|
682
|
+
newVal = this._trimAlignValue(
|
683
|
+
curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
|
684
|
+
);
|
617
685
|
break;
|
618
686
|
case $.ui.keyCode.PAGE_DOWN:
|
619
|
-
newVal = this._trimAlignValue(
|
687
|
+
newVal = this._trimAlignValue(
|
688
|
+
curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );
|
620
689
|
break;
|
621
690
|
case $.ui.keyCode.UP:
|
622
691
|
case $.ui.keyCode.RIGHT:
|
@@ -647,7 +716,6 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
647
716
|
}
|
648
717
|
}
|
649
718
|
}
|
650
|
-
|
651
719
|
});
|
652
720
|
|
653
|
-
}
|
721
|
+
}));
|