jquery-ui-rails 5.0.4 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitmodules +1 -1
- data/.travis.yml +1 -1
- data/History.md +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,291 +0,0 @@
|
|
1
|
-
//= require jquery-ui/core
|
2
|
-
//= require jquery-ui/widget
|
3
|
-
//= require jquery-ui/mouse
|
4
|
-
|
5
|
-
/*!
|
6
|
-
* jQuery UI Selectable 1.11.3
|
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
|
-
* http://api.jqueryui.com/selectable/
|
14
|
-
*/
|
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( $ ) {
|
31
|
-
|
32
|
-
return $.widget("ui.selectable", $.ui.mouse, {
|
33
|
-
version: "1.11.3",
|
34
|
-
options: {
|
35
|
-
appendTo: "body",
|
36
|
-
autoRefresh: true,
|
37
|
-
distance: 0,
|
38
|
-
filter: "*",
|
39
|
-
tolerance: "touch",
|
40
|
-
|
41
|
-
// callbacks
|
42
|
-
selected: null,
|
43
|
-
selecting: null,
|
44
|
-
start: null,
|
45
|
-
stop: null,
|
46
|
-
unselected: null,
|
47
|
-
unselecting: null
|
48
|
-
},
|
49
|
-
_create: function() {
|
50
|
-
var selectees,
|
51
|
-
that = this;
|
52
|
-
|
53
|
-
this.element.addClass("ui-selectable");
|
54
|
-
|
55
|
-
this.dragged = false;
|
56
|
-
|
57
|
-
// cache selectee children based on filter
|
58
|
-
this.refresh = function() {
|
59
|
-
selectees = $(that.options.filter, that.element[0]);
|
60
|
-
selectees.addClass("ui-selectee");
|
61
|
-
selectees.each(function() {
|
62
|
-
var $this = $(this),
|
63
|
-
pos = $this.offset();
|
64
|
-
$.data(this, "selectable-item", {
|
65
|
-
element: this,
|
66
|
-
$element: $this,
|
67
|
-
left: pos.left,
|
68
|
-
top: pos.top,
|
69
|
-
right: pos.left + $this.outerWidth(),
|
70
|
-
bottom: pos.top + $this.outerHeight(),
|
71
|
-
startselected: false,
|
72
|
-
selected: $this.hasClass("ui-selected"),
|
73
|
-
selecting: $this.hasClass("ui-selecting"),
|
74
|
-
unselecting: $this.hasClass("ui-unselecting")
|
75
|
-
});
|
76
|
-
});
|
77
|
-
};
|
78
|
-
this.refresh();
|
79
|
-
|
80
|
-
this.selectees = selectees.addClass("ui-selectee");
|
81
|
-
|
82
|
-
this._mouseInit();
|
83
|
-
|
84
|
-
this.helper = $("<div class='ui-selectable-helper'></div>");
|
85
|
-
},
|
86
|
-
|
87
|
-
_destroy: function() {
|
88
|
-
this.selectees
|
89
|
-
.removeClass("ui-selectee")
|
90
|
-
.removeData("selectable-item");
|
91
|
-
this.element
|
92
|
-
.removeClass("ui-selectable ui-selectable-disabled");
|
93
|
-
this._mouseDestroy();
|
94
|
-
},
|
95
|
-
|
96
|
-
_mouseStart: function(event) {
|
97
|
-
var that = this,
|
98
|
-
options = this.options;
|
99
|
-
|
100
|
-
this.opos = [ event.pageX, event.pageY ];
|
101
|
-
|
102
|
-
if (this.options.disabled) {
|
103
|
-
return;
|
104
|
-
}
|
105
|
-
|
106
|
-
this.selectees = $(options.filter, this.element[0]);
|
107
|
-
|
108
|
-
this._trigger("start", event);
|
109
|
-
|
110
|
-
$(options.appendTo).append(this.helper);
|
111
|
-
// position helper (lasso)
|
112
|
-
this.helper.css({
|
113
|
-
"left": event.pageX,
|
114
|
-
"top": event.pageY,
|
115
|
-
"width": 0,
|
116
|
-
"height": 0
|
117
|
-
});
|
118
|
-
|
119
|
-
if (options.autoRefresh) {
|
120
|
-
this.refresh();
|
121
|
-
}
|
122
|
-
|
123
|
-
this.selectees.filter(".ui-selected").each(function() {
|
124
|
-
var selectee = $.data(this, "selectable-item");
|
125
|
-
selectee.startselected = true;
|
126
|
-
if (!event.metaKey && !event.ctrlKey) {
|
127
|
-
selectee.$element.removeClass("ui-selected");
|
128
|
-
selectee.selected = false;
|
129
|
-
selectee.$element.addClass("ui-unselecting");
|
130
|
-
selectee.unselecting = true;
|
131
|
-
// selectable UNSELECTING callback
|
132
|
-
that._trigger("unselecting", event, {
|
133
|
-
unselecting: selectee.element
|
134
|
-
});
|
135
|
-
}
|
136
|
-
});
|
137
|
-
|
138
|
-
$(event.target).parents().addBack().each(function() {
|
139
|
-
var doSelect,
|
140
|
-
selectee = $.data(this, "selectable-item");
|
141
|
-
if (selectee) {
|
142
|
-
doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
|
143
|
-
selectee.$element
|
144
|
-
.removeClass(doSelect ? "ui-unselecting" : "ui-selected")
|
145
|
-
.addClass(doSelect ? "ui-selecting" : "ui-unselecting");
|
146
|
-
selectee.unselecting = !doSelect;
|
147
|
-
selectee.selecting = doSelect;
|
148
|
-
selectee.selected = doSelect;
|
149
|
-
// selectable (UN)SELECTING callback
|
150
|
-
if (doSelect) {
|
151
|
-
that._trigger("selecting", event, {
|
152
|
-
selecting: selectee.element
|
153
|
-
});
|
154
|
-
} else {
|
155
|
-
that._trigger("unselecting", event, {
|
156
|
-
unselecting: selectee.element
|
157
|
-
});
|
158
|
-
}
|
159
|
-
return false;
|
160
|
-
}
|
161
|
-
});
|
162
|
-
|
163
|
-
},
|
164
|
-
|
165
|
-
_mouseDrag: function(event) {
|
166
|
-
|
167
|
-
this.dragged = true;
|
168
|
-
|
169
|
-
if (this.options.disabled) {
|
170
|
-
return;
|
171
|
-
}
|
172
|
-
|
173
|
-
var tmp,
|
174
|
-
that = this,
|
175
|
-
options = this.options,
|
176
|
-
x1 = this.opos[0],
|
177
|
-
y1 = this.opos[1],
|
178
|
-
x2 = event.pageX,
|
179
|
-
y2 = event.pageY;
|
180
|
-
|
181
|
-
if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
|
182
|
-
if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
|
183
|
-
this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 });
|
184
|
-
|
185
|
-
this.selectees.each(function() {
|
186
|
-
var selectee = $.data(this, "selectable-item"),
|
187
|
-
hit = false;
|
188
|
-
|
189
|
-
//prevent helper from being selected if appendTo: selectable
|
190
|
-
if (!selectee || selectee.element === that.element[0]) {
|
191
|
-
return;
|
192
|
-
}
|
193
|
-
|
194
|
-
if (options.tolerance === "touch") {
|
195
|
-
hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
|
196
|
-
} else if (options.tolerance === "fit") {
|
197
|
-
hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
|
198
|
-
}
|
199
|
-
|
200
|
-
if (hit) {
|
201
|
-
// SELECT
|
202
|
-
if (selectee.selected) {
|
203
|
-
selectee.$element.removeClass("ui-selected");
|
204
|
-
selectee.selected = false;
|
205
|
-
}
|
206
|
-
if (selectee.unselecting) {
|
207
|
-
selectee.$element.removeClass("ui-unselecting");
|
208
|
-
selectee.unselecting = false;
|
209
|
-
}
|
210
|
-
if (!selectee.selecting) {
|
211
|
-
selectee.$element.addClass("ui-selecting");
|
212
|
-
selectee.selecting = true;
|
213
|
-
// selectable SELECTING callback
|
214
|
-
that._trigger("selecting", event, {
|
215
|
-
selecting: selectee.element
|
216
|
-
});
|
217
|
-
}
|
218
|
-
} else {
|
219
|
-
// UNSELECT
|
220
|
-
if (selectee.selecting) {
|
221
|
-
if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
|
222
|
-
selectee.$element.removeClass("ui-selecting");
|
223
|
-
selectee.selecting = false;
|
224
|
-
selectee.$element.addClass("ui-selected");
|
225
|
-
selectee.selected = true;
|
226
|
-
} else {
|
227
|
-
selectee.$element.removeClass("ui-selecting");
|
228
|
-
selectee.selecting = false;
|
229
|
-
if (selectee.startselected) {
|
230
|
-
selectee.$element.addClass("ui-unselecting");
|
231
|
-
selectee.unselecting = true;
|
232
|
-
}
|
233
|
-
// selectable UNSELECTING callback
|
234
|
-
that._trigger("unselecting", event, {
|
235
|
-
unselecting: selectee.element
|
236
|
-
});
|
237
|
-
}
|
238
|
-
}
|
239
|
-
if (selectee.selected) {
|
240
|
-
if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
|
241
|
-
selectee.$element.removeClass("ui-selected");
|
242
|
-
selectee.selected = false;
|
243
|
-
|
244
|
-
selectee.$element.addClass("ui-unselecting");
|
245
|
-
selectee.unselecting = true;
|
246
|
-
// selectable UNSELECTING callback
|
247
|
-
that._trigger("unselecting", event, {
|
248
|
-
unselecting: selectee.element
|
249
|
-
});
|
250
|
-
}
|
251
|
-
}
|
252
|
-
}
|
253
|
-
});
|
254
|
-
|
255
|
-
return false;
|
256
|
-
},
|
257
|
-
|
258
|
-
_mouseStop: function(event) {
|
259
|
-
var that = this;
|
260
|
-
|
261
|
-
this.dragged = false;
|
262
|
-
|
263
|
-
$(".ui-unselecting", this.element[0]).each(function() {
|
264
|
-
var selectee = $.data(this, "selectable-item");
|
265
|
-
selectee.$element.removeClass("ui-unselecting");
|
266
|
-
selectee.unselecting = false;
|
267
|
-
selectee.startselected = false;
|
268
|
-
that._trigger("unselected", event, {
|
269
|
-
unselected: selectee.element
|
270
|
-
});
|
271
|
-
});
|
272
|
-
$(".ui-selecting", this.element[0]).each(function() {
|
273
|
-
var selectee = $.data(this, "selectable-item");
|
274
|
-
selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
|
275
|
-
selectee.selecting = false;
|
276
|
-
selectee.selected = true;
|
277
|
-
selectee.startselected = true;
|
278
|
-
that._trigger("selected", event, {
|
279
|
-
selected: selectee.element
|
280
|
-
});
|
281
|
-
});
|
282
|
-
this._trigger("stop", event);
|
283
|
-
|
284
|
-
this.helper.remove();
|
285
|
-
|
286
|
-
return false;
|
287
|
-
}
|
288
|
-
|
289
|
-
});
|
290
|
-
|
291
|
-
}));
|