jquery-ui-rails 4.2.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/History.md +6 -0
- data/README.md +69 -73
- data/Rakefile +28 -24
- data/VERSIONS.md +1 -0
- data/app/assets/javascripts/jquery-ui.js +37 -0
- data/app/assets/javascripts/{jquery.ui.accordion.js → jquery-ui/accordion.js} +62 -57
- data/app/assets/javascripts/{jquery.ui.autocomplete.js → jquery-ui/autocomplete.js} +70 -50
- data/app/assets/javascripts/{jquery.ui.button.js → jquery-ui/button.js} +41 -25
- data/app/assets/javascripts/{jquery.ui.core.js → jquery-ui/core.js} +106 -123
- 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 +37 -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/app/assets/javascripts/{jquery.ui.datepicker.js → jquery-ui/datepicker.js} +72 -37
- data/app/assets/javascripts/{jquery.ui.dialog.js → jquery-ui/dialog.js} +215 -180
- data/app/assets/javascripts/{jquery.ui.draggable.js → jquery-ui/draggable.js} +219 -161
- data/app/assets/javascripts/jquery-ui/droppable.js +421 -0
- data/app/assets/javascripts/{jquery.ui.effect-blind.js → jquery-ui/effect-blind.js} +20 -12
- data/app/assets/javascripts/{jquery.ui.effect-bounce.js → jquery-ui/effect-bounce.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-clip.js → jquery-ui/effect-clip.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-drop.js → jquery-ui/effect-drop.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-explode.js → jquery-ui/effect-explode.js} +20 -10
- data/app/assets/javascripts/{jquery.ui.effect-fade.js → jquery-ui/effect-fade.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-fold.js → jquery-ui/effect-fold.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-highlight.js → jquery-ui/effect-highlight.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
- data/app/assets/javascripts/{jquery.ui.effect-pulsate.js → jquery-ui/effect-pulsate.js} +18 -8
- data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
- data/app/assets/javascripts/{jquery.ui.effect-shake.js → jquery-ui/effect-shake.js} +19 -9
- data/app/assets/javascripts/{jquery.ui.effect-scale.js → jquery-ui/effect-size.js} +19 -104
- data/app/assets/javascripts/{jquery.ui.effect-slide.js → jquery-ui/effect-slide.js} +18 -8
- data/app/assets/javascripts/{jquery.ui.effect-transfer.js → jquery-ui/effect-transfer.js} +22 -12
- data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
- data/app/assets/javascripts/{jquery.ui.effect.js → jquery-ui/effect.js} +28 -20
- data/app/assets/javascripts/{jquery.ui.menu.js → jquery-ui/menu.js} +93 -80
- data/app/assets/javascripts/{jquery.ui.mouse.js → jquery-ui/mouse.js} +41 -23
- data/app/assets/javascripts/{jquery.ui.position.js → jquery-ui/position.js} +25 -12
- data/app/assets/javascripts/{jquery.ui.progressbar.js → jquery-ui/progressbar.js} +26 -12
- data/app/assets/javascripts/{jquery.ui.resizable.js → jquery-ui/resizable.js} +196 -146
- data/app/assets/javascripts/{jquery.ui.selectable.js → jquery-ui/selectable.js} +25 -15
- data/app/assets/javascripts/jquery-ui/selectmenu.js +560 -0
- data/app/assets/javascripts/{jquery.ui.slider.js → jquery-ui/slider.js} +43 -31
- data/app/assets/javascripts/{jquery.ui.sortable.js → jquery-ui/sortable.js} +71 -50
- data/app/assets/javascripts/{jquery.ui.spinner.js → jquery-ui/spinner.js} +46 -29
- data/app/assets/javascripts/{jquery.ui.tabs.js → jquery-ui/tabs.js} +69 -52
- data/app/assets/javascripts/{jquery.ui.tooltip.js → jquery-ui/tooltip.js} +97 -55
- data/app/assets/javascripts/{jquery.ui.widget.js → jquery-ui/widget.js} +52 -30
- data/app/assets/stylesheets/jquery-ui.css +1 -0
- data/app/assets/stylesheets/{jquery.ui.accordion.css.erb → jquery-ui/accordion.css.erb} +5 -7
- data/app/assets/stylesheets/{jquery.ui.all.css.erb → jquery-ui/all.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.autocomplete.css.erb → jquery-ui/autocomplete.css.erb} +4 -4
- data/app/assets/stylesheets/jquery-ui/base.css.erb +30 -0
- data/app/assets/stylesheets/{jquery.ui.button.css.erb → jquery-ui/button.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.core.css.erb → jquery-ui/core.css.erb} +4 -1
- data/app/assets/stylesheets/{jquery.ui.datepicker.css.erb → jquery-ui/datepicker.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.dialog.css.erb → jquery-ui/dialog.css.erb} +6 -5
- data/app/assets/stylesheets/jquery-ui/draggable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.menu.css.erb → jquery-ui/menu.css.erb} +18 -34
- data/app/assets/stylesheets/{jquery.ui.progressbar.css.erb → jquery-ui/progressbar.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.resizable.css.erb → jquery-ui/resizable.css.erb} +5 -3
- data/app/assets/stylesheets/{jquery.ui.selectable.css.erb → jquery-ui/selectable.css.erb} +7 -3
- data/app/assets/stylesheets/jquery-ui/selectmenu.css.erb +64 -0
- data/app/assets/stylesheets/{jquery.ui.slider.css.erb → jquery-ui/slider.css.erb} +5 -3
- data/app/assets/stylesheets/jquery-ui/sortable.css.erb +16 -0
- data/app/assets/stylesheets/{jquery.ui.spinner.css.erb → jquery-ui/spinner.css.erb} +4 -4
- data/app/assets/stylesheets/{jquery.ui.tabs.css.erb → jquery-ui/tabs.css.erb} +3 -3
- data/app/assets/stylesheets/{jquery.ui.theme.css.erb → jquery-ui/theme.css.erb} +1 -4
- data/app/assets/stylesheets/{jquery.ui.tooltip.css.erb → jquery-ui/tooltip.css.erb} +3 -3
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +137 -129
- data/app/assets/javascripts/jquery.ui.all.js +0 -34
- data/app/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
- data/app/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
- data/app/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
- data/app/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
- data/app/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
- data/app/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
- data/app/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
- data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
- data/app/assets/javascripts/jquery.ui.droppable.js +0 -394
- data/app/assets/javascripts/jquery.ui.effect.all.js +0 -14
- data/app/assets/stylesheets/jquery.ui.base.css.erb +0 -27
@@ -1,9 +1,9 @@
|
|
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.0
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -11,25 +11,36 @@
|
|
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.0",
|
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,14 +75,11 @@ $.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
|
74
|
-
event.preventDefault();
|
75
|
-
},
|
76
|
-
"click .ui-state-disabled > a": function( event ) {
|
78
|
+
"mousedown .ui-menu-item": function( event ) {
|
77
79
|
event.preventDefault();
|
78
80
|
},
|
79
|
-
"click .ui-menu-item
|
80
|
-
var target = $( event.target )
|
81
|
+
"click .ui-menu-item": function( event ) {
|
82
|
+
var target = $( event.target );
|
81
83
|
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
82
84
|
this.select( event );
|
83
85
|
|
@@ -106,7 +108,7 @@ $.widget( "ui.menu", {
|
|
106
108
|
var target = $( event.currentTarget );
|
107
109
|
// Remove ui-state-active class from siblings of the newly focused menu item
|
108
110
|
// to avoid a jump caused by adjacent elements both having a class with a border
|
109
|
-
target.siblings(
|
111
|
+
target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
|
110
112
|
this.focus( event, target );
|
111
113
|
},
|
112
114
|
mouseleave: "collapseAll",
|
@@ -114,7 +116,7 @@ $.widget( "ui.menu", {
|
|
114
116
|
focus: function( event, keepActiveItem ) {
|
115
117
|
// If there's already an active item, keep it active
|
116
118
|
// If not, activate the first item
|
117
|
-
var item = this.active || this.element.
|
119
|
+
var item = this.active || this.element.find( this.options.items ).eq( 0 );
|
118
120
|
|
119
121
|
if ( !keepActiveItem ) {
|
120
122
|
this.focus( event, item );
|
@@ -135,7 +137,7 @@ $.widget( "ui.menu", {
|
|
135
137
|
// Clicks outside of a menu collapse any open menus
|
136
138
|
this._on( this.document, {
|
137
139
|
click: function( event ) {
|
138
|
-
if (
|
140
|
+
if ( this._closeOnDocumentClick( event ) ) {
|
139
141
|
this.collapseAll( event );
|
140
142
|
}
|
141
143
|
|
@@ -150,7 +152,7 @@ $.widget( "ui.menu", {
|
|
150
152
|
this.element
|
151
153
|
.removeAttr( "aria-activedescendant" )
|
152
154
|
.find( ".ui-menu" ).addBack()
|
153
|
-
.removeClass( "ui-menu ui-widget ui-widget-content ui-
|
155
|
+
.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
|
154
156
|
.removeAttr( "role" )
|
155
157
|
.removeAttr( "tabIndex" )
|
156
158
|
.removeAttr( "aria-labelledby" )
|
@@ -165,18 +167,17 @@ $.widget( "ui.menu", {
|
|
165
167
|
.removeClass( "ui-menu-item" )
|
166
168
|
.removeAttr( "role" )
|
167
169
|
.removeAttr( "aria-disabled" )
|
168
|
-
.
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
});
|
170
|
+
.removeUniqueId()
|
171
|
+
.removeClass( "ui-state-hover" )
|
172
|
+
.removeAttr( "tabIndex" )
|
173
|
+
.removeAttr( "role" )
|
174
|
+
.removeAttr( "aria-haspopup" )
|
175
|
+
.children().each( function() {
|
176
|
+
var elem = $( this );
|
177
|
+
if ( elem.data( "ui-menu-submenu-carat" ) ) {
|
178
|
+
elem.remove();
|
179
|
+
}
|
180
|
+
});
|
180
181
|
|
181
182
|
// Destroy menu dividers
|
182
183
|
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
|
@@ -239,8 +240,8 @@ $.widget( "ui.menu", {
|
|
239
240
|
}
|
240
241
|
|
241
242
|
regex = new RegExp( "^" + escape( character ), "i" );
|
242
|
-
match = this.activeMenu.
|
243
|
-
return regex.test( $( this ).
|
243
|
+
match = this.activeMenu.find( this.options.items ).filter(function() {
|
244
|
+
return regex.test( $( this ).text() );
|
244
245
|
});
|
245
246
|
match = skip && match.index( this.active.next() ) !== -1 ?
|
246
247
|
this.active.nextAll( ".ui-menu-item" ) :
|
@@ -251,8 +252,8 @@ $.widget( "ui.menu", {
|
|
251
252
|
if ( !match.length ) {
|
252
253
|
character = String.fromCharCode( event.keyCode );
|
253
254
|
regex = new RegExp( "^" + escape( character ), "i" );
|
254
|
-
match = this.activeMenu.
|
255
|
-
return regex.test( $( this ).
|
255
|
+
match = this.activeMenu.find( this.options.items ).filter(function() {
|
256
|
+
return regex.test( $( this ).text() );
|
256
257
|
});
|
257
258
|
}
|
258
259
|
|
@@ -278,7 +279,7 @@ $.widget( "ui.menu", {
|
|
278
279
|
|
279
280
|
_activate: function( event ) {
|
280
281
|
if ( !this.active.is( ".ui-state-disabled" ) ) {
|
281
|
-
if ( this.active.
|
282
|
+
if ( this.active.is( "[aria-haspopup='true']" ) ) {
|
282
283
|
this.expand( event );
|
283
284
|
} else {
|
284
285
|
this.select( event );
|
@@ -287,7 +288,8 @@ $.widget( "ui.menu", {
|
|
287
288
|
},
|
288
289
|
|
289
290
|
refresh: function() {
|
290
|
-
var menus,
|
291
|
+
var menus, items,
|
292
|
+
that = this,
|
291
293
|
icon = this.options.icons.submenu,
|
292
294
|
submenus = this.element.find( this.options.menus );
|
293
295
|
|
@@ -295,7 +297,7 @@ $.widget( "ui.menu", {
|
|
295
297
|
|
296
298
|
// Initialize nested menus
|
297
299
|
submenus.filter( ":not(.ui-menu)" )
|
298
|
-
.addClass( "ui-menu ui-widget ui-widget-content ui-
|
300
|
+
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
|
299
301
|
.hide()
|
300
302
|
.attr({
|
301
303
|
role: this.options.role,
|
@@ -304,7 +306,7 @@ $.widget( "ui.menu", {
|
|
304
306
|
})
|
305
307
|
.each(function() {
|
306
308
|
var menu = $( this ),
|
307
|
-
item = menu.
|
309
|
+
item = menu.parent(),
|
308
310
|
submenuCarat = $( "<span>" )
|
309
311
|
.addClass( "ui-menu-icon ui-icon " + icon )
|
310
312
|
.data( "ui-menu-submenu-carat", true );
|
@@ -316,30 +318,27 @@ $.widget( "ui.menu", {
|
|
316
318
|
});
|
317
319
|
|
318
320
|
menus = submenus.add( this.element );
|
321
|
+
items = menus.find( this.options.items );
|
319
322
|
|
320
|
-
//
|
321
|
-
|
322
|
-
.addClass( "ui-menu-item" )
|
323
|
-
.attr( "role", "presentation" )
|
324
|
-
.children( "a" )
|
325
|
-
.uniqueId()
|
326
|
-
.addClass( "ui-corner-all" )
|
327
|
-
.attr({
|
328
|
-
tabIndex: -1,
|
329
|
-
role: this._itemRole()
|
330
|
-
});
|
331
|
-
|
332
|
-
// Initialize unlinked menu-items containing spaces and/or dashes only as dividers
|
333
|
-
menus.children( ":not(.ui-menu-item)" ).each(function() {
|
323
|
+
// Initialize menu-items containing spaces and/or dashes only as dividers
|
324
|
+
items.not( ".ui-menu-item" ).each(function() {
|
334
325
|
var item = $( this );
|
335
|
-
|
336
|
-
if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
|
326
|
+
if ( that._isDivider( item ) ) {
|
337
327
|
item.addClass( "ui-widget-content ui-menu-divider" );
|
338
328
|
}
|
339
329
|
});
|
340
330
|
|
331
|
+
// Don't refresh list items that are already adapted
|
332
|
+
items.not( ".ui-menu-item, .ui-menu-divider" )
|
333
|
+
.addClass( "ui-menu-item" )
|
334
|
+
.uniqueId()
|
335
|
+
.attr({
|
336
|
+
tabIndex: -1,
|
337
|
+
role: this._itemRole()
|
338
|
+
});
|
339
|
+
|
341
340
|
// Add aria-disabled attribute to any disabled menu item
|
342
|
-
|
341
|
+
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
|
343
342
|
|
344
343
|
// If the active item has been removed, blur the menu
|
345
344
|
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
|
@@ -360,6 +359,11 @@ $.widget( "ui.menu", {
|
|
360
359
|
.removeClass( this.options.icons.submenu )
|
361
360
|
.addClass( value.submenu );
|
362
361
|
}
|
362
|
+
if ( key === "disabled" ) {
|
363
|
+
this.element
|
364
|
+
.toggleClass( "ui-state-disabled", !!value )
|
365
|
+
.attr( "aria-disabled", value );
|
366
|
+
}
|
363
367
|
this._super( key, value );
|
364
368
|
},
|
365
369
|
|
@@ -370,7 +374,7 @@ $.widget( "ui.menu", {
|
|
370
374
|
this._scrollIntoView( item );
|
371
375
|
|
372
376
|
this.active = item.first();
|
373
|
-
focused = this.active.
|
377
|
+
focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
|
374
378
|
// Only update aria-activedescendant if there's a role
|
375
379
|
// otherwise we assume focus is managed elsewhere
|
376
380
|
if ( this.options.role ) {
|
@@ -381,7 +385,6 @@ $.widget( "ui.menu", {
|
|
381
385
|
this.active
|
382
386
|
.parent()
|
383
387
|
.closest( ".ui-menu-item" )
|
384
|
-
.children( "a:first" )
|
385
388
|
.addClass( "ui-state-active" );
|
386
389
|
|
387
390
|
if ( event && event.type === "keydown" ) {
|
@@ -409,7 +412,7 @@ $.widget( "ui.menu", {
|
|
409
412
|
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
|
410
413
|
scroll = this.activeMenu.scrollTop();
|
411
414
|
elementHeight = this.activeMenu.height();
|
412
|
-
itemHeight = item.
|
415
|
+
itemHeight = item.outerHeight();
|
413
416
|
|
414
417
|
if ( offset < 0 ) {
|
415
418
|
this.activeMenu.scrollTop( scroll + offset );
|
@@ -428,7 +431,7 @@ $.widget( "ui.menu", {
|
|
428
431
|
return;
|
429
432
|
}
|
430
433
|
|
431
|
-
this.active.
|
434
|
+
this.active.removeClass( "ui-state-focus" );
|
432
435
|
this.active = null;
|
433
436
|
|
434
437
|
this._trigger( "blur", event, { item: this.active } );
|
@@ -498,10 +501,20 @@ $.widget( "ui.menu", {
|
|
498
501
|
.attr( "aria-hidden", "true" )
|
499
502
|
.attr( "aria-expanded", "false" )
|
500
503
|
.end()
|
501
|
-
.find( "
|
504
|
+
.find( ".ui-state-active" ).not( ".ui-state-focus" )
|
502
505
|
.removeClass( "ui-state-active" );
|
503
506
|
},
|
504
507
|
|
508
|
+
_closeOnDocumentClick: function( event ) {
|
509
|
+
return !$( event.target ).closest( ".ui-menu" ).length;
|
510
|
+
},
|
511
|
+
|
512
|
+
_isDivider: function( item ) {
|
513
|
+
|
514
|
+
// Match hyphen, em dash, en dash
|
515
|
+
return !/[^\-\u2014\u2013\s]/.test( item.text() );
|
516
|
+
},
|
517
|
+
|
505
518
|
collapse: function( event ) {
|
506
519
|
var newItem = this.active &&
|
507
520
|
this.active.parent().closest( ".ui-menu-item", this.element );
|
@@ -515,7 +528,7 @@ $.widget( "ui.menu", {
|
|
515
528
|
var newItem = this.active &&
|
516
529
|
this.active
|
517
530
|
.children( ".ui-menu " )
|
518
|
-
.
|
531
|
+
.find( this.options.items )
|
519
532
|
.first();
|
520
533
|
|
521
534
|
if ( newItem && newItem.length ) {
|
@@ -558,7 +571,7 @@ $.widget( "ui.menu", {
|
|
558
571
|
}
|
559
572
|
}
|
560
573
|
if ( !next || !next.length || !this.active ) {
|
561
|
-
next = this.activeMenu.
|
574
|
+
next = this.activeMenu.find( this.options.items )[ filter ]();
|
562
575
|
}
|
563
576
|
|
564
577
|
this.focus( event, next );
|
@@ -584,7 +597,7 @@ $.widget( "ui.menu", {
|
|
584
597
|
|
585
598
|
this.focus( event, item );
|
586
599
|
} else {
|
587
|
-
this.focus( event, this.activeMenu.
|
600
|
+
this.focus( event, this.activeMenu.find( this.options.items )
|
588
601
|
[ !this.active ? "first" : "last" ]() );
|
589
602
|
}
|
590
603
|
},
|
@@ -608,7 +621,7 @@ $.widget( "ui.menu", {
|
|
608
621
|
|
609
622
|
this.focus( event, item );
|
610
623
|
} else {
|
611
|
-
this.focus( event, this.activeMenu.
|
624
|
+
this.focus( event, this.activeMenu.find( this.options.items ).first() );
|
612
625
|
}
|
613
626
|
},
|
614
627
|
|
@@ -628,4 +641,4 @@ $.widget( "ui.menu", {
|
|
628
641
|
}
|
629
642
|
});
|
630
643
|
|
631
|
-
}
|
644
|
+
}));
|
@@ -1,8 +1,8 @@
|
|
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.0
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -10,19 +10,29 @@
|
|
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.0",
|
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,19 @@ $.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
|
+
}
|
63
75
|
|
64
76
|
// we may have missed mouseup (out of window)
|
65
77
|
(this._mouseStarted && this._mouseUp(event));
|
@@ -102,9 +114,10 @@ $.widget("ui.mouse", {
|
|
102
114
|
this._mouseUpDelegate = function(event) {
|
103
115
|
return that._mouseUp(event);
|
104
116
|
};
|
105
|
-
|
106
|
-
|
107
|
-
.bind("
|
117
|
+
|
118
|
+
this.document
|
119
|
+
.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
120
|
+
.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
108
121
|
|
109
122
|
event.preventDefault();
|
110
123
|
|
@@ -116,6 +129,10 @@ $.widget("ui.mouse", {
|
|
116
129
|
// IE mouseup check - mouseup happened when mouse was out of window
|
117
130
|
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
|
118
131
|
return this._mouseUp(event);
|
132
|
+
|
133
|
+
// Iframe mouseup check - mouseup occurred in another document
|
134
|
+
} else if ( !event.which ) {
|
135
|
+
return this._mouseUp( event );
|
119
136
|
}
|
120
137
|
|
121
138
|
if (this._mouseStarted) {
|
@@ -133,9 +150,9 @@ $.widget("ui.mouse", {
|
|
133
150
|
},
|
134
151
|
|
135
152
|
_mouseUp: function(event) {
|
136
|
-
|
137
|
-
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
138
|
-
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
153
|
+
this.document
|
154
|
+
.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
155
|
+
.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
139
156
|
|
140
157
|
if (this._mouseStarted) {
|
141
158
|
this._mouseStarted = false;
|
@@ -147,6 +164,7 @@ $.widget("ui.mouse", {
|
|
147
164
|
this._mouseStop(event);
|
148
165
|
}
|
149
166
|
|
167
|
+
mouseHandled = false;
|
150
168
|
return false;
|
151
169
|
},
|
152
170
|
|
@@ -169,4 +187,4 @@ $.widget("ui.mouse", {
|
|
169
187
|
_mouseCapture: function(/* event */) { return true; }
|
170
188
|
});
|
171
189
|
|
172
|
-
})
|
190
|
+
}));
|