jquery-ui-rails 4.0.0 → 5.0.4

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 (239) hide show
  1. data/.travis.yml +0 -1
  2. data/Gemfile +1 -1
  3. data/History.md +62 -0
  4. data/README.md +86 -74
  5. data/Rakefile +69 -37
  6. data/VERSIONS.md +36 -0
  7. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  8. data/{vendor → app}/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  9. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  10. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  11. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  12. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  13. data/{vendor → app}/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  14. data/{vendor → app}/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  15. data/{vendor → app}/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  16. data/{vendor → app}/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  17. data/{vendor → app}/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  18. data/{vendor → app}/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  19. data/{vendor → app}/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  20. data/{vendor/assets/javascripts/jquery.ui.accordion.js → app/assets/javascripts/jquery-ui/accordion.js} +90 -74
  21. data/{vendor/assets/javascripts/jquery.ui.autocomplete.js → app/assets/javascripts/jquery-ui/autocomplete.js} +105 -91
  22. data/{vendor/assets/javascripts/jquery.ui.button.js → app/assets/javascripts/jquery-ui/button.js} +60 -68
  23. data/{vendor/assets/javascripts/jquery.ui.core.js → app/assets/javascripts/jquery-ui/core.js} +112 -132
  24. data/app/assets/javascripts/jquery-ui/datepicker-af.js +37 -0
  25. data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +37 -0
  26. data/app/assets/javascripts/jquery-ui/datepicker-ar.js +38 -0
  27. data/app/assets/javascripts/jquery-ui/datepicker-az.js +37 -0
  28. data/app/assets/javascripts/jquery-ui/datepicker-be.js +37 -0
  29. data/app/assets/javascripts/jquery-ui/datepicker-bg.js +38 -0
  30. data/app/assets/javascripts/jquery-ui/datepicker-bs.js +37 -0
  31. data/app/assets/javascripts/jquery-ui/datepicker-ca.js +37 -0
  32. data/app/assets/javascripts/jquery-ui/datepicker-cs.js +37 -0
  33. data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +37 -0
  34. data/app/assets/javascripts/jquery-ui/datepicker-da.js +37 -0
  35. data/app/assets/javascripts/jquery-ui/datepicker-de.js +37 -0
  36. data/app/assets/javascripts/jquery-ui/datepicker-el.js +37 -0
  37. data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +37 -0
  38. data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +37 -0
  39. data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +37 -0
  40. data/app/assets/javascripts/jquery-ui/datepicker-eo.js +37 -0
  41. data/app/assets/javascripts/jquery-ui/datepicker-es.js +37 -0
  42. data/app/assets/javascripts/jquery-ui/datepicker-et.js +37 -0
  43. data/app/assets/javascripts/jquery-ui/datepicker-eu.js +36 -0
  44. data/app/assets/javascripts/jquery-ui/datepicker-fa.js +73 -0
  45. data/app/assets/javascripts/jquery-ui/datepicker-fi.js +37 -0
  46. data/app/assets/javascripts/jquery-ui/datepicker-fo.js +37 -0
  47. data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +37 -0
  48. data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +37 -0
  49. data/app/assets/javascripts/jquery-ui/datepicker-fr.js +39 -0
  50. data/app/assets/javascripts/jquery-ui/datepicker-gl.js +37 -0
  51. data/app/assets/javascripts/jquery-ui/datepicker-he.js +37 -0
  52. data/app/assets/javascripts/jquery-ui/datepicker-hi.js +37 -0
  53. data/app/assets/javascripts/jquery-ui/datepicker-hr.js +37 -0
  54. data/app/assets/javascripts/jquery-ui/datepicker-hu.js +36 -0
  55. data/app/assets/javascripts/jquery-ui/datepicker-hy.js +37 -0
  56. data/app/assets/javascripts/jquery-ui/datepicker-id.js +37 -0
  57. data/app/assets/javascripts/jquery-ui/datepicker-is.js +37 -0
  58. data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +37 -0
  59. data/app/assets/javascripts/jquery-ui/datepicker-it.js +37 -0
  60. data/app/assets/javascripts/jquery-ui/datepicker-ja.js +37 -0
  61. data/app/assets/javascripts/jquery-ui/datepicker-ka.js +35 -0
  62. data/app/assets/javascripts/jquery-ui/datepicker-kk.js +37 -0
  63. data/app/assets/javascripts/jquery-ui/datepicker-km.js +37 -0
  64. data/app/assets/javascripts/jquery-ui/datepicker-ko.js +37 -0
  65. data/app/assets/javascripts/jquery-ui/datepicker-ky.js +38 -0
  66. data/app/assets/javascripts/jquery-ui/datepicker-lb.js +37 -0
  67. data/app/assets/javascripts/jquery-ui/datepicker-lt.js +37 -0
  68. data/app/assets/javascripts/jquery-ui/datepicker-lv.js +37 -0
  69. data/app/assets/javascripts/jquery-ui/datepicker-mk.js +37 -0
  70. data/app/assets/javascripts/jquery-ui/datepicker-ml.js +37 -0
  71. data/app/assets/javascripts/jquery-ui/datepicker-ms.js +37 -0
  72. data/app/assets/javascripts/jquery-ui/datepicker-nb.js +36 -0
  73. data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +37 -0
  74. data/app/assets/javascripts/jquery-ui/datepicker-nl.js +37 -0
  75. data/app/assets/javascripts/jquery-ui/datepicker-nn.js +36 -0
  76. data/app/assets/javascripts/jquery-ui/datepicker-no.js +37 -0
  77. data/app/assets/javascripts/jquery-ui/datepicker-pl.js +37 -0
  78. data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +37 -0
  79. data/app/assets/javascripts/jquery-ui/datepicker-pt.js +36 -0
  80. data/app/assets/javascripts/jquery-ui/datepicker-rm.js +35 -0
  81. data/app/assets/javascripts/jquery-ui/datepicker-ro.js +40 -0
  82. data/app/assets/javascripts/jquery-ui/datepicker-ru.js +37 -0
  83. data/app/assets/javascripts/jquery-ui/datepicker-sk.js +37 -0
  84. data/app/assets/javascripts/jquery-ui/datepicker-sl.js +38 -0
  85. data/app/assets/javascripts/jquery-ui/datepicker-sq.js +37 -0
  86. data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +37 -0
  87. data/app/assets/javascripts/jquery-ui/datepicker-sr.js +37 -0
  88. data/app/assets/javascripts/jquery-ui/datepicker-sv.js +37 -0
  89. data/app/assets/javascripts/jquery-ui/datepicker-ta.js +37 -0
  90. data/app/assets/javascripts/jquery-ui/datepicker-th.js +37 -0
  91. data/app/assets/javascripts/jquery-ui/datepicker-tj.js +37 -0
  92. data/app/assets/javascripts/jquery-ui/datepicker-tr.js +37 -0
  93. data/app/assets/javascripts/jquery-ui/datepicker-uk.js +38 -0
  94. data/app/assets/javascripts/jquery-ui/datepicker-vi.js +37 -0
  95. data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +37 -0
  96. data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +37 -0
  97. data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +37 -0
  98. data/{vendor/assets/javascripts/jquery.ui.datepicker.js → app/assets/javascripts/jquery-ui/datepicker.js} +120 -80
  99. data/{vendor/assets/javascripts/jquery.ui.dialog.js → app/assets/javascripts/jquery-ui/dialog.js} +298 -190
  100. data/app/assets/javascripts/jquery-ui/draggable.js +1132 -0
  101. data/app/assets/javascripts/jquery-ui/droppable.js +418 -0
  102. data/{vendor/assets/javascripts/jquery.ui.effect-blind.js → app/assets/javascripts/jquery-ui/effect-blind.js} +21 -13
  103. data/{vendor/assets/javascripts/jquery.ui.effect-bounce.js → app/assets/javascripts/jquery-ui/effect-bounce.js} +19 -9
  104. data/{vendor/assets/javascripts/jquery.ui.effect-clip.js → app/assets/javascripts/jquery-ui/effect-clip.js} +19 -9
  105. data/{vendor/assets/javascripts/jquery.ui.effect-drop.js → app/assets/javascripts/jquery-ui/effect-drop.js} +20 -10
  106. data/{vendor/assets/javascripts/jquery.ui.effect-explode.js → app/assets/javascripts/jquery-ui/effect-explode.js} +21 -11
  107. data/app/assets/javascripts/jquery-ui/effect-fade.js +42 -0
  108. data/{vendor/assets/javascripts/jquery.ui.effect-fold.js → app/assets/javascripts/jquery-ui/effect-fold.js} +19 -9
  109. data/{vendor/assets/javascripts/jquery.ui.effect-highlight.js → app/assets/javascripts/jquery-ui/effect-highlight.js} +19 -9
  110. data/app/assets/javascripts/jquery-ui/effect-puff.js +63 -0
  111. data/{vendor/assets/javascripts/jquery.ui.effect-pulsate.js → app/assets/javascripts/jquery-ui/effect-pulsate.js} +19 -9
  112. data/app/assets/javascripts/jquery-ui/effect-scale.js +92 -0
  113. data/{vendor/assets/javascripts/jquery.ui.effect-shake.js → app/assets/javascripts/jquery-ui/effect-shake.js} +20 -10
  114. data/{vendor/assets/javascripts/jquery.ui.effect-scale.js → app/assets/javascripts/jquery-ui/effect-size.js} +20 -105
  115. data/{vendor/assets/javascripts/jquery.ui.effect-slide.js → app/assets/javascripts/jquery-ui/effect-slide.js} +19 -9
  116. data/{vendor/assets/javascripts/jquery.ui.effect-transfer.js → app/assets/javascripts/jquery-ui/effect-transfer.js} +23 -13
  117. data/app/assets/javascripts/jquery-ui/effect.all.js +16 -0
  118. data/{vendor/assets/javascripts/jquery.ui.effect.js → app/assets/javascripts/jquery-ui/effect.js} +125 -92
  119. data/{vendor/assets/javascripts/jquery.ui.menu.js → app/assets/javascripts/jquery-ui/menu.js} +127 -102
  120. data/{vendor/assets/javascripts/jquery.ui.mouse.js → app/assets/javascripts/jquery-ui/mouse.js} +57 -27
  121. data/{vendor/assets/javascripts/jquery.ui.position.js → app/assets/javascripts/jquery-ui/position.js} +47 -27
  122. data/{vendor/assets/javascripts/jquery.ui.progressbar.js → app/assets/javascripts/jquery-ui/progressbar.js} +27 -13
  123. data/{vendor/assets/javascripts/jquery.ui.resizable.js → app/assets/javascripts/jquery-ui/resizable.js} +454 -243
  124. data/{vendor/assets/javascripts/jquery.ui.selectable.js → app/assets/javascripts/jquery-ui/selectable.js} +26 -16
  125. data/app/assets/javascripts/jquery-ui/selectmenu.js +620 -0
  126. data/{vendor/assets/javascripts/jquery.ui.slider.js → app/assets/javascripts/jquery-ui/slider.js} +159 -91
  127. data/{vendor/assets/javascripts/jquery.ui.sortable.js → app/assets/javascripts/jquery-ui/sortable.js} +168 -114
  128. data/{vendor/assets/javascripts/jquery.ui.spinner.js → app/assets/javascripts/jquery-ui/spinner.js} +54 -32
  129. data/{vendor/assets/javascripts/jquery.ui.tabs.js → app/assets/javascripts/jquery-ui/tabs.js} +108 -73
  130. data/{vendor/assets/javascripts/jquery.ui.tooltip.js → app/assets/javascripts/jquery-ui/tooltip.js} +134 -75
  131. data/{vendor/assets/javascripts/jquery.ui.widget.js → app/assets/javascripts/jquery-ui/widget.js} +81 -44
  132. data/app/assets/javascripts/jquery-ui.js +37 -0
  133. data/{vendor/assets/stylesheets/jquery.ui.accordion.css.erb → app/assets/stylesheets/jquery-ui/accordion.css} +7 -9
  134. data/app/assets/stylesheets/jquery-ui/all.css +14 -0
  135. data/app/assets/stylesheets/jquery-ui/autocomplete.css +21 -0
  136. data/app/assets/stylesheets/jquery-ui/base.css +30 -0
  137. data/{vendor/assets/stylesheets/jquery.ui.button.css.erb → app/assets/stylesheets/jquery-ui/button.css} +5 -5
  138. data/{vendor/assets/stylesheets/jquery.ui.core.css.erb → app/assets/stylesheets/jquery-ui/core.css} +8 -4
  139. data/{vendor/assets/stylesheets/jquery.ui.datepicker.css.erb → app/assets/stylesheets/jquery-ui/datepicker.css} +6 -9
  140. data/{vendor/assets/stylesheets/jquery.ui.dialog.css.erb → app/assets/stylesheets/jquery-ui/dialog.css} +10 -8
  141. data/app/assets/stylesheets/jquery-ui/draggable.css +16 -0
  142. data/app/assets/stylesheets/jquery-ui/menu.css +67 -0
  143. data/app/assets/stylesheets/jquery-ui/progressbar.css +32 -0
  144. data/{vendor/assets/stylesheets/jquery.ui.resizable.css.erb → app/assets/stylesheets/jquery-ui/resizable.css} +6 -6
  145. data/app/assets/stylesheets/jquery-ui/selectable.css +21 -0
  146. data/app/assets/stylesheets/jquery-ui/selectmenu.css +64 -0
  147. data/{vendor/assets/stylesheets/jquery.ui.slider.css.erb → app/assets/stylesheets/jquery-ui/slider.css} +8 -6
  148. data/app/assets/stylesheets/jquery-ui/sortable.css +16 -0
  149. data/{vendor/assets/stylesheets/jquery.ui.spinner.css.erb → app/assets/stylesheets/jquery-ui/spinner.css} +8 -8
  150. data/{vendor/assets/stylesheets/jquery.ui.tabs.css.erb → app/assets/stylesheets/jquery-ui/tabs.css} +11 -12
  151. data/{vendor/assets/stylesheets/jquery.ui.theme.css.erb → app/assets/stylesheets/jquery-ui/theme.css.erb} +29 -11
  152. data/{vendor/assets/stylesheets/jquery.ui.tooltip.css.erb → app/assets/stylesheets/jquery-ui/tooltip.css} +6 -4
  153. data/app/assets/stylesheets/jquery-ui.css +1 -0
  154. data/lib/jquery/ui/rails/version.rb +2 -1
  155. metadata +155 -161
  156. data/vendor/assets/javascripts/jquery.ui.all.js +0 -34
  157. data/vendor/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
  158. data/vendor/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
  159. data/vendor/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
  160. data/vendor/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
  161. data/vendor/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
  162. data/vendor/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
  163. data/vendor/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
  164. data/vendor/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
  165. data/vendor/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
  166. data/vendor/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
  167. data/vendor/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
  168. data/vendor/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
  169. data/vendor/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
  170. data/vendor/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
  171. data/vendor/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
  172. data/vendor/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
  173. data/vendor/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
  174. data/vendor/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
  175. data/vendor/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
  176. data/vendor/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
  177. data/vendor/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
  178. data/vendor/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
  179. data/vendor/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
  180. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
  181. data/vendor/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
  182. data/vendor/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
  183. data/vendor/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
  184. data/vendor/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
  185. data/vendor/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
  186. data/vendor/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
  187. data/vendor/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
  188. data/vendor/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
  189. data/vendor/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
  190. data/vendor/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
  191. data/vendor/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
  192. data/vendor/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
  193. data/vendor/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
  194. data/vendor/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
  195. data/vendor/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
  196. data/vendor/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
  197. data/vendor/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
  198. data/vendor/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
  199. data/vendor/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
  200. data/vendor/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
  201. data/vendor/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
  202. data/vendor/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
  203. data/vendor/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
  204. data/vendor/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
  205. data/vendor/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
  206. data/vendor/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
  207. data/vendor/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
  208. data/vendor/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
  209. data/vendor/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
  210. data/vendor/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
  211. data/vendor/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
  212. data/vendor/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
  213. data/vendor/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
  214. data/vendor/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
  215. data/vendor/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
  216. data/vendor/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
  217. data/vendor/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
  218. data/vendor/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
  219. data/vendor/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
  220. data/vendor/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
  221. data/vendor/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
  222. data/vendor/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
  223. data/vendor/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
  224. data/vendor/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
  225. data/vendor/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
  226. data/vendor/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
  227. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
  228. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
  229. data/vendor/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
  230. data/vendor/assets/javascripts/jquery.ui.draggable.js +0 -950
  231. data/vendor/assets/javascripts/jquery.ui.droppable.js +0 -376
  232. data/vendor/assets/javascripts/jquery.ui.effect-fade.js +0 -32
  233. data/vendor/assets/javascripts/jquery.ui.effect.all.js +0 -14
  234. data/vendor/assets/stylesheets/jquery.ui.all.css.erb +0 -14
  235. data/vendor/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
  236. data/vendor/assets/stylesheets/jquery.ui.base.css.erb +0 -27
  237. data/vendor/assets/stylesheets/jquery.ui.menu.css.erb +0 -81
  238. data/vendor/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -32
  239. data/vendor/assets/stylesheets/jquery.ui.selectable.css.erb +0 -19
@@ -1,32 +1,36 @@
1
- //= require jquery.ui.core
2
- //= require jquery.ui.widget
3
- //= require jquery.ui.mouse
1
+ //= require jquery-ui/core
2
+ //= require jquery-ui/widget
3
+ //= require jquery-ui/mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Sortable 1.10.0
6
+ * jQuery UI Sortable 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2013 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
13
13
  * http://api.jqueryui.com/sortable/
14
- *
15
- * Depends:
16
- * jquery.ui.core.js
17
- * jquery.ui.mouse.js
18
- * jquery.ui.widget.js
19
14
  */
20
- (function( $, undefined ) {
21
-
22
- /*jshint loopfunc: true */
23
-
24
- function isOverAxis( x, reference, size ) {
25
- return ( x > reference ) && ( x < ( reference + size ) );
26
- }
15
+ (function( factory ) {
16
+ if ( typeof define === "function" && define.amd ) {
17
+
18
+ // AMD. Register as an anonymous module.
19
+ define([
20
+ "jquery",
21
+ "./core",
22
+ "./mouse",
23
+ "./widget"
24
+ ], factory );
25
+ } else {
26
+
27
+ // Browser globals
28
+ factory( jQuery );
29
+ }
30
+ }(function( $ ) {
27
31
 
28
- $.widget("ui.sortable", $.ui.mouse, {
29
- version: "1.10.0",
32
+ return $.widget("ui.sortable", $.ui.mouse, {
33
+ version: "1.11.3",
30
34
  widgetEventPrefix: "sort",
31
35
  ready: false,
32
36
  options: {
@@ -67,6 +71,15 @@ $.widget("ui.sortable", $.ui.mouse, {
67
71
  stop: null,
68
72
  update: null
69
73
  },
74
+
75
+ _isOverAxis: function( x, reference, size ) {
76
+ return ( x >= reference ) && ( x < ( reference + size ) );
77
+ },
78
+
79
+ _isFloating: function( item ) {
80
+ return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
81
+ },
82
+
70
83
  _create: function() {
71
84
 
72
85
  var o = this.options;
@@ -77,7 +90,7 @@ $.widget("ui.sortable", $.ui.mouse, {
77
90
  this.refresh();
78
91
 
79
92
  //Let's determine if the items are being displayed horizontally
80
- this.floating = this.items.length ? o.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
93
+ this.floating = this.items.length ? o.axis === "x" || this._isFloating(this.items[0].item) : false;
81
94
 
82
95
  //Let's determine the parent's offset
83
96
  this.offset = this.element.offset();
@@ -85,14 +98,35 @@ $.widget("ui.sortable", $.ui.mouse, {
85
98
  //Initialize mouse events for interaction
86
99
  this._mouseInit();
87
100
 
101
+ this._setHandleClassName();
102
+
88
103
  //We're ready to go
89
104
  this.ready = true;
90
105
 
91
106
  },
92
107
 
108
+ _setOption: function( key, value ) {
109
+ this._super( key, value );
110
+
111
+ if ( key === "handle" ) {
112
+ this._setHandleClassName();
113
+ }
114
+ },
115
+
116
+ _setHandleClassName: function() {
117
+ this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" );
118
+ $.each( this.items, function() {
119
+ ( this.instance.options.handle ?
120
+ this.item.find( this.instance.options.handle ) : this.item )
121
+ .addClass( "ui-sortable-handle" );
122
+ });
123
+ },
124
+
93
125
  _destroy: function() {
94
126
  this.element
95
- .removeClass("ui-sortable ui-sortable-disabled");
127
+ .removeClass( "ui-sortable ui-sortable-disabled" )
128
+ .find( ".ui-sortable-handle" )
129
+ .removeClass( "ui-sortable-handle" );
96
130
  this._mouseDestroy();
97
131
 
98
132
  for ( var i = this.items.length - 1; i >= 0; i-- ) {
@@ -102,17 +136,6 @@ $.widget("ui.sortable", $.ui.mouse, {
102
136
  return this;
103
137
  },
104
138
 
105
- _setOption: function(key, value){
106
- if ( key === "disabled" ) {
107
- this.options[ key ] = value;
108
-
109
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
110
- } else {
111
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
112
- $.Widget.prototype._setOption.apply(this, arguments);
113
- }
114
- },
115
-
116
139
  _mouseCapture: function(event, overrideHandle) {
117
140
  var currentItem = null,
118
141
  validHandle = false,
@@ -162,7 +185,7 @@ $.widget("ui.sortable", $.ui.mouse, {
162
185
 
163
186
  _mouseStart: function(event, overrideHandle, noActivation) {
164
187
 
165
- var i,
188
+ var i, body,
166
189
  o = this.options;
167
190
 
168
191
  this.currentContainer = this;
@@ -232,11 +255,14 @@ $.widget("ui.sortable", $.ui.mouse, {
232
255
  this._setContainment();
233
256
  }
234
257
 
235
- if(o.cursor) { // cursor option
236
- if ($("body").css("cursor")) {
237
- this._storedCursor = $("body").css("cursor");
238
- }
239
- $("body").css("cursor", o.cursor);
258
+ if( o.cursor && o.cursor !== "auto" ) { // cursor option
259
+ body = this.document.find( "body" );
260
+
261
+ // support: IE
262
+ this.storedCursor = body.css( "cursor" );
263
+ body.css( "cursor", o.cursor );
264
+
265
+ this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
240
266
  }
241
267
 
242
268
  if(o.opacity) { // opacity option
@@ -254,7 +280,7 @@ $.widget("ui.sortable", $.ui.mouse, {
254
280
  }
255
281
 
256
282
  //Prepare scrolling
257
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
283
+ if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
258
284
  this.overflowOffset = this.scrollParent.offset();
259
285
  }
260
286
 
@@ -306,7 +332,7 @@ $.widget("ui.sortable", $.ui.mouse, {
306
332
 
307
333
  //Do scrolling
308
334
  if(this.options.scroll) {
309
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
335
+ if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
310
336
 
311
337
  if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
312
338
  this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
@@ -322,16 +348,16 @@ $.widget("ui.sortable", $.ui.mouse, {
322
348
 
323
349
  } else {
324
350
 
325
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
326
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
327
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
328
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
351
+ if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
352
+ scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
353
+ } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
354
+ scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
329
355
  }
330
356
 
331
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
332
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
333
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
334
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
357
+ if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
358
+ scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
359
+ } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
360
+ scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
335
361
  }
336
362
 
337
363
  }
@@ -364,12 +390,12 @@ $.widget("ui.sortable", $.ui.mouse, {
364
390
  }
365
391
 
366
392
  // Only put the placeholder inside the current Container, skip all
367
- // items form other containers. This works because when moving
393
+ // items from other containers. This works because when moving
368
394
  // an item from one container to another the
369
395
  // currentContainer is switched before the placeholder is moved.
370
396
  //
371
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
372
- // beetween the outer and inner container.
397
+ // Without this, moving items in "sub-sortables" can cause
398
+ // the placeholder to jitter between the outer and inner container.
373
399
  if (item.instance !== this.currentContainer) {
374
400
  continue;
375
401
  }
@@ -425,14 +451,18 @@ $.widget("ui.sortable", $.ui.mouse, {
425
451
 
426
452
  if(this.options.revert) {
427
453
  var that = this,
428
- cur = this.placeholder.offset();
454
+ cur = this.placeholder.offset(),
455
+ axis = this.options.axis,
456
+ animation = {};
429
457
 
458
+ if ( !axis || axis === "x" ) {
459
+ animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
460
+ }
461
+ if ( !axis || axis === "y" ) {
462
+ animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
463
+ }
430
464
  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() {
465
+ $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
436
466
  that._clear(event);
437
467
  });
438
468
  } else {
@@ -539,7 +569,9 @@ $.widget("ui.sortable", $.ui.mouse, {
539
569
  b = t + item.height,
540
570
  dyClick = this.offset.click.top,
541
571
  dxClick = this.offset.click.left,
542
- isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
572
+ isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
573
+ isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
574
+ isOverElement = isOverElementHeight && isOverElementWidth;
543
575
 
544
576
  if ( this.options.tolerance === "pointer" ||
545
577
  this.options.forcePointerForContainers ||
@@ -558,8 +590,8 @@ $.widget("ui.sortable", $.ui.mouse, {
558
590
 
559
591
  _intersectsWithPointer: function(item) {
560
592
 
561
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
562
- isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
593
+ var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
594
+ isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
563
595
  isOverElement = isOverElementHeight && isOverElementWidth,
564
596
  verticalDirection = this._getDragVerticalDirection(),
565
597
  horizontalDirection = this._getDragHorizontalDirection();
@@ -576,8 +608,8 @@ $.widget("ui.sortable", $.ui.mouse, {
576
608
 
577
609
  _intersectsWithSides: function(item) {
578
610
 
579
- var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
580
- isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
611
+ var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
612
+ isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
581
613
  verticalDirection = this._getDragVerticalDirection(),
582
614
  horizontalDirection = this._getDragHorizontalDirection();
583
615
 
@@ -601,6 +633,7 @@ $.widget("ui.sortable", $.ui.mouse, {
601
633
 
602
634
  refresh: function(event) {
603
635
  this._refreshItems(event);
636
+ this._setHandleClassName();
604
637
  this.refreshPositions();
605
638
  return this;
606
639
  },
@@ -619,7 +652,7 @@ $.widget("ui.sortable", $.ui.mouse, {
619
652
 
620
653
  if(connectWith && connected) {
621
654
  for (i = connectWith.length - 1; i >= 0; i--){
622
- cur = $(connectWith[i]);
655
+ cur = $(connectWith[i], this.document[0]);
623
656
  for ( j = cur.length - 1; j >= 0; j--){
624
657
  inst = $.data(cur[j], this.widgetFullName);
625
658
  if(inst && inst !== this && !inst.options.disabled) {
@@ -631,10 +664,11 @@ $.widget("ui.sortable", $.ui.mouse, {
631
664
 
632
665
  queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
633
666
 
667
+ function addItems() {
668
+ items.push( this );
669
+ }
634
670
  for (i = queries.length - 1; i >= 0; i--){
635
- queries[i][0].each(function() {
636
- items.push(this);
637
- });
671
+ queries[i][0].each( addItems );
638
672
  }
639
673
 
640
674
  return $(items);
@@ -668,7 +702,7 @@ $.widget("ui.sortable", $.ui.mouse, {
668
702
 
669
703
  if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
670
704
  for (i = connectWith.length - 1; i >= 0; i--){
671
- cur = $(connectWith[i]);
705
+ cur = $(connectWith[i], this.document[0]);
672
706
  for (j = cur.length - 1; j >= 0; j--){
673
707
  inst = $.data(cur[j], this.widgetFullName);
674
708
  if(inst && inst !== this && !inst.options.disabled) {
@@ -735,7 +769,7 @@ $.widget("ui.sortable", $.ui.mouse, {
735
769
  p = this.containers[i].element.offset();
736
770
  this.containers[i].containerCache.left = p.left;
737
771
  this.containers[i].containerCache.top = p.top;
738
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
772
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
739
773
  this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
740
774
  }
741
775
  }
@@ -753,15 +787,26 @@ $.widget("ui.sortable", $.ui.mouse, {
753
787
  o.placeholder = {
754
788
  element: function() {
755
789
 
756
- var el = $(document.createElement(that.currentItem[0].nodeName))
757
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
758
- .removeClass("ui-sortable-helper")[0];
790
+ var nodeName = that.currentItem[0].nodeName.toLowerCase(),
791
+ element = $( "<" + nodeName + ">", that.document[0] )
792
+ .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
793
+ .removeClass("ui-sortable-helper");
794
+
795
+ if ( nodeName === "tr" ) {
796
+ that.currentItem.children().each(function() {
797
+ $( "<td>&#160;</td>", that.document[0] )
798
+ .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
799
+ .appendTo( element );
800
+ });
801
+ } else if ( nodeName === "img" ) {
802
+ element.attr( "src", that.currentItem.attr( "src" ) );
803
+ }
759
804
 
760
- if(!className) {
761
- el.style.visibility = "hidden";
805
+ if ( !className ) {
806
+ element.css( "visibility", "hidden" );
762
807
  }
763
808
 
764
- return el;
809
+ return element;
765
810
  },
766
811
  update: function(container, p) {
767
812
 
@@ -790,7 +835,7 @@ $.widget("ui.sortable", $.ui.mouse, {
790
835
  },
791
836
 
792
837
  _contactContainers: function(event) {
793
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
838
+ var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
794
839
  innermostContainer = null,
795
840
  innermostIndex = null;
796
841
 
@@ -829,16 +874,20 @@ $.widget("ui.sortable", $.ui.mouse, {
829
874
 
830
875
  // move the item into the container if it's not there already
831
876
  if(this.containers.length === 1) {
832
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
833
- this.containers[innermostIndex].containerCache.over = 1;
877
+ if (!this.containers[innermostIndex].containerCache.over) {
878
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
879
+ this.containers[innermostIndex].containerCache.over = 1;
880
+ }
834
881
  } else {
835
882
 
836
883
  //When entering a new container, we will find the item with the least distance and append our item near it
837
884
  dist = 10000;
838
885
  itemWithLeastDistance = null;
839
- posProperty = this.containers[innermostIndex].floating ? "left" : "top";
840
- sizeProperty = this.containers[innermostIndex].floating ? "width" : "height";
841
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
886
+ floating = innermostContainer.floating || this._isFloating(this.currentItem);
887
+ posProperty = floating ? "left" : "top";
888
+ sizeProperty = floating ? "width" : "height";
889
+ axis = floating ? "clientX" : "clientY";
890
+
842
891
  for (j = this.items.length - 1; j >= 0; j--) {
843
892
  if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
844
893
  continue;
@@ -846,15 +895,16 @@ $.widget("ui.sortable", $.ui.mouse, {
846
895
  if(this.items[j].item[0] === this.currentItem[0]) {
847
896
  continue;
848
897
  }
898
+
849
899
  cur = this.items[j].item.offset()[posProperty];
850
900
  nearBottom = false;
851
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
901
+ if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
852
902
  nearBottom = true;
853
- cur += this.items[j][sizeProperty];
854
903
  }
855
904
 
856
- if(Math.abs(cur - base) < dist) {
857
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
905
+ if ( Math.abs( event[ axis ] - cur ) < dist ) {
906
+ dist = Math.abs( event[ axis ] - cur );
907
+ itemWithLeastDistance = this.items[ j ];
858
908
  this.direction = nearBottom ? "up": "down";
859
909
  }
860
910
  }
@@ -864,10 +914,18 @@ $.widget("ui.sortable", $.ui.mouse, {
864
914
  return;
865
915
  }
866
916
 
867
- this.currentContainer = this.containers[innermostIndex];
917
+ if(this.currentContainer === this.containers[innermostIndex]) {
918
+ if ( !this.currentContainer.containerCache.over ) {
919
+ this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
920
+ this.currentContainer.containerCache.over = 1;
921
+ }
922
+ return;
923
+ }
924
+
868
925
  itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
869
926
  this._trigger("change", event, this._uiHash());
870
927
  this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
928
+ this.currentContainer = this.containers[innermostIndex];
871
929
 
872
930
  //Update the placeholder
873
931
  this.options.placeholder.update(this.currentContainer, this.placeholder);
@@ -936,14 +994,14 @@ $.widget("ui.sortable", $.ui.mouse, {
936
994
  // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
937
995
  // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
938
996
  // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
939
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
997
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
940
998
  po.left += this.scrollParent.scrollLeft();
941
999
  po.top += this.scrollParent.scrollTop();
942
1000
  }
943
1001
 
944
1002
  // This needs to be actually done for all browsers, since pageX/pageY includes this information
945
1003
  // with an ugly IE fix
946
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
1004
+ if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
947
1005
  po = { top: 0, left: 0 };
948
1006
  }
949
1007
 
@@ -993,8 +1051,8 @@ $.widget("ui.sortable", $.ui.mouse, {
993
1051
  this.containment = [
994
1052
  0 - this.offset.relative.left - this.offset.parent.left,
995
1053
  0 - this.offset.relative.top - this.offset.parent.top,
996
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
997
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
1054
+ o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
1055
+ (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
998
1056
  ];
999
1057
  }
1000
1058
 
@@ -1019,7 +1077,7 @@ $.widget("ui.sortable", $.ui.mouse, {
1019
1077
  pos = this.position;
1020
1078
  }
1021
1079
  var mod = d === "absolute" ? 1 : -1,
1022
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
1080
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
1023
1081
  scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1024
1082
 
1025
1083
  return {
@@ -1045,13 +1103,13 @@ $.widget("ui.sortable", $.ui.mouse, {
1045
1103
  o = this.options,
1046
1104
  pageX = event.pageX,
1047
1105
  pageY = event.pageY,
1048
- 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);
1106
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1049
1107
 
1050
1108
  // This is another very weird special case that only happens for relative elements:
1051
1109
  // 1. If the css position is relative
1052
1110
  // 2. and the scroll parent is the document or similar to the offset parent
1053
1111
  // we have to refresh the relative offset during the scroll so there are no jumps
1054
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
1112
+ if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
1055
1113
  this.offset.relative = this._getRelativeOffset();
1056
1114
  }
1057
1115
 
@@ -1171,19 +1229,25 @@ $.widget("ui.sortable", $.ui.mouse, {
1171
1229
 
1172
1230
 
1173
1231
  //Post events to containers
1232
+ function delayEvent( type, instance, container ) {
1233
+ return function( event ) {
1234
+ container._trigger( type, event, instance._uiHash( instance ) );
1235
+ };
1236
+ }
1174
1237
  for (i = this.containers.length - 1; i >= 0; i--){
1175
- if(!noPropagation) {
1176
- delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
1238
+ if (!noPropagation) {
1239
+ delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
1177
1240
  }
1178
1241
  if(this.containers[i].containerCache.over) {
1179
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
1242
+ delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
1180
1243
  this.containers[i].containerCache.over = 0;
1181
1244
  }
1182
1245
  }
1183
1246
 
1184
1247
  //Do what was originally in plugins
1185
- if(this._storedCursor) {
1186
- $("body").css("cursor", this._storedCursor);
1248
+ if ( this.storedCursor ) {
1249
+ this.document.find( "body" ).css( "cursor", this.storedCursor );
1250
+ this.storedStylesheet.remove();
1187
1251
  }
1188
1252
  if(this._storedOpacity) {
1189
1253
  this.helper.css("opacity", this._storedOpacity);
@@ -1193,18 +1257,6 @@ $.widget("ui.sortable", $.ui.mouse, {
1193
1257
  }
1194
1258
 
1195
1259
  this.dragging = false;
1196
- if(this.cancelHelperRemoval) {
1197
- if(!noPropagation) {
1198
- this._trigger("beforeStop", event, this._uiHash());
1199
- for (i=0; i < delayedTriggers.length; i++) {
1200
- delayedTriggers[i].call(this, event);
1201
- } //Trigger all delayed events
1202
- this._trigger("stop", event, this._uiHash());
1203
- }
1204
-
1205
- this.fromOutside = false;
1206
- return false;
1207
- }
1208
1260
 
1209
1261
  if(!noPropagation) {
1210
1262
  this._trigger("beforeStop", event, this._uiHash());
@@ -1213,10 +1265,12 @@ $.widget("ui.sortable", $.ui.mouse, {
1213
1265
  //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
1214
1266
  this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
1215
1267
 
1216
- if(this.helper[0] !== this.currentItem[0]) {
1217
- this.helper.remove();
1268
+ if ( !this.cancelHelperRemoval ) {
1269
+ if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
1270
+ this.helper.remove();
1271
+ }
1272
+ this.helper = null;
1218
1273
  }
1219
- this.helper = null;
1220
1274
 
1221
1275
  if(!noPropagation) {
1222
1276
  for (i=0; i < delayedTriggers.length; i++) {
@@ -1226,7 +1280,7 @@ $.widget("ui.sortable", $.ui.mouse, {
1226
1280
  }
1227
1281
 
1228
1282
  this.fromOutside = false;
1229
- return true;
1283
+ return !this.cancelHelperRemoval;
1230
1284
 
1231
1285
  },
1232
1286
 
@@ -1251,4 +1305,4 @@ $.widget("ui.sortable", $.ui.mouse, {
1251
1305
 
1252
1306
  });
1253
1307
 
1254
- })(jQuery);
1308
+ }));