jquery-ui-rails 4.0.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/.travis.yml +0 -1
- data/Gemfile +1 -1
- data/History.md +44 -0
- data/README.md +16 -4
- data/Rakefile +39 -11
- data/VERSIONS.md +31 -0
- data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.accordion.js +17 -18
- data/{vendor → app}/assets/javascripts/jquery.ui.all.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.autocomplete.js +36 -44
- data/{vendor → app}/assets/javascripts/jquery.ui.button.js +23 -47
- data/{vendor → app}/assets/javascripts/jquery.ui.core.js +20 -24
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-af.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-az.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-be.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bg.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bs.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ca.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cs.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-da.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-de.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-el.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eo.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-es.js +7 -7
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-et.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eu.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fa.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fi.js +1 -1
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fo.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -0
- data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr.js +6 -6
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-gl.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-he.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hi.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hr.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hu.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hy.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-id.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-is.js +1 -1
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-it.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ja.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ka.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-kk.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-km.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ko.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ky.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lb.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lt.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lv.js +4 -4
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-mk.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ml.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ms.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nb.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nn.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-no.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pl.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt.js +1 -1
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-rm.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ro.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ru.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sk.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sl.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sq.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr-SR.js +1 -1
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr.js +1 -1
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sv.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ta.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-th.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tj.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tr.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-uk.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-vi.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.datepicker.js +28 -34
- data/{vendor → app}/assets/javascripts/jquery.ui.dialog.js +84 -28
- data/{vendor → app}/assets/javascripts/jquery.ui.draggable.js +96 -84
- data/{vendor → app}/assets/javascripts/jquery.ui.droppable.js +33 -15
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-blind.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-bounce.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-clip.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-drop.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-explode.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-fade.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-fold.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-highlight.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-pulsate.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-scale.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-shake.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-slide.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect-transfer.js +2 -2
- data/{vendor → app}/assets/javascripts/jquery.ui.effect.all.js +0 -0
- data/{vendor → app}/assets/javascripts/jquery.ui.effect.js +94 -73
- data/{vendor → app}/assets/javascripts/jquery.ui.menu.js +15 -9
- data/{vendor → app}/assets/javascripts/jquery.ui.mouse.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.position.js +16 -12
- data/{vendor → app}/assets/javascripts/jquery.ui.progressbar.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.resizable.js +20 -10
- data/{vendor → app}/assets/javascripts/jquery.ui.selectable.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.slider.js +97 -70
- data/{vendor → app}/assets/javascripts/jquery.ui.sortable.js +81 -42
- data/{vendor → app}/assets/javascripts/jquery.ui.spinner.js +10 -5
- data/{vendor → app}/assets/javascripts/jquery.ui.tabs.js +8 -5
- data/{vendor → app}/assets/javascripts/jquery.ui.tooltip.js +3 -3
- data/{vendor → app}/assets/javascripts/jquery.ui.widget.js +5 -5
- data/{vendor → app}/assets/stylesheets/jquery.ui.accordion.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.all.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.autocomplete.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.base.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.button.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.core.css.erb +4 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.datepicker.css.erb +3 -6
- data/{vendor → app}/assets/stylesheets/jquery.ui.dialog.css.erb +5 -4
- data/{vendor → app}/assets/stylesheets/jquery.ui.menu.css.erb +5 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.progressbar.css.erb +9 -4
- data/{vendor → app}/assets/stylesheets/jquery.ui.resizable.css.erb +2 -4
- data/{vendor → app}/assets/stylesheets/jquery.ui.selectable.css.erb +2 -4
- data/{vendor → app}/assets/stylesheets/jquery.ui.slider.css.erb +3 -3
- data/{vendor → app}/assets/stylesheets/jquery.ui.spinner.css.erb +5 -5
- data/{vendor → app}/assets/stylesheets/jquery.ui.tabs.css.erb +9 -10
- data/{vendor → app}/assets/stylesheets/jquery.ui.theme.css.erb +26 -5
- data/{vendor → app}/assets/stylesheets/jquery.ui.tooltip.css.erb +4 -2
- data/lib/jquery/ui/rails/version.rb +2 -1
- metadata +148 -161
- data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
@@ -3,10 +3,10 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Draggable 1.10.
|
6
|
+
* jQuery UI Draggable 1.10.4
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
|
-
* Copyright
|
9
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
10
10
|
* Released under the MIT license.
|
11
11
|
* http://jquery.org/license
|
12
12
|
*
|
@@ -20,7 +20,7 @@
|
|
20
20
|
(function( $, undefined ) {
|
21
21
|
|
22
22
|
$.widget("ui.draggable", $.ui.mouse, {
|
23
|
-
version: "1.10.
|
23
|
+
version: "1.10.4",
|
24
24
|
widgetEventPrefix: "drag",
|
25
25
|
options: {
|
26
26
|
addClasses: true,
|
@@ -129,8 +129,10 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
129
129
|
this._cacheMargins();
|
130
130
|
|
131
131
|
//Store the helper's css position
|
132
|
-
this.cssPosition = this.helper.css("position");
|
132
|
+
this.cssPosition = this.helper.css( "position" );
|
133
133
|
this.scrollParent = this.helper.scrollParent();
|
134
|
+
this.offsetParent = this.helper.offsetParent();
|
135
|
+
this.offsetParentCssPosition = this.offsetParent.css( "position" );
|
134
136
|
|
135
137
|
//The element's absolute position on the page minus margins
|
136
138
|
this.offset = this.positionAbs = this.element.offset();
|
@@ -139,6 +141,9 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
139
141
|
left: this.offset.left - this.margins.left
|
140
142
|
};
|
141
143
|
|
144
|
+
//Reset scroll cache
|
145
|
+
this.offset.scroll = false;
|
146
|
+
|
142
147
|
$.extend(this.offset, {
|
143
148
|
click: { //Where the click happened, relative to the element
|
144
149
|
left: event.pageX - this.offset.left,
|
@@ -157,9 +162,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
157
162
|
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
|
158
163
|
|
159
164
|
//Set a containment if given in the options
|
160
|
-
|
161
|
-
this._setContainment();
|
162
|
-
}
|
165
|
+
this._setContainment();
|
163
166
|
|
164
167
|
//Trigger event + callbacks
|
165
168
|
if(this._trigger("start", event) === false) {
|
@@ -187,6 +190,10 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
187
190
|
},
|
188
191
|
|
189
192
|
_mouseDrag: function(event, noPropagation) {
|
193
|
+
// reset any necessary cached properties (see #5009)
|
194
|
+
if ( this.offsetParentCssPosition === "fixed" ) {
|
195
|
+
this.offset.parent = this._getParentOffset();
|
196
|
+
}
|
190
197
|
|
191
198
|
//Compute the helpers position
|
192
199
|
this.position = this._generatePosition(event);
|
@@ -218,9 +225,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
218
225
|
_mouseStop: function(event) {
|
219
226
|
|
220
227
|
//If we are using droppables, inform the manager about the drop
|
221
|
-
var
|
222
|
-
that = this,
|
223
|
-
elementInDom = false,
|
228
|
+
var that = this,
|
224
229
|
dropped = false;
|
225
230
|
if ($.ui.ddmanager && !this.options.dropBehaviour) {
|
226
231
|
dropped = $.ui.ddmanager.drop(this, event);
|
@@ -233,13 +238,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
233
238
|
}
|
234
239
|
|
235
240
|
//if the original element is no longer in the DOM don't bother to continue (see #8269)
|
236
|
-
element
|
237
|
-
while ( element && (element = element.parentNode) ) {
|
238
|
-
if (element === document ) {
|
239
|
-
elementInDom = true;
|
240
|
-
}
|
241
|
-
}
|
242
|
-
if ( !elementInDom && this.options.helper === "original" ) {
|
241
|
+
if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
|
243
242
|
return false;
|
244
243
|
}
|
245
244
|
|
@@ -285,19 +284,9 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
285
284
|
},
|
286
285
|
|
287
286
|
_getHandle: function(event) {
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
.find("*")
|
292
|
-
.addBack()
|
293
|
-
.each(function() {
|
294
|
-
if(this === event.target) {
|
295
|
-
handle = true;
|
296
|
-
}
|
297
|
-
});
|
298
|
-
|
299
|
-
return handle;
|
300
|
-
|
287
|
+
return this.options.handle ?
|
288
|
+
!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
|
289
|
+
true;
|
301
290
|
},
|
302
291
|
|
303
292
|
_createHelper: function(event) {
|
@@ -341,7 +330,6 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
341
330
|
_getParentOffset: function() {
|
342
331
|
|
343
332
|
//Get the offsetParent and cache its position
|
344
|
-
this.offsetParent = this.helper.offsetParent();
|
345
333
|
var po = this.offsetParent.offset();
|
346
334
|
|
347
335
|
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
@@ -402,40 +390,56 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
402
390
|
var over, c, ce,
|
403
391
|
o = this.options;
|
404
392
|
|
405
|
-
if(o.containment
|
406
|
-
|
393
|
+
if ( !o.containment ) {
|
394
|
+
this.containment = null;
|
395
|
+
return;
|
407
396
|
}
|
408
|
-
|
397
|
+
|
398
|
+
if ( o.containment === "window" ) {
|
409
399
|
this.containment = [
|
410
|
-
|
411
|
-
|
412
|
-
(
|
413
|
-
(
|
400
|
+
$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
|
401
|
+
$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
|
402
|
+
$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
|
403
|
+
$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
|
414
404
|
];
|
405
|
+
return;
|
415
406
|
}
|
416
407
|
|
417
|
-
if(
|
418
|
-
c = $(o.containment);
|
419
|
-
ce = c[0];
|
420
|
-
|
421
|
-
if(!ce) {
|
422
|
-
return;
|
423
|
-
}
|
424
|
-
|
425
|
-
over = ($(ce).css("overflow") !== "hidden");
|
426
|
-
|
408
|
+
if ( o.containment === "document") {
|
427
409
|
this.containment = [
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
(
|
410
|
+
0,
|
411
|
+
0,
|
412
|
+
$( document ).width() - this.helperProportions.width - this.margins.left,
|
413
|
+
( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
|
432
414
|
];
|
433
|
-
|
415
|
+
return;
|
416
|
+
}
|
434
417
|
|
435
|
-
|
418
|
+
if ( o.containment.constructor === Array ) {
|
436
419
|
this.containment = o.containment;
|
420
|
+
return;
|
437
421
|
}
|
438
422
|
|
423
|
+
if ( o.containment === "parent" ) {
|
424
|
+
o.containment = this.helper[ 0 ].parentNode;
|
425
|
+
}
|
426
|
+
|
427
|
+
c = $( o.containment );
|
428
|
+
ce = c[ 0 ];
|
429
|
+
|
430
|
+
if( !ce ) {
|
431
|
+
return;
|
432
|
+
}
|
433
|
+
|
434
|
+
over = c.css( "overflow" ) !== "hidden";
|
435
|
+
|
436
|
+
this.containment = [
|
437
|
+
( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
|
438
|
+
( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
|
439
|
+
( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
|
440
|
+
( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom
|
441
|
+
];
|
442
|
+
this.relative_container = c;
|
439
443
|
},
|
440
444
|
|
441
445
|
_convertPositionTo: function(d, pos) {
|
@@ -445,20 +449,25 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
445
449
|
}
|
446
450
|
|
447
451
|
var mod = d === "absolute" ? 1 : -1,
|
448
|
-
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent
|
452
|
+
scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
|
453
|
+
|
454
|
+
//Cache the scroll
|
455
|
+
if (!this.offset.scroll) {
|
456
|
+
this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
|
457
|
+
}
|
449
458
|
|
450
459
|
return {
|
451
460
|
top: (
|
452
461
|
pos.top + // The absolute mouse position
|
453
462
|
this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
|
454
463
|
this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
|
455
|
-
( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() :
|
464
|
+
( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
|
456
465
|
),
|
457
466
|
left: (
|
458
467
|
pos.left + // The absolute mouse position
|
459
468
|
this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
|
460
469
|
this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
|
461
|
-
( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() :
|
470
|
+
( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
|
462
471
|
)
|
463
472
|
};
|
464
473
|
|
@@ -468,28 +477,35 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
468
477
|
|
469
478
|
var containment, co, top, left,
|
470
479
|
o = this.options,
|
471
|
-
scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
|
472
|
-
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
|
480
|
+
scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
|
473
481
|
pageX = event.pageX,
|
474
482
|
pageY = event.pageY;
|
475
483
|
|
484
|
+
//Cache the scroll
|
485
|
+
if (!this.offset.scroll) {
|
486
|
+
this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
|
487
|
+
}
|
488
|
+
|
476
489
|
/*
|
477
490
|
* - Position constraining -
|
478
491
|
* Constrain the position to a mix of grid, containment.
|
479
492
|
*/
|
480
493
|
|
481
|
-
|
482
|
-
|
483
|
-
if (this.
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
494
|
+
// If we are not dragging yet, we won't check for options
|
495
|
+
if ( this.originalPosition ) {
|
496
|
+
if ( this.containment ) {
|
497
|
+
if ( this.relative_container ){
|
498
|
+
co = this.relative_container.offset();
|
499
|
+
containment = [
|
500
|
+
this.containment[ 0 ] + co.left,
|
501
|
+
this.containment[ 1 ] + co.top,
|
502
|
+
this.containment[ 2 ] + co.left,
|
503
|
+
this.containment[ 3 ] + co.top
|
504
|
+
];
|
505
|
+
}
|
506
|
+
else {
|
507
|
+
containment = this.containment;
|
508
|
+
}
|
493
509
|
|
494
510
|
if(event.pageX - this.offset.click.left < containment[0]) {
|
495
511
|
pageX = containment[0] + this.offset.click.left;
|
@@ -522,14 +538,14 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
522
538
|
this.offset.click.top - // Click offset (relative to the element)
|
523
539
|
this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
|
524
540
|
this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
|
525
|
-
(
|
541
|
+
( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
|
526
542
|
),
|
527
543
|
left: (
|
528
544
|
pageX - // The absolute mouse position
|
529
545
|
this.offset.click.left - // Click offset (relative to the element)
|
530
546
|
this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
|
531
547
|
this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
|
532
|
-
(
|
548
|
+
( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
|
533
549
|
)
|
534
550
|
};
|
535
551
|
|
@@ -604,7 +620,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
604
620
|
|
605
621
|
//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
|
606
622
|
if(this.shouldRevert) {
|
607
|
-
this.instance.options.revert =
|
623
|
+
this.instance.options.revert = this.shouldRevert;
|
608
624
|
}
|
609
625
|
|
610
626
|
//Trigger the stop of the sortable
|
@@ -647,7 +663,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
|
|
647
663
|
this.instance.offset.click = inst.offset.click;
|
648
664
|
if (this !== thisSortable &&
|
649
665
|
this.instance._intersectsWith(this.instance.containerCache) &&
|
650
|
-
$.
|
666
|
+
$.contains(thisSortable.instance.element[0], this.instance.element[0])
|
651
667
|
) {
|
652
668
|
innermostIntersecting = false;
|
653
669
|
}
|
@@ -851,8 +867,7 @@ $.ui.plugin.add("draggable", "snap", {
|
|
851
867
|
t = inst.snapElements[i].top;
|
852
868
|
b = t + inst.snapElements[i].height;
|
853
869
|
|
854
|
-
|
855
|
-
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
|
870
|
+
if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
|
856
871
|
if(inst.snapElements[i].snapping) {
|
857
872
|
(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
858
873
|
}
|
@@ -912,22 +927,19 @@ $.ui.plugin.add("draggable", "snap", {
|
|
912
927
|
|
913
928
|
$.ui.plugin.add("draggable", "stack", {
|
914
929
|
start: function() {
|
915
|
-
|
916
930
|
var min,
|
917
|
-
o =
|
931
|
+
o = this.data("ui-draggable").options,
|
918
932
|
group = $.makeArray($(o.stack)).sort(function(a,b) {
|
919
933
|
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
|
920
934
|
});
|
921
935
|
|
922
936
|
if (!group.length) { return; }
|
923
937
|
|
924
|
-
min = parseInt(group[0].
|
938
|
+
min = parseInt($(group[0]).css("zIndex"), 10) || 0;
|
925
939
|
$(group).each(function(i) {
|
926
|
-
this.
|
940
|
+
$(this).css("zIndex", min + i);
|
927
941
|
});
|
928
|
-
|
929
|
-
this[0].style.zIndex = min + group.length;
|
930
|
-
|
942
|
+
this.css("zIndex", (min + group.length));
|
931
943
|
}
|
932
944
|
});
|
933
945
|
|
@@ -4,10 +4,10 @@
|
|
4
4
|
//= require jquery.ui.draggable
|
5
5
|
|
6
6
|
/*!
|
7
|
-
* jQuery UI Droppable 1.10.
|
7
|
+
* jQuery UI Droppable 1.10.4
|
8
8
|
* http://jqueryui.com
|
9
9
|
*
|
10
|
-
* Copyright
|
10
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
11
11
|
* Released under the MIT license.
|
12
12
|
* http://jquery.org/license
|
13
13
|
*
|
@@ -26,7 +26,7 @@ function isOverAxis( x, reference, size ) {
|
|
26
26
|
}
|
27
27
|
|
28
28
|
$.widget("ui.droppable", {
|
29
|
-
version: "1.10.
|
29
|
+
version: "1.10.4",
|
30
30
|
widgetEventPrefix: "drop",
|
31
31
|
options: {
|
32
32
|
accept: "*",
|
@@ -46,7 +46,8 @@ $.widget("ui.droppable", {
|
|
46
46
|
},
|
47
47
|
_create: function() {
|
48
48
|
|
49
|
-
var
|
49
|
+
var proportions,
|
50
|
+
o = this.options,
|
50
51
|
accept = o.accept;
|
51
52
|
|
52
53
|
this.isover = false;
|
@@ -56,8 +57,20 @@ $.widget("ui.droppable", {
|
|
56
57
|
return d.is(accept);
|
57
58
|
};
|
58
59
|
|
59
|
-
|
60
|
-
|
60
|
+
this.proportions = function( /* valueToWrite */ ) {
|
61
|
+
if ( arguments.length ) {
|
62
|
+
// Store the droppable's proportions
|
63
|
+
proportions = arguments[ 0 ];
|
64
|
+
} else {
|
65
|
+
// Retrieve or derive the droppable's proportions
|
66
|
+
return proportions ?
|
67
|
+
proportions :
|
68
|
+
proportions = {
|
69
|
+
width: this.element[ 0 ].offsetWidth,
|
70
|
+
height: this.element[ 0 ].offsetHeight
|
71
|
+
};
|
72
|
+
}
|
73
|
+
};
|
61
74
|
|
62
75
|
// Add the reference and positions to the manager
|
63
76
|
$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
|
@@ -203,10 +216,14 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
|
|
203
216
|
}
|
204
217
|
|
205
218
|
var draggableLeft, draggableTop,
|
206
|
-
x1 = (draggable.positionAbs || draggable.position.absolute).left,
|
207
|
-
y1 = (draggable.positionAbs || draggable.position.absolute).top,
|
208
|
-
|
209
|
-
|
219
|
+
x1 = (draggable.positionAbs || draggable.position.absolute).left,
|
220
|
+
y1 = (draggable.positionAbs || draggable.position.absolute).top,
|
221
|
+
x2 = x1 + draggable.helperProportions.width,
|
222
|
+
y2 = y1 + draggable.helperProportions.height,
|
223
|
+
l = droppable.offset.left,
|
224
|
+
t = droppable.offset.top,
|
225
|
+
r = l + droppable.proportions().width,
|
226
|
+
b = t + droppable.proportions().height;
|
210
227
|
|
211
228
|
switch (toleranceMode) {
|
212
229
|
case "fit":
|
@@ -219,7 +236,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
|
|
219
236
|
case "pointer":
|
220
237
|
draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
|
221
238
|
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
|
222
|
-
return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
|
239
|
+
return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width );
|
223
240
|
case "touch":
|
224
241
|
return (
|
225
242
|
(y1 >= t && y1 <= b) || // Top edge touching
|
@@ -259,7 +276,7 @@ $.ui.ddmanager = {
|
|
259
276
|
// Filter out elements in the current dragged item
|
260
277
|
for (j=0; j < list.length; j++) {
|
261
278
|
if(list[j] === m[i].element[0]) {
|
262
|
-
m[i].proportions.height = 0;
|
279
|
+
m[i].proportions().height = 0;
|
263
280
|
continue droppablesLoop;
|
264
281
|
}
|
265
282
|
}
|
@@ -274,8 +291,8 @@ $.ui.ddmanager = {
|
|
274
291
|
m[i]._activate.call(m[i], event);
|
275
292
|
}
|
276
293
|
|
277
|
-
m[i].offset = m[i].element.offset();
|
278
|
-
m[i].proportions
|
294
|
+
m[ i ].offset = m[ i ].element.offset();
|
295
|
+
m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
|
279
296
|
|
280
297
|
}
|
281
298
|
|
@@ -283,7 +300,8 @@ $.ui.ddmanager = {
|
|
283
300
|
drop: function(draggable, event) {
|
284
301
|
|
285
302
|
var dropped = false;
|
286
|
-
|
303
|
+
// Create a copy of the droppables in case the list changes during the drop (#9116)
|
304
|
+
$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
|
287
305
|
|
288
306
|
if(!this.options) {
|
289
307
|
return;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Blind 1.10.
|
4
|
+
* jQuery UI Effects Blind 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Bounce 1.10.
|
4
|
+
* jQuery UI Effects Bounce 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Clip 1.10.
|
4
|
+
* jQuery UI Effects Clip 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Drop 1.10.
|
4
|
+
* jQuery UI Effects Drop 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Explode 1.10.
|
4
|
+
* jQuery UI Effects Explode 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Fade 1.10.
|
4
|
+
* jQuery UI Effects Fade 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Fold 1.10.
|
4
|
+
* jQuery UI Effects Fold 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Highlight 1.10.
|
4
|
+
* jQuery UI Effects Highlight 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Pulsate 1.10.
|
4
|
+
* jQuery UI Effects Pulsate 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Scale 1.10.
|
4
|
+
* jQuery UI Effects Scale 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Shake 1.10.
|
4
|
+
* jQuery UI Effects Shake 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Slide 1.10.
|
4
|
+
* jQuery UI Effects Slide 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
@@ -1,10 +1,10 @@
|
|
1
1
|
//= require jquery.ui.effect
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Effects Transfer 1.10.
|
4
|
+
* jQuery UI Effects Transfer 1.10.4
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
9
|
* http://jquery.org/license
|
10
10
|
*
|
File without changes
|