jquery-ui-rails 4.0.0 → 4.2.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.

Files changed (149) hide show
  1. data/.travis.yml +0 -1
  2. data/Gemfile +1 -1
  3. data/History.md +44 -0
  4. data/README.md +16 -4
  5. data/Rakefile +39 -11
  6. data/VERSIONS.md +31 -0
  7. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  8. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  9. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  10. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  11. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  12. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  13. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  14. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  15. data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  16. data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  17. data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  18. data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  19. data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  20. data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  21. data/{vendor → app}/assets/javascripts/jquery.ui.accordion.js +17 -18
  22. data/{vendor → app}/assets/javascripts/jquery.ui.all.js +0 -0
  23. data/{vendor → app}/assets/javascripts/jquery.ui.autocomplete.js +36 -44
  24. data/{vendor → app}/assets/javascripts/jquery.ui.button.js +23 -47
  25. data/{vendor → app}/assets/javascripts/jquery.ui.core.js +20 -24
  26. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-af.js +0 -0
  27. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -0
  28. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ar.js +0 -0
  29. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-az.js +0 -0
  30. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-be.js +0 -0
  31. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bg.js +0 -0
  32. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-bs.js +0 -0
  33. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ca.js +0 -0
  34. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cs.js +0 -0
  35. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -0
  36. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-da.js +0 -0
  37. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-de.js +3 -3
  38. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-el.js +0 -0
  39. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -0
  40. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -0
  41. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -0
  42. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eo.js +0 -0
  43. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-es.js +7 -7
  44. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-et.js +0 -0
  45. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-eu.js +0 -0
  46. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fa.js +0 -0
  47. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fi.js +1 -1
  48. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fo.js +0 -0
  49. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -0
  50. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +23 -0
  51. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-fr.js +6 -6
  52. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-gl.js +0 -0
  53. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-he.js +0 -0
  54. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hi.js +0 -0
  55. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hr.js +0 -0
  56. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hu.js +0 -0
  57. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-hy.js +0 -0
  58. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-id.js +0 -0
  59. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-is.js +1 -1
  60. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-it.js +0 -0
  61. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ja.js +0 -0
  62. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ka.js +0 -0
  63. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-kk.js +0 -0
  64. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-km.js +0 -0
  65. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ko.js +0 -0
  66. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ky.js +0 -0
  67. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lb.js +0 -0
  68. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lt.js +2 -2
  69. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-lv.js +4 -4
  70. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-mk.js +0 -0
  71. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ml.js +0 -0
  72. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ms.js +0 -0
  73. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nb.js +0 -0
  74. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -0
  75. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nl.js +0 -0
  76. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-nn.js +0 -0
  77. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-no.js +0 -0
  78. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pl.js +0 -0
  79. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -0
  80. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-pt.js +1 -1
  81. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-rm.js +0 -0
  82. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ro.js +0 -0
  83. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ru.js +0 -0
  84. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sk.js +3 -3
  85. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sl.js +0 -0
  86. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sq.js +0 -0
  87. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr-SR.js +1 -1
  88. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sr.js +1 -1
  89. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-sv.js +0 -0
  90. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-ta.js +0 -0
  91. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-th.js +0 -0
  92. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tj.js +0 -0
  93. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-tr.js +0 -0
  94. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-uk.js +0 -0
  95. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-vi.js +0 -0
  96. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -0
  97. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -0
  98. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -0
  99. data/{vendor → app}/assets/javascripts/jquery.ui.datepicker.js +28 -34
  100. data/{vendor → app}/assets/javascripts/jquery.ui.dialog.js +84 -28
  101. data/{vendor → app}/assets/javascripts/jquery.ui.draggable.js +96 -84
  102. data/{vendor → app}/assets/javascripts/jquery.ui.droppable.js +33 -15
  103. data/{vendor → app}/assets/javascripts/jquery.ui.effect-blind.js +2 -2
  104. data/{vendor → app}/assets/javascripts/jquery.ui.effect-bounce.js +2 -2
  105. data/{vendor → app}/assets/javascripts/jquery.ui.effect-clip.js +2 -2
  106. data/{vendor → app}/assets/javascripts/jquery.ui.effect-drop.js +2 -2
  107. data/{vendor → app}/assets/javascripts/jquery.ui.effect-explode.js +2 -2
  108. data/{vendor → app}/assets/javascripts/jquery.ui.effect-fade.js +2 -2
  109. data/{vendor → app}/assets/javascripts/jquery.ui.effect-fold.js +2 -2
  110. data/{vendor → app}/assets/javascripts/jquery.ui.effect-highlight.js +2 -2
  111. data/{vendor → app}/assets/javascripts/jquery.ui.effect-pulsate.js +2 -2
  112. data/{vendor → app}/assets/javascripts/jquery.ui.effect-scale.js +2 -2
  113. data/{vendor → app}/assets/javascripts/jquery.ui.effect-shake.js +2 -2
  114. data/{vendor → app}/assets/javascripts/jquery.ui.effect-slide.js +2 -2
  115. data/{vendor → app}/assets/javascripts/jquery.ui.effect-transfer.js +2 -2
  116. data/{vendor → app}/assets/javascripts/jquery.ui.effect.all.js +0 -0
  117. data/{vendor → app}/assets/javascripts/jquery.ui.effect.js +94 -73
  118. data/{vendor → app}/assets/javascripts/jquery.ui.menu.js +15 -9
  119. data/{vendor → app}/assets/javascripts/jquery.ui.mouse.js +3 -3
  120. data/{vendor → app}/assets/javascripts/jquery.ui.position.js +16 -12
  121. data/{vendor → app}/assets/javascripts/jquery.ui.progressbar.js +3 -3
  122. data/{vendor → app}/assets/javascripts/jquery.ui.resizable.js +20 -10
  123. data/{vendor → app}/assets/javascripts/jquery.ui.selectable.js +3 -3
  124. data/{vendor → app}/assets/javascripts/jquery.ui.slider.js +97 -70
  125. data/{vendor → app}/assets/javascripts/jquery.ui.sortable.js +81 -42
  126. data/{vendor → app}/assets/javascripts/jquery.ui.spinner.js +10 -5
  127. data/{vendor → app}/assets/javascripts/jquery.ui.tabs.js +8 -5
  128. data/{vendor → app}/assets/javascripts/jquery.ui.tooltip.js +3 -3
  129. data/{vendor → app}/assets/javascripts/jquery.ui.widget.js +5 -5
  130. data/{vendor → app}/assets/stylesheets/jquery.ui.accordion.css.erb +3 -3
  131. data/{vendor → app}/assets/stylesheets/jquery.ui.all.css.erb +3 -3
  132. data/{vendor → app}/assets/stylesheets/jquery.ui.autocomplete.css.erb +3 -3
  133. data/{vendor → app}/assets/stylesheets/jquery.ui.base.css.erb +3 -3
  134. data/{vendor → app}/assets/stylesheets/jquery.ui.button.css.erb +3 -3
  135. data/{vendor → app}/assets/stylesheets/jquery.ui.core.css.erb +4 -3
  136. data/{vendor → app}/assets/stylesheets/jquery.ui.datepicker.css.erb +3 -6
  137. data/{vendor → app}/assets/stylesheets/jquery.ui.dialog.css.erb +5 -4
  138. data/{vendor → app}/assets/stylesheets/jquery.ui.menu.css.erb +5 -3
  139. data/{vendor → app}/assets/stylesheets/jquery.ui.progressbar.css.erb +9 -4
  140. data/{vendor → app}/assets/stylesheets/jquery.ui.resizable.css.erb +2 -4
  141. data/{vendor → app}/assets/stylesheets/jquery.ui.selectable.css.erb +2 -4
  142. data/{vendor → app}/assets/stylesheets/jquery.ui.slider.css.erb +3 -3
  143. data/{vendor → app}/assets/stylesheets/jquery.ui.spinner.css.erb +5 -5
  144. data/{vendor → app}/assets/stylesheets/jquery.ui.tabs.css.erb +9 -10
  145. data/{vendor → app}/assets/stylesheets/jquery.ui.theme.css.erb +26 -5
  146. data/{vendor → app}/assets/stylesheets/jquery.ui.tooltip.css.erb +4 -2
  147. data/lib/jquery/ui/rails/version.rb +2 -1
  148. metadata +148 -161
  149. 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.0
6
+ * jQuery UI Draggable 1.10.4
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
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.0",
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
- if(o.containment) {
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 element,
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 = this.element[0];
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
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
290
- $(this.options.handle, this.element)
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 === "parent") {
406
- o.containment = this.helper[0].parentNode;
393
+ if ( !o.containment ) {
394
+ this.containment = null;
395
+ return;
407
396
  }
408
- if(o.containment === "document" || o.containment === "window") {
397
+
398
+ if ( o.containment === "window" ) {
409
399
  this.containment = [
410
- o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
411
- o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
412
- (o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
413
- (o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
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(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) {
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
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
429
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
430
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
431
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
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
- this.relative_container = c;
415
+ return;
416
+ }
434
417
 
435
- } else if(o.containment.constructor === Array) {
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, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
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() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
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() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
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
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
482
- if(this.containment) {
483
- if (this.relative_container){
484
- co = this.relative_container.offset();
485
- containment = [ this.containment[0] + co.left,
486
- this.containment[1] + co.top,
487
- this.containment[2] + co.left,
488
- this.containment[3] + co.top ];
489
- }
490
- else {
491
- containment = this.containment;
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
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
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
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
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 = true;
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
- $.ui.contains(thisSortable.instance.element[0], this.instance.element[0])
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
- //Yes, I know, this is insane ;)
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 = $(this).data("ui-draggable").options,
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].style.zIndex, 10) || 0;
938
+ min = parseInt($(group[0]).css("zIndex"), 10) || 0;
925
939
  $(group).each(function(i) {
926
- this.style.zIndex = min + i;
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.0
7
+ * jQuery UI Droppable 1.10.4
8
8
  * http://jqueryui.com
9
9
  *
10
- * Copyright 2013 jQuery Foundation and other contributors
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.0",
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 o = this.options,
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
- //Store the droppable's proportions
60
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
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, x2 = x1 + draggable.helperProportions.width,
207
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
208
- l = droppable.offset.left, r = l + droppable.proportions.width,
209
- t = droppable.offset.top, b = t + droppable.proportions.height;
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 = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
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
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
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.0
4
+ * jQuery UI Effects Blind 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Bounce 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Clip 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Drop 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Explode 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Fade 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Fold 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Highlight 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Pulsate 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Scale 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Shake 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Slide 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
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.0
4
+ * jQuery UI Effects Transfer 1.10.4
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2013 jQuery Foundation and other contributors
7
+ * Copyright 2014 jQuery Foundation and other contributors
8
8
  * Released under the MIT license.
9
9
  * http://jquery.org/license
10
10
  *