jquery-ui-rails 4.0.2 → 4.0.3
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 -2
- data/README.md +4 -0
- data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/javascripts/jquery.ui.accordion.js +6 -5
- data/app/assets/javascripts/jquery.ui.autocomplete.js +26 -30
- data/app/assets/javascripts/jquery.ui.button.js +5 -5
- data/app/assets/javascripts/jquery.ui.core.js +19 -23
- data/app/assets/javascripts/jquery.ui.datepicker-de.js +3 -3
- data/app/assets/javascripts/jquery.ui.datepicker-sk.js +3 -3
- data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +1 -1
- data/app/assets/javascripts/jquery.ui.datepicker-sr.js +1 -1
- data/app/assets/javascripts/jquery.ui.datepicker.js +27 -33
- data/app/assets/javascripts/jquery.ui.dialog.js +61 -20
- data/app/assets/javascripts/jquery.ui.draggable.js +95 -83
- data/app/assets/javascripts/jquery.ui.droppable.js +4 -3
- data/app/assets/javascripts/jquery.ui.effect-blind.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-bounce.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-clip.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-drop.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-explode.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-fade.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-fold.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-highlight.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-pulsate.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-scale.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-shake.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-slide.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect-transfer.js +1 -1
- data/app/assets/javascripts/jquery.ui.effect.js +93 -72
- data/app/assets/javascripts/jquery.ui.menu.js +3 -3
- data/app/assets/javascripts/jquery.ui.mouse.js +2 -2
- data/app/assets/javascripts/jquery.ui.position.js +6 -6
- data/app/assets/javascripts/jquery.ui.progressbar.js +2 -2
- data/app/assets/javascripts/jquery.ui.resizable.js +2 -2
- data/app/assets/javascripts/jquery.ui.selectable.js +2 -2
- data/app/assets/javascripts/jquery.ui.slider.js +89 -66
- data/app/assets/javascripts/jquery.ui.sortable.js +65 -30
- data/app/assets/javascripts/jquery.ui.spinner.js +3 -2
- data/app/assets/javascripts/jquery.ui.tabs.js +2 -2
- data/app/assets/javascripts/jquery.ui.tooltip.js +2 -2
- data/app/assets/javascripts/jquery.ui.widget.js +1 -1
- data/app/assets/stylesheets/jquery.ui.accordion.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.all.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.autocomplete.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.base.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.button.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.core.css.erb +2 -1
- data/app/assets/stylesheets/jquery.ui.datepicker.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.dialog.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.menu.css.erb +3 -1
- data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.resizable.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.selectable.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.slider.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.spinner.css.erb +1 -1
- data/app/assets/stylesheets/jquery.ui.tabs.css.erb +2 -2
- data/app/assets/stylesheets/jquery.ui.theme.css.erb +2 -2
- data/app/assets/stylesheets/jquery.ui.tooltip.css.erb +1 -1
- data/lib/jquery/ui/rails/version.rb +1 -1
- metadata +3 -3
@@ -2,7 +2,7 @@
|
|
2
2
|
//= require jquery.ui.widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Progressbar 1.10.
|
5
|
+
* jQuery UI Progressbar 1.10.3
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2013 jQuery Foundation and other contributors
|
@@ -18,7 +18,7 @@
|
|
18
18
|
(function( $, undefined ) {
|
19
19
|
|
20
20
|
$.widget( "ui.progressbar", {
|
21
|
-
version: "1.10.
|
21
|
+
version: "1.10.3",
|
22
22
|
options: {
|
23
23
|
max: 100,
|
24
24
|
value: 0,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Resizable 1.10.
|
6
|
+
* jQuery UI Resizable 1.10.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2013 jQuery Foundation and other contributors
|
@@ -28,7 +28,7 @@ function isNumber(value) {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
$.widget("ui.resizable", $.ui.mouse, {
|
31
|
-
version: "1.10.
|
31
|
+
version: "1.10.3",
|
32
32
|
widgetEventPrefix: "resize",
|
33
33
|
options: {
|
34
34
|
alsoResize: false,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Selectable 1.10.
|
6
|
+
* jQuery UI Selectable 1.10.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2013 jQuery Foundation and other contributors
|
@@ -20,7 +20,7 @@
|
|
20
20
|
(function( $, undefined ) {
|
21
21
|
|
22
22
|
$.widget("ui.selectable", $.ui.mouse, {
|
23
|
-
version: "1.10.
|
23
|
+
version: "1.10.3",
|
24
24
|
options: {
|
25
25
|
appendTo: "body",
|
26
26
|
autoRefresh: true,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Slider 1.10.
|
6
|
+
* jQuery UI Slider 1.10.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2013 jQuery Foundation and other contributors
|
@@ -24,7 +24,7 @@
|
|
24
24
|
var numPages = 5;
|
25
25
|
|
26
26
|
$.widget( "ui.slider", $.ui.mouse, {
|
27
|
-
version: "1.10.
|
27
|
+
version: "1.10.3",
|
28
28
|
widgetEventPrefix: "slide",
|
29
29
|
|
30
30
|
options: {
|
@@ -46,12 +46,6 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
46
46
|
},
|
47
47
|
|
48
48
|
_create: function() {
|
49
|
-
var i, handleCount,
|
50
|
-
o = this.options,
|
51
|
-
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
52
|
-
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
|
53
|
-
handles = [];
|
54
|
-
|
55
49
|
this._keySliding = false;
|
56
50
|
this._mouseSliding = false;
|
57
51
|
this._animateOff = true;
|
@@ -66,29 +60,32 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
66
60
|
" ui-widget-content" +
|
67
61
|
" ui-corner-all");
|
68
62
|
|
69
|
-
this.
|
63
|
+
this._refresh();
|
64
|
+
this._setOption( "disabled", this.options.disabled );
|
70
65
|
|
71
|
-
|
72
|
-
|
73
|
-
if ( !o.values ) {
|
74
|
-
o.values = [ this._valueMin(), this._valueMin() ];
|
75
|
-
} else if ( o.values.length && o.values.length !== 2 ) {
|
76
|
-
o.values = [ o.values[0], o.values[0] ];
|
77
|
-
} else if ( $.isArray( o.values ) ) {
|
78
|
-
o.values = o.values.slice(0);
|
79
|
-
}
|
80
|
-
}
|
66
|
+
this._animateOff = false;
|
67
|
+
},
|
81
68
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
69
|
+
_refresh: function() {
|
70
|
+
this._createRange();
|
71
|
+
this._createHandles();
|
72
|
+
this._setupEvents();
|
73
|
+
this._refreshValue();
|
74
|
+
},
|
75
|
+
|
76
|
+
_createHandles: function() {
|
77
|
+
var i, handleCount,
|
78
|
+
options = this.options,
|
79
|
+
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
80
|
+
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
|
81
|
+
handles = [];
|
90
82
|
|
91
|
-
handleCount = (
|
83
|
+
handleCount = ( options.values && options.values.length ) || 1;
|
84
|
+
|
85
|
+
if ( existingHandles.length > handleCount ) {
|
86
|
+
existingHandles.slice( handleCount ).remove();
|
87
|
+
existingHandles = existingHandles.slice( 0, handleCount );
|
88
|
+
}
|
92
89
|
|
93
90
|
for ( i = existingHandles.length; i < handleCount; i++ ) {
|
94
91
|
handles.push( handle );
|
@@ -98,41 +95,56 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
98
95
|
|
99
96
|
this.handle = this.handles.eq( 0 );
|
100
97
|
|
101
|
-
this.handles.add( this.range ).filter( "a" )
|
102
|
-
.click(function( event ) {
|
103
|
-
event.preventDefault();
|
104
|
-
})
|
105
|
-
.mouseenter(function() {
|
106
|
-
if ( !o.disabled ) {
|
107
|
-
$( this ).addClass( "ui-state-hover" );
|
108
|
-
}
|
109
|
-
})
|
110
|
-
.mouseleave(function() {
|
111
|
-
$( this ).removeClass( "ui-state-hover" );
|
112
|
-
})
|
113
|
-
.focus(function() {
|
114
|
-
if ( !o.disabled ) {
|
115
|
-
$( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
|
116
|
-
$( this ).addClass( "ui-state-focus" );
|
117
|
-
} else {
|
118
|
-
$( this ).blur();
|
119
|
-
}
|
120
|
-
})
|
121
|
-
.blur(function() {
|
122
|
-
$( this ).removeClass( "ui-state-focus" );
|
123
|
-
});
|
124
|
-
|
125
98
|
this.handles.each(function( i ) {
|
126
99
|
$( this ).data( "ui-slider-handle-index", i );
|
127
100
|
});
|
101
|
+
},
|
128
102
|
|
129
|
-
|
103
|
+
_createRange: function() {
|
104
|
+
var options = this.options,
|
105
|
+
classes = "";
|
106
|
+
|
107
|
+
if ( options.range ) {
|
108
|
+
if ( options.range === true ) {
|
109
|
+
if ( !options.values ) {
|
110
|
+
options.values = [ this._valueMin(), this._valueMin() ];
|
111
|
+
} else if ( options.values.length && options.values.length !== 2 ) {
|
112
|
+
options.values = [ options.values[0], options.values[0] ];
|
113
|
+
} else if ( $.isArray( options.values ) ) {
|
114
|
+
options.values = options.values.slice(0);
|
115
|
+
}
|
116
|
+
}
|
130
117
|
|
131
|
-
|
118
|
+
if ( !this.range || !this.range.length ) {
|
119
|
+
this.range = $( "<div></div>" )
|
120
|
+
.appendTo( this.element );
|
132
121
|
|
133
|
-
|
122
|
+
classes = "ui-slider-range" +
|
123
|
+
// note: this isn't the most fittingly semantic framework class for this element,
|
124
|
+
// but worked best visually with a variety of themes
|
125
|
+
" ui-widget-header ui-corner-all";
|
126
|
+
} else {
|
127
|
+
this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
|
128
|
+
// Handle range switching from true to min/max
|
129
|
+
.css({
|
130
|
+
"left": "",
|
131
|
+
"bottom": ""
|
132
|
+
});
|
133
|
+
}
|
134
134
|
|
135
|
-
|
135
|
+
this.range.addClass( classes +
|
136
|
+
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
|
137
|
+
} else {
|
138
|
+
this.range = $([]);
|
139
|
+
}
|
140
|
+
},
|
141
|
+
|
142
|
+
_setupEvents: function() {
|
143
|
+
var elements = this.handles.add( this.range ).filter( "a" );
|
144
|
+
this._off( elements );
|
145
|
+
this._on( elements, this._handleEvents );
|
146
|
+
this._hoverable( elements );
|
147
|
+
this._focusable( elements );
|
136
148
|
},
|
137
149
|
|
138
150
|
_destroy: function() {
|
@@ -405,6 +417,16 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
405
417
|
var i,
|
406
418
|
valsLength = 0;
|
407
419
|
|
420
|
+
if ( key === "range" && this.options.range === true ) {
|
421
|
+
if ( value === "min" ) {
|
422
|
+
this.options.value = this._values( 0 );
|
423
|
+
this.options.values = null;
|
424
|
+
} else if ( value === "max" ) {
|
425
|
+
this.options.value = this._values( this.options.values.length-1 );
|
426
|
+
this.options.values = null;
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
408
430
|
if ( $.isArray( this.options.values ) ) {
|
409
431
|
valsLength = this.options.values.length;
|
410
432
|
}
|
@@ -412,15 +434,6 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
412
434
|
$.Widget.prototype._setOption.apply( this, arguments );
|
413
435
|
|
414
436
|
switch ( key ) {
|
415
|
-
case "disabled":
|
416
|
-
if ( value ) {
|
417
|
-
this.handles.filter( ".ui-state-focus" ).blur();
|
418
|
-
this.handles.removeClass( "ui-state-hover" );
|
419
|
-
this.handles.prop( "disabled", true );
|
420
|
-
} else {
|
421
|
-
this.handles.prop( "disabled", false );
|
422
|
-
}
|
423
|
-
break;
|
424
437
|
case "orientation":
|
425
438
|
this._detectOrientation();
|
426
439
|
this.element
|
@@ -448,6 +461,11 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
448
461
|
this._refreshValue();
|
449
462
|
this._animateOff = false;
|
450
463
|
break;
|
464
|
+
case "range":
|
465
|
+
this._animateOff = true;
|
466
|
+
this._refresh();
|
467
|
+
this._animateOff = false;
|
468
|
+
break;
|
451
469
|
}
|
452
470
|
},
|
453
471
|
|
@@ -473,7 +491,7 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
473
491
|
val = this._trimAlignValue( val );
|
474
492
|
|
475
493
|
return val;
|
476
|
-
} else {
|
494
|
+
} else if ( this.options.values && this.options.values.length ) {
|
477
495
|
// .slice() creates a copy of the array
|
478
496
|
// this copy gets trimmed by min and max and then returned
|
479
497
|
vals = this.options.values.slice();
|
@@ -482,6 +500,8 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
482
500
|
}
|
483
501
|
|
484
502
|
return vals;
|
503
|
+
} else {
|
504
|
+
return [];
|
485
505
|
}
|
486
506
|
},
|
487
507
|
|
@@ -636,6 +656,9 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|
636
656
|
|
637
657
|
this._slide( event, index, newVal );
|
638
658
|
},
|
659
|
+
click: function( event ) {
|
660
|
+
event.preventDefault();
|
661
|
+
},
|
639
662
|
keyup: function( event ) {
|
640
663
|
var index = $( event.target ).data( "ui-slider-handle-index" );
|
641
664
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
//= require jquery.ui.mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Sortable 1.10.
|
6
|
+
* jQuery UI Sortable 1.10.3
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2013 jQuery Foundation and other contributors
|
@@ -25,8 +25,12 @@ function isOverAxis( x, reference, size ) {
|
|
25
25
|
return ( x > reference ) && ( x < ( reference + size ) );
|
26
26
|
}
|
27
27
|
|
28
|
+
function isFloating(item) {
|
29
|
+
return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
|
30
|
+
}
|
31
|
+
|
28
32
|
$.widget("ui.sortable", $.ui.mouse, {
|
29
|
-
version: "1.10.
|
33
|
+
version: "1.10.3",
|
30
34
|
widgetEventPrefix: "sort",
|
31
35
|
ready: false,
|
32
36
|
options: {
|
@@ -77,7 +81,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
77
81
|
this.refresh();
|
78
82
|
|
79
83
|
//Let's determine if the items are being displayed horizontally
|
80
|
-
this.floating = this.items.length ? o.axis === "x" || (
|
84
|
+
this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
|
81
85
|
|
82
86
|
//Let's determine the parent's offset
|
83
87
|
this.offset = this.element.offset();
|
@@ -162,7 +166,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
162
166
|
|
163
167
|
_mouseStart: function(event, overrideHandle, noActivation) {
|
164
168
|
|
165
|
-
var i,
|
169
|
+
var i, body,
|
166
170
|
o = this.options;
|
167
171
|
|
168
172
|
this.currentContainer = this;
|
@@ -232,11 +236,14 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
232
236
|
this._setContainment();
|
233
237
|
}
|
234
238
|
|
235
|
-
if(o.cursor) { // cursor option
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
239
|
+
if( o.cursor && o.cursor !== "auto" ) { // cursor option
|
240
|
+
body = this.document.find( "body" );
|
241
|
+
|
242
|
+
// support: IE
|
243
|
+
this.storedCursor = body.css( "cursor" );
|
244
|
+
body.css( "cursor", o.cursor );
|
245
|
+
|
246
|
+
this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
|
240
247
|
}
|
241
248
|
|
242
249
|
if(o.opacity) { // opacity option
|
@@ -425,14 +432,18 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
425
432
|
|
426
433
|
if(this.options.revert) {
|
427
434
|
var that = this,
|
428
|
-
cur = this.placeholder.offset()
|
435
|
+
cur = this.placeholder.offset(),
|
436
|
+
axis = this.options.axis,
|
437
|
+
animation = {};
|
429
438
|
|
439
|
+
if ( !axis || axis === "x" ) {
|
440
|
+
animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
|
441
|
+
}
|
442
|
+
if ( !axis || axis === "y" ) {
|
443
|
+
animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
|
444
|
+
}
|
430
445
|
this.reverting = true;
|
431
|
-
|
432
|
-
$(this.helper).animate({
|
433
|
-
left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft),
|
434
|
-
top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)
|
435
|
-
}, parseInt(this.options.revert, 10) || 500, function() {
|
446
|
+
$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
|
436
447
|
that._clear(event);
|
437
448
|
});
|
438
449
|
} else {
|
@@ -539,7 +550,9 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
539
550
|
b = t + item.height,
|
540
551
|
dyClick = this.offset.click.top,
|
541
552
|
dxClick = this.offset.click.left,
|
542
|
-
|
553
|
+
isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
|
554
|
+
isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
|
555
|
+
isOverElement = isOverElementHeight && isOverElementWidth;
|
543
556
|
|
544
557
|
if ( this.options.tolerance === "pointer" ||
|
545
558
|
this.options.forcePointerForContainers ||
|
@@ -753,15 +766,26 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
753
766
|
o.placeholder = {
|
754
767
|
element: function() {
|
755
768
|
|
756
|
-
var
|
757
|
-
|
758
|
-
|
769
|
+
var nodeName = that.currentItem[0].nodeName.toLowerCase(),
|
770
|
+
element = $( "<" + nodeName + ">", that.document[0] )
|
771
|
+
.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
|
772
|
+
.removeClass("ui-sortable-helper");
|
773
|
+
|
774
|
+
if ( nodeName === "tr" ) {
|
775
|
+
that.currentItem.children().each(function() {
|
776
|
+
$( "<td> </td>", that.document[0] )
|
777
|
+
.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
|
778
|
+
.appendTo( element );
|
779
|
+
});
|
780
|
+
} else if ( nodeName === "img" ) {
|
781
|
+
element.attr( "src", that.currentItem.attr( "src" ) );
|
782
|
+
}
|
759
783
|
|
760
|
-
if(!className) {
|
761
|
-
|
784
|
+
if ( !className ) {
|
785
|
+
element.css( "visibility", "hidden" );
|
762
786
|
}
|
763
787
|
|
764
|
-
return
|
788
|
+
return element;
|
765
789
|
},
|
766
790
|
update: function(container, p) {
|
767
791
|
|
@@ -790,7 +814,7 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
790
814
|
},
|
791
815
|
|
792
816
|
_contactContainers: function(event) {
|
793
|
-
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
|
817
|
+
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
|
794
818
|
innermostContainer = null,
|
795
819
|
innermostIndex = null;
|
796
820
|
|
@@ -829,15 +853,18 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
829
853
|
|
830
854
|
// move the item into the container if it's not there already
|
831
855
|
if(this.containers.length === 1) {
|
832
|
-
this.containers[innermostIndex].
|
833
|
-
|
856
|
+
if (!this.containers[innermostIndex].containerCache.over) {
|
857
|
+
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
|
858
|
+
this.containers[innermostIndex].containerCache.over = 1;
|
859
|
+
}
|
834
860
|
} else {
|
835
861
|
|
836
862
|
//When entering a new container, we will find the item with the least distance and append our item near it
|
837
863
|
dist = 10000;
|
838
864
|
itemWithLeastDistance = null;
|
839
|
-
|
840
|
-
|
865
|
+
floating = innermostContainer.floating || isFloating(this.currentItem);
|
866
|
+
posProperty = floating ? "left" : "top";
|
867
|
+
sizeProperty = floating ? "width" : "height";
|
841
868
|
base = this.positionAbs[posProperty] + this.offset.click[posProperty];
|
842
869
|
for (j = this.items.length - 1; j >= 0; j--) {
|
843
870
|
if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
|
@@ -846,6 +873,9 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
846
873
|
if(this.items[j].item[0] === this.currentItem[0]) {
|
847
874
|
continue;
|
848
875
|
}
|
876
|
+
if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
|
877
|
+
continue;
|
878
|
+
}
|
849
879
|
cur = this.items[j].item.offset()[posProperty];
|
850
880
|
nearBottom = false;
|
851
881
|
if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
|
@@ -864,10 +894,14 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
864
894
|
return;
|
865
895
|
}
|
866
896
|
|
867
|
-
this.currentContainer
|
897
|
+
if(this.currentContainer === this.containers[innermostIndex]) {
|
898
|
+
return;
|
899
|
+
}
|
900
|
+
|
868
901
|
itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
|
869
902
|
this._trigger("change", event, this._uiHash());
|
870
903
|
this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
|
904
|
+
this.currentContainer = this.containers[innermostIndex];
|
871
905
|
|
872
906
|
//Update the placeholder
|
873
907
|
this.options.placeholder.update(this.currentContainer, this.placeholder);
|
@@ -1182,8 +1216,9 @@ $.widget("ui.sortable", $.ui.mouse, {
|
|
1182
1216
|
}
|
1183
1217
|
|
1184
1218
|
//Do what was originally in plugins
|
1185
|
-
if(this.
|
1186
|
-
|
1219
|
+
if ( this.storedCursor ) {
|
1220
|
+
this.document.find( "body" ).css( "cursor", this.storedCursor );
|
1221
|
+
this.storedStylesheet.remove();
|
1187
1222
|
}
|
1188
1223
|
if(this._storedOpacity) {
|
1189
1224
|
this.helper.css("opacity", this._storedOpacity);
|