jquery-ui-rails 4.0.0 → 5.0.4
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.
- 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.menu.js → app/assets/javascripts/jquery-ui/menu.js}
RENAMED
@@ -1,35 +1,46 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
3
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/position
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Menu 1.
|
6
|
+
* jQuery UI Menu 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/menu/
|
14
|
-
*
|
15
|
-
* Depends:
|
16
|
-
* jquery.ui.core.js
|
17
|
-
* jquery.ui.widget.js
|
18
|
-
* jquery.ui.position.js
|
19
14
|
*/
|
20
|
-
(function(
|
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
|
+
"./widget",
|
23
|
+
"./position"
|
24
|
+
], factory );
|
25
|
+
} else {
|
26
|
+
|
27
|
+
// Browser globals
|
28
|
+
factory( jQuery );
|
29
|
+
}
|
30
|
+
}(function( $ ) {
|
21
31
|
|
22
|
-
$.widget( "ui.menu", {
|
23
|
-
version: "1.
|
32
|
+
return $.widget( "ui.menu", {
|
33
|
+
version: "1.11.3",
|
24
34
|
defaultElement: "<ul>",
|
25
35
|
delay: 300,
|
26
36
|
options: {
|
27
37
|
icons: {
|
28
38
|
submenu: "ui-icon-carat-1-e"
|
29
39
|
},
|
40
|
+
items: "> *",
|
30
41
|
menus: "ul",
|
31
42
|
position: {
|
32
|
-
my: "left top",
|
43
|
+
my: "left-1 top",
|
33
44
|
at: "right top"
|
34
45
|
},
|
35
46
|
role: "menu",
|
@@ -42,24 +53,18 @@ $.widget( "ui.menu", {
|
|
42
53
|
|
43
54
|
_create: function() {
|
44
55
|
this.activeMenu = this.element;
|
45
|
-
|
56
|
+
|
57
|
+
// Flag used to prevent firing of the click handler
|
46
58
|
// as the event bubbles up through nested menus
|
47
59
|
this.mouseHandled = false;
|
48
60
|
this.element
|
49
61
|
.uniqueId()
|
50
|
-
.addClass( "ui-menu ui-widget ui-widget-content
|
62
|
+
.addClass( "ui-menu ui-widget ui-widget-content" )
|
51
63
|
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
|
52
64
|
.attr({
|
53
65
|
role: this.options.role,
|
54
66
|
tabIndex: 0
|
55
|
-
})
|
56
|
-
// need to catch all clicks on disabled menu
|
57
|
-
// not possible through _on
|
58
|
-
.bind( "click" + this.eventNamespace, $.proxy(function( event ) {
|
59
|
-
if ( this.options.disabled ) {
|
60
|
-
event.preventDefault();
|
61
|
-
}
|
62
|
-
}, this ));
|
67
|
+
});
|
63
68
|
|
64
69
|
if ( this.options.disabled ) {
|
65
70
|
this.element
|
@@ -70,22 +75,24 @@ $.widget( "ui.menu", {
|
|
70
75
|
this._on({
|
71
76
|
// Prevent focus from sticking to links inside menu after clicking
|
72
77
|
// them (focus should always stay on UL during navigation).
|
73
|
-
"mousedown .ui-menu-item
|
78
|
+
"mousedown .ui-menu-item": function( event ) {
|
74
79
|
event.preventDefault();
|
75
80
|
},
|
76
|
-
"click .ui-
|
77
|
-
event.
|
78
|
-
},
|
79
|
-
"click .ui-menu-item:has(a)": function( event ) {
|
80
|
-
var target = $( event.target ).closest( ".ui-menu-item" );
|
81
|
+
"click .ui-menu-item": function( event ) {
|
82
|
+
var target = $( event.target );
|
81
83
|
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
82
|
-
this.mouseHandled = true;
|
83
|
-
|
84
84
|
this.select( event );
|
85
|
+
|
86
|
+
// Only set the mouseHandled flag if the event will bubble, see #9469.
|
87
|
+
if ( !event.isPropagationStopped() ) {
|
88
|
+
this.mouseHandled = true;
|
89
|
+
}
|
90
|
+
|
85
91
|
// Open submenu on click
|
86
92
|
if ( target.has( ".ui-menu" ).length ) {
|
87
93
|
this.expand( event );
|
88
|
-
} else if ( !this.element.is( ":focus" ) ) {
|
94
|
+
} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
|
95
|
+
|
89
96
|
// Redirect focus to the menu
|
90
97
|
this.element.trigger( "focus", [ true ] );
|
91
98
|
|
@@ -98,10 +105,16 @@ $.widget( "ui.menu", {
|
|
98
105
|
}
|
99
106
|
},
|
100
107
|
"mouseenter .ui-menu-item": function( event ) {
|
108
|
+
// Ignore mouse events while typeahead is active, see #10458.
|
109
|
+
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
|
110
|
+
// is over an item in the menu
|
111
|
+
if ( this.previousFilter ) {
|
112
|
+
return;
|
113
|
+
}
|
101
114
|
var target = $( event.currentTarget );
|
102
115
|
// Remove ui-state-active class from siblings of the newly focused menu item
|
103
116
|
// to avoid a jump caused by adjacent elements both having a class with a border
|
104
|
-
target.siblings(
|
117
|
+
target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
|
105
118
|
this.focus( event, target );
|
106
119
|
},
|
107
120
|
mouseleave: "collapseAll",
|
@@ -109,7 +122,7 @@ $.widget( "ui.menu", {
|
|
109
122
|
focus: function( event, keepActiveItem ) {
|
110
123
|
// If there's already an active item, keep it active
|
111
124
|
// If not, activate the first item
|
112
|
-
var item = this.active || this.element.
|
125
|
+
var item = this.active || this.element.find( this.options.items ).eq( 0 );
|
113
126
|
|
114
127
|
if ( !keepActiveItem ) {
|
115
128
|
this.focus( event, item );
|
@@ -130,7 +143,7 @@ $.widget( "ui.menu", {
|
|
130
143
|
// Clicks outside of a menu collapse any open menus
|
131
144
|
this._on( this.document, {
|
132
145
|
click: function( event ) {
|
133
|
-
if (
|
146
|
+
if ( this._closeOnDocumentClick( event ) ) {
|
134
147
|
this.collapseAll( event );
|
135
148
|
}
|
136
149
|
|
@@ -145,7 +158,7 @@ $.widget( "ui.menu", {
|
|
145
158
|
this.element
|
146
159
|
.removeAttr( "aria-activedescendant" )
|
147
160
|
.find( ".ui-menu" ).addBack()
|
148
|
-
.removeClass( "ui-menu ui-widget ui-widget-content ui-
|
161
|
+
.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
|
149
162
|
.removeAttr( "role" )
|
150
163
|
.removeAttr( "tabIndex" )
|
151
164
|
.removeAttr( "aria-labelledby" )
|
@@ -160,32 +173,26 @@ $.widget( "ui.menu", {
|
|
160
173
|
.removeClass( "ui-menu-item" )
|
161
174
|
.removeAttr( "role" )
|
162
175
|
.removeAttr( "aria-disabled" )
|
163
|
-
.
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
});
|
176
|
+
.removeUniqueId()
|
177
|
+
.removeClass( "ui-state-hover" )
|
178
|
+
.removeAttr( "tabIndex" )
|
179
|
+
.removeAttr( "role" )
|
180
|
+
.removeAttr( "aria-haspopup" )
|
181
|
+
.children().each( function() {
|
182
|
+
var elem = $( this );
|
183
|
+
if ( elem.data( "ui-menu-submenu-carat" ) ) {
|
184
|
+
elem.remove();
|
185
|
+
}
|
186
|
+
});
|
175
187
|
|
176
188
|
// Destroy menu dividers
|
177
189
|
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
|
178
190
|
},
|
179
191
|
|
180
192
|
_keydown: function( event ) {
|
181
|
-
|
182
|
-
var match, prev, character, skip, regex,
|
193
|
+
var match, prev, character, skip,
|
183
194
|
preventDefault = true;
|
184
195
|
|
185
|
-
function escape( value ) {
|
186
|
-
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
|
187
|
-
}
|
188
|
-
|
189
196
|
switch ( event.keyCode ) {
|
190
197
|
case $.ui.keyCode.PAGE_UP:
|
191
198
|
this.previousPage( event );
|
@@ -234,10 +241,7 @@ $.widget( "ui.menu", {
|
|
234
241
|
character = prev + character;
|
235
242
|
}
|
236
243
|
|
237
|
-
|
238
|
-
match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
|
239
|
-
return regex.test( $( this ).children( "a" ).text() );
|
240
|
-
});
|
244
|
+
match = this._filterMenuItems( character );
|
241
245
|
match = skip && match.index( this.active.next() ) !== -1 ?
|
242
246
|
this.active.nextAll( ".ui-menu-item" ) :
|
243
247
|
match;
|
@@ -246,22 +250,15 @@ $.widget( "ui.menu", {
|
|
246
250
|
// to move down the menu to the first item that starts with that character
|
247
251
|
if ( !match.length ) {
|
248
252
|
character = String.fromCharCode( event.keyCode );
|
249
|
-
|
250
|
-
match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
|
251
|
-
return regex.test( $( this ).children( "a" ).text() );
|
252
|
-
});
|
253
|
+
match = this._filterMenuItems( character );
|
253
254
|
}
|
254
255
|
|
255
256
|
if ( match.length ) {
|
256
257
|
this.focus( event, match );
|
257
|
-
|
258
|
-
|
259
|
-
this.filterTimer = this._delay(function() {
|
260
|
-
delete this.previousFilter;
|
261
|
-
}, 1000 );
|
262
|
-
} else {
|
258
|
+
this.previousFilter = character;
|
259
|
+
this.filterTimer = this._delay(function() {
|
263
260
|
delete this.previousFilter;
|
264
|
-
}
|
261
|
+
}, 1000 );
|
265
262
|
} else {
|
266
263
|
delete this.previousFilter;
|
267
264
|
}
|
@@ -274,7 +271,7 @@ $.widget( "ui.menu", {
|
|
274
271
|
|
275
272
|
_activate: function( event ) {
|
276
273
|
if ( !this.active.is( ".ui-state-disabled" ) ) {
|
277
|
-
if ( this.active.
|
274
|
+
if ( this.active.is( "[aria-haspopup='true']" ) ) {
|
278
275
|
this.expand( event );
|
279
276
|
} else {
|
280
277
|
this.select( event );
|
@@ -283,13 +280,16 @@ $.widget( "ui.menu", {
|
|
283
280
|
},
|
284
281
|
|
285
282
|
refresh: function() {
|
286
|
-
var menus,
|
283
|
+
var menus, items,
|
284
|
+
that = this,
|
287
285
|
icon = this.options.icons.submenu,
|
288
286
|
submenus = this.element.find( this.options.menus );
|
289
287
|
|
288
|
+
this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
|
289
|
+
|
290
290
|
// Initialize nested menus
|
291
291
|
submenus.filter( ":not(.ui-menu)" )
|
292
|
-
.addClass( "ui-menu ui-widget ui-widget-content ui-
|
292
|
+
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
|
293
293
|
.hide()
|
294
294
|
.attr({
|
295
295
|
role: this.options.role,
|
@@ -298,7 +298,7 @@ $.widget( "ui.menu", {
|
|
298
298
|
})
|
299
299
|
.each(function() {
|
300
300
|
var menu = $( this ),
|
301
|
-
item = menu.
|
301
|
+
item = menu.parent(),
|
302
302
|
submenuCarat = $( "<span>" )
|
303
303
|
.addClass( "ui-menu-icon ui-icon " + icon )
|
304
304
|
.data( "ui-menu-submenu-carat", true );
|
@@ -310,30 +310,27 @@ $.widget( "ui.menu", {
|
|
310
310
|
});
|
311
311
|
|
312
312
|
menus = submenus.add( this.element );
|
313
|
+
items = menus.find( this.options.items );
|
313
314
|
|
314
|
-
//
|
315
|
-
|
316
|
-
.addClass( "ui-menu-item" )
|
317
|
-
.attr( "role", "presentation" )
|
318
|
-
.children( "a" )
|
319
|
-
.uniqueId()
|
320
|
-
.addClass( "ui-corner-all" )
|
321
|
-
.attr({
|
322
|
-
tabIndex: -1,
|
323
|
-
role: this._itemRole()
|
324
|
-
});
|
325
|
-
|
326
|
-
// Initialize unlinked menu-items containing spaces and/or dashes only as dividers
|
327
|
-
menus.children( ":not(.ui-menu-item)" ).each(function() {
|
315
|
+
// Initialize menu-items containing spaces and/or dashes only as dividers
|
316
|
+
items.not( ".ui-menu-item" ).each(function() {
|
328
317
|
var item = $( this );
|
329
|
-
|
330
|
-
if ( !/[^\-—–\s]/.test( item.text() ) ) {
|
318
|
+
if ( that._isDivider( item ) ) {
|
331
319
|
item.addClass( "ui-widget-content ui-menu-divider" );
|
332
320
|
}
|
333
321
|
});
|
334
322
|
|
323
|
+
// Don't refresh list items that are already adapted
|
324
|
+
items.not( ".ui-menu-item, .ui-menu-divider" )
|
325
|
+
.addClass( "ui-menu-item" )
|
326
|
+
.uniqueId()
|
327
|
+
.attr({
|
328
|
+
tabIndex: -1,
|
329
|
+
role: this._itemRole()
|
330
|
+
});
|
331
|
+
|
335
332
|
// Add aria-disabled attribute to any disabled menu item
|
336
|
-
|
333
|
+
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
|
337
334
|
|
338
335
|
// If the active item has been removed, blur the menu
|
339
336
|
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
|
@@ -354,6 +351,11 @@ $.widget( "ui.menu", {
|
|
354
351
|
.removeClass( this.options.icons.submenu )
|
355
352
|
.addClass( value.submenu );
|
356
353
|
}
|
354
|
+
if ( key === "disabled" ) {
|
355
|
+
this.element
|
356
|
+
.toggleClass( "ui-state-disabled", !!value )
|
357
|
+
.attr( "aria-disabled", value );
|
358
|
+
}
|
357
359
|
this._super( key, value );
|
358
360
|
},
|
359
361
|
|
@@ -364,7 +366,7 @@ $.widget( "ui.menu", {
|
|
364
366
|
this._scrollIntoView( item );
|
365
367
|
|
366
368
|
this.active = item.first();
|
367
|
-
focused = this.active.
|
369
|
+
focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
|
368
370
|
// Only update aria-activedescendant if there's a role
|
369
371
|
// otherwise we assume focus is managed elsewhere
|
370
372
|
if ( this.options.role ) {
|
@@ -375,7 +377,6 @@ $.widget( "ui.menu", {
|
|
375
377
|
this.active
|
376
378
|
.parent()
|
377
379
|
.closest( ".ui-menu-item" )
|
378
|
-
.children( "a:first" )
|
379
380
|
.addClass( "ui-state-active" );
|
380
381
|
|
381
382
|
if ( event && event.type === "keydown" ) {
|
@@ -387,7 +388,7 @@ $.widget( "ui.menu", {
|
|
387
388
|
}
|
388
389
|
|
389
390
|
nested = item.children( ".ui-menu" );
|
390
|
-
if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
|
391
|
+
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
|
391
392
|
this._startOpening(nested);
|
392
393
|
}
|
393
394
|
this.activeMenu = item.parent();
|
@@ -403,7 +404,7 @@ $.widget( "ui.menu", {
|
|
403
404
|
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
|
404
405
|
scroll = this.activeMenu.scrollTop();
|
405
406
|
elementHeight = this.activeMenu.height();
|
406
|
-
itemHeight = item.
|
407
|
+
itemHeight = item.outerHeight();
|
407
408
|
|
408
409
|
if ( offset < 0 ) {
|
409
410
|
this.activeMenu.scrollTop( scroll + offset );
|
@@ -422,7 +423,7 @@ $.widget( "ui.menu", {
|
|
422
423
|
return;
|
423
424
|
}
|
424
425
|
|
425
|
-
this.active.
|
426
|
+
this.active.removeClass( "ui-state-focus" );
|
426
427
|
this.active = null;
|
427
428
|
|
428
429
|
this._trigger( "blur", event, { item: this.active } );
|
@@ -492,10 +493,20 @@ $.widget( "ui.menu", {
|
|
492
493
|
.attr( "aria-hidden", "true" )
|
493
494
|
.attr( "aria-expanded", "false" )
|
494
495
|
.end()
|
495
|
-
.find( "
|
496
|
+
.find( ".ui-state-active" ).not( ".ui-state-focus" )
|
496
497
|
.removeClass( "ui-state-active" );
|
497
498
|
},
|
498
499
|
|
500
|
+
_closeOnDocumentClick: function( event ) {
|
501
|
+
return !$( event.target ).closest( ".ui-menu" ).length;
|
502
|
+
},
|
503
|
+
|
504
|
+
_isDivider: function( item ) {
|
505
|
+
|
506
|
+
// Match hyphen, em dash, en dash
|
507
|
+
return !/[^\-\u2014\u2013\s]/.test( item.text() );
|
508
|
+
},
|
509
|
+
|
499
510
|
collapse: function( event ) {
|
500
511
|
var newItem = this.active &&
|
501
512
|
this.active.parent().closest( ".ui-menu-item", this.element );
|
@@ -509,7 +520,7 @@ $.widget( "ui.menu", {
|
|
509
520
|
var newItem = this.active &&
|
510
521
|
this.active
|
511
522
|
.children( ".ui-menu " )
|
512
|
-
.
|
523
|
+
.find( this.options.items )
|
513
524
|
.first();
|
514
525
|
|
515
526
|
if ( newItem && newItem.length ) {
|
@@ -552,7 +563,7 @@ $.widget( "ui.menu", {
|
|
552
563
|
}
|
553
564
|
}
|
554
565
|
if ( !next || !next.length || !this.active ) {
|
555
|
-
next = this.activeMenu.
|
566
|
+
next = this.activeMenu.find( this.options.items )[ filter ]();
|
556
567
|
}
|
557
568
|
|
558
569
|
this.focus( event, next );
|
@@ -578,7 +589,7 @@ $.widget( "ui.menu", {
|
|
578
589
|
|
579
590
|
this.focus( event, item );
|
580
591
|
} else {
|
581
|
-
this.focus( event, this.activeMenu.
|
592
|
+
this.focus( event, this.activeMenu.find( this.options.items )
|
582
593
|
[ !this.active ? "first" : "last" ]() );
|
583
594
|
}
|
584
595
|
},
|
@@ -602,7 +613,7 @@ $.widget( "ui.menu", {
|
|
602
613
|
|
603
614
|
this.focus( event, item );
|
604
615
|
} else {
|
605
|
-
this.focus( event, this.activeMenu.
|
616
|
+
this.focus( event, this.activeMenu.find( this.options.items ).first() );
|
606
617
|
}
|
607
618
|
},
|
608
619
|
|
@@ -619,7 +630,21 @@ $.widget( "ui.menu", {
|
|
619
630
|
this.collapseAll( event, true );
|
620
631
|
}
|
621
632
|
this._trigger( "select", event, ui );
|
633
|
+
},
|
634
|
+
|
635
|
+
_filterMenuItems: function(character) {
|
636
|
+
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
|
637
|
+
regex = new RegExp( "^" + escapedCharacter, "i" );
|
638
|
+
|
639
|
+
return this.activeMenu
|
640
|
+
.find( this.options.items )
|
641
|
+
|
642
|
+
// Only match on items, not dividers or other content (#10571)
|
643
|
+
.filter( ".ui-menu-item" )
|
644
|
+
.filter(function() {
|
645
|
+
return regex.test( $.trim( $( this ).text() ) );
|
646
|
+
});
|
622
647
|
}
|
623
648
|
});
|
624
649
|
|
625
|
-
}
|
650
|
+
}));
|
data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js}
RENAMED
@@ -1,28 +1,38 @@
|
|
1
|
-
//= require jquery
|
2
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Mouse 1.
|
5
|
+
* jQuery UI Mouse 1.11.3
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
|
-
* Copyright
|
8
|
+
* Copyright jQuery Foundation and other contributors
|
9
9
|
* Released under the MIT license.
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
12
|
* http://api.jqueryui.com/mouse/
|
13
|
-
*
|
14
|
-
* Depends:
|
15
|
-
* jquery.ui.widget.js
|
16
13
|
*/
|
17
|
-
(function(
|
14
|
+
(function( factory ) {
|
15
|
+
if ( typeof define === "function" && define.amd ) {
|
16
|
+
|
17
|
+
// AMD. Register as an anonymous module.
|
18
|
+
define([
|
19
|
+
"jquery",
|
20
|
+
"./widget"
|
21
|
+
], factory );
|
22
|
+
} else {
|
23
|
+
|
24
|
+
// Browser globals
|
25
|
+
factory( jQuery );
|
26
|
+
}
|
27
|
+
}(function( $ ) {
|
18
28
|
|
19
29
|
var mouseHandled = false;
|
20
30
|
$( document ).mouseup( function() {
|
21
31
|
mouseHandled = false;
|
22
32
|
});
|
23
33
|
|
24
|
-
$.widget("ui.mouse", {
|
25
|
-
version: "1.
|
34
|
+
return $.widget("ui.mouse", {
|
35
|
+
version: "1.11.3",
|
26
36
|
options: {
|
27
37
|
cancel: "input,textarea,button,select,option",
|
28
38
|
distance: 1,
|
@@ -32,10 +42,10 @@ $.widget("ui.mouse", {
|
|
32
42
|
var that = this;
|
33
43
|
|
34
44
|
this.element
|
35
|
-
.bind("mousedown."+this.widgetName, function(event) {
|
45
|
+
.bind("mousedown." + this.widgetName, function(event) {
|
36
46
|
return that._mouseDown(event);
|
37
47
|
})
|
38
|
-
.bind("click."+this.widgetName, function(event) {
|
48
|
+
.bind("click." + this.widgetName, function(event) {
|
39
49
|
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
|
40
50
|
$.removeData(event.target, that.widgetName + ".preventClickEvent");
|
41
51
|
event.stopImmediatePropagation();
|
@@ -49,17 +59,21 @@ $.widget("ui.mouse", {
|
|
49
59
|
// TODO: make sure destroying one instance of mouse doesn't mess with
|
50
60
|
// other instances of mouse
|
51
61
|
_mouseDestroy: function() {
|
52
|
-
this.element.unbind("."+this.widgetName);
|
62
|
+
this.element.unbind("." + this.widgetName);
|
53
63
|
if ( this._mouseMoveDelegate ) {
|
54
|
-
|
55
|
-
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
56
|
-
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
64
|
+
this.document
|
65
|
+
.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
|
66
|
+
.unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
|
57
67
|
}
|
58
68
|
},
|
59
69
|
|
60
70
|
_mouseDown: function(event) {
|
61
71
|
// don't let more than one widget handle mouseStart
|
62
|
-
if( mouseHandled ) {
|
72
|
+
if ( mouseHandled ) {
|
73
|
+
return;
|
74
|
+
}
|
75
|
+
|
76
|
+
this._mouseMoved = false;
|
63
77
|
|
64
78
|
// we may have missed mouseup (out of window)
|
65
79
|
(this._mouseStarted && this._mouseUp(event));
|
@@ -102,9 +116,10 @@ $.widget("ui.mouse", {
|
|
102
116
|
this._mouseUpDelegate = function(event) {
|
103
117
|
return that._mouseUp(event);
|
104
118
|
};
|
105
|
-
|
106
|
-
|
107
|
-
.bind("
|
119
|
+
|
120
|
+
this.document
|
121
|
+
.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
122
|
+
.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
108
123
|
|
109
124
|
event.preventDefault();
|
110
125
|
|
@@ -113,9 +128,23 @@ $.widget("ui.mouse", {
|
|
113
128
|
},
|
114
129
|
|
115
130
|
_mouseMove: function(event) {
|
116
|
-
//
|
117
|
-
|
118
|
-
|
131
|
+
// Only check for mouseups outside the document if you've moved inside the document
|
132
|
+
// at least once. This prevents the firing of mouseup in the case of IE<9, which will
|
133
|
+
// fire a mousemove event if content is placed under the cursor. See #7778
|
134
|
+
// Support: IE <9
|
135
|
+
if ( this._mouseMoved ) {
|
136
|
+
// IE mouseup check - mouseup happened when mouse was out of window
|
137
|
+
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
|
138
|
+
return this._mouseUp(event);
|
139
|
+
|
140
|
+
// Iframe mouseup check - mouseup occurred in another document
|
141
|
+
} else if ( !event.which ) {
|
142
|
+
return this._mouseUp( event );
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
if ( event.which || event.button ) {
|
147
|
+
this._mouseMoved = true;
|
119
148
|
}
|
120
149
|
|
121
150
|
if (this._mouseStarted) {
|
@@ -133,9 +162,9 @@ $.widget("ui.mouse", {
|
|
133
162
|
},
|
134
163
|
|
135
164
|
_mouseUp: function(event) {
|
136
|
-
|
137
|
-
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
138
|
-
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
165
|
+
this.document
|
166
|
+
.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
167
|
+
.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
139
168
|
|
140
169
|
if (this._mouseStarted) {
|
141
170
|
this._mouseStarted = false;
|
@@ -147,6 +176,7 @@ $.widget("ui.mouse", {
|
|
147
176
|
this._mouseStop(event);
|
148
177
|
}
|
149
178
|
|
179
|
+
mouseHandled = false;
|
150
180
|
return false;
|
151
181
|
},
|
152
182
|
|
@@ -169,4 +199,4 @@ $.widget("ui.mouse", {
|
|
169
199
|
_mouseCapture: function(/* event */) { return true; }
|
170
200
|
});
|
171
201
|
|
172
|
-
})
|
202
|
+
}));
|