jquery-ui-rails 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jquery-ui-rails might be problematic. Click here for more details.
- data/History.md +4 -0
- data/README.md +4 -0
- data/Rakefile +2 -4
- data/VERSIONS.md +1 -0
- data/app/assets/javascripts/jquery-ui/accordion.js +2 -2
- data/app/assets/javascripts/jquery-ui/autocomplete.js +6 -4
- data/app/assets/javascripts/jquery-ui/button.js +3 -3
- data/app/assets/javascripts/jquery-ui/core.js +6 -5
- data/app/assets/javascripts/jquery-ui/datepicker.js +25 -18
- data/app/assets/javascripts/jquery-ui/dialog.js +22 -5
- data/app/assets/javascripts/jquery-ui/draggable.js +38 -33
- data/app/assets/javascripts/jquery-ui/droppable.js +8 -11
- 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-puff.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-size.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 +7 -3
- data/app/assets/javascripts/jquery-ui/menu.js +2 -2
- data/app/assets/javascripts/jquery-ui/mouse.js +2 -2
- data/app/assets/javascripts/jquery-ui/position.js +6 -3
- data/app/assets/javascripts/jquery-ui/progressbar.js +2 -2
- data/app/assets/javascripts/jquery-ui/resizable.js +283 -132
- data/app/assets/javascripts/jquery-ui/selectable.js +2 -2
- data/app/assets/javascripts/jquery-ui/selectmenu.js +25 -8
- data/app/assets/javascripts/jquery-ui/slider.js +5 -2
- data/app/assets/javascripts/jquery-ui/sortable.js +2 -2
- data/app/assets/javascripts/jquery-ui/spinner.js +2 -2
- data/app/assets/javascripts/jquery-ui/tabs.js +25 -21
- data/app/assets/javascripts/jquery-ui/tooltip.js +10 -3
- data/app/assets/javascripts/jquery-ui/widget.js +10 -3
- 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 -2
- data/app/assets/stylesheets/jquery-ui/datepicker.css.erb +2 -2
- data/app/assets/stylesheets/jquery-ui/dialog.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/draggable.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/menu.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/progressbar.css.erb +3 -8
- 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/selectmenu.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/slider.css.erb +2 -2
- data/app/assets/stylesheets/jquery-ui/sortable.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/spinner.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/tabs.css.erb +1 -1
- data/app/assets/stylesheets/jquery-ui/theme.css.erb +6 -6
- data/app/assets/stylesheets/jquery-ui/tooltip.css.erb +1 -1
- data/lib/jquery/ui/rails/version.rb +2 -2
- metadata +3 -4
- data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
data/History.md
CHANGED
data/README.md
CHANGED
@@ -45,6 +45,10 @@ Also add the jQuery UI CSS to your application.css:
|
|
45
45
|
*/
|
46
46
|
```
|
47
47
|
|
48
|
+
Warning: If you are using a version below 5.0, you will have to use a different naming
|
49
|
+
for the files to require, see https://github.com/joliss/jquery-ui-rails/blob/v4.2.1/README.md
|
50
|
+
for more information.
|
51
|
+
|
48
52
|
All images required by jQuery UI are automatically served through the asset
|
49
53
|
pipeline, so you are good to go! For example, this code will add a
|
50
54
|
[datepicker](http://jqueryui.com/demos/datepicker/):
|
data/Rakefile
CHANGED
@@ -18,15 +18,13 @@ end
|
|
18
18
|
# "ui.widget": "1.9.2"
|
19
19
|
# },
|
20
20
|
#
|
21
|
-
# then "ui.widget" returns "
|
21
|
+
# then "ui.widget" returns "widget.js")
|
22
22
|
#
|
23
23
|
# The only exception is "jquery", which doesn't follow the
|
24
|
-
# same naming conventions so
|
24
|
+
# same naming conventions so it's a special case.
|
25
25
|
def source_file_for_dependency_entry(dep_entry)
|
26
|
-
# if the dependent file is jquery.js itself, return its filename
|
27
26
|
return "jquery.js" if dep_entry == 'jquery'
|
28
27
|
|
29
|
-
# otherwise, tack 'jquery.' on the front
|
30
28
|
"#{dep_entry.sub 'ui.', ''}.js"
|
31
29
|
end
|
32
30
|
|
data/VERSIONS.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Accordion 1.11.
|
5
|
+
* jQuery UI Accordion 1.11.1
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -28,7 +28,7 @@
|
|
28
28
|
}(function( $ ) {
|
29
29
|
|
30
30
|
return $.widget( "ui.accordion", {
|
31
|
-
version: "1.11.
|
31
|
+
version: "1.11.1",
|
32
32
|
options: {
|
33
33
|
active: 0,
|
34
34
|
animate: {},
|
@@ -4,7 +4,7 @@
|
|
4
4
|
//= require jquery-ui/position
|
5
5
|
|
6
6
|
/*!
|
7
|
-
* jQuery UI Autocomplete 1.11.
|
7
|
+
* jQuery UI Autocomplete 1.11.1
|
8
8
|
* http://jqueryui.com
|
9
9
|
*
|
10
10
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -32,7 +32,7 @@
|
|
32
32
|
}(function( $ ) {
|
33
33
|
|
34
34
|
$.widget( "ui.autocomplete", {
|
35
|
-
version: "1.11.
|
35
|
+
version: "1.11.1",
|
36
36
|
defaultElement: "<input>",
|
37
37
|
options: {
|
38
38
|
appendTo: null,
|
@@ -135,7 +135,9 @@ $.widget( "ui.autocomplete", {
|
|
135
135
|
break;
|
136
136
|
case keyCode.ESCAPE:
|
137
137
|
if ( this.menu.element.is( ":visible" ) ) {
|
138
|
-
|
138
|
+
if ( !this.isMultiLine ) {
|
139
|
+
this._value( this.term );
|
140
|
+
}
|
139
141
|
this.close( event );
|
140
142
|
// Different browsers have different default behavior for escape
|
141
143
|
// Single press can mean undo or clear
|
@@ -271,7 +273,7 @@ $.widget( "ui.autocomplete", {
|
|
271
273
|
|
272
274
|
// Announce the value in the liveRegion
|
273
275
|
label = ui.item.attr( "aria-label" ) || item.value;
|
274
|
-
if ( label &&
|
276
|
+
if ( label && $.trim( label ).length ) {
|
275
277
|
this.liveRegion.children().hide();
|
276
278
|
$( "<div>" ).text( label ).appendTo( this.liveRegion );
|
277
279
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
//= require jquery-ui/widget
|
3
3
|
|
4
4
|
/*!
|
5
|
-
* jQuery UI Button 1.11.
|
5
|
+
* jQuery UI Button 1.11.1
|
6
6
|
* http://jqueryui.com
|
7
7
|
*
|
8
8
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -55,7 +55,7 @@ var lastActive,
|
|
55
55
|
};
|
56
56
|
|
57
57
|
$.widget( "ui.button", {
|
58
|
-
version: "1.11.
|
58
|
+
version: "1.11.1",
|
59
59
|
defaultElement: "<button>",
|
60
60
|
options: {
|
61
61
|
disabled: null,
|
@@ -351,7 +351,7 @@ $.widget( "ui.button", {
|
|
351
351
|
});
|
352
352
|
|
353
353
|
$.widget( "ui.buttonset", {
|
354
|
-
version: "1.11.
|
354
|
+
version: "1.11.1",
|
355
355
|
options: {
|
356
356
|
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
|
357
357
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery UI Core 1.11.
|
2
|
+
* jQuery UI Core 1.11.1
|
3
3
|
* http://jqueryui.com
|
4
4
|
*
|
5
5
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -24,7 +24,7 @@
|
|
24
24
|
$.ui = $.ui || {};
|
25
25
|
|
26
26
|
$.extend( $.ui, {
|
27
|
-
version: "1.11.
|
27
|
+
version: "1.11.1",
|
28
28
|
|
29
29
|
keyCode: {
|
30
30
|
BACKSPACE: 8,
|
@@ -48,15 +48,16 @@ $.extend( $.ui, {
|
|
48
48
|
|
49
49
|
// plugins
|
50
50
|
$.fn.extend({
|
51
|
-
scrollParent: function() {
|
51
|
+
scrollParent: function( includeHidden ) {
|
52
52
|
var position = this.css( "position" ),
|
53
53
|
excludeStaticParent = position === "absolute",
|
54
|
+
overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
|
54
55
|
scrollParent = this.parents().filter( function() {
|
55
56
|
var parent = $( this );
|
56
57
|
if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
|
57
58
|
return false;
|
58
59
|
}
|
59
|
-
return
|
60
|
+
return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
|
60
61
|
}).eq( 0 );
|
61
62
|
|
62
63
|
return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
|
@@ -93,7 +94,7 @@ function focusable( element, isTabIndexNotNaN ) {
|
|
93
94
|
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
94
95
|
return false;
|
95
96
|
}
|
96
|
-
img = $( "img[usemap
|
97
|
+
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
|
97
98
|
return !!img && visible( img );
|
98
99
|
}
|
99
100
|
return ( /input|select|textarea|button|object/.test( nodeName ) ?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//= require jquery-ui/core
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Datepicker 1.11.
|
4
|
+
* jQuery UI Datepicker 1.11.1
|
5
5
|
* http://jqueryui.com
|
6
6
|
*
|
7
7
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -25,7 +25,7 @@
|
|
25
25
|
}
|
26
26
|
}(function( $ ) {
|
27
27
|
|
28
|
-
$.extend($.ui, { datepicker: { version: "1.11.
|
28
|
+
$.extend($.ui, { datepicker: { version: "1.11.1" } });
|
29
29
|
|
30
30
|
var datepicker_instActive;
|
31
31
|
|
@@ -801,12 +801,16 @@ $.extend(Datepicker.prototype, {
|
|
801
801
|
datepicker_instActive = inst; // for delegate hover events
|
802
802
|
inst.dpDiv.empty().append(this._generateHTML(inst));
|
803
803
|
this._attachHandlers(inst);
|
804
|
-
inst.dpDiv.find("." + this._dayOverClass + " a");
|
805
804
|
|
806
805
|
var origyearshtml,
|
807
806
|
numMonths = this._getNumberOfMonths(inst),
|
808
807
|
cols = numMonths[1],
|
809
|
-
width = 17
|
808
|
+
width = 17,
|
809
|
+
activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
|
810
|
+
|
811
|
+
if ( activeCell.length > 0 ) {
|
812
|
+
datepicker_handleMouseover.apply( activeCell.get( 0 ) );
|
813
|
+
}
|
810
814
|
|
811
815
|
inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
|
812
816
|
if (cols > 1) {
|
@@ -1140,7 +1144,8 @@ $.extend(Datepicker.prototype, {
|
|
1140
1144
|
var isDoubled = lookAhead(match),
|
1141
1145
|
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
1142
1146
|
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
1143
|
-
|
1147
|
+
minSize = (match === "y" ? size : 1),
|
1148
|
+
digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
|
1144
1149
|
num = value.substring(iValue).match(digits);
|
1145
1150
|
if (!num) {
|
1146
1151
|
throw "Missing number at position " + iValue;
|
@@ -2001,18 +2006,20 @@ function datepicker_bindHover(dpDiv) {
|
|
2001
2006
|
$(this).removeClass("ui-datepicker-next-hover");
|
2002
2007
|
}
|
2003
2008
|
})
|
2004
|
-
.delegate(selector, "mouseover",
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2009
|
+
.delegate( selector, "mouseover", datepicker_handleMouseover );
|
2010
|
+
}
|
2011
|
+
|
2012
|
+
function datepicker_handleMouseover() {
|
2013
|
+
if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
|
2014
|
+
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
|
2015
|
+
$(this).addClass("ui-state-hover");
|
2016
|
+
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
|
2017
|
+
$(this).addClass("ui-datepicker-prev-hover");
|
2018
|
+
}
|
2019
|
+
if (this.className.indexOf("ui-datepicker-next") !== -1) {
|
2020
|
+
$(this).addClass("ui-datepicker-next-hover");
|
2021
|
+
}
|
2022
|
+
}
|
2016
2023
|
}
|
2017
2024
|
|
2018
2025
|
/* jQuery extend now ignores nulls! */
|
@@ -2068,7 +2075,7 @@ $.fn.datepicker = function(options){
|
|
2068
2075
|
$.datepicker = new Datepicker(); // singleton instance
|
2069
2076
|
$.datepicker.initialized = false;
|
2070
2077
|
$.datepicker.uuid = new Date().getTime();
|
2071
|
-
$.datepicker.version = "1.11.
|
2078
|
+
$.datepicker.version = "1.11.1";
|
2072
2079
|
|
2073
2080
|
return $.datepicker;
|
2074
2081
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
//= require jquery-ui/resizable
|
7
7
|
|
8
8
|
/*!
|
9
|
-
* jQuery UI Dialog 1.11.
|
9
|
+
* jQuery UI Dialog 1.11.1
|
10
10
|
* http://jqueryui.com
|
11
11
|
*
|
12
12
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -37,7 +37,7 @@
|
|
37
37
|
}(function( $ ) {
|
38
38
|
|
39
39
|
return $.widget( "ui.dialog", {
|
40
|
-
version: "1.11.
|
40
|
+
version: "1.11.1",
|
41
41
|
options: {
|
42
42
|
appendTo: "body",
|
43
43
|
autoOpen: true,
|
@@ -267,11 +267,24 @@ return $.widget( "ui.dialog", {
|
|
267
267
|
this._position();
|
268
268
|
this._createOverlay();
|
269
269
|
this._moveToTop( null, true );
|
270
|
+
|
271
|
+
// Ensure the overlay is moved to the top with the dialog, but only when
|
272
|
+
// opening. The overlay shouldn't move after the dialog is open so that
|
273
|
+
// modeless dialogs opened after the modal dialog stack properly.
|
274
|
+
if ( this.overlay ) {
|
275
|
+
this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
|
276
|
+
}
|
277
|
+
|
270
278
|
this._show( this.uiDialog, this.options.show, function() {
|
271
279
|
that._focusTabbable();
|
272
280
|
that._trigger( "focus" );
|
273
281
|
});
|
274
282
|
|
283
|
+
// Track the dialog immediately upon openening in case a focus event
|
284
|
+
// somehow occurs outside of the dialog before an element inside the
|
285
|
+
// dialog is focused (#10152)
|
286
|
+
this._makeFocusTarget();
|
287
|
+
|
275
288
|
this._trigger( "open" );
|
276
289
|
},
|
277
290
|
|
@@ -583,14 +596,18 @@ return $.widget( "ui.dialog", {
|
|
583
596
|
|
584
597
|
_trackFocus: function() {
|
585
598
|
this._on( this.widget(), {
|
586
|
-
|
587
|
-
this.
|
588
|
-
this._trackingInstances().unshift( this );
|
599
|
+
focusin: function( event ) {
|
600
|
+
this._makeFocusTarget();
|
589
601
|
this._focusedElement = $( event.target );
|
590
602
|
}
|
591
603
|
});
|
592
604
|
},
|
593
605
|
|
606
|
+
_makeFocusTarget: function() {
|
607
|
+
this._untrackInstance();
|
608
|
+
this._trackingInstances().unshift( this );
|
609
|
+
},
|
610
|
+
|
594
611
|
_untrackInstance: function() {
|
595
612
|
var instances = this._trackingInstances(),
|
596
613
|
exists = $.inArray( this, instances );
|
@@ -3,7 +3,7 @@
|
|
3
3
|
//= require jquery-ui/mouse
|
4
4
|
|
5
5
|
/*!
|
6
|
-
* jQuery UI Draggable 1.11.
|
6
|
+
* jQuery UI Draggable 1.11.1
|
7
7
|
* http://jqueryui.com
|
8
8
|
*
|
9
9
|
* Copyright 2014 jQuery Foundation and other contributors
|
@@ -30,7 +30,7 @@
|
|
30
30
|
}(function( $ ) {
|
31
31
|
|
32
32
|
$.widget("ui.draggable", $.ui.mouse, {
|
33
|
-
version: "1.11.
|
33
|
+
version: "1.11.1",
|
34
34
|
widgetEventPrefix: "drag",
|
35
35
|
options: {
|
36
36
|
addClasses: true,
|
@@ -82,6 +82,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
82
82
|
_setOption: function( key, value ) {
|
83
83
|
this._super( key, value );
|
84
84
|
if ( key === "handle" ) {
|
85
|
+
this._removeHandleClassName();
|
85
86
|
this._setHandleClassName();
|
86
87
|
}
|
87
88
|
},
|
@@ -164,7 +165,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
164
165
|
|
165
166
|
//Store the helper's css position
|
166
167
|
this.cssPosition = this.helper.css( "position" );
|
167
|
-
this.scrollParent = this.helper.scrollParent();
|
168
|
+
this.scrollParent = this.helper.scrollParent( true );
|
168
169
|
this.offsetParent = this.helper.offsetParent();
|
169
170
|
this.offsetParentCssPosition = this.offsetParent.css( "position" );
|
170
171
|
|
@@ -318,14 +319,13 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
318
319
|
},
|
319
320
|
|
320
321
|
_setHandleClassName: function() {
|
321
|
-
this.
|
322
|
-
|
322
|
+
this.handleElement = this.options.handle ?
|
323
|
+
this.element.find( this.options.handle ) : this.element;
|
324
|
+
this.handleElement.addClass( "ui-draggable-handle" );
|
323
325
|
},
|
324
326
|
|
325
327
|
_removeHandleClassName: function() {
|
326
|
-
this.
|
327
|
-
.addBack()
|
328
|
-
.removeClass( "ui-draggable-handle" );
|
328
|
+
this.handleElement.removeClass( "ui-draggable-handle" );
|
329
329
|
},
|
330
330
|
|
331
331
|
_createHelper: function(event) {
|
@@ -390,8 +390,8 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
390
390
|
}
|
391
391
|
|
392
392
|
return {
|
393
|
-
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
|
394
|
-
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
|
393
|
+
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
|
394
|
+
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
|
395
395
|
};
|
396
396
|
|
397
397
|
},
|
@@ -413,10 +413,10 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
413
413
|
|
414
414
|
_cacheMargins: function() {
|
415
415
|
this.margins = {
|
416
|
-
left: (parseInt(this.element.css("marginLeft"),10) || 0),
|
417
|
-
top: (parseInt(this.element.css("marginTop"),10) || 0),
|
418
|
-
right: (parseInt(this.element.css("marginRight"),10) || 0),
|
419
|
-
bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
|
416
|
+
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
|
417
|
+
top: (parseInt(this.element.css("marginTop"), 10) || 0),
|
418
|
+
right: (parseInt(this.element.css("marginRight"), 10) || 0),
|
419
|
+
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
|
420
420
|
};
|
421
421
|
},
|
422
422
|
|
@@ -433,7 +433,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
433
433
|
o = this.options,
|
434
434
|
document = this.document[ 0 ];
|
435
435
|
|
436
|
-
this.
|
436
|
+
this.relativeContainer = null;
|
437
437
|
|
438
438
|
if ( !o.containment ) {
|
439
439
|
this.containment = null;
|
@@ -484,7 +484,7 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
484
484
|
( 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,
|
485
485
|
( 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
|
486
486
|
];
|
487
|
-
this.
|
487
|
+
this.relativeContainer = c;
|
488
488
|
},
|
489
489
|
|
490
490
|
_convertPositionTo: function(d, pos) {
|
@@ -537,8 +537,8 @@ $.widget("ui.draggable", $.ui.mouse, {
|
|
537
537
|
// If we are not dragging yet, we won't check for options
|
538
538
|
if ( constrainPosition ) {
|
539
539
|
if ( this.containment ) {
|
540
|
-
if ( this.
|
541
|
-
co = this.
|
540
|
+
if ( this.relativeContainer ){
|
541
|
+
co = this.relativeContainer.offset();
|
542
542
|
containment = [
|
543
543
|
this.containment[ 0 ] + co.left,
|
544
544
|
this.containment[ 1 ] + co.top,
|
@@ -831,30 +831,35 @@ $.ui.plugin.add("draggable", "opacity", {
|
|
831
831
|
|
832
832
|
$.ui.plugin.add("draggable", "scroll", {
|
833
833
|
start: function( event, ui, i ) {
|
834
|
-
if ( i.
|
835
|
-
i.
|
834
|
+
if ( !i.scrollParentNotHidden ) {
|
835
|
+
i.scrollParentNotHidden = i.helper.scrollParent( false );
|
836
|
+
}
|
837
|
+
|
838
|
+
if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
|
839
|
+
i.overflowOffset = i.scrollParentNotHidden.offset();
|
836
840
|
}
|
837
841
|
},
|
838
842
|
drag: function( event, ui, i ) {
|
839
843
|
|
840
844
|
var o = i.options,
|
841
845
|
scrolled = false,
|
846
|
+
scrollParent = i.scrollParentNotHidden[ 0 ],
|
842
847
|
document = i.document[ 0 ];
|
843
848
|
|
844
|
-
if (
|
845
|
-
if (!o.axis || o.axis !== "x") {
|
846
|
-
if ((i.overflowOffset.top +
|
847
|
-
|
848
|
-
} else if (event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
|
849
|
-
|
849
|
+
if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
|
850
|
+
if ( !o.axis || o.axis !== "x" ) {
|
851
|
+
if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
|
852
|
+
scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
|
853
|
+
} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
|
854
|
+
scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
|
850
855
|
}
|
851
856
|
}
|
852
857
|
|
853
|
-
if (!o.axis || o.axis !== "y") {
|
854
|
-
if ((i.overflowOffset.left +
|
855
|
-
|
856
|
-
} else if (event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
|
857
|
-
|
858
|
+
if ( !o.axis || o.axis !== "y" ) {
|
859
|
+
if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
|
860
|
+
scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
|
861
|
+
} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
|
862
|
+
scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
|
858
863
|
}
|
859
864
|
}
|
860
865
|
|
@@ -982,8 +987,8 @@ $.ui.plugin.add("draggable", "stack", {
|
|
982
987
|
start: function( event, ui, instance ) {
|
983
988
|
var min,
|
984
989
|
o = instance.options,
|
985
|
-
group = $.makeArray($(o.stack)).sort(function(a,b) {
|
986
|
-
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
|
990
|
+
group = $.makeArray($(o.stack)).sort(function(a, b) {
|
991
|
+
return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
|
987
992
|
});
|
988
993
|
|
989
994
|
if (!group.length) { return; }
|