jquery-ui-rails 5.0.5 → 6.0.1
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 +16 -0
- data/README.md +67 -50
- data/Rakefile +51 -27
- data/VERSIONS.md +2 -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 +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/javascripts/jquery-ui.js +52 -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 +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
@@ -0,0 +1,314 @@
|
|
1
|
+
//= require jquery-ui/widgets/mouse
|
2
|
+
//= require jquery-ui/version
|
3
|
+
//= require jquery-ui/widget
|
4
|
+
|
5
|
+
/*!
|
6
|
+
* jQuery UI Selectable 1.12.1
|
7
|
+
* http://jqueryui.com
|
8
|
+
*
|
9
|
+
* Copyright jQuery Foundation and other contributors
|
10
|
+
* Released under the MIT license.
|
11
|
+
* http://jquery.org/license
|
12
|
+
*/
|
13
|
+
|
14
|
+
//>>label: Selectable
|
15
|
+
//>>group: Interactions
|
16
|
+
//>>description: Allows groups of elements to be selected with the mouse.
|
17
|
+
//>>docs: http://api.jqueryui.com/selectable/
|
18
|
+
//>>demos: http://jqueryui.com/selectable/
|
19
|
+
//>>css.structure: ../../themes/base/selectable.css
|
20
|
+
|
21
|
+
( function( factory ) {
|
22
|
+
if ( typeof define === "function" && define.amd ) {
|
23
|
+
|
24
|
+
// AMD. Register as an anonymous module.
|
25
|
+
define( [
|
26
|
+
"jquery",
|
27
|
+
"./mouse",
|
28
|
+
"../version",
|
29
|
+
"../widget"
|
30
|
+
], factory );
|
31
|
+
} else {
|
32
|
+
|
33
|
+
// Browser globals
|
34
|
+
factory( jQuery );
|
35
|
+
}
|
36
|
+
}( function( $ ) {
|
37
|
+
|
38
|
+
return $.widget( "ui.selectable", $.ui.mouse, {
|
39
|
+
version: "1.12.1",
|
40
|
+
options: {
|
41
|
+
appendTo: "body",
|
42
|
+
autoRefresh: true,
|
43
|
+
distance: 0,
|
44
|
+
filter: "*",
|
45
|
+
tolerance: "touch",
|
46
|
+
|
47
|
+
// Callbacks
|
48
|
+
selected: null,
|
49
|
+
selecting: null,
|
50
|
+
start: null,
|
51
|
+
stop: null,
|
52
|
+
unselected: null,
|
53
|
+
unselecting: null
|
54
|
+
},
|
55
|
+
_create: function() {
|
56
|
+
var that = this;
|
57
|
+
|
58
|
+
this._addClass( "ui-selectable" );
|
59
|
+
|
60
|
+
this.dragged = false;
|
61
|
+
|
62
|
+
// Cache selectee children based on filter
|
63
|
+
this.refresh = function() {
|
64
|
+
that.elementPos = $( that.element[ 0 ] ).offset();
|
65
|
+
that.selectees = $( that.options.filter, that.element[ 0 ] );
|
66
|
+
that._addClass( that.selectees, "ui-selectee" );
|
67
|
+
that.selectees.each( function() {
|
68
|
+
var $this = $( this ),
|
69
|
+
selecteeOffset = $this.offset(),
|
70
|
+
pos = {
|
71
|
+
left: selecteeOffset.left - that.elementPos.left,
|
72
|
+
top: selecteeOffset.top - that.elementPos.top
|
73
|
+
};
|
74
|
+
$.data( this, "selectable-item", {
|
75
|
+
element: this,
|
76
|
+
$element: $this,
|
77
|
+
left: pos.left,
|
78
|
+
top: pos.top,
|
79
|
+
right: pos.left + $this.outerWidth(),
|
80
|
+
bottom: pos.top + $this.outerHeight(),
|
81
|
+
startselected: false,
|
82
|
+
selected: $this.hasClass( "ui-selected" ),
|
83
|
+
selecting: $this.hasClass( "ui-selecting" ),
|
84
|
+
unselecting: $this.hasClass( "ui-unselecting" )
|
85
|
+
} );
|
86
|
+
} );
|
87
|
+
};
|
88
|
+
this.refresh();
|
89
|
+
|
90
|
+
this._mouseInit();
|
91
|
+
|
92
|
+
this.helper = $( "<div>" );
|
93
|
+
this._addClass( this.helper, "ui-selectable-helper" );
|
94
|
+
},
|
95
|
+
|
96
|
+
_destroy: function() {
|
97
|
+
this.selectees.removeData( "selectable-item" );
|
98
|
+
this._mouseDestroy();
|
99
|
+
},
|
100
|
+
|
101
|
+
_mouseStart: function( event ) {
|
102
|
+
var that = this,
|
103
|
+
options = this.options;
|
104
|
+
|
105
|
+
this.opos = [ event.pageX, event.pageY ];
|
106
|
+
this.elementPos = $( this.element[ 0 ] ).offset();
|
107
|
+
|
108
|
+
if ( this.options.disabled ) {
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
|
112
|
+
this.selectees = $( options.filter, this.element[ 0 ] );
|
113
|
+
|
114
|
+
this._trigger( "start", event );
|
115
|
+
|
116
|
+
$( options.appendTo ).append( this.helper );
|
117
|
+
|
118
|
+
// position helper (lasso)
|
119
|
+
this.helper.css( {
|
120
|
+
"left": event.pageX,
|
121
|
+
"top": event.pageY,
|
122
|
+
"width": 0,
|
123
|
+
"height": 0
|
124
|
+
} );
|
125
|
+
|
126
|
+
if ( options.autoRefresh ) {
|
127
|
+
this.refresh();
|
128
|
+
}
|
129
|
+
|
130
|
+
this.selectees.filter( ".ui-selected" ).each( function() {
|
131
|
+
var selectee = $.data( this, "selectable-item" );
|
132
|
+
selectee.startselected = true;
|
133
|
+
if ( !event.metaKey && !event.ctrlKey ) {
|
134
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
135
|
+
selectee.selected = false;
|
136
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
137
|
+
selectee.unselecting = true;
|
138
|
+
|
139
|
+
// selectable UNSELECTING callback
|
140
|
+
that._trigger( "unselecting", event, {
|
141
|
+
unselecting: selectee.element
|
142
|
+
} );
|
143
|
+
}
|
144
|
+
} );
|
145
|
+
|
146
|
+
$( event.target ).parents().addBack().each( function() {
|
147
|
+
var doSelect,
|
148
|
+
selectee = $.data( this, "selectable-item" );
|
149
|
+
if ( selectee ) {
|
150
|
+
doSelect = ( !event.metaKey && !event.ctrlKey ) ||
|
151
|
+
!selectee.$element.hasClass( "ui-selected" );
|
152
|
+
that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
|
153
|
+
._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
|
154
|
+
selectee.unselecting = !doSelect;
|
155
|
+
selectee.selecting = doSelect;
|
156
|
+
selectee.selected = doSelect;
|
157
|
+
|
158
|
+
// selectable (UN)SELECTING callback
|
159
|
+
if ( doSelect ) {
|
160
|
+
that._trigger( "selecting", event, {
|
161
|
+
selecting: selectee.element
|
162
|
+
} );
|
163
|
+
} else {
|
164
|
+
that._trigger( "unselecting", event, {
|
165
|
+
unselecting: selectee.element
|
166
|
+
} );
|
167
|
+
}
|
168
|
+
return false;
|
169
|
+
}
|
170
|
+
} );
|
171
|
+
|
172
|
+
},
|
173
|
+
|
174
|
+
_mouseDrag: function( event ) {
|
175
|
+
|
176
|
+
this.dragged = true;
|
177
|
+
|
178
|
+
if ( this.options.disabled ) {
|
179
|
+
return;
|
180
|
+
}
|
181
|
+
|
182
|
+
var tmp,
|
183
|
+
that = this,
|
184
|
+
options = this.options,
|
185
|
+
x1 = this.opos[ 0 ],
|
186
|
+
y1 = this.opos[ 1 ],
|
187
|
+
x2 = event.pageX,
|
188
|
+
y2 = event.pageY;
|
189
|
+
|
190
|
+
if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }
|
191
|
+
if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }
|
192
|
+
this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
|
193
|
+
|
194
|
+
this.selectees.each( function() {
|
195
|
+
var selectee = $.data( this, "selectable-item" ),
|
196
|
+
hit = false,
|
197
|
+
offset = {};
|
198
|
+
|
199
|
+
//prevent helper from being selected if appendTo: selectable
|
200
|
+
if ( !selectee || selectee.element === that.element[ 0 ] ) {
|
201
|
+
return;
|
202
|
+
}
|
203
|
+
|
204
|
+
offset.left = selectee.left + that.elementPos.left;
|
205
|
+
offset.right = selectee.right + that.elementPos.left;
|
206
|
+
offset.top = selectee.top + that.elementPos.top;
|
207
|
+
offset.bottom = selectee.bottom + that.elementPos.top;
|
208
|
+
|
209
|
+
if ( options.tolerance === "touch" ) {
|
210
|
+
hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
|
211
|
+
offset.bottom < y1 ) );
|
212
|
+
} else if ( options.tolerance === "fit" ) {
|
213
|
+
hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
|
214
|
+
offset.bottom < y2 );
|
215
|
+
}
|
216
|
+
|
217
|
+
if ( hit ) {
|
218
|
+
|
219
|
+
// SELECT
|
220
|
+
if ( selectee.selected ) {
|
221
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
222
|
+
selectee.selected = false;
|
223
|
+
}
|
224
|
+
if ( selectee.unselecting ) {
|
225
|
+
that._removeClass( selectee.$element, "ui-unselecting" );
|
226
|
+
selectee.unselecting = false;
|
227
|
+
}
|
228
|
+
if ( !selectee.selecting ) {
|
229
|
+
that._addClass( selectee.$element, "ui-selecting" );
|
230
|
+
selectee.selecting = true;
|
231
|
+
|
232
|
+
// selectable SELECTING callback
|
233
|
+
that._trigger( "selecting", event, {
|
234
|
+
selecting: selectee.element
|
235
|
+
} );
|
236
|
+
}
|
237
|
+
} else {
|
238
|
+
|
239
|
+
// UNSELECT
|
240
|
+
if ( selectee.selecting ) {
|
241
|
+
if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
|
242
|
+
that._removeClass( selectee.$element, "ui-selecting" );
|
243
|
+
selectee.selecting = false;
|
244
|
+
that._addClass( selectee.$element, "ui-selected" );
|
245
|
+
selectee.selected = true;
|
246
|
+
} else {
|
247
|
+
that._removeClass( selectee.$element, "ui-selecting" );
|
248
|
+
selectee.selecting = false;
|
249
|
+
if ( selectee.startselected ) {
|
250
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
251
|
+
selectee.unselecting = true;
|
252
|
+
}
|
253
|
+
|
254
|
+
// selectable UNSELECTING callback
|
255
|
+
that._trigger( "unselecting", event, {
|
256
|
+
unselecting: selectee.element
|
257
|
+
} );
|
258
|
+
}
|
259
|
+
}
|
260
|
+
if ( selectee.selected ) {
|
261
|
+
if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
|
262
|
+
that._removeClass( selectee.$element, "ui-selected" );
|
263
|
+
selectee.selected = false;
|
264
|
+
|
265
|
+
that._addClass( selectee.$element, "ui-unselecting" );
|
266
|
+
selectee.unselecting = true;
|
267
|
+
|
268
|
+
// selectable UNSELECTING callback
|
269
|
+
that._trigger( "unselecting", event, {
|
270
|
+
unselecting: selectee.element
|
271
|
+
} );
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
275
|
+
} );
|
276
|
+
|
277
|
+
return false;
|
278
|
+
},
|
279
|
+
|
280
|
+
_mouseStop: function( event ) {
|
281
|
+
var that = this;
|
282
|
+
|
283
|
+
this.dragged = false;
|
284
|
+
|
285
|
+
$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
|
286
|
+
var selectee = $.data( this, "selectable-item" );
|
287
|
+
that._removeClass( selectee.$element, "ui-unselecting" );
|
288
|
+
selectee.unselecting = false;
|
289
|
+
selectee.startselected = false;
|
290
|
+
that._trigger( "unselected", event, {
|
291
|
+
unselected: selectee.element
|
292
|
+
} );
|
293
|
+
} );
|
294
|
+
$( ".ui-selecting", this.element[ 0 ] ).each( function() {
|
295
|
+
var selectee = $.data( this, "selectable-item" );
|
296
|
+
that._removeClass( selectee.$element, "ui-selecting" )
|
297
|
+
._addClass( selectee.$element, "ui-selected" );
|
298
|
+
selectee.selecting = false;
|
299
|
+
selectee.selected = true;
|
300
|
+
selectee.startselected = true;
|
301
|
+
that._trigger( "selected", event, {
|
302
|
+
selected: selectee.element
|
303
|
+
} );
|
304
|
+
} );
|
305
|
+
this._trigger( "stop", event );
|
306
|
+
|
307
|
+
this.helper.remove();
|
308
|
+
|
309
|
+
return false;
|
310
|
+
}
|
311
|
+
|
312
|
+
} );
|
313
|
+
|
314
|
+
} ) );
|