jquery-ui-rails 4.2.1 → 5.0.0
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/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
@@ -0,0 +1,421 @@
|
|
1
|
+
//= require jquery-ui/core
|
2
|
+
//= require jquery-ui/widget
|
3
|
+
//= require jquery-ui/mouse
|
4
|
+
//= require jquery-ui/draggable
|
5
|
+
|
6
|
+
/*!
|
7
|
+
* jQuery UI Droppable 1.11.0
|
8
|
+
* http://jqueryui.com
|
9
|
+
*
|
10
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
11
|
+
* Released under the MIT license.
|
12
|
+
* http://jquery.org/license
|
13
|
+
*
|
14
|
+
* http://api.jqueryui.com/droppable/
|
15
|
+
*/
|
16
|
+
(function( factory ) {
|
17
|
+
if ( typeof define === "function" && define.amd ) {
|
18
|
+
|
19
|
+
// AMD. Register as an anonymous module.
|
20
|
+
define([
|
21
|
+
"jquery",
|
22
|
+
"./core",
|
23
|
+
"./widget",
|
24
|
+
"./mouse",
|
25
|
+
"./draggable"
|
26
|
+
], factory );
|
27
|
+
} else {
|
28
|
+
|
29
|
+
// Browser globals
|
30
|
+
factory( jQuery );
|
31
|
+
}
|
32
|
+
}(function( $ ) {
|
33
|
+
|
34
|
+
$.widget( "ui.droppable", {
|
35
|
+
version: "1.11.0",
|
36
|
+
widgetEventPrefix: "drop",
|
37
|
+
options: {
|
38
|
+
accept: "*",
|
39
|
+
activeClass: false,
|
40
|
+
addClasses: true,
|
41
|
+
greedy: false,
|
42
|
+
hoverClass: false,
|
43
|
+
scope: "default",
|
44
|
+
tolerance: "intersect",
|
45
|
+
|
46
|
+
// callbacks
|
47
|
+
activate: null,
|
48
|
+
deactivate: null,
|
49
|
+
drop: null,
|
50
|
+
out: null,
|
51
|
+
over: null
|
52
|
+
},
|
53
|
+
_create: function() {
|
54
|
+
|
55
|
+
var proportions,
|
56
|
+
o = this.options,
|
57
|
+
accept = o.accept;
|
58
|
+
|
59
|
+
this.isover = false;
|
60
|
+
this.isout = true;
|
61
|
+
|
62
|
+
this.accept = $.isFunction( accept ) ? accept : function( d ) {
|
63
|
+
return d.is( accept );
|
64
|
+
};
|
65
|
+
|
66
|
+
this.proportions = function( /* valueToWrite */ ) {
|
67
|
+
if ( arguments.length ) {
|
68
|
+
// Store the droppable's proportions
|
69
|
+
proportions = arguments[ 0 ];
|
70
|
+
} else {
|
71
|
+
// Retrieve or derive the droppable's proportions
|
72
|
+
return proportions ?
|
73
|
+
proportions :
|
74
|
+
proportions = {
|
75
|
+
width: this.element[ 0 ].offsetWidth,
|
76
|
+
height: this.element[ 0 ].offsetHeight
|
77
|
+
};
|
78
|
+
}
|
79
|
+
};
|
80
|
+
|
81
|
+
this._addToManager( o.scope );
|
82
|
+
|
83
|
+
o.addClasses && this.element.addClass( "ui-droppable" );
|
84
|
+
|
85
|
+
},
|
86
|
+
|
87
|
+
_addToManager: function( scope ) {
|
88
|
+
// Add the reference and positions to the manager
|
89
|
+
$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
|
90
|
+
$.ui.ddmanager.droppables[ scope ].push( this );
|
91
|
+
},
|
92
|
+
|
93
|
+
_splice: function( drop ) {
|
94
|
+
var i = 0;
|
95
|
+
for ( ; i < drop.length; i++ ) {
|
96
|
+
if ( drop[ i ] === this ) {
|
97
|
+
drop.splice( i, 1 );
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
|
102
|
+
_destroy: function() {
|
103
|
+
var drop = $.ui.ddmanager.droppables[ this.options.scope ];
|
104
|
+
|
105
|
+
this._splice( drop );
|
106
|
+
|
107
|
+
this.element.removeClass( "ui-droppable ui-droppable-disabled" );
|
108
|
+
},
|
109
|
+
|
110
|
+
_setOption: function( key, value ) {
|
111
|
+
|
112
|
+
if ( key === "accept" ) {
|
113
|
+
this.accept = $.isFunction( value ) ? value : function( d ) {
|
114
|
+
return d.is( value );
|
115
|
+
};
|
116
|
+
} else if ( key === "scope" ) {
|
117
|
+
var drop = $.ui.ddmanager.droppables[ this.options.scope ];
|
118
|
+
|
119
|
+
this._splice( drop );
|
120
|
+
this._addToManager( value );
|
121
|
+
}
|
122
|
+
|
123
|
+
this._super( key, value );
|
124
|
+
},
|
125
|
+
|
126
|
+
_activate: function( event ) {
|
127
|
+
var draggable = $.ui.ddmanager.current;
|
128
|
+
if ( this.options.activeClass ) {
|
129
|
+
this.element.addClass( this.options.activeClass );
|
130
|
+
}
|
131
|
+
if ( draggable ){
|
132
|
+
this._trigger( "activate", event, this.ui( draggable ) );
|
133
|
+
}
|
134
|
+
},
|
135
|
+
|
136
|
+
_deactivate: function( event ) {
|
137
|
+
var draggable = $.ui.ddmanager.current;
|
138
|
+
if ( this.options.activeClass ) {
|
139
|
+
this.element.removeClass( this.options.activeClass );
|
140
|
+
}
|
141
|
+
if ( draggable ){
|
142
|
+
this._trigger( "deactivate", event, this.ui( draggable ) );
|
143
|
+
}
|
144
|
+
},
|
145
|
+
|
146
|
+
_over: function( event ) {
|
147
|
+
|
148
|
+
var draggable = $.ui.ddmanager.current;
|
149
|
+
|
150
|
+
// Bail if draggable and droppable are same element
|
151
|
+
if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
|
155
|
+
if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
|
156
|
+
if ( this.options.hoverClass ) {
|
157
|
+
this.element.addClass( this.options.hoverClass );
|
158
|
+
}
|
159
|
+
this._trigger( "over", event, this.ui( draggable ) );
|
160
|
+
}
|
161
|
+
|
162
|
+
},
|
163
|
+
|
164
|
+
_out: function( event ) {
|
165
|
+
|
166
|
+
var draggable = $.ui.ddmanager.current;
|
167
|
+
|
168
|
+
// Bail if draggable and droppable are same element
|
169
|
+
if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
|
170
|
+
return;
|
171
|
+
}
|
172
|
+
|
173
|
+
if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
|
174
|
+
if ( this.options.hoverClass ) {
|
175
|
+
this.element.removeClass( this.options.hoverClass );
|
176
|
+
}
|
177
|
+
this._trigger( "out", event, this.ui( draggable ) );
|
178
|
+
}
|
179
|
+
|
180
|
+
},
|
181
|
+
|
182
|
+
_drop: function( event, custom ) {
|
183
|
+
|
184
|
+
var draggable = custom || $.ui.ddmanager.current,
|
185
|
+
childrenIntersection = false;
|
186
|
+
|
187
|
+
// Bail if draggable and droppable are same element
|
188
|
+
if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
|
189
|
+
return false;
|
190
|
+
}
|
191
|
+
|
192
|
+
this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() {
|
193
|
+
var inst = $( this ).droppable( "instance" );
|
194
|
+
if (
|
195
|
+
inst.options.greedy &&
|
196
|
+
!inst.options.disabled &&
|
197
|
+
inst.options.scope === draggable.options.scope &&
|
198
|
+
inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
|
199
|
+
$.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance )
|
200
|
+
) { childrenIntersection = true; return false; }
|
201
|
+
});
|
202
|
+
if ( childrenIntersection ) {
|
203
|
+
return false;
|
204
|
+
}
|
205
|
+
|
206
|
+
if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
|
207
|
+
if ( this.options.activeClass ) {
|
208
|
+
this.element.removeClass( this.options.activeClass );
|
209
|
+
}
|
210
|
+
if ( this.options.hoverClass ) {
|
211
|
+
this.element.removeClass( this.options.hoverClass );
|
212
|
+
}
|
213
|
+
this._trigger( "drop", event, this.ui( draggable ) );
|
214
|
+
return this.element;
|
215
|
+
}
|
216
|
+
|
217
|
+
return false;
|
218
|
+
|
219
|
+
},
|
220
|
+
|
221
|
+
ui: function( c ) {
|
222
|
+
return {
|
223
|
+
draggable: ( c.currentItem || c.element ),
|
224
|
+
helper: c.helper,
|
225
|
+
position: c.position,
|
226
|
+
offset: c.positionAbs
|
227
|
+
};
|
228
|
+
}
|
229
|
+
|
230
|
+
});
|
231
|
+
|
232
|
+
$.ui.intersect = (function() {
|
233
|
+
function isOverAxis( x, reference, size ) {
|
234
|
+
return ( x >= reference ) && ( x < ( reference + size ) );
|
235
|
+
}
|
236
|
+
|
237
|
+
return function( draggable, droppable, toleranceMode ) {
|
238
|
+
|
239
|
+
if ( !droppable.offset ) {
|
240
|
+
return false;
|
241
|
+
}
|
242
|
+
|
243
|
+
var draggableLeft, draggableTop,
|
244
|
+
x1 = ( draggable.positionAbs || draggable.position.absolute ).left,
|
245
|
+
y1 = ( draggable.positionAbs || draggable.position.absolute ).top,
|
246
|
+
x2 = x1 + draggable.helperProportions.width,
|
247
|
+
y2 = y1 + draggable.helperProportions.height,
|
248
|
+
l = droppable.offset.left,
|
249
|
+
t = droppable.offset.top,
|
250
|
+
r = l + droppable.proportions().width,
|
251
|
+
b = t + droppable.proportions().height;
|
252
|
+
|
253
|
+
switch ( toleranceMode ) {
|
254
|
+
case "fit":
|
255
|
+
return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
|
256
|
+
case "intersect":
|
257
|
+
return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
|
258
|
+
x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
|
259
|
+
t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
|
260
|
+
y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
|
261
|
+
case "pointer":
|
262
|
+
draggableLeft = ( ( draggable.positionAbs || draggable.position.absolute ).left + ( draggable.clickOffset || draggable.offset.click ).left );
|
263
|
+
draggableTop = ( ( draggable.positionAbs || draggable.position.absolute ).top + ( draggable.clickOffset || draggable.offset.click ).top );
|
264
|
+
return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width );
|
265
|
+
case "touch":
|
266
|
+
return (
|
267
|
+
( y1 >= t && y1 <= b ) || // Top edge touching
|
268
|
+
( y2 >= t && y2 <= b ) || // Bottom edge touching
|
269
|
+
( y1 < t && y2 > b ) // Surrounded vertically
|
270
|
+
) && (
|
271
|
+
( x1 >= l && x1 <= r ) || // Left edge touching
|
272
|
+
( x2 >= l && x2 <= r ) || // Right edge touching
|
273
|
+
( x1 < l && x2 > r ) // Surrounded horizontally
|
274
|
+
);
|
275
|
+
default:
|
276
|
+
return false;
|
277
|
+
}
|
278
|
+
};
|
279
|
+
})();
|
280
|
+
|
281
|
+
/*
|
282
|
+
This manager tracks offsets of draggables and droppables
|
283
|
+
*/
|
284
|
+
$.ui.ddmanager = {
|
285
|
+
current: null,
|
286
|
+
droppables: { "default": [] },
|
287
|
+
prepareOffsets: function( t, event ) {
|
288
|
+
|
289
|
+
var i, j,
|
290
|
+
m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
|
291
|
+
type = event ? event.type : null, // workaround for #2317
|
292
|
+
list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
|
293
|
+
|
294
|
+
droppablesLoop: for ( i = 0; i < m.length; i++ ) {
|
295
|
+
|
296
|
+
// No disabled and non-accepted
|
297
|
+
if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {
|
298
|
+
continue;
|
299
|
+
}
|
300
|
+
|
301
|
+
// Filter out elements in the current dragged item
|
302
|
+
for ( j = 0; j < list.length; j++ ) {
|
303
|
+
if ( list[ j ] === m[ i ].element[ 0 ] ) {
|
304
|
+
m[ i ].proportions().height = 0;
|
305
|
+
continue droppablesLoop;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
|
310
|
+
if ( !m[ i ].visible ) {
|
311
|
+
continue;
|
312
|
+
}
|
313
|
+
|
314
|
+
// Activate the droppable if used directly from draggables
|
315
|
+
if ( type === "mousedown" ) {
|
316
|
+
m[ i ]._activate.call( m[ i ], event );
|
317
|
+
}
|
318
|
+
|
319
|
+
m[ i ].offset = m[ i ].element.offset();
|
320
|
+
m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
|
321
|
+
|
322
|
+
}
|
323
|
+
|
324
|
+
},
|
325
|
+
drop: function( draggable, event ) {
|
326
|
+
|
327
|
+
var dropped = false;
|
328
|
+
// Create a copy of the droppables in case the list changes during the drop (#9116)
|
329
|
+
$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
|
330
|
+
|
331
|
+
if ( !this.options ) {
|
332
|
+
return;
|
333
|
+
}
|
334
|
+
if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance ) ) {
|
335
|
+
dropped = this._drop.call( this, event ) || dropped;
|
336
|
+
}
|
337
|
+
|
338
|
+
if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
|
339
|
+
this.isout = true;
|
340
|
+
this.isover = false;
|
341
|
+
this._deactivate.call( this, event );
|
342
|
+
}
|
343
|
+
|
344
|
+
});
|
345
|
+
return dropped;
|
346
|
+
|
347
|
+
},
|
348
|
+
dragStart: function( draggable, event ) {
|
349
|
+
// Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
|
350
|
+
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
|
351
|
+
if ( !draggable.options.refreshPositions ) {
|
352
|
+
$.ui.ddmanager.prepareOffsets( draggable, event );
|
353
|
+
}
|
354
|
+
});
|
355
|
+
},
|
356
|
+
drag: function( draggable, event ) {
|
357
|
+
|
358
|
+
// If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
|
359
|
+
if ( draggable.options.refreshPositions ) {
|
360
|
+
$.ui.ddmanager.prepareOffsets( draggable, event );
|
361
|
+
}
|
362
|
+
|
363
|
+
// Run through all droppables and check their positions based on specific tolerance options
|
364
|
+
$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
|
365
|
+
|
366
|
+
if ( this.options.disabled || this.greedyChild || !this.visible ) {
|
367
|
+
return;
|
368
|
+
}
|
369
|
+
|
370
|
+
var parentInstance, scope, parent,
|
371
|
+
intersects = $.ui.intersect( draggable, this, this.options.tolerance ),
|
372
|
+
c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
|
373
|
+
if ( !c ) {
|
374
|
+
return;
|
375
|
+
}
|
376
|
+
|
377
|
+
if ( this.options.greedy ) {
|
378
|
+
// find droppable parents with same scope
|
379
|
+
scope = this.options.scope;
|
380
|
+
parent = this.element.parents( ":data(ui-droppable)" ).filter(function() {
|
381
|
+
return $( this ).droppable( "instance" ).options.scope === scope;
|
382
|
+
});
|
383
|
+
|
384
|
+
if ( parent.length ) {
|
385
|
+
parentInstance = $( parent[ 0 ] ).droppable( "instance" );
|
386
|
+
parentInstance.greedyChild = ( c === "isover" );
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
// we just moved into a greedy child
|
391
|
+
if ( parentInstance && c === "isover" ) {
|
392
|
+
parentInstance.isover = false;
|
393
|
+
parentInstance.isout = true;
|
394
|
+
parentInstance._out.call( parentInstance, event );
|
395
|
+
}
|
396
|
+
|
397
|
+
this[ c ] = true;
|
398
|
+
this[c === "isout" ? "isover" : "isout"] = false;
|
399
|
+
this[c === "isover" ? "_over" : "_out"].call( this, event );
|
400
|
+
|
401
|
+
// we just moved out of a greedy child
|
402
|
+
if ( parentInstance && c === "isout" ) {
|
403
|
+
parentInstance.isout = false;
|
404
|
+
parentInstance.isover = true;
|
405
|
+
parentInstance._over.call( parentInstance, event );
|
406
|
+
}
|
407
|
+
});
|
408
|
+
|
409
|
+
},
|
410
|
+
dragStop: function( draggable, event ) {
|
411
|
+
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
|
412
|
+
// Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
|
413
|
+
if ( !draggable.options.refreshPositions ) {
|
414
|
+
$.ui.ddmanager.prepareOffsets( draggable, event );
|
415
|
+
}
|
416
|
+
}
|
417
|
+
};
|
418
|
+
|
419
|
+
return $.ui.droppable;
|
420
|
+
|
421
|
+
}));
|
@@ -1,7 +1,7 @@
|
|
1
|
-
//= require jquery
|
1
|
+
//= require jquery-ui/effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Blind 1.
|
4
|
+
* jQuery UI Effects Blind 1.11.0
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
7
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -9,18 +9,27 @@
|
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
11
11
|
* http://api.jqueryui.com/blind-effect/
|
12
|
-
*
|
13
|
-
* Depends:
|
14
|
-
* jquery.ui.effect.js
|
15
12
|
*/
|
16
|
-
(function(
|
13
|
+
(function( factory ) {
|
14
|
+
if ( typeof define === "function" && define.amd ) {
|
17
15
|
|
18
|
-
|
19
|
-
|
16
|
+
// AMD. Register as an anonymous module.
|
17
|
+
define([
|
18
|
+
"jquery",
|
19
|
+
"./effect"
|
20
|
+
], factory );
|
21
|
+
} else {
|
20
22
|
|
21
|
-
|
23
|
+
// Browser globals
|
24
|
+
factory( jQuery );
|
25
|
+
}
|
26
|
+
}(function( $ ) {
|
27
|
+
|
28
|
+
return $.effects.effect.blind = function( o, done ) {
|
22
29
|
// Create element
|
23
30
|
var el = $( this ),
|
31
|
+
rvertical = /up|down|vertical/,
|
32
|
+
rpositivemotion = /up|left|vertical|horizontal/,
|
24
33
|
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
25
34
|
mode = $.effects.setMode( el, o.mode || "hide" ),
|
26
35
|
direction = o.direction || "up",
|
@@ -59,7 +68,7 @@ $.effects.effect.blind = function( o, done ) {
|
|
59
68
|
// start at 0 if we are showing
|
60
69
|
if ( show ) {
|
61
70
|
wrapper.css( ref, 0 );
|
62
|
-
if ( !
|
71
|
+
if ( !motion ) {
|
63
72
|
wrapper.css( ref2, margin + distance );
|
64
73
|
}
|
65
74
|
}
|
@@ -78,7 +87,6 @@ $.effects.effect.blind = function( o, done ) {
|
|
78
87
|
done();
|
79
88
|
}
|
80
89
|
});
|
81
|
-
|
82
90
|
};
|
83
91
|
|
84
|
-
})
|
92
|
+
}));
|