jquery-ui-rails 4.2.1 → 8.0.0

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.
Files changed (291) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -1
  3. data/History.md +45 -2
  4. data/README.md +100 -83
  5. data/Rakefile +82 -49
  6. data/VERSIONS.md +10 -0
  7. data/app/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  8. data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
  9. data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
  10. data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
  11. data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
  12. data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
  13. data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  14. data/app/assets/javascripts/jquery-ui/data.js +39 -0
  15. data/app/assets/javascripts/jquery-ui/disable-selection.js +51 -0
  16. data/app/assets/javascripts/jquery-ui/effect.all.js +15 -0
  17. data/app/assets/javascripts/jquery-ui/effect.js +954 -0
  18. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +76 -0
  19. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +116 -0
  20. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +71 -0
  21. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +75 -0
  22. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +117 -0
  23. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +53 -0
  24. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +95 -0
  25. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +63 -0
  26. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +49 -0
  27. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +70 -0
  28. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +63 -0
  29. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +80 -0
  30. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +199 -0
  31. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +82 -0
  32. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +46 -0
  33. data/app/assets/javascripts/jquery-ui/focusable.js +79 -0
  34. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +81 -0
  35. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +40 -0
  36. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +42 -0
  37. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +42 -0
  38. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +40 -0
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +40 -0
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +41 -0
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +40 -0
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +40 -0
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +40 -0
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +48 -0
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +40 -0
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +40 -0
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +40 -0
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +40 -0
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +40 -0
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +40 -0
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +40 -0
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +40 -0
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +48 -0
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +39 -0
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +76 -0
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +40 -0
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +48 -0
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +40 -0
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +40 -0
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +42 -0
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +40 -0
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +40 -0
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +40 -0
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +40 -0
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +39 -0
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +40 -0
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +41 -0
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +48 -0
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +40 -0
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +40 -0
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +40 -0
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +51 -0
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +40 -0
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +40 -0
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +40 -0
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +41 -0
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +48 -0
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +48 -0
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +48 -0
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +40 -0
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +40 -0
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +40 -0
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +52 -0
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +40 -0
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +40 -0
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +52 -0
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +53 -0
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +40 -0
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +48 -0
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +47 -0
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +64 -0
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +43 -0
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +40 -0
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +40 -0
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +41 -0
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +40 -0
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +40 -0
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +40 -0
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +40 -0
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +56 -0
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +40 -0
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +40 -0
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +40 -0
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +41 -0
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +40 -0
  107. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +40 -0
  108. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +40 -0
  109. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +40 -0
  110. data/app/assets/javascripts/jquery-ui/jquery-patch.js +58 -0
  111. data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
  112. data/app/assets/javascripts/jquery-ui/keycode.js +51 -0
  113. data/app/assets/javascripts/jquery-ui/labels.js +70 -0
  114. data/app/assets/javascripts/jquery-ui/plugin.js +49 -0
  115. data/app/assets/javascripts/{jquery.ui.position.js → jquery-ui/position.js} +123 -111
  116. data/app/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
  117. data/app/assets/javascripts/jquery-ui/tabbable.js +41 -0
  118. data/app/assets/javascripts/jquery-ui/unique-id.js +54 -0
  119. data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +691 -0
  120. data/app/assets/javascripts/jquery-ui/version.js +20 -0
  121. data/app/assets/javascripts/jquery-ui/widget.js +761 -0
  122. data/app/assets/javascripts/{jquery.ui.accordion.js → jquery-ui/widgets/accordion.js} +263 -209
  123. data/app/assets/javascripts/{jquery.ui.autocomplete.js → jquery-ui/widgets/autocomplete.js} +177 -142
  124. data/app/assets/javascripts/jquery-ui/widgets/button.js +454 -0
  125. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +294 -0
  126. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +304 -0
  127. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2240 -0
  128. data/app/assets/javascripts/jquery-ui/widgets/dialog.js +957 -0
  129. data/app/assets/javascripts/jquery-ui/widgets/draggable.js +1264 -0
  130. data/app/assets/javascripts/jquery-ui/widgets/droppable.js +508 -0
  131. data/app/assets/javascripts/{jquery.ui.menu.js → jquery-ui/widgets/menu.js} +276 -189
  132. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +226 -0
  133. data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +184 -0
  134. data/app/assets/javascripts/jquery-ui/widgets/resizable.js +1281 -0
  135. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +321 -0
  136. data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +675 -0
  137. data/app/assets/javascripts/{jquery.ui.slider.js → jquery-ui/widgets/slider.js} +256 -176
  138. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1614 -0
  139. data/app/assets/javascripts/{jquery.ui.spinner.js → jquery-ui/widgets/spinner.js} +200 -137
  140. data/app/assets/javascripts/{jquery.ui.tabs.js → jquery-ui/widgets/tabs.js} +322 -277
  141. data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +528 -0
  142. data/app/assets/javascripts/jquery-ui.js +52 -0
  143. data/app/assets/stylesheets/jquery-ui/accordion.css +26 -0
  144. data/app/assets/stylesheets/jquery-ui/all.css +14 -0
  145. data/app/assets/stylesheets/jquery-ui/autocomplete.css +19 -0
  146. data/app/assets/stylesheets/jquery-ui/base.css +32 -0
  147. data/app/assets/stylesheets/jquery-ui/button.css +80 -0
  148. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
  149. data/app/assets/stylesheets/jquery-ui/controlgroup.css +65 -0
  150. data/app/assets/stylesheets/{jquery.ui.core.css.erb → jquery-ui/core.css} +15 -12
  151. data/app/assets/stylesheets/{jquery.ui.datepicker.css.erb → jquery-ui/datepicker.css} +17 -8
  152. data/app/assets/stylesheets/{jquery.ui.dialog.css.erb → jquery-ui/dialog.css} +43 -15
  153. data/app/assets/stylesheets/jquery-ui/draggable.css +14 -0
  154. data/app/assets/stylesheets/jquery-ui/menu.css +65 -0
  155. data/app/assets/stylesheets/jquery-ui/progressbar.css +30 -0
  156. data/app/assets/stylesheets/{jquery.ui.resizable.css.erb → jquery-ui/resizable.css} +6 -6
  157. data/app/assets/stylesheets/jquery-ui/selectable.css +19 -0
  158. data/app/assets/stylesheets/jquery-ui/selectmenu.css +53 -0
  159. data/app/assets/stylesheets/{jquery.ui.slider.css.erb → jquery-ui/slider.css} +8 -14
  160. data/app/assets/stylesheets/jquery-ui/sortable.css +14 -0
  161. data/app/assets/stylesheets/{jquery.ui.spinner.css.erb → jquery-ui/spinner.css} +12 -27
  162. data/app/assets/stylesheets/{jquery.ui.tabs.css.erb → jquery-ui/tabs.css} +6 -7
  163. data/app/assets/stylesheets/{jquery.ui.theme.css.erb → jquery-ui/theme.css.erb} +121 -102
  164. data/app/assets/stylesheets/jquery-ui/tooltip.css +22 -0
  165. data/app/assets/stylesheets/jquery-ui.css +1 -0
  166. data/lib/jquery/ui/rails/version.rb +2 -2
  167. metadata +178 -169
  168. data/app/assets/images/jquery-ui/animated-overlay.gif +0 -0
  169. data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  170. data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  171. data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  172. data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  173. data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  174. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  175. data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  176. data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  177. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  178. data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  179. data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  180. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  181. data/app/assets/javascripts/jquery.ui.all.js +0 -34
  182. data/app/assets/javascripts/jquery.ui.button.js +0 -398
  183. data/app/assets/javascripts/jquery.ui.core.js +0 -320
  184. data/app/assets/javascripts/jquery.ui.datepicker-af.js +0 -23
  185. data/app/assets/javascripts/jquery.ui.datepicker-ar-DZ.js +0 -23
  186. data/app/assets/javascripts/jquery.ui.datepicker-ar.js +0 -23
  187. data/app/assets/javascripts/jquery.ui.datepicker-az.js +0 -23
  188. data/app/assets/javascripts/jquery.ui.datepicker-be.js +0 -23
  189. data/app/assets/javascripts/jquery.ui.datepicker-bg.js +0 -24
  190. data/app/assets/javascripts/jquery.ui.datepicker-bs.js +0 -23
  191. data/app/assets/javascripts/jquery.ui.datepicker-ca.js +0 -23
  192. data/app/assets/javascripts/jquery.ui.datepicker-cs.js +0 -23
  193. data/app/assets/javascripts/jquery.ui.datepicker-cy-GB.js +0 -23
  194. data/app/assets/javascripts/jquery.ui.datepicker-da.js +0 -23
  195. data/app/assets/javascripts/jquery.ui.datepicker-de.js +0 -23
  196. data/app/assets/javascripts/jquery.ui.datepicker-el.js +0 -23
  197. data/app/assets/javascripts/jquery.ui.datepicker-en-AU.js +0 -23
  198. data/app/assets/javascripts/jquery.ui.datepicker-en-GB.js +0 -23
  199. data/app/assets/javascripts/jquery.ui.datepicker-en-NZ.js +0 -23
  200. data/app/assets/javascripts/jquery.ui.datepicker-eo.js +0 -23
  201. data/app/assets/javascripts/jquery.ui.datepicker-es.js +0 -23
  202. data/app/assets/javascripts/jquery.ui.datepicker-et.js +0 -23
  203. data/app/assets/javascripts/jquery.ui.datepicker-eu.js +0 -23
  204. data/app/assets/javascripts/jquery.ui.datepicker-fa.js +0 -59
  205. data/app/assets/javascripts/jquery.ui.datepicker-fi.js +0 -23
  206. data/app/assets/javascripts/jquery.ui.datepicker-fo.js +0 -23
  207. data/app/assets/javascripts/jquery.ui.datepicker-fr-CA.js +0 -23
  208. data/app/assets/javascripts/jquery.ui.datepicker-fr-CH.js +0 -23
  209. data/app/assets/javascripts/jquery.ui.datepicker-fr.js +0 -25
  210. data/app/assets/javascripts/jquery.ui.datepicker-gl.js +0 -23
  211. data/app/assets/javascripts/jquery.ui.datepicker-he.js +0 -23
  212. data/app/assets/javascripts/jquery.ui.datepicker-hi.js +0 -23
  213. data/app/assets/javascripts/jquery.ui.datepicker-hr.js +0 -23
  214. data/app/assets/javascripts/jquery.ui.datepicker-hu.js +0 -23
  215. data/app/assets/javascripts/jquery.ui.datepicker-hy.js +0 -23
  216. data/app/assets/javascripts/jquery.ui.datepicker-id.js +0 -23
  217. data/app/assets/javascripts/jquery.ui.datepicker-is.js +0 -23
  218. data/app/assets/javascripts/jquery.ui.datepicker-it.js +0 -23
  219. data/app/assets/javascripts/jquery.ui.datepicker-ja.js +0 -23
  220. data/app/assets/javascripts/jquery.ui.datepicker-ka.js +0 -21
  221. data/app/assets/javascripts/jquery.ui.datepicker-kk.js +0 -23
  222. data/app/assets/javascripts/jquery.ui.datepicker-km.js +0 -23
  223. data/app/assets/javascripts/jquery.ui.datepicker-ko.js +0 -23
  224. data/app/assets/javascripts/jquery.ui.datepicker-ky.js +0 -24
  225. data/app/assets/javascripts/jquery.ui.datepicker-lb.js +0 -23
  226. data/app/assets/javascripts/jquery.ui.datepicker-lt.js +0 -23
  227. data/app/assets/javascripts/jquery.ui.datepicker-lv.js +0 -23
  228. data/app/assets/javascripts/jquery.ui.datepicker-mk.js +0 -23
  229. data/app/assets/javascripts/jquery.ui.datepicker-ml.js +0 -23
  230. data/app/assets/javascripts/jquery.ui.datepicker-ms.js +0 -23
  231. data/app/assets/javascripts/jquery.ui.datepicker-nb.js +0 -22
  232. data/app/assets/javascripts/jquery.ui.datepicker-nl-BE.js +0 -23
  233. data/app/assets/javascripts/jquery.ui.datepicker-nl.js +0 -23
  234. data/app/assets/javascripts/jquery.ui.datepicker-nn.js +0 -22
  235. data/app/assets/javascripts/jquery.ui.datepicker-no.js +0 -23
  236. data/app/assets/javascripts/jquery.ui.datepicker-pl.js +0 -23
  237. data/app/assets/javascripts/jquery.ui.datepicker-pt-BR.js +0 -23
  238. data/app/assets/javascripts/jquery.ui.datepicker-pt.js +0 -22
  239. data/app/assets/javascripts/jquery.ui.datepicker-rm.js +0 -21
  240. data/app/assets/javascripts/jquery.ui.datepicker-ro.js +0 -26
  241. data/app/assets/javascripts/jquery.ui.datepicker-ru.js +0 -23
  242. data/app/assets/javascripts/jquery.ui.datepicker-sk.js +0 -23
  243. data/app/assets/javascripts/jquery.ui.datepicker-sl.js +0 -24
  244. data/app/assets/javascripts/jquery.ui.datepicker-sq.js +0 -23
  245. data/app/assets/javascripts/jquery.ui.datepicker-sr-SR.js +0 -23
  246. data/app/assets/javascripts/jquery.ui.datepicker-sr.js +0 -23
  247. data/app/assets/javascripts/jquery.ui.datepicker-sv.js +0 -23
  248. data/app/assets/javascripts/jquery.ui.datepicker-ta.js +0 -23
  249. data/app/assets/javascripts/jquery.ui.datepicker-th.js +0 -23
  250. data/app/assets/javascripts/jquery.ui.datepicker-tj.js +0 -23
  251. data/app/assets/javascripts/jquery.ui.datepicker-tr.js +0 -23
  252. data/app/assets/javascripts/jquery.ui.datepicker-uk.js +0 -24
  253. data/app/assets/javascripts/jquery.ui.datepicker-vi.js +0 -23
  254. data/app/assets/javascripts/jquery.ui.datepicker-zh-CN.js +0 -23
  255. data/app/assets/javascripts/jquery.ui.datepicker-zh-HK.js +0 -23
  256. data/app/assets/javascripts/jquery.ui.datepicker-zh-TW.js +0 -23
  257. data/app/assets/javascripts/jquery.ui.datepicker.js +0 -2040
  258. data/app/assets/javascripts/jquery.ui.dialog.js +0 -830
  259. data/app/assets/javascripts/jquery.ui.draggable.js +0 -962
  260. data/app/assets/javascripts/jquery.ui.droppable.js +0 -394
  261. data/app/assets/javascripts/jquery.ui.effect-blind.js +0 -84
  262. data/app/assets/javascripts/jquery.ui.effect-bounce.js +0 -115
  263. data/app/assets/javascripts/jquery.ui.effect-clip.js +0 -69
  264. data/app/assets/javascripts/jquery.ui.effect-drop.js +0 -67
  265. data/app/assets/javascripts/jquery.ui.effect-explode.js +0 -99
  266. data/app/assets/javascripts/jquery.ui.effect-fade.js +0 -32
  267. data/app/assets/javascripts/jquery.ui.effect-fold.js +0 -78
  268. data/app/assets/javascripts/jquery.ui.effect-highlight.js +0 -52
  269. data/app/assets/javascripts/jquery.ui.effect-pulsate.js +0 -65
  270. data/app/assets/javascripts/jquery.ui.effect-scale.js +0 -320
  271. data/app/assets/javascripts/jquery.ui.effect-shake.js +0 -76
  272. data/app/assets/javascripts/jquery.ui.effect-slide.js +0 -66
  273. data/app/assets/javascripts/jquery.ui.effect-transfer.js +0 -49
  274. data/app/assets/javascripts/jquery.ui.effect.all.js +0 -14
  275. data/app/assets/javascripts/jquery.ui.effect.js +0 -1289
  276. data/app/assets/javascripts/jquery.ui.mouse.js +0 -172
  277. data/app/assets/javascripts/jquery.ui.progressbar.js +0 -148
  278. data/app/assets/javascripts/jquery.ui.resizable.js +0 -982
  279. data/app/assets/javascripts/jquery.ui.selectable.js +0 -281
  280. data/app/assets/javascripts/jquery.ui.sortable.js +0 -1293
  281. data/app/assets/javascripts/jquery.ui.tooltip.js +0 -406
  282. data/app/assets/javascripts/jquery.ui.widget.js +0 -521
  283. data/app/assets/stylesheets/jquery.ui.accordion.css.erb +0 -42
  284. data/app/assets/stylesheets/jquery.ui.all.css.erb +0 -14
  285. data/app/assets/stylesheets/jquery.ui.autocomplete.css.erb +0 -21
  286. data/app/assets/stylesheets/jquery.ui.base.css.erb +0 -27
  287. data/app/assets/stylesheets/jquery.ui.button.css.erb +0 -118
  288. data/app/assets/stylesheets/jquery.ui.menu.css.erb +0 -83
  289. data/app/assets/stylesheets/jquery.ui.progressbar.css.erb +0 -37
  290. data/app/assets/stylesheets/jquery.ui.selectable.css.erb +0 -17
  291. data/app/assets/stylesheets/jquery.ui.tooltip.css.erb +0 -25
@@ -1,1293 +0,0 @@
1
- //= require jquery.ui.core
2
- //= require jquery.ui.widget
3
- //= require jquery.ui.mouse
4
-
5
- /*!
6
- * jQuery UI Sortable 1.10.4
7
- * http://jqueryui.com
8
- *
9
- * Copyright 2014 jQuery Foundation and other contributors
10
- * Released under the MIT license.
11
- * http://jquery.org/license
12
- *
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
- */
20
- (function( $, undefined ) {
21
-
22
- function isOverAxis( x, reference, size ) {
23
- return ( x > reference ) && ( x < ( reference + size ) );
24
- }
25
-
26
- function isFloating(item) {
27
- return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
28
- }
29
-
30
- $.widget("ui.sortable", $.ui.mouse, {
31
- version: "1.10.4",
32
- widgetEventPrefix: "sort",
33
- ready: false,
34
- options: {
35
- appendTo: "parent",
36
- axis: false,
37
- connectWith: false,
38
- containment: false,
39
- cursor: "auto",
40
- cursorAt: false,
41
- dropOnEmpty: true,
42
- forcePlaceholderSize: false,
43
- forceHelperSize: false,
44
- grid: false,
45
- handle: false,
46
- helper: "original",
47
- items: "> *",
48
- opacity: false,
49
- placeholder: false,
50
- revert: false,
51
- scroll: true,
52
- scrollSensitivity: 20,
53
- scrollSpeed: 20,
54
- scope: "default",
55
- tolerance: "intersect",
56
- zIndex: 1000,
57
-
58
- // callbacks
59
- activate: null,
60
- beforeStop: null,
61
- change: null,
62
- deactivate: null,
63
- out: null,
64
- over: null,
65
- receive: null,
66
- remove: null,
67
- sort: null,
68
- start: null,
69
- stop: null,
70
- update: null
71
- },
72
- _create: function() {
73
-
74
- var o = this.options;
75
- this.containerCache = {};
76
- this.element.addClass("ui-sortable");
77
-
78
- //Get the items
79
- this.refresh();
80
-
81
- //Let's determine if the items are being displayed horizontally
82
- this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
83
-
84
- //Let's determine the parent's offset
85
- this.offset = this.element.offset();
86
-
87
- //Initialize mouse events for interaction
88
- this._mouseInit();
89
-
90
- //We're ready to go
91
- this.ready = true;
92
-
93
- },
94
-
95
- _destroy: function() {
96
- this.element
97
- .removeClass("ui-sortable ui-sortable-disabled");
98
- this._mouseDestroy();
99
-
100
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
101
- this.items[i].item.removeData(this.widgetName + "-item");
102
- }
103
-
104
- return this;
105
- },
106
-
107
- _setOption: function(key, value){
108
- if ( key === "disabled" ) {
109
- this.options[ key ] = value;
110
-
111
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
112
- } else {
113
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
114
- $.Widget.prototype._setOption.apply(this, arguments);
115
- }
116
- },
117
-
118
- _mouseCapture: function(event, overrideHandle) {
119
- var currentItem = null,
120
- validHandle = false,
121
- that = this;
122
-
123
- if (this.reverting) {
124
- return false;
125
- }
126
-
127
- if(this.options.disabled || this.options.type === "static") {
128
- return false;
129
- }
130
-
131
- //We have to refresh the items data once first
132
- this._refreshItems(event);
133
-
134
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
135
- $(event.target).parents().each(function() {
136
- if($.data(this, that.widgetName + "-item") === that) {
137
- currentItem = $(this);
138
- return false;
139
- }
140
- });
141
- if($.data(event.target, that.widgetName + "-item") === that) {
142
- currentItem = $(event.target);
143
- }
144
-
145
- if(!currentItem) {
146
- return false;
147
- }
148
- if(this.options.handle && !overrideHandle) {
149
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
150
- if(this === event.target) {
151
- validHandle = true;
152
- }
153
- });
154
- if(!validHandle) {
155
- return false;
156
- }
157
- }
158
-
159
- this.currentItem = currentItem;
160
- this._removeCurrentsFromItems();
161
- return true;
162
-
163
- },
164
-
165
- _mouseStart: function(event, overrideHandle, noActivation) {
166
-
167
- var i, body,
168
- o = this.options;
169
-
170
- this.currentContainer = this;
171
-
172
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
173
- this.refreshPositions();
174
-
175
- //Create and append the visible helper
176
- this.helper = this._createHelper(event);
177
-
178
- //Cache the helper size
179
- this._cacheHelperProportions();
180
-
181
- /*
182
- * - Position generation -
183
- * This block generates everything position related - it's the core of draggables.
184
- */
185
-
186
- //Cache the margins of the original element
187
- this._cacheMargins();
188
-
189
- //Get the next scrolling parent
190
- this.scrollParent = this.helper.scrollParent();
191
-
192
- //The element's absolute position on the page minus margins
193
- this.offset = this.currentItem.offset();
194
- this.offset = {
195
- top: this.offset.top - this.margins.top,
196
- left: this.offset.left - this.margins.left
197
- };
198
-
199
- $.extend(this.offset, {
200
- click: { //Where the click happened, relative to the element
201
- left: event.pageX - this.offset.left,
202
- top: event.pageY - this.offset.top
203
- },
204
- parent: this._getParentOffset(),
205
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
206
- });
207
-
208
- // Only after we got the offset, we can change the helper's position to absolute
209
- // TODO: Still need to figure out a way to make relative sorting possible
210
- this.helper.css("position", "absolute");
211
- this.cssPosition = this.helper.css("position");
212
-
213
- //Generate the original position
214
- this.originalPosition = this._generatePosition(event);
215
- this.originalPageX = event.pageX;
216
- this.originalPageY = event.pageY;
217
-
218
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
219
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
220
-
221
- //Cache the former DOM position
222
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
223
-
224
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
225
- if(this.helper[0] !== this.currentItem[0]) {
226
- this.currentItem.hide();
227
- }
228
-
229
- //Create the placeholder
230
- this._createPlaceholder();
231
-
232
- //Set a containment if given in the options
233
- if(o.containment) {
234
- this._setContainment();
235
- }
236
-
237
- if( o.cursor && o.cursor !== "auto" ) { // cursor option
238
- body = this.document.find( "body" );
239
-
240
- // support: IE
241
- this.storedCursor = body.css( "cursor" );
242
- body.css( "cursor", o.cursor );
243
-
244
- this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
245
- }
246
-
247
- if(o.opacity) { // opacity option
248
- if (this.helper.css("opacity")) {
249
- this._storedOpacity = this.helper.css("opacity");
250
- }
251
- this.helper.css("opacity", o.opacity);
252
- }
253
-
254
- if(o.zIndex) { // zIndex option
255
- if (this.helper.css("zIndex")) {
256
- this._storedZIndex = this.helper.css("zIndex");
257
- }
258
- this.helper.css("zIndex", o.zIndex);
259
- }
260
-
261
- //Prepare scrolling
262
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
263
- this.overflowOffset = this.scrollParent.offset();
264
- }
265
-
266
- //Call callbacks
267
- this._trigger("start", event, this._uiHash());
268
-
269
- //Recache the helper size
270
- if(!this._preserveHelperProportions) {
271
- this._cacheHelperProportions();
272
- }
273
-
274
-
275
- //Post "activate" events to possible containers
276
- if( !noActivation ) {
277
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
278
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
279
- }
280
- }
281
-
282
- //Prepare possible droppables
283
- if($.ui.ddmanager) {
284
- $.ui.ddmanager.current = this;
285
- }
286
-
287
- if ($.ui.ddmanager && !o.dropBehaviour) {
288
- $.ui.ddmanager.prepareOffsets(this, event);
289
- }
290
-
291
- this.dragging = true;
292
-
293
- this.helper.addClass("ui-sortable-helper");
294
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
295
- return true;
296
-
297
- },
298
-
299
- _mouseDrag: function(event) {
300
- var i, item, itemElement, intersection,
301
- o = this.options,
302
- scrolled = false;
303
-
304
- //Compute the helpers position
305
- this.position = this._generatePosition(event);
306
- this.positionAbs = this._convertPositionTo("absolute");
307
-
308
- if (!this.lastPositionAbs) {
309
- this.lastPositionAbs = this.positionAbs;
310
- }
311
-
312
- //Do scrolling
313
- if(this.options.scroll) {
314
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
315
-
316
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
317
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
318
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
319
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
320
- }
321
-
322
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
323
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
324
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
325
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
326
- }
327
-
328
- } else {
329
-
330
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
331
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
332
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
333
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
334
- }
335
-
336
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
337
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
338
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
339
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
340
- }
341
-
342
- }
343
-
344
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
345
- $.ui.ddmanager.prepareOffsets(this, event);
346
- }
347
- }
348
-
349
- //Regenerate the absolute position used for position checks
350
- this.positionAbs = this._convertPositionTo("absolute");
351
-
352
- //Set the helper position
353
- if(!this.options.axis || this.options.axis !== "y") {
354
- this.helper[0].style.left = this.position.left+"px";
355
- }
356
- if(!this.options.axis || this.options.axis !== "x") {
357
- this.helper[0].style.top = this.position.top+"px";
358
- }
359
-
360
- //Rearrange
361
- for (i = this.items.length - 1; i >= 0; i--) {
362
-
363
- //Cache variables and intersection, continue if no intersection
364
- item = this.items[i];
365
- itemElement = item.item[0];
366
- intersection = this._intersectsWithPointer(item);
367
- if (!intersection) {
368
- continue;
369
- }
370
-
371
- // Only put the placeholder inside the current Container, skip all
372
- // items from other containers. This works because when moving
373
- // an item from one container to another the
374
- // currentContainer is switched before the placeholder is moved.
375
- //
376
- // Without this, moving items in "sub-sortables" can cause
377
- // the placeholder to jitter beetween the outer and inner container.
378
- if (item.instance !== this.currentContainer) {
379
- continue;
380
- }
381
-
382
- // cannot intersect with itself
383
- // no useless actions that have been done before
384
- // no action if the item moved is the parent of the item checked
385
- if (itemElement !== this.currentItem[0] &&
386
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
387
- !$.contains(this.placeholder[0], itemElement) &&
388
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
389
- ) {
390
-
391
- this.direction = intersection === 1 ? "down" : "up";
392
-
393
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
394
- this._rearrange(event, item);
395
- } else {
396
- break;
397
- }
398
-
399
- this._trigger("change", event, this._uiHash());
400
- break;
401
- }
402
- }
403
-
404
- //Post events to containers
405
- this._contactContainers(event);
406
-
407
- //Interconnect with droppables
408
- if($.ui.ddmanager) {
409
- $.ui.ddmanager.drag(this, event);
410
- }
411
-
412
- //Call callbacks
413
- this._trigger("sort", event, this._uiHash());
414
-
415
- this.lastPositionAbs = this.positionAbs;
416
- return false;
417
-
418
- },
419
-
420
- _mouseStop: function(event, noPropagation) {
421
-
422
- if(!event) {
423
- return;
424
- }
425
-
426
- //If we are using droppables, inform the manager about the drop
427
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
428
- $.ui.ddmanager.drop(this, event);
429
- }
430
-
431
- if(this.options.revert) {
432
- var that = this,
433
- cur = this.placeholder.offset(),
434
- axis = this.options.axis,
435
- animation = {};
436
-
437
- if ( !axis || axis === "x" ) {
438
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
439
- }
440
- if ( !axis || axis === "y" ) {
441
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
442
- }
443
- this.reverting = true;
444
- $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
445
- that._clear(event);
446
- });
447
- } else {
448
- this._clear(event, noPropagation);
449
- }
450
-
451
- return false;
452
-
453
- },
454
-
455
- cancel: function() {
456
-
457
- if(this.dragging) {
458
-
459
- this._mouseUp({ target: null });
460
-
461
- if(this.options.helper === "original") {
462
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
463
- } else {
464
- this.currentItem.show();
465
- }
466
-
467
- //Post deactivating events to containers
468
- for (var i = this.containers.length - 1; i >= 0; i--){
469
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
470
- if(this.containers[i].containerCache.over) {
471
- this.containers[i]._trigger("out", null, this._uiHash(this));
472
- this.containers[i].containerCache.over = 0;
473
- }
474
- }
475
-
476
- }
477
-
478
- if (this.placeholder) {
479
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
480
- if(this.placeholder[0].parentNode) {
481
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
482
- }
483
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
484
- this.helper.remove();
485
- }
486
-
487
- $.extend(this, {
488
- helper: null,
489
- dragging: false,
490
- reverting: false,
491
- _noFinalSort: null
492
- });
493
-
494
- if(this.domPosition.prev) {
495
- $(this.domPosition.prev).after(this.currentItem);
496
- } else {
497
- $(this.domPosition.parent).prepend(this.currentItem);
498
- }
499
- }
500
-
501
- return this;
502
-
503
- },
504
-
505
- serialize: function(o) {
506
-
507
- var items = this._getItemsAsjQuery(o && o.connected),
508
- str = [];
509
- o = o || {};
510
-
511
- $(items).each(function() {
512
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
513
- if (res) {
514
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
515
- }
516
- });
517
-
518
- if(!str.length && o.key) {
519
- str.push(o.key + "=");
520
- }
521
-
522
- return str.join("&");
523
-
524
- },
525
-
526
- toArray: function(o) {
527
-
528
- var items = this._getItemsAsjQuery(o && o.connected),
529
- ret = [];
530
-
531
- o = o || {};
532
-
533
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
534
- return ret;
535
-
536
- },
537
-
538
- /* Be careful with the following core functions */
539
- _intersectsWith: function(item) {
540
-
541
- var x1 = this.positionAbs.left,
542
- x2 = x1 + this.helperProportions.width,
543
- y1 = this.positionAbs.top,
544
- y2 = y1 + this.helperProportions.height,
545
- l = item.left,
546
- r = l + item.width,
547
- t = item.top,
548
- b = t + item.height,
549
- dyClick = this.offset.click.top,
550
- dxClick = this.offset.click.left,
551
- isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
552
- isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
553
- isOverElement = isOverElementHeight && isOverElementWidth;
554
-
555
- if ( this.options.tolerance === "pointer" ||
556
- this.options.forcePointerForContainers ||
557
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
558
- ) {
559
- return isOverElement;
560
- } else {
561
-
562
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
563
- x2 - (this.helperProportions.width / 2) < r && // Left Half
564
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
565
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
566
-
567
- }
568
- },
569
-
570
- _intersectsWithPointer: function(item) {
571
-
572
- var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
573
- isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
574
- isOverElement = isOverElementHeight && isOverElementWidth,
575
- verticalDirection = this._getDragVerticalDirection(),
576
- horizontalDirection = this._getDragHorizontalDirection();
577
-
578
- if (!isOverElement) {
579
- return false;
580
- }
581
-
582
- return this.floating ?
583
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
584
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
585
-
586
- },
587
-
588
- _intersectsWithSides: function(item) {
589
-
590
- var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
591
- isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
592
- verticalDirection = this._getDragVerticalDirection(),
593
- horizontalDirection = this._getDragHorizontalDirection();
594
-
595
- if (this.floating && horizontalDirection) {
596
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
597
- } else {
598
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
599
- }
600
-
601
- },
602
-
603
- _getDragVerticalDirection: function() {
604
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
605
- return delta !== 0 && (delta > 0 ? "down" : "up");
606
- },
607
-
608
- _getDragHorizontalDirection: function() {
609
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
610
- return delta !== 0 && (delta > 0 ? "right" : "left");
611
- },
612
-
613
- refresh: function(event) {
614
- this._refreshItems(event);
615
- this.refreshPositions();
616
- return this;
617
- },
618
-
619
- _connectWith: function() {
620
- var options = this.options;
621
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
622
- },
623
-
624
- _getItemsAsjQuery: function(connected) {
625
-
626
- var i, j, cur, inst,
627
- items = [],
628
- queries = [],
629
- connectWith = this._connectWith();
630
-
631
- if(connectWith && connected) {
632
- for (i = connectWith.length - 1; i >= 0; i--){
633
- cur = $(connectWith[i]);
634
- for ( j = cur.length - 1; j >= 0; j--){
635
- inst = $.data(cur[j], this.widgetFullName);
636
- if(inst && inst !== this && !inst.options.disabled) {
637
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
638
- }
639
- }
640
- }
641
- }
642
-
643
- 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]);
644
-
645
- function addItems() {
646
- items.push( this );
647
- }
648
- for (i = queries.length - 1; i >= 0; i--){
649
- queries[i][0].each( addItems );
650
- }
651
-
652
- return $(items);
653
-
654
- },
655
-
656
- _removeCurrentsFromItems: function() {
657
-
658
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
659
-
660
- this.items = $.grep(this.items, function (item) {
661
- for (var j=0; j < list.length; j++) {
662
- if(list[j] === item.item[0]) {
663
- return false;
664
- }
665
- }
666
- return true;
667
- });
668
-
669
- },
670
-
671
- _refreshItems: function(event) {
672
-
673
- this.items = [];
674
- this.containers = [this];
675
-
676
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
677
- items = this.items,
678
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
679
- connectWith = this._connectWith();
680
-
681
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
682
- for (i = connectWith.length - 1; i >= 0; i--){
683
- cur = $(connectWith[i]);
684
- for (j = cur.length - 1; j >= 0; j--){
685
- inst = $.data(cur[j], this.widgetFullName);
686
- if(inst && inst !== this && !inst.options.disabled) {
687
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
688
- this.containers.push(inst);
689
- }
690
- }
691
- }
692
- }
693
-
694
- for (i = queries.length - 1; i >= 0; i--) {
695
- targetData = queries[i][1];
696
- _queries = queries[i][0];
697
-
698
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
699
- item = $(_queries[j]);
700
-
701
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
702
-
703
- items.push({
704
- item: item,
705
- instance: targetData,
706
- width: 0, height: 0,
707
- left: 0, top: 0
708
- });
709
- }
710
- }
711
-
712
- },
713
-
714
- refreshPositions: function(fast) {
715
-
716
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
717
- if(this.offsetParent && this.helper) {
718
- this.offset.parent = this._getParentOffset();
719
- }
720
-
721
- var i, item, t, p;
722
-
723
- for (i = this.items.length - 1; i >= 0; i--){
724
- item = this.items[i];
725
-
726
- //We ignore calculating positions of all connected containers when we're not over them
727
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
728
- continue;
729
- }
730
-
731
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
732
-
733
- if (!fast) {
734
- item.width = t.outerWidth();
735
- item.height = t.outerHeight();
736
- }
737
-
738
- p = t.offset();
739
- item.left = p.left;
740
- item.top = p.top;
741
- }
742
-
743
- if(this.options.custom && this.options.custom.refreshContainers) {
744
- this.options.custom.refreshContainers.call(this);
745
- } else {
746
- for (i = this.containers.length - 1; i >= 0; i--){
747
- p = this.containers[i].element.offset();
748
- this.containers[i].containerCache.left = p.left;
749
- this.containers[i].containerCache.top = p.top;
750
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
751
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
752
- }
753
- }
754
-
755
- return this;
756
- },
757
-
758
- _createPlaceholder: function(that) {
759
- that = that || this;
760
- var className,
761
- o = that.options;
762
-
763
- if(!o.placeholder || o.placeholder.constructor === String) {
764
- className = o.placeholder;
765
- o.placeholder = {
766
- element: function() {
767
-
768
- var nodeName = that.currentItem[0].nodeName.toLowerCase(),
769
- element = $( "<" + nodeName + ">", that.document[0] )
770
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
771
- .removeClass("ui-sortable-helper");
772
-
773
- if ( nodeName === "tr" ) {
774
- that.currentItem.children().each(function() {
775
- $( "<td>&#160;</td>", that.document[0] )
776
- .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
777
- .appendTo( element );
778
- });
779
- } else if ( nodeName === "img" ) {
780
- element.attr( "src", that.currentItem.attr( "src" ) );
781
- }
782
-
783
- if ( !className ) {
784
- element.css( "visibility", "hidden" );
785
- }
786
-
787
- return element;
788
- },
789
- update: function(container, p) {
790
-
791
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
792
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
793
- if(className && !o.forcePlaceholderSize) {
794
- return;
795
- }
796
-
797
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
798
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
799
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
800
- }
801
- };
802
- }
803
-
804
- //Create the placeholder
805
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
806
-
807
- //Append it after the actual current item
808
- that.currentItem.after(that.placeholder);
809
-
810
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
811
- o.placeholder.update(that, that.placeholder);
812
-
813
- },
814
-
815
- _contactContainers: function(event) {
816
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
817
- innermostContainer = null,
818
- innermostIndex = null;
819
-
820
- // get innermost container that intersects with item
821
- for (i = this.containers.length - 1; i >= 0; i--) {
822
-
823
- // never consider a container that's located within the item itself
824
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
825
- continue;
826
- }
827
-
828
- if(this._intersectsWith(this.containers[i].containerCache)) {
829
-
830
- // if we've already found a container and it's more "inner" than this, then continue
831
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
832
- continue;
833
- }
834
-
835
- innermostContainer = this.containers[i];
836
- innermostIndex = i;
837
-
838
- } else {
839
- // container doesn't intersect. trigger "out" event if necessary
840
- if(this.containers[i].containerCache.over) {
841
- this.containers[i]._trigger("out", event, this._uiHash(this));
842
- this.containers[i].containerCache.over = 0;
843
- }
844
- }
845
-
846
- }
847
-
848
- // if no intersecting containers found, return
849
- if(!innermostContainer) {
850
- return;
851
- }
852
-
853
- // move the item into the container if it's not there already
854
- if(this.containers.length === 1) {
855
- if (!this.containers[innermostIndex].containerCache.over) {
856
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
857
- this.containers[innermostIndex].containerCache.over = 1;
858
- }
859
- } else {
860
-
861
- //When entering a new container, we will find the item with the least distance and append our item near it
862
- dist = 10000;
863
- itemWithLeastDistance = null;
864
- floating = innermostContainer.floating || isFloating(this.currentItem);
865
- posProperty = floating ? "left" : "top";
866
- sizeProperty = floating ? "width" : "height";
867
- base = this.positionAbs[posProperty] + this.offset.click[posProperty];
868
- for (j = this.items.length - 1; j >= 0; j--) {
869
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
870
- continue;
871
- }
872
- if(this.items[j].item[0] === this.currentItem[0]) {
873
- continue;
874
- }
875
- if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
876
- continue;
877
- }
878
- cur = this.items[j].item.offset()[posProperty];
879
- nearBottom = false;
880
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
881
- nearBottom = true;
882
- cur += this.items[j][sizeProperty];
883
- }
884
-
885
- if(Math.abs(cur - base) < dist) {
886
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
887
- this.direction = nearBottom ? "up": "down";
888
- }
889
- }
890
-
891
- //Check if dropOnEmpty is enabled
892
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
893
- return;
894
- }
895
-
896
- if(this.currentContainer === this.containers[innermostIndex]) {
897
- return;
898
- }
899
-
900
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
901
- this._trigger("change", event, this._uiHash());
902
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
903
- this.currentContainer = this.containers[innermostIndex];
904
-
905
- //Update the placeholder
906
- this.options.placeholder.update(this.currentContainer, this.placeholder);
907
-
908
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
909
- this.containers[innermostIndex].containerCache.over = 1;
910
- }
911
-
912
-
913
- },
914
-
915
- _createHelper: function(event) {
916
-
917
- var o = this.options,
918
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
919
-
920
- //Add the helper to the DOM if that didn't happen already
921
- if(!helper.parents("body").length) {
922
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
923
- }
924
-
925
- if(helper[0] === this.currentItem[0]) {
926
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
927
- }
928
-
929
- if(!helper[0].style.width || o.forceHelperSize) {
930
- helper.width(this.currentItem.width());
931
- }
932
- if(!helper[0].style.height || o.forceHelperSize) {
933
- helper.height(this.currentItem.height());
934
- }
935
-
936
- return helper;
937
-
938
- },
939
-
940
- _adjustOffsetFromHelper: function(obj) {
941
- if (typeof obj === "string") {
942
- obj = obj.split(" ");
943
- }
944
- if ($.isArray(obj)) {
945
- obj = {left: +obj[0], top: +obj[1] || 0};
946
- }
947
- if ("left" in obj) {
948
- this.offset.click.left = obj.left + this.margins.left;
949
- }
950
- if ("right" in obj) {
951
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
952
- }
953
- if ("top" in obj) {
954
- this.offset.click.top = obj.top + this.margins.top;
955
- }
956
- if ("bottom" in obj) {
957
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
958
- }
959
- },
960
-
961
- _getParentOffset: function() {
962
-
963
-
964
- //Get the offsetParent and cache its position
965
- this.offsetParent = this.helper.offsetParent();
966
- var po = this.offsetParent.offset();
967
-
968
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
969
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
970
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
971
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
972
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
973
- po.left += this.scrollParent.scrollLeft();
974
- po.top += this.scrollParent.scrollTop();
975
- }
976
-
977
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
978
- // with an ugly IE fix
979
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
980
- po = { top: 0, left: 0 };
981
- }
982
-
983
- return {
984
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
985
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
986
- };
987
-
988
- },
989
-
990
- _getRelativeOffset: function() {
991
-
992
- if(this.cssPosition === "relative") {
993
- var p = this.currentItem.position();
994
- return {
995
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
996
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
997
- };
998
- } else {
999
- return { top: 0, left: 0 };
1000
- }
1001
-
1002
- },
1003
-
1004
- _cacheMargins: function() {
1005
- this.margins = {
1006
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
1007
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
1008
- };
1009
- },
1010
-
1011
- _cacheHelperProportions: function() {
1012
- this.helperProportions = {
1013
- width: this.helper.outerWidth(),
1014
- height: this.helper.outerHeight()
1015
- };
1016
- },
1017
-
1018
- _setContainment: function() {
1019
-
1020
- var ce, co, over,
1021
- o = this.options;
1022
- if(o.containment === "parent") {
1023
- o.containment = this.helper[0].parentNode;
1024
- }
1025
- if(o.containment === "document" || o.containment === "window") {
1026
- this.containment = [
1027
- 0 - this.offset.relative.left - this.offset.parent.left,
1028
- 0 - this.offset.relative.top - this.offset.parent.top,
1029
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
1030
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
1031
- ];
1032
- }
1033
-
1034
- if(!(/^(document|window|parent)$/).test(o.containment)) {
1035
- ce = $(o.containment)[0];
1036
- co = $(o.containment).offset();
1037
- over = ($(ce).css("overflow") !== "hidden");
1038
-
1039
- this.containment = [
1040
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
1041
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
1042
- co.left+(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,
1043
- co.top+(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
1044
- ];
1045
- }
1046
-
1047
- },
1048
-
1049
- _convertPositionTo: function(d, pos) {
1050
-
1051
- if(!pos) {
1052
- pos = this.position;
1053
- }
1054
- var mod = d === "absolute" ? 1 : -1,
1055
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
1056
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1057
-
1058
- return {
1059
- top: (
1060
- pos.top + // The absolute mouse position
1061
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
1062
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
1063
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
1064
- ),
1065
- left: (
1066
- pos.left + // The absolute mouse position
1067
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
1068
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
1069
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
1070
- )
1071
- };
1072
-
1073
- },
1074
-
1075
- _generatePosition: function(event) {
1076
-
1077
- var top, left,
1078
- o = this.options,
1079
- pageX = event.pageX,
1080
- pageY = event.pageY,
1081
- 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);
1082
-
1083
- // This is another very weird special case that only happens for relative elements:
1084
- // 1. If the css position is relative
1085
- // 2. and the scroll parent is the document or similar to the offset parent
1086
- // we have to refresh the relative offset during the scroll so there are no jumps
1087
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
1088
- this.offset.relative = this._getRelativeOffset();
1089
- }
1090
-
1091
- /*
1092
- * - Position constraining -
1093
- * Constrain the position to a mix of grid, containment.
1094
- */
1095
-
1096
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
1097
-
1098
- if(this.containment) {
1099
- if(event.pageX - this.offset.click.left < this.containment[0]) {
1100
- pageX = this.containment[0] + this.offset.click.left;
1101
- }
1102
- if(event.pageY - this.offset.click.top < this.containment[1]) {
1103
- pageY = this.containment[1] + this.offset.click.top;
1104
- }
1105
- if(event.pageX - this.offset.click.left > this.containment[2]) {
1106
- pageX = this.containment[2] + this.offset.click.left;
1107
- }
1108
- if(event.pageY - this.offset.click.top > this.containment[3]) {
1109
- pageY = this.containment[3] + this.offset.click.top;
1110
- }
1111
- }
1112
-
1113
- if(o.grid) {
1114
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
1115
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
1116
-
1117
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
1118
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
1119
- }
1120
-
1121
- }
1122
-
1123
- return {
1124
- top: (
1125
- pageY - // The absolute mouse position
1126
- this.offset.click.top - // Click offset (relative to the element)
1127
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
1128
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
1129
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
1130
- ),
1131
- left: (
1132
- pageX - // The absolute mouse position
1133
- this.offset.click.left - // Click offset (relative to the element)
1134
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
1135
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
1136
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
1137
- )
1138
- };
1139
-
1140
- },
1141
-
1142
- _rearrange: function(event, i, a, hardRefresh) {
1143
-
1144
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
1145
-
1146
- //Various things done here to improve the performance:
1147
- // 1. we create a setTimeout, that calls refreshPositions
1148
- // 2. on the instance, we have a counter variable, that get's higher after every append
1149
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
1150
- // 4. this lets only the last addition to the timeout stack through
1151
- this.counter = this.counter ? ++this.counter : 1;
1152
- var counter = this.counter;
1153
-
1154
- this._delay(function() {
1155
- if(counter === this.counter) {
1156
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
1157
- }
1158
- });
1159
-
1160
- },
1161
-
1162
- _clear: function(event, noPropagation) {
1163
-
1164
- this.reverting = false;
1165
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
1166
- // everything else normalized again
1167
- var i,
1168
- delayedTriggers = [];
1169
-
1170
- // We first have to update the dom position of the actual currentItem
1171
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
1172
- if(!this._noFinalSort && this.currentItem.parent().length) {
1173
- this.placeholder.before(this.currentItem);
1174
- }
1175
- this._noFinalSort = null;
1176
-
1177
- if(this.helper[0] === this.currentItem[0]) {
1178
- for(i in this._storedCSS) {
1179
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
1180
- this._storedCSS[i] = "";
1181
- }
1182
- }
1183
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
1184
- } else {
1185
- this.currentItem.show();
1186
- }
1187
-
1188
- if(this.fromOutside && !noPropagation) {
1189
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
1190
- }
1191
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
1192
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
1193
- }
1194
-
1195
- // Check if the items Container has Changed and trigger appropriate
1196
- // events.
1197
- if (this !== this.currentContainer) {
1198
- if(!noPropagation) {
1199
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
1200
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
1201
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
1202
- }
1203
- }
1204
-
1205
-
1206
- //Post events to containers
1207
- function delayEvent( type, instance, container ) {
1208
- return function( event ) {
1209
- container._trigger( type, event, instance._uiHash( instance ) );
1210
- };
1211
- }
1212
- for (i = this.containers.length - 1; i >= 0; i--){
1213
- if (!noPropagation) {
1214
- delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
1215
- }
1216
- if(this.containers[i].containerCache.over) {
1217
- delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
1218
- this.containers[i].containerCache.over = 0;
1219
- }
1220
- }
1221
-
1222
- //Do what was originally in plugins
1223
- if ( this.storedCursor ) {
1224
- this.document.find( "body" ).css( "cursor", this.storedCursor );
1225
- this.storedStylesheet.remove();
1226
- }
1227
- if(this._storedOpacity) {
1228
- this.helper.css("opacity", this._storedOpacity);
1229
- }
1230
- if(this._storedZIndex) {
1231
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
1232
- }
1233
-
1234
- this.dragging = false;
1235
- if(this.cancelHelperRemoval) {
1236
- if(!noPropagation) {
1237
- this._trigger("beforeStop", event, this._uiHash());
1238
- for (i=0; i < delayedTriggers.length; i++) {
1239
- delayedTriggers[i].call(this, event);
1240
- } //Trigger all delayed events
1241
- this._trigger("stop", event, this._uiHash());
1242
- }
1243
-
1244
- this.fromOutside = false;
1245
- return false;
1246
- }
1247
-
1248
- if(!noPropagation) {
1249
- this._trigger("beforeStop", event, this._uiHash());
1250
- }
1251
-
1252
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
1253
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
1254
-
1255
- if(this.helper[0] !== this.currentItem[0]) {
1256
- this.helper.remove();
1257
- }
1258
- this.helper = null;
1259
-
1260
- if(!noPropagation) {
1261
- for (i=0; i < delayedTriggers.length; i++) {
1262
- delayedTriggers[i].call(this, event);
1263
- } //Trigger all delayed events
1264
- this._trigger("stop", event, this._uiHash());
1265
- }
1266
-
1267
- this.fromOutside = false;
1268
- return true;
1269
-
1270
- },
1271
-
1272
- _trigger: function() {
1273
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
1274
- this.cancel();
1275
- }
1276
- },
1277
-
1278
- _uiHash: function(_inst) {
1279
- var inst = _inst || this;
1280
- return {
1281
- helper: inst.helper,
1282
- placeholder: inst.placeholder || $([]),
1283
- position: inst.position,
1284
- originalPosition: inst.originalPosition,
1285
- offset: inst.positionAbs,
1286
- item: inst.currentItem,
1287
- sender: _inst ? _inst.element : null
1288
- };
1289
- }
1290
-
1291
- });
1292
-
1293
- })(jQuery);