jquery-ui-rails 2.0.2 → 3.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 +15 -0
- data/License.txt +2 -3
- data/README.md +17 -19
- data/Rakefile +79 -28
- data/lib/jquery/ui/rails/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.ui.accordion.js +537 -417
- data/vendor/assets/javascripts/jquery.ui.all.js +17 -14
- data/vendor/assets/javascripts/jquery.ui.autocomplete.js +311 -339
- data/vendor/assets/javascripts/jquery.ui.button.js +63 -59
- data/vendor/assets/javascripts/jquery.ui.core.js +134 -112
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +16 -16
- data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +5 -5
- data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +13 -13
- data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +9 -9
- data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +5 -5
- data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +11 -11
- data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +18 -18
- data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +7 -7
- data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +6 -6
- data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +9 -9
- data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +1 -1
- data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +3 -3
- data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +2 -2
- data/vendor/assets/javascripts/jquery.ui.datepicker.js +51 -59
- data/vendor/assets/javascripts/jquery.ui.dialog.js +402 -409
- data/vendor/assets/javascripts/jquery.ui.draggable.js +79 -75
- data/vendor/assets/javascripts/jquery.ui.droppable.js +10 -17
- data/vendor/assets/javascripts/jquery.ui.effect-blind.js +84 -0
- data/vendor/assets/javascripts/jquery.ui.effect-bounce.js +115 -0
- data/vendor/assets/javascripts/jquery.ui.effect-clip.js +69 -0
- data/vendor/assets/javascripts/jquery.ui.effect-drop.js +67 -0
- data/vendor/assets/javascripts/jquery.ui.effect-explode.js +99 -0
- data/vendor/assets/javascripts/jquery.ui.effect-fade.js +32 -0
- data/vendor/assets/javascripts/jquery.ui.effect-fold.js +78 -0
- data/vendor/assets/javascripts/jquery.ui.effect-highlight.js +52 -0
- data/vendor/assets/javascripts/jquery.ui.effect-pulsate.js +65 -0
- data/vendor/assets/javascripts/jquery.ui.effect-scale.js +320 -0
- data/vendor/assets/javascripts/jquery.ui.effect-shake.js +76 -0
- data/vendor/assets/javascripts/jquery.ui.effect-slide.js +66 -0
- data/vendor/assets/javascripts/jquery.ui.effect-transfer.js +49 -0
- data/vendor/assets/javascripts/jquery.ui.effect.all.js +14 -0
- data/vendor/assets/javascripts/jquery.ui.effect.js +1276 -0
- data/vendor/assets/javascripts/jquery.ui.menu.js +614 -0
- data/vendor/assets/javascripts/jquery.ui.mouse.js +22 -20
- data/vendor/assets/javascripts/jquery.ui.position.js +367 -158
- data/vendor/assets/javascripts/jquery.ui.progressbar.js +10 -14
- data/vendor/assets/javascripts/jquery.ui.resizable.js +143 -149
- data/vendor/assets/javascripts/jquery.ui.selectable.js +22 -28
- data/vendor/assets/javascripts/jquery.ui.slider.js +88 -106
- data/vendor/assets/javascripts/jquery.ui.sortable.js +97 -95
- data/vendor/assets/javascripts/jquery.ui.spinner.js +482 -0
- data/vendor/assets/javascripts/jquery.ui.tabs.js +1189 -580
- data/vendor/assets/javascripts/jquery.ui.tooltip.js +402 -0
- data/vendor/assets/javascripts/jquery.ui.widget.js +373 -117
- data/vendor/assets/stylesheets/jquery.ui.accordion.css.erb +10 -13
- data/vendor/assets/stylesheets/jquery.ui.all.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +10 -44
- data/vendor/assets/stylesheets/jquery.ui.base.css.erb +7 -3
- data/vendor/assets/stylesheets/jquery.ui.button.css.erb +6 -4
- data/vendor/assets/stylesheets/jquery.ui.core.css.erb +5 -4
- data/vendor/assets/stylesheets/jquery.ui.datepicker.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.dialog.css.erb +6 -5
- data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +34 -0
- data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.resizable.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.slider.css.erb +4 -3
- data/vendor/assets/stylesheets/jquery.ui.spinner.css.erb +27 -0
- data/vendor/assets/stylesheets/jquery.ui.tabs.css.erb +8 -8
- data/vendor/assets/stylesheets/jquery.ui.theme.css.erb +8 -7
- data/vendor/assets/stylesheets/jquery.ui.tooltip.css.erb +25 -0
- metadata +24 -19
- data/dependencies.js +0 -31
- data/vendor/assets/javascripts/jquery.effects.all.js +0 -14
- data/vendor/assets/javascripts/jquery.effects.blind.js +0 -51
- data/vendor/assets/javascripts/jquery.effects.bounce.js +0 -80
- data/vendor/assets/javascripts/jquery.effects.clip.js +0 -56
- data/vendor/assets/javascripts/jquery.effects.core.js +0 -612
- data/vendor/assets/javascripts/jquery.effects.drop.js +0 -52
- data/vendor/assets/javascripts/jquery.effects.explode.js +0 -81
- data/vendor/assets/javascripts/jquery.effects.fade.js +0 -34
- data/vendor/assets/javascripts/jquery.effects.fold.js +0 -58
- data/vendor/assets/javascripts/jquery.effects.highlight.js +0 -52
- data/vendor/assets/javascripts/jquery.effects.pulsate.js +0 -53
- data/vendor/assets/javascripts/jquery.effects.scale.js +0 -180
- data/vendor/assets/javascripts/jquery.effects.shake.js +0 -59
- data/vendor/assets/javascripts/jquery.effects.slide.js +0 -52
- data/vendor/assets/javascripts/jquery.effects.transfer.js +0 -47
@@ -3,13 +3,14 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Draggable 1.
|
6
|
+
* jQuery UI Draggable 1.9.2
|
7
|
+
* http://jqueryui.com
|
7
8
|
*
|
8
|
-
* Copyright 2012
|
9
|
-
*
|
9
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
10
|
+
* Released under the MIT license.
|
10
11
|
* http://jquery.org/license
|
11
12
|
*
|
12
|
-
* http://
|
13
|
+
* http://api.jqueryui.com/draggable/
|
13
14
|
*
|
14
15
|
* Depends:
|
15
16
|
* jquery.ui.core.js
|
@@ -19,6 +20,7 @@
|
|
19
20
|
(function( $, undefined ) {
|
20
21
|
|
21
22
|
$.widget("ui.draggable", $.ui.mouse, {
|
23
|
+
version: "1.9.2",
|
22
24
|
widgetEventPrefix: "drag",
|
23
25
|
options: {
|
24
26
|
addClasses: true,
|
@@ -58,17 +60,9 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
58
60
|
|
59
61
|
},
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
-
this.element
|
64
|
-
.removeData("draggable")
|
65
|
-
.unbind(".draggable")
|
66
|
-
.removeClass("ui-draggable"
|
67
|
-
+ " ui-draggable-dragging"
|
68
|
-
+ " ui-draggable-disabled");
|
63
|
+
_destroy: function() {
|
64
|
+
this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
|
69
65
|
this._mouseDestroy();
|
70
|
-
|
71
|
-
return this;
|
72
66
|
},
|
73
67
|
|
74
68
|
_mouseCapture: function(event) {
|
@@ -83,18 +77,16 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
83
77
|
this.handle = this._getHandle(event);
|
84
78
|
if (!this.handle)
|
85
79
|
return false;
|
86
|
-
|
87
|
-
|
88
|
-
$(
|
89
|
-
|
90
|
-
.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
});
|
97
|
-
}
|
80
|
+
|
81
|
+
$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
|
82
|
+
$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
|
83
|
+
.css({
|
84
|
+
width: this.offsetWidth+"px", height: this.offsetHeight+"px",
|
85
|
+
position: "absolute", opacity: "0.001", zIndex: 1000
|
86
|
+
})
|
87
|
+
.css($(this).offset())
|
88
|
+
.appendTo("body");
|
89
|
+
});
|
98
90
|
|
99
91
|
return true;
|
100
92
|
|
@@ -169,12 +161,12 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
169
161
|
if ($.ui.ddmanager && !o.dropBehaviour)
|
170
162
|
$.ui.ddmanager.prepareOffsets(this, event);
|
171
163
|
|
172
|
-
|
164
|
+
|
173
165
|
this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
174
|
-
|
166
|
+
|
175
167
|
//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
|
176
168
|
if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
|
177
|
-
|
169
|
+
|
178
170
|
return true;
|
179
171
|
},
|
180
172
|
|
@@ -213,7 +205,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
213
205
|
dropped = this.dropped;
|
214
206
|
this.dropped = false;
|
215
207
|
}
|
216
|
-
|
208
|
+
|
217
209
|
//if the original element is no longer in the DOM don't bother to continue (see #8269)
|
218
210
|
var element = this.element[0], elementInDom = false;
|
219
211
|
while ( element && (element = element.parentNode) ) {
|
@@ -225,10 +217,10 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
225
217
|
return false;
|
226
218
|
|
227
219
|
if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
|
228
|
-
var
|
220
|
+
var that = this;
|
229
221
|
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
|
230
|
-
if(
|
231
|
-
|
222
|
+
if(that._trigger("stop", event) !== false) {
|
223
|
+
that._clear();
|
232
224
|
}
|
233
225
|
});
|
234
226
|
} else {
|
@@ -239,29 +231,29 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
239
231
|
|
240
232
|
return false;
|
241
233
|
},
|
242
|
-
|
234
|
+
|
243
235
|
_mouseUp: function(event) {
|
244
236
|
//Remove frame helpers
|
245
|
-
$("div.ui-draggable-iframeFix").each(function() {
|
246
|
-
this.parentNode.removeChild(this);
|
237
|
+
$("div.ui-draggable-iframeFix").each(function() {
|
238
|
+
this.parentNode.removeChild(this);
|
247
239
|
});
|
248
|
-
|
240
|
+
|
249
241
|
//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
|
250
242
|
if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
|
251
|
-
|
243
|
+
|
252
244
|
return $.ui.mouse.prototype._mouseUp.call(this, event);
|
253
245
|
},
|
254
|
-
|
246
|
+
|
255
247
|
cancel: function() {
|
256
|
-
|
248
|
+
|
257
249
|
if(this.helper.is(".ui-draggable-dragging")) {
|
258
250
|
this._mouseUp({});
|
259
251
|
} else {
|
260
252
|
this._clear();
|
261
253
|
}
|
262
|
-
|
254
|
+
|
263
255
|
return this;
|
264
|
-
|
256
|
+
|
265
257
|
},
|
266
258
|
|
267
259
|
_getHandle: function(event) {
|
@@ -324,13 +316,13 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
324
316
|
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
325
317
|
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
326
318
|
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
327
|
-
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.
|
319
|
+
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
328
320
|
po.left += this.scrollParent.scrollLeft();
|
329
321
|
po.top += this.scrollParent.scrollTop();
|
330
322
|
}
|
331
323
|
|
332
324
|
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|
333
|
-
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.
|
325
|
+
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
|
334
326
|
po = { top: 0, left: 0 };
|
335
327
|
|
336
328
|
return {
|
@@ -382,7 +374,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
382
374
|
];
|
383
375
|
|
384
376
|
if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
|
385
|
-
|
377
|
+
var c = $(o.containment);
|
386
378
|
var ce = c[0]; if(!ce) return;
|
387
379
|
var co = c.offset();
|
388
380
|
var over = ($(ce).css("overflow") != 'hidden');
|
@@ -405,20 +397,20 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
405
397
|
|
406
398
|
if(!pos) pos = this.position;
|
407
399
|
var mod = d == "absolute" ? 1 : -1;
|
408
|
-
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.
|
400
|
+
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
409
401
|
|
410
402
|
return {
|
411
403
|
top: (
|
412
404
|
pos.top // The absolute mouse position
|
413
405
|
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
414
406
|
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
|
415
|
-
- (
|
407
|
+
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
416
408
|
),
|
417
409
|
left: (
|
418
410
|
pos.left // The absolute mouse position
|
419
411
|
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
420
412
|
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
|
421
|
-
- (
|
413
|
+
- ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
422
414
|
)
|
423
415
|
};
|
424
416
|
|
@@ -426,7 +418,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
426
418
|
|
427
419
|
_generatePosition: function(event) {
|
428
420
|
|
429
|
-
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.
|
421
|
+
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
430
422
|
var pageX = event.pageX;
|
431
423
|
var pageY = event.pageY;
|
432
424
|
|
@@ -436,18 +428,18 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
436
428
|
*/
|
437
429
|
|
438
430
|
if(this.originalPosition) { //If we are not dragging yet, we won't check for options
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
431
|
+
var containment;
|
432
|
+
if(this.containment) {
|
433
|
+
if (this.relative_container){
|
434
|
+
var co = this.relative_container.offset();
|
435
|
+
containment = [ this.containment[0] + co.left,
|
436
|
+
this.containment[1] + co.top,
|
437
|
+
this.containment[2] + co.left,
|
438
|
+
this.containment[3] + co.top ];
|
439
|
+
}
|
440
|
+
else {
|
441
|
+
containment = this.containment;
|
442
|
+
}
|
451
443
|
|
452
444
|
if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
|
453
445
|
if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
|
@@ -472,14 +464,14 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
472
464
|
- this.offset.click.top // Click offset (relative to the element)
|
473
465
|
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
|
474
466
|
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
|
475
|
-
+ (
|
467
|
+
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
476
468
|
),
|
477
469
|
left: (
|
478
470
|
pageX // The absolute mouse position
|
479
471
|
- this.offset.click.left // Click offset (relative to the element)
|
480
472
|
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
|
481
473
|
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
|
482
|
-
+ (
|
474
|
+
+ ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
483
475
|
)
|
484
476
|
};
|
485
477
|
|
@@ -515,10 +507,6 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
515
507
|
|
516
508
|
});
|
517
509
|
|
518
|
-
$.extend($.ui.draggable, {
|
519
|
-
version: "1.8.24"
|
520
|
-
});
|
521
|
-
|
522
510
|
$.ui.plugin.add("draggable", "connectToSortable", {
|
523
511
|
start: function(event, ui) {
|
524
512
|
|
@@ -574,7 +562,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
574
562
|
},
|
575
563
|
drag: function(event, ui) {
|
576
564
|
|
577
|
-
var inst = $(this).data("draggable"),
|
565
|
+
var inst = $(this).data("draggable"), that = this;
|
578
566
|
|
579
567
|
var checkPos = function(o) {
|
580
568
|
var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
|
@@ -586,14 +574,30 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
586
574
|
};
|
587
575
|
|
588
576
|
$.each(inst.sortables, function(i) {
|
589
|
-
|
577
|
+
|
578
|
+
var innermostIntersecting = false;
|
579
|
+
var thisSortable = this;
|
590
580
|
//Copy over some variables to allow calling the sortable's native _intersectsWith
|
591
581
|
this.instance.positionAbs = inst.positionAbs;
|
592
582
|
this.instance.helperProportions = inst.helperProportions;
|
593
583
|
this.instance.offset.click = inst.offset.click;
|
594
|
-
|
584
|
+
|
595
585
|
if(this.instance._intersectsWith(this.instance.containerCache)) {
|
586
|
+
innermostIntersecting = true;
|
587
|
+
$.each(inst.sortables, function () {
|
588
|
+
this.instance.positionAbs = inst.positionAbs;
|
589
|
+
this.instance.helperProportions = inst.helperProportions;
|
590
|
+
this.instance.offset.click = inst.offset.click;
|
591
|
+
if (this != thisSortable
|
592
|
+
&& this.instance._intersectsWith(this.instance.containerCache)
|
593
|
+
&& $.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
|
594
|
+
innermostIntersecting = false;
|
595
|
+
return innermostIntersecting;
|
596
|
+
});
|
597
|
+
}
|
596
598
|
|
599
|
+
|
600
|
+
if(innermostIntersecting) {
|
597
601
|
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
|
598
602
|
if(!this.instance.isOver) {
|
599
603
|
|
@@ -601,7 +605,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
601
605
|
//Now we fake the start of dragging for the sortable instance,
|
602
606
|
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
|
603
607
|
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
|
604
|
-
this.instance.currentItem = $(
|
608
|
+
this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
|
605
609
|
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
|
606
610
|
this.instance.options.helper = function() { return ui.helper[0]; };
|
607
611
|
|
@@ -634,13 +638,13 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
634
638
|
|
635
639
|
this.instance.isOver = 0;
|
636
640
|
this.instance.cancelHelperRemoval = true;
|
637
|
-
|
641
|
+
|
638
642
|
//Prevent reverting on this forced stop
|
639
643
|
this.instance.options.revert = false;
|
640
|
-
|
644
|
+
|
641
645
|
// The out event needs to be triggered independently
|
642
646
|
this.instance._trigger('out', event, this.instance._uiHash(this.instance));
|
643
|
-
|
647
|
+
|
644
648
|
this.instance._mouseStop(event, true);
|
645
649
|
this.instance.options.helper = this.instance.options._helper;
|
646
650
|
|
@@ -810,7 +814,7 @@ $.ui.plugin.add("draggable", "stack", {
|
|
810
814
|
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
|
811
815
|
});
|
812
816
|
if (!group.length) { return; }
|
813
|
-
|
817
|
+
|
814
818
|
var min = parseInt(group[0].style.zIndex) || 0;
|
815
819
|
$(group).each(function(i) {
|
816
820
|
this.style.zIndex = min + i;
|
@@ -4,13 +4,14 @@
|
|
4
4
|
//= require jquery.ui.draggable
|
5
5
|
|
6
6
|
/*!
|
7
|
-
* jQuery UI Droppable 1.
|
7
|
+
* jQuery UI Droppable 1.9.2
|
8
|
+
* http://jqueryui.com
|
8
9
|
*
|
9
|
-
* Copyright 2012
|
10
|
-
*
|
10
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
11
|
+
* Released under the MIT license.
|
11
12
|
* http://jquery.org/license
|
12
13
|
*
|
13
|
-
* http://
|
14
|
+
* http://api.jqueryui.com/droppable/
|
14
15
|
*
|
15
16
|
* Depends:
|
16
17
|
* jquery.ui.core.js
|
@@ -21,6 +22,7 @@
|
|
21
22
|
(function( $, undefined ) {
|
22
23
|
|
23
24
|
$.widget("ui.droppable", {
|
25
|
+
version: "1.9.2",
|
24
26
|
widgetEventPrefix: "drop",
|
25
27
|
options: {
|
26
28
|
accept: '*',
|
@@ -51,18 +53,13 @@ $.widget("ui.droppable", {
|
|
51
53
|
|
52
54
|
},
|
53
55
|
|
54
|
-
|
56
|
+
_destroy: function() {
|
55
57
|
var drop = $.ui.ddmanager.droppables[this.options.scope];
|
56
58
|
for ( var i = 0; i < drop.length; i++ )
|
57
59
|
if ( drop[i] == this )
|
58
60
|
drop.splice(i, 1);
|
59
61
|
|
60
|
-
this.element
|
61
|
-
.removeClass("ui-droppable ui-droppable-disabled")
|
62
|
-
.removeData("droppable")
|
63
|
-
.unbind(".droppable");
|
64
|
-
|
65
|
-
return this;
|
62
|
+
this.element.removeClass("ui-droppable ui-droppable-disabled");
|
66
63
|
},
|
67
64
|
|
68
65
|
_setOption: function(key, value) {
|
@@ -151,10 +148,6 @@ $.widget("ui.droppable", {
|
|
151
148
|
|
152
149
|
});
|
153
150
|
|
154
|
-
$.extend($.ui.droppable, {
|
155
|
-
version: "1.8.24"
|
156
|
-
});
|
157
|
-
|
158
151
|
$.ui.intersect = function(draggable, droppable, toleranceMode) {
|
159
152
|
|
160
153
|
if (!droppable.offset) return false;
|
@@ -245,7 +238,7 @@ $.ui.ddmanager = {
|
|
245
238
|
},
|
246
239
|
dragStart: function( draggable, event ) {
|
247
240
|
//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
|
248
|
-
draggable.element.
|
241
|
+
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
|
249
242
|
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
|
250
243
|
});
|
251
244
|
},
|
@@ -297,7 +290,7 @@ $.ui.ddmanager = {
|
|
297
290
|
|
298
291
|
},
|
299
292
|
dragStop: function( draggable, event ) {
|
300
|
-
draggable.element.
|
293
|
+
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
|
301
294
|
//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
|
302
295
|
if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
|
303
296
|
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
//= require jquery.ui.effect
|
2
|
+
|
3
|
+
/*!
|
4
|
+
* jQuery UI Effects Blind 1.9.2
|
5
|
+
* http://jqueryui.com
|
6
|
+
*
|
7
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
8
|
+
* Released under the MIT license.
|
9
|
+
* http://jquery.org/license
|
10
|
+
*
|
11
|
+
* http://api.jqueryui.com/blind-effect/
|
12
|
+
*
|
13
|
+
* Depends:
|
14
|
+
* jquery.ui.effect.js
|
15
|
+
*/
|
16
|
+
(function( $, undefined ) {
|
17
|
+
|
18
|
+
var rvertical = /up|down|vertical/,
|
19
|
+
rpositivemotion = /up|left|vertical|horizontal/;
|
20
|
+
|
21
|
+
$.effects.effect.blind = function( o, done ) {
|
22
|
+
// Create element
|
23
|
+
var el = $( this ),
|
24
|
+
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
|
25
|
+
mode = $.effects.setMode( el, o.mode || "hide" ),
|
26
|
+
direction = o.direction || "up",
|
27
|
+
vertical = rvertical.test( direction ),
|
28
|
+
ref = vertical ? "height" : "width",
|
29
|
+
ref2 = vertical ? "top" : "left",
|
30
|
+
motion = rpositivemotion.test( direction ),
|
31
|
+
animation = {},
|
32
|
+
show = mode === "show",
|
33
|
+
wrapper, distance, margin;
|
34
|
+
|
35
|
+
// if already wrapped, the wrapper's properties are my property. #6245
|
36
|
+
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
|
37
|
+
$.effects.save( el.parent(), props );
|
38
|
+
} else {
|
39
|
+
$.effects.save( el, props );
|
40
|
+
}
|
41
|
+
el.show();
|
42
|
+
wrapper = $.effects.createWrapper( el ).css({
|
43
|
+
overflow: "hidden"
|
44
|
+
});
|
45
|
+
|
46
|
+
distance = wrapper[ ref ]();
|
47
|
+
margin = parseFloat( wrapper.css( ref2 ) ) || 0;
|
48
|
+
|
49
|
+
animation[ ref ] = show ? distance : 0;
|
50
|
+
if ( !motion ) {
|
51
|
+
el
|
52
|
+
.css( vertical ? "bottom" : "right", 0 )
|
53
|
+
.css( vertical ? "top" : "left", "auto" )
|
54
|
+
.css({ position: "absolute" });
|
55
|
+
|
56
|
+
animation[ ref2 ] = show ? margin : distance + margin;
|
57
|
+
}
|
58
|
+
|
59
|
+
// start at 0 if we are showing
|
60
|
+
if ( show ) {
|
61
|
+
wrapper.css( ref, 0 );
|
62
|
+
if ( ! motion ) {
|
63
|
+
wrapper.css( ref2, margin + distance );
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
// Animate
|
68
|
+
wrapper.animate( animation, {
|
69
|
+
duration: o.duration,
|
70
|
+
easing: o.easing,
|
71
|
+
queue: false,
|
72
|
+
complete: function() {
|
73
|
+
if ( mode === "hide" ) {
|
74
|
+
el.hide();
|
75
|
+
}
|
76
|
+
$.effects.restore( el, props );
|
77
|
+
$.effects.removeWrapper( el );
|
78
|
+
done();
|
79
|
+
}
|
80
|
+
});
|
81
|
+
|
82
|
+
};
|
83
|
+
|
84
|
+
})(jQuery);
|