jquery-ui-rails 5.0.5 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +1 -1
  3. data/History.md +12 -0
  4. data/README.md +47 -30
  5. data/Rakefile +48 -27
  6. data/VERSIONS.md +1 -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.js +52 -33
  15. data/app/assets/javascripts/jquery-ui/core.js +37 -304
  16. data/app/assets/javascripts/jquery-ui/data.js +41 -0
  17. data/app/assets/javascripts/jquery-ui/disable-selection.js +48 -0
  18. data/app/assets/javascripts/jquery-ui/effect.all.js +15 -16
  19. data/app/assets/javascripts/jquery-ui/effect.js +620 -284
  20. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +73 -0
  21. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +113 -0
  22. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +68 -0
  23. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +72 -0
  24. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +114 -0
  25. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +50 -0
  26. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +92 -0
  27. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +60 -0
  28. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +46 -0
  29. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +67 -0
  30. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +60 -0
  31. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +77 -0
  32. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +194 -0
  33. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +79 -0
  34. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +43 -0
  35. data/app/assets/javascripts/jquery-ui/escape-selector.js +23 -0
  36. data/app/assets/javascripts/jquery-ui/focusable.js +86 -0
  37. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +80 -0
  38. data/app/assets/javascripts/jquery-ui/form.js +22 -0
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +37 -0
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +39 -0
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +39 -0
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +37 -0
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +37 -0
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +38 -0
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +37 -0
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +37 -0
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +37 -0
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +45 -0
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +37 -0
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +37 -0
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +37 -0
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +37 -0
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +37 -0
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +37 -0
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +37 -0
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +37 -0
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +45 -0
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +36 -0
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +73 -0
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +37 -0
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +45 -0
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +37 -0
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +37 -0
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +39 -0
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +37 -0
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +37 -0
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +37 -0
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +37 -0
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +36 -0
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +37 -0
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +37 -0
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +45 -0
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +37 -0
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +37 -0
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +37 -0
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +48 -0
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +37 -0
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +37 -0
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +37 -0
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +38 -0
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +45 -0
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +45 -0
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +45 -0
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +37 -0
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +37 -0
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +37 -0
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +49 -0
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +37 -0
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +37 -0
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +49 -0
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +50 -0
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +37 -0
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +45 -0
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +44 -0
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +61 -0
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +40 -0
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +37 -0
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +37 -0
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +38 -0
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +37 -0
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +37 -0
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +37 -0
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +37 -0
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +53 -0
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +37 -0
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +37 -0
  107. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +37 -0
  108. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +38 -0
  109. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +37 -0
  110. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +37 -0
  111. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +37 -0
  112. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +37 -0
  113. data/app/assets/javascripts/jquery-ui/ie.js +17 -0
  114. data/app/assets/javascripts/jquery-ui/jquery-1-7.js +91 -0
  115. data/app/assets/javascripts/jquery-ui/keycode.js +47 -0
  116. data/app/assets/javascripts/jquery-ui/labels.js +65 -0
  117. data/app/assets/javascripts/jquery-ui/plugin.js +46 -0
  118. data/app/assets/javascripts/jquery-ui/position.js +92 -109
  119. data/app/assets/javascripts/jquery-ui/safe-active-element.js +42 -0
  120. data/app/assets/javascripts/jquery-ui/safe-blur.js +23 -0
  121. data/app/assets/javascripts/jquery-ui/scroll-parent.js +47 -0
  122. data/app/assets/javascripts/jquery-ui/tabbable.js +38 -0
  123. data/app/assets/javascripts/jquery-ui/unique-id.js +51 -0
  124. data/app/assets/javascripts/jquery-ui/version.js +17 -0
  125. data/app/assets/javascripts/jquery-ui/widget.js +328 -151
  126. data/app/assets/javascripts/jquery-ui/{accordion.js → widgets/accordion.js} +187 -162
  127. data/app/assets/javascripts/jquery-ui/{autocomplete.js → widgets/autocomplete.js} +148 -92
  128. data/app/assets/javascripts/jquery-ui/widgets/button.js +391 -0
  129. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +291 -0
  130. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +300 -0
  131. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +2123 -0
  132. data/app/assets/javascripts/jquery-ui/{dialog.js → widgets/dialog.js} +229 -158
  133. data/app/assets/javascripts/jquery-ui/{draggable.js → widgets/draggable.js} +416 -293
  134. data/app/assets/javascripts/jquery-ui/{droppable.js → widgets/droppable.js} +167 -83
  135. data/app/assets/javascripts/jquery-ui/{menu.js → widgets/menu.js} +164 -134
  136. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +230 -0
  137. data/app/assets/javascripts/jquery-ui/{progressbar.js → widgets/progressbar.js} +60 -41
  138. data/app/assets/javascripts/jquery-ui/{resizable.js → widgets/resizable.js} +413 -362
  139. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +314 -0
  140. data/app/assets/javascripts/jquery-ui/{selectmenu.js → widgets/selectmenu.js} +253 -176
  141. data/app/assets/javascripts/jquery-ui/{slider.js → widgets/slider.js} +193 -157
  142. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +1561 -0
  143. data/app/assets/javascripts/jquery-ui/{spinner.js → widgets/spinner.js} +175 -112
  144. data/app/assets/javascripts/jquery-ui/{tabs.js → widgets/tabs.js} +237 -195
  145. data/app/assets/javascripts/jquery-ui/{tooltip.js → widgets/tooltip.js} +136 -87
  146. data/app/assets/stylesheets/jquery-ui/accordion.css +1 -15
  147. data/app/assets/stylesheets/jquery-ui/all.css +1 -1
  148. data/app/assets/stylesheets/jquery-ui/autocomplete.css +1 -3
  149. data/app/assets/stylesheets/jquery-ui/base.css +3 -1
  150. data/app/assets/stylesheets/jquery-ui/button.css +35 -68
  151. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +37 -0
  152. data/app/assets/stylesheets/jquery-ui/controlgroup.css +68 -0
  153. data/app/assets/stylesheets/jquery-ui/core.css +11 -7
  154. data/app/assets/stylesheets/jquery-ui/datepicker.css +11 -2
  155. data/app/assets/stylesheets/jquery-ui/dialog.css +38 -11
  156. data/app/assets/stylesheets/jquery-ui/draggable.css +1 -2
  157. data/app/assets/stylesheets/jquery-ui/menu.css +7 -7
  158. data/app/assets/stylesheets/jquery-ui/progressbar.css +1 -2
  159. data/app/assets/stylesheets/jquery-ui/resizable.css +1 -2
  160. data/app/assets/stylesheets/jquery-ui/selectable.css +1 -2
  161. data/app/assets/stylesheets/jquery-ui/selectmenu.css +11 -22
  162. data/app/assets/stylesheets/jquery-ui/slider.css +1 -2
  163. data/app/assets/stylesheets/jquery-ui/sortable.css +1 -2
  164. data/app/assets/stylesheets/jquery-ui/spinner.css +7 -22
  165. data/app/assets/stylesheets/jquery-ui/tabs.css +1 -2
  166. data/app/assets/stylesheets/jquery-ui/theme.css.erb +113 -87
  167. data/app/assets/stylesheets/jquery-ui/tooltip.css +1 -4
  168. data/lib/jquery/ui/rails/version.rb +2 -2
  169. metadata +150 -144
  170. data/app/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  171. data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  172. data/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  173. data/app/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png +0 -0
  174. data/app/assets/images/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  175. data/app/assets/images/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  176. data/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  177. data/app/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  178. data/app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png +0 -0
  179. data/app/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  180. data/app/assets/images/jquery-ui/ui-icons_888888_256x240.png +0 -0
  181. data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
  182. data/app/assets/javascripts/jquery-ui/button.js +0 -414
  183. data/app/assets/javascripts/jquery-ui/datepicker-af.js +0 -37
  184. data/app/assets/javascripts/jquery-ui/datepicker-ar-DZ.js +0 -37
  185. data/app/assets/javascripts/jquery-ui/datepicker-ar.js +0 -38
  186. data/app/assets/javascripts/jquery-ui/datepicker-az.js +0 -37
  187. data/app/assets/javascripts/jquery-ui/datepicker-be.js +0 -37
  188. data/app/assets/javascripts/jquery-ui/datepicker-bg.js +0 -38
  189. data/app/assets/javascripts/jquery-ui/datepicker-bs.js +0 -37
  190. data/app/assets/javascripts/jquery-ui/datepicker-ca.js +0 -37
  191. data/app/assets/javascripts/jquery-ui/datepicker-cs.js +0 -37
  192. data/app/assets/javascripts/jquery-ui/datepicker-cy-GB.js +0 -37
  193. data/app/assets/javascripts/jquery-ui/datepicker-da.js +0 -37
  194. data/app/assets/javascripts/jquery-ui/datepicker-de.js +0 -37
  195. data/app/assets/javascripts/jquery-ui/datepicker-el.js +0 -37
  196. data/app/assets/javascripts/jquery-ui/datepicker-en-AU.js +0 -37
  197. data/app/assets/javascripts/jquery-ui/datepicker-en-GB.js +0 -37
  198. data/app/assets/javascripts/jquery-ui/datepicker-en-NZ.js +0 -37
  199. data/app/assets/javascripts/jquery-ui/datepicker-eo.js +0 -37
  200. data/app/assets/javascripts/jquery-ui/datepicker-es.js +0 -37
  201. data/app/assets/javascripts/jquery-ui/datepicker-et.js +0 -37
  202. data/app/assets/javascripts/jquery-ui/datepicker-eu.js +0 -36
  203. data/app/assets/javascripts/jquery-ui/datepicker-fa.js +0 -73
  204. data/app/assets/javascripts/jquery-ui/datepicker-fi.js +0 -37
  205. data/app/assets/javascripts/jquery-ui/datepicker-fo.js +0 -37
  206. data/app/assets/javascripts/jquery-ui/datepicker-fr-CA.js +0 -37
  207. data/app/assets/javascripts/jquery-ui/datepicker-fr-CH.js +0 -37
  208. data/app/assets/javascripts/jquery-ui/datepicker-fr.js +0 -39
  209. data/app/assets/javascripts/jquery-ui/datepicker-gl.js +0 -37
  210. data/app/assets/javascripts/jquery-ui/datepicker-he.js +0 -37
  211. data/app/assets/javascripts/jquery-ui/datepicker-hi.js +0 -37
  212. data/app/assets/javascripts/jquery-ui/datepicker-hr.js +0 -37
  213. data/app/assets/javascripts/jquery-ui/datepicker-hu.js +0 -36
  214. data/app/assets/javascripts/jquery-ui/datepicker-hy.js +0 -37
  215. data/app/assets/javascripts/jquery-ui/datepicker-id.js +0 -37
  216. data/app/assets/javascripts/jquery-ui/datepicker-is.js +0 -37
  217. data/app/assets/javascripts/jquery-ui/datepicker-it-CH.js +0 -37
  218. data/app/assets/javascripts/jquery-ui/datepicker-it.js +0 -37
  219. data/app/assets/javascripts/jquery-ui/datepicker-ja.js +0 -37
  220. data/app/assets/javascripts/jquery-ui/datepicker-ka.js +0 -35
  221. data/app/assets/javascripts/jquery-ui/datepicker-kk.js +0 -37
  222. data/app/assets/javascripts/jquery-ui/datepicker-km.js +0 -37
  223. data/app/assets/javascripts/jquery-ui/datepicker-ko.js +0 -37
  224. data/app/assets/javascripts/jquery-ui/datepicker-ky.js +0 -38
  225. data/app/assets/javascripts/jquery-ui/datepicker-lb.js +0 -37
  226. data/app/assets/javascripts/jquery-ui/datepicker-lt.js +0 -37
  227. data/app/assets/javascripts/jquery-ui/datepicker-lv.js +0 -37
  228. data/app/assets/javascripts/jquery-ui/datepicker-mk.js +0 -37
  229. data/app/assets/javascripts/jquery-ui/datepicker-ml.js +0 -37
  230. data/app/assets/javascripts/jquery-ui/datepicker-ms.js +0 -37
  231. data/app/assets/javascripts/jquery-ui/datepicker-nb.js +0 -36
  232. data/app/assets/javascripts/jquery-ui/datepicker-nl-BE.js +0 -37
  233. data/app/assets/javascripts/jquery-ui/datepicker-nl.js +0 -37
  234. data/app/assets/javascripts/jquery-ui/datepicker-nn.js +0 -36
  235. data/app/assets/javascripts/jquery-ui/datepicker-no.js +0 -37
  236. data/app/assets/javascripts/jquery-ui/datepicker-pl.js +0 -37
  237. data/app/assets/javascripts/jquery-ui/datepicker-pt-BR.js +0 -37
  238. data/app/assets/javascripts/jquery-ui/datepicker-pt.js +0 -36
  239. data/app/assets/javascripts/jquery-ui/datepicker-rm.js +0 -35
  240. data/app/assets/javascripts/jquery-ui/datepicker-ro.js +0 -40
  241. data/app/assets/javascripts/jquery-ui/datepicker-ru.js +0 -37
  242. data/app/assets/javascripts/jquery-ui/datepicker-sk.js +0 -37
  243. data/app/assets/javascripts/jquery-ui/datepicker-sl.js +0 -38
  244. data/app/assets/javascripts/jquery-ui/datepicker-sq.js +0 -37
  245. data/app/assets/javascripts/jquery-ui/datepicker-sr-SR.js +0 -37
  246. data/app/assets/javascripts/jquery-ui/datepicker-sr.js +0 -37
  247. data/app/assets/javascripts/jquery-ui/datepicker-sv.js +0 -37
  248. data/app/assets/javascripts/jquery-ui/datepicker-ta.js +0 -37
  249. data/app/assets/javascripts/jquery-ui/datepicker-th.js +0 -37
  250. data/app/assets/javascripts/jquery-ui/datepicker-tj.js +0 -37
  251. data/app/assets/javascripts/jquery-ui/datepicker-tr.js +0 -37
  252. data/app/assets/javascripts/jquery-ui/datepicker-uk.js +0 -38
  253. data/app/assets/javascripts/jquery-ui/datepicker-vi.js +0 -37
  254. data/app/assets/javascripts/jquery-ui/datepicker-zh-CN.js +0 -37
  255. data/app/assets/javascripts/jquery-ui/datepicker-zh-HK.js +0 -37
  256. data/app/assets/javascripts/jquery-ui/datepicker-zh-TW.js +0 -37
  257. data/app/assets/javascripts/jquery-ui/datepicker.js +0 -2086
  258. data/app/assets/javascripts/jquery-ui/effect-blind.js +0 -92
  259. data/app/assets/javascripts/jquery-ui/effect-bounce.js +0 -125
  260. data/app/assets/javascripts/jquery-ui/effect-clip.js +0 -79
  261. data/app/assets/javascripts/jquery-ui/effect-drop.js +0 -77
  262. data/app/assets/javascripts/jquery-ui/effect-explode.js +0 -109
  263. data/app/assets/javascripts/jquery-ui/effect-fade.js +0 -42
  264. data/app/assets/javascripts/jquery-ui/effect-fold.js +0 -88
  265. data/app/assets/javascripts/jquery-ui/effect-highlight.js +0 -62
  266. data/app/assets/javascripts/jquery-ui/effect-puff.js +0 -63
  267. data/app/assets/javascripts/jquery-ui/effect-pulsate.js +0 -75
  268. data/app/assets/javascripts/jquery-ui/effect-scale.js +0 -92
  269. data/app/assets/javascripts/jquery-ui/effect-shake.js +0 -86
  270. data/app/assets/javascripts/jquery-ui/effect-size.js +0 -235
  271. data/app/assets/javascripts/jquery-ui/effect-slide.js +0 -76
  272. data/app/assets/javascripts/jquery-ui/effect-transfer.js +0 -59
  273. data/app/assets/javascripts/jquery-ui/mouse.js +0 -202
  274. data/app/assets/javascripts/jquery-ui/selectable.js +0 -291
  275. data/app/assets/javascripts/jquery-ui/sortable.js +0 -1319
@@ -1,36 +1,52 @@
1
- //= require jquery-ui/core
1
+ //= require jquery-ui/widgets/mouse
2
+ //= require jquery-ui/data
3
+ //= require jquery-ui/plugin
4
+ //= require jquery-ui/safe-active-element
5
+ //= require jquery-ui/safe-blur
6
+ //= require jquery-ui/scroll-parent
7
+ //= require jquery-ui/version
2
8
  //= require jquery-ui/widget
3
- //= require jquery-ui/mouse
4
9
 
5
10
  /*!
6
- * jQuery UI Draggable 1.11.4
11
+ * jQuery UI Draggable 1.12.1
7
12
  * http://jqueryui.com
8
13
  *
9
14
  * Copyright jQuery Foundation and other contributors
10
15
  * Released under the MIT license.
11
16
  * http://jquery.org/license
12
- *
13
- * http://api.jqueryui.com/draggable/
14
17
  */
15
- (function( factory ) {
18
+
19
+ //>>label: Draggable
20
+ //>>group: Interactions
21
+ //>>description: Enables dragging functionality for any element.
22
+ //>>docs: http://api.jqueryui.com/draggable/
23
+ //>>demos: http://jqueryui.com/draggable/
24
+ //>>css.structure: ../../themes/base/draggable.css
25
+
26
+ ( function( factory ) {
16
27
  if ( typeof define === "function" && define.amd ) {
17
28
 
18
29
  // AMD. Register as an anonymous module.
19
- define([
30
+ define( [
20
31
  "jquery",
21
- "./core",
22
32
  "./mouse",
23
- "./widget"
33
+ "../data",
34
+ "../plugin",
35
+ "../safe-active-element",
36
+ "../safe-blur",
37
+ "../scroll-parent",
38
+ "../version",
39
+ "../widget"
24
40
  ], factory );
25
41
  } else {
26
42
 
27
43
  // Browser globals
28
44
  factory( jQuery );
29
45
  }
30
- }(function( $ ) {
46
+ }( function( $ ) {
31
47
 
32
- $.widget("ui.draggable", $.ui.mouse, {
33
- version: "1.11.4",
48
+ $.widget( "ui.draggable", $.ui.mouse, {
49
+ version: "1.12.1",
34
50
  widgetEventPrefix: "drag",
35
51
  options: {
36
52
  addClasses: true,
@@ -58,7 +74,7 @@ $.widget("ui.draggable", $.ui.mouse, {
58
74
  stack: false,
59
75
  zIndex: false,
60
76
 
61
- // callbacks
77
+ // Callbacks
62
78
  drag: null,
63
79
  start: null,
64
80
  stop: null
@@ -68,11 +84,8 @@ $.widget("ui.draggable", $.ui.mouse, {
68
84
  if ( this.options.helper === "original" ) {
69
85
  this._setPositionRelative();
70
86
  }
71
- if (this.options.addClasses){
72
- this.element.addClass("ui-draggable");
73
- }
74
- if (this.options.disabled){
75
- this.element.addClass("ui-draggable-disabled");
87
+ if ( this.options.addClasses ) {
88
+ this._addClass( "ui-draggable" );
76
89
  }
77
90
  this._setHandleClassName();
78
91
 
@@ -92,27 +105,27 @@ $.widget("ui.draggable", $.ui.mouse, {
92
105
  this.destroyOnClear = true;
93
106
  return;
94
107
  }
95
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
96
108
  this._removeHandleClassName();
97
109
  this._mouseDestroy();
98
110
  },
99
111
 
100
- _mouseCapture: function(event) {
112
+ _mouseCapture: function( event ) {
101
113
  var o = this.options;
102
114
 
103
- this._blurActiveElement( event );
104
-
105
- // among others, prevent a drag on a resizable-handle
106
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
115
+ // Among others, prevent a drag on a resizable-handle
116
+ if ( this.helper || o.disabled ||
117
+ $( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
107
118
  return false;
108
119
  }
109
120
 
110
121
  //Quit if we're not on a valid handle
111
- this.handle = this._getHandle(event);
112
- if (!this.handle) {
122
+ this.handle = this._getHandle( event );
123
+ if ( !this.handle ) {
113
124
  return false;
114
125
  }
115
126
 
127
+ this._blurActiveElement( event );
128
+
116
129
  this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
117
130
 
118
131
  return true;
@@ -120,7 +133,7 @@ $.widget("ui.draggable", $.ui.mouse, {
120
133
  },
121
134
 
122
135
  _blockFrames: function( selector ) {
123
- this.iframeBlocks = this.document.find( selector ).map(function() {
136
+ this.iframeBlocks = this.document.find( selector ).map( function() {
124
137
  var iframe = $( this );
125
138
 
126
139
  return $( "<div>" )
@@ -129,7 +142,7 @@ $.widget("ui.draggable", $.ui.mouse, {
129
142
  .outerWidth( iframe.outerWidth() )
130
143
  .outerHeight( iframe.outerHeight() )
131
144
  .offset( iframe.offset() )[ 0 ];
132
- });
145
+ } );
133
146
  },
134
147
 
135
148
  _unblockFrames: function() {
@@ -140,41 +153,34 @@ $.widget("ui.draggable", $.ui.mouse, {
140
153
  },
141
154
 
142
155
  _blurActiveElement: function( event ) {
143
- var document = this.document[ 0 ];
156
+ var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
157
+ target = $( event.target );
144
158
 
145
- // Only need to blur if the event occurred on the draggable itself, see #10527
146
- if ( !this.handleElement.is( event.target ) ) {
159
+ // Don't blur if the event occurred on an element that is within
160
+ // the currently focused element
161
+ // See #10527, #12472
162
+ if ( target.closest( activeElement ).length ) {
147
163
  return;
148
164
  }
149
165
 
150
- // support: IE9
151
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
152
- try {
153
-
154
- // Support: IE9, IE10
155
- // If the <body> is blurred, IE will switch windows, see #9520
156
- if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) {
157
-
158
- // Blur any element that currently has focus, see #4261
159
- $( document.activeElement ).blur();
160
- }
161
- } catch ( error ) {}
166
+ // Blur any element that currently has focus, see #4261
167
+ $.ui.safeBlur( activeElement );
162
168
  },
163
169
 
164
- _mouseStart: function(event) {
170
+ _mouseStart: function( event ) {
165
171
 
166
172
  var o = this.options;
167
173
 
168
174
  //Create and append the visible helper
169
- this.helper = this._createHelper(event);
175
+ this.helper = this._createHelper( event );
170
176
 
171
- this.helper.addClass("ui-draggable-dragging");
177
+ this._addClass( this.helper, "ui-draggable-dragging" );
172
178
 
173
179
  //Cache the helper size
174
180
  this._cacheHelperProportions();
175
181
 
176
182
  //If ddmanager is used for droppables, set the global draggable
177
- if ($.ui.ddmanager) {
183
+ if ( $.ui.ddmanager ) {
178
184
  $.ui.ddmanager.current = this;
179
185
  }
180
186
 
@@ -190,9 +196,9 @@ $.widget("ui.draggable", $.ui.mouse, {
190
196
  this.cssPosition = this.helper.css( "position" );
191
197
  this.scrollParent = this.helper.scrollParent( true );
192
198
  this.offsetParent = this.helper.offsetParent();
193
- this.hasFixedAncestor = this.helper.parents().filter(function() {
199
+ this.hasFixedAncestor = this.helper.parents().filter( function() {
194
200
  return $( this ).css( "position" ) === "fixed";
195
- }).length > 0;
201
+ } ).length > 0;
196
202
 
197
203
  //The element's absolute position on the page minus margins
198
204
  this.positionAbs = this.element.offset();
@@ -204,13 +210,13 @@ $.widget("ui.draggable", $.ui.mouse, {
204
210
  this.originalPageY = event.pageY;
205
211
 
206
212
  //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
207
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
213
+ ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
208
214
 
209
215
  //Set a containment if given in the options
210
216
  this._setContainment();
211
217
 
212
218
  //Trigger event + callbacks
213
- if (this._trigger("start", event) === false) {
219
+ if ( this._trigger( "start", event ) === false ) {
214
220
  this._clear();
215
221
  return false;
216
222
  }
@@ -219,19 +225,18 @@ $.widget("ui.draggable", $.ui.mouse, {
219
225
  this._cacheHelperProportions();
220
226
 
221
227
  //Prepare the droppable offsets
222
- if ($.ui.ddmanager && !o.dropBehaviour) {
223
- $.ui.ddmanager.prepareOffsets(this, event);
228
+ if ( $.ui.ddmanager && !o.dropBehaviour ) {
229
+ $.ui.ddmanager.prepareOffsets( this, event );
224
230
  }
225
231
 
226
- // Reset helper's right/bottom css if they're set and set explicit width/height instead
227
- // as this prevents resizing of elements with right/bottom set (see #7772)
228
- this._normalizeRightBottom();
229
-
230
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
232
+ // Execute the drag once - this causes the helper not to be visible before getting its
233
+ // correct position
234
+ this._mouseDrag( event, true );
231
235
 
232
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
236
+ // If the ddmanager is used for droppables, inform the manager that dragging has started
237
+ // (see #5003)
233
238
  if ( $.ui.ddmanager ) {
234
- $.ui.ddmanager.dragStart(this, event);
239
+ $.ui.ddmanager.dragStart( this, event );
235
240
  }
236
241
 
237
242
  return true;
@@ -252,7 +257,8 @@ $.widget("ui.draggable", $.ui.mouse, {
252
257
  };
253
258
  },
254
259
 
255
- _mouseDrag: function(event, noPropagation) {
260
+ _mouseDrag: function( event, noPropagation ) {
261
+
256
262
  // reset any necessary cached properties (see #5009)
257
263
  if ( this.hasFixedAncestor ) {
258
264
  this.offset.parent = this._getParentOffset();
@@ -260,13 +266,13 @@ $.widget("ui.draggable", $.ui.mouse, {
260
266
 
261
267
  //Compute the helpers position
262
268
  this.position = this._generatePosition( event, true );
263
- this.positionAbs = this._convertPositionTo("absolute");
269
+ this.positionAbs = this._convertPositionTo( "absolute" );
264
270
 
265
271
  //Call plugins and callbacks and use the resulting position if something is returned
266
- if (!noPropagation) {
272
+ if ( !noPropagation ) {
267
273
  var ui = this._uiHash();
268
- if (this._trigger("drag", event, ui) === false) {
269
- this._mouseUp({});
274
+ if ( this._trigger( "drag", event, ui ) === false ) {
275
+ this._mouseUp( new $.Event( "mouseup", event ) );
270
276
  return false;
271
277
  }
272
278
  this.position = ui.position;
@@ -275,36 +281,44 @@ $.widget("ui.draggable", $.ui.mouse, {
275
281
  this.helper[ 0 ].style.left = this.position.left + "px";
276
282
  this.helper[ 0 ].style.top = this.position.top + "px";
277
283
 
278
- if ($.ui.ddmanager) {
279
- $.ui.ddmanager.drag(this, event);
284
+ if ( $.ui.ddmanager ) {
285
+ $.ui.ddmanager.drag( this, event );
280
286
  }
281
287
 
282
288
  return false;
283
289
  },
284
290
 
285
- _mouseStop: function(event) {
291
+ _mouseStop: function( event ) {
286
292
 
287
293
  //If we are using droppables, inform the manager about the drop
288
294
  var that = this,
289
295
  dropped = false;
290
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
291
- dropped = $.ui.ddmanager.drop(this, event);
296
+ if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
297
+ dropped = $.ui.ddmanager.drop( this, event );
292
298
  }
293
299
 
294
300
  //if a drop comes from outside (a sortable)
295
- if (this.dropped) {
301
+ if ( this.dropped ) {
296
302
  dropped = this.dropped;
297
303
  this.dropped = false;
298
304
  }
299
305
 
300
- if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
301
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
302
- if (that._trigger("stop", event) !== false) {
303
- that._clear();
306
+ if ( ( this.options.revert === "invalid" && !dropped ) ||
307
+ ( this.options.revert === "valid" && dropped ) ||
308
+ this.options.revert === true || ( $.isFunction( this.options.revert ) &&
309
+ this.options.revert.call( this.element, dropped ) )
310
+ ) {
311
+ $( this.helper ).animate(
312
+ this.originalPosition,
313
+ parseInt( this.options.revertDuration, 10 ),
314
+ function() {
315
+ if ( that._trigger( "stop", event ) !== false ) {
316
+ that._clear();
317
+ }
304
318
  }
305
- });
319
+ );
306
320
  } else {
307
- if (this._trigger("stop", event) !== false) {
321
+ if ( this._trigger( "stop", event ) !== false ) {
308
322
  this._clear();
309
323
  }
310
324
  }
@@ -315,24 +329,27 @@ $.widget("ui.draggable", $.ui.mouse, {
315
329
  _mouseUp: function( event ) {
316
330
  this._unblockFrames();
317
331
 
318
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
332
+ // If the ddmanager is used for droppables, inform the manager that dragging has stopped
333
+ // (see #5003)
319
334
  if ( $.ui.ddmanager ) {
320
- $.ui.ddmanager.dragStop(this, event);
335
+ $.ui.ddmanager.dragStop( this, event );
321
336
  }
322
337
 
323
338
  // Only need to focus if the event occurred on the draggable itself, see #10527
324
339
  if ( this.handleElement.is( event.target ) ) {
325
- // The interaction is over; whether or not the click resulted in a drag, focus the element
326
- this.element.focus();
340
+
341
+ // The interaction is over; whether or not the click resulted in a drag,
342
+ // focus the element
343
+ this.element.trigger( "focus" );
327
344
  }
328
345
 
329
- return $.ui.mouse.prototype._mouseUp.call(this, event);
346
+ return $.ui.mouse.prototype._mouseUp.call( this, event );
330
347
  },
331
348
 
332
349
  cancel: function() {
333
350
 
334
- if (this.helper.is(".ui-draggable-dragging")) {
335
- this._mouseUp({});
351
+ if ( this.helper.is( ".ui-draggable-dragging" ) ) {
352
+ this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
336
353
  } else {
337
354
  this._clear();
338
355
  }
@@ -341,7 +358,7 @@ $.widget("ui.draggable", $.ui.mouse, {
341
358
 
342
359
  },
343
360
 
344
- _getHandle: function(event) {
361
+ _getHandle: function( event ) {
345
362
  return this.options.handle ?
346
363
  !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
347
364
  true;
@@ -350,14 +367,14 @@ $.widget("ui.draggable", $.ui.mouse, {
350
367
  _setHandleClassName: function() {
351
368
  this.handleElement = this.options.handle ?
352
369
  this.element.find( this.options.handle ) : this.element;
353
- this.handleElement.addClass( "ui-draggable-handle" );
370
+ this._addClass( this.handleElement, "ui-draggable-handle" );
354
371
  },
355
372
 
356
373
  _removeHandleClassName: function() {
357
- this.handleElement.removeClass( "ui-draggable-handle" );
374
+ this._removeClass( this.handleElement, "ui-draggable-handle" );
358
375
  },
359
376
 
360
- _createHelper: function(event) {
377
+ _createHelper: function( event ) {
361
378
 
362
379
  var o = this.options,
363
380
  helperIsFunction = $.isFunction( o.helper ),
@@ -367,19 +384,22 @@ $.widget("ui.draggable", $.ui.mouse, {
367
384
  this.element.clone().removeAttr( "id" ) :
368
385
  this.element );
369
386
 
370
- if (!helper.parents("body").length) {
371
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
387
+ if ( !helper.parents( "body" ).length ) {
388
+ helper.appendTo( ( o.appendTo === "parent" ?
389
+ this.element[ 0 ].parentNode :
390
+ o.appendTo ) );
372
391
  }
373
392
 
374
- // http://bugs.jqueryui.com/ticket/9446
393
+ // Http://bugs.jqueryui.com/ticket/9446
375
394
  // a helper function can return the original element
376
395
  // which wouldn't have been set to relative in _create
377
396
  if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
378
397
  this._setPositionRelative();
379
398
  }
380
399
 
381
- if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
382
- helper.css("position", "absolute");
400
+ if ( helper[ 0 ] !== this.element[ 0 ] &&
401
+ !( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
402
+ helper.css( "position", "absolute" );
383
403
  }
384
404
 
385
405
  return helper;
@@ -392,23 +412,23 @@ $.widget("ui.draggable", $.ui.mouse, {
392
412
  }
393
413
  },
394
414
 
395
- _adjustOffsetFromHelper: function(obj) {
396
- if (typeof obj === "string") {
397
- obj = obj.split(" ");
415
+ _adjustOffsetFromHelper: function( obj ) {
416
+ if ( typeof obj === "string" ) {
417
+ obj = obj.split( " " );
398
418
  }
399
- if ($.isArray(obj)) {
400
- obj = { left: +obj[0], top: +obj[1] || 0 };
419
+ if ( $.isArray( obj ) ) {
420
+ obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
401
421
  }
402
- if ("left" in obj) {
422
+ if ( "left" in obj ) {
403
423
  this.offset.click.left = obj.left + this.margins.left;
404
424
  }
405
- if ("right" in obj) {
425
+ if ( "right" in obj ) {
406
426
  this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
407
427
  }
408
- if ("top" in obj) {
428
+ if ( "top" in obj ) {
409
429
  this.offset.click.top = obj.top + this.margins.top;
410
430
  }
411
- if ("bottom" in obj) {
431
+ if ( "bottom" in obj ) {
412
432
  this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
413
433
  }
414
434
  },
@@ -423,11 +443,15 @@ $.widget("ui.draggable", $.ui.mouse, {
423
443
  var po = this.offsetParent.offset(),
424
444
  document = this.document[ 0 ];
425
445
 
426
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
427
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
428
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
429
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
430
- if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
446
+ // This is a special case where we need to modify a offset calculated on start, since the
447
+ // following happened:
448
+ // 1. The position of the helper is absolute, so it's position is calculated based on the
449
+ // next positioned parent
450
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
451
+ // the document, which means that the scroll is included in the initial calculation of the
452
+ // offset of the parent, and never recalculated upon drag
453
+ if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
454
+ $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
431
455
  po.left += this.scrollParent.scrollLeft();
432
456
  po.top += this.scrollParent.scrollTop();
433
457
  }
@@ -437,8 +461,8 @@ $.widget("ui.draggable", $.ui.mouse, {
437
461
  }
438
462
 
439
463
  return {
440
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
441
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
464
+ top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
465
+ left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
442
466
  };
443
467
 
444
468
  },
@@ -452,18 +476,20 @@ $.widget("ui.draggable", $.ui.mouse, {
452
476
  scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
453
477
 
454
478
  return {
455
- top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
456
- left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
479
+ top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
480
+ ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
481
+ left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
482
+ ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
457
483
  };
458
484
 
459
485
  },
460
486
 
461
487
  _cacheMargins: function() {
462
488
  this.margins = {
463
- left: (parseInt(this.element.css("marginLeft"), 10) || 0),
464
- top: (parseInt(this.element.css("marginTop"), 10) || 0),
465
- right: (parseInt(this.element.css("marginRight"), 10) || 0),
466
- bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
489
+ left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
490
+ top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
491
+ right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
492
+ bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
467
493
  };
468
494
  },
469
495
 
@@ -491,18 +517,22 @@ $.widget("ui.draggable", $.ui.mouse, {
491
517
  this.containment = [
492
518
  $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
493
519
  $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
494
- $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
495
- $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
520
+ $( window ).scrollLeft() + $( window ).width() -
521
+ this.helperProportions.width - this.margins.left,
522
+ $( window ).scrollTop() +
523
+ ( $( window ).height() || document.body.parentNode.scrollHeight ) -
524
+ this.helperProportions.height - this.margins.top
496
525
  ];
497
526
  return;
498
527
  }
499
528
 
500
- if ( o.containment === "document") {
529
+ if ( o.containment === "document" ) {
501
530
  this.containment = [
502
531
  0,
503
532
  0,
504
533
  $( document ).width() - this.helperProportions.width - this.margins.left,
505
- ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
534
+ ( $( document ).height() || document.body.parentNode.scrollHeight ) -
535
+ this.helperProportions.height - this.margins.top
506
536
  ];
507
537
  return;
508
538
  }
@@ -526,8 +556,10 @@ $.widget("ui.draggable", $.ui.mouse, {
526
556
  isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
527
557
 
528
558
  this.containment = [
529
- ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
530
- ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
559
+ ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
560
+ ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
561
+ ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
562
+ ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
531
563
  ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
532
564
  ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
533
565
  ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
@@ -544,9 +576,9 @@ $.widget("ui.draggable", $.ui.mouse, {
544
576
  this.relativeContainer = c;
545
577
  },
546
578
 
547
- _convertPositionTo: function(d, pos) {
579
+ _convertPositionTo: function( d, pos ) {
548
580
 
549
- if (!pos) {
581
+ if ( !pos ) {
550
582
  pos = this.position;
551
583
  }
552
584
 
@@ -555,16 +587,32 @@ $.widget("ui.draggable", $.ui.mouse, {
555
587
 
556
588
  return {
557
589
  top: (
558
- pos.top + // The absolute mouse position
559
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
560
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
561
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
590
+
591
+ // The absolute mouse position
592
+ pos.top +
593
+
594
+ // Only for relative positioned nodes: Relative offset from element to offset parent
595
+ this.offset.relative.top * mod +
596
+
597
+ // The offsetParent's offset without borders (offset + border)
598
+ this.offset.parent.top * mod -
599
+ ( ( this.cssPosition === "fixed" ?
600
+ -this.offset.scroll.top :
601
+ ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
562
602
  ),
563
603
  left: (
564
- pos.left + // The absolute mouse position
565
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
566
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
567
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
604
+
605
+ // The absolute mouse position
606
+ pos.left +
607
+
608
+ // Only for relative positioned nodes: Relative offset from element to offset parent
609
+ this.offset.relative.left * mod +
610
+
611
+ // The offsetParent's offset without borders (offset + border)
612
+ this.offset.parent.left * mod -
613
+ ( ( this.cssPosition === "fixed" ?
614
+ -this.offset.scroll.left :
615
+ ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
568
616
  )
569
617
  };
570
618
 
@@ -594,7 +642,7 @@ $.widget("ui.draggable", $.ui.mouse, {
594
642
  // If we are not dragging yet, we won't check for options
595
643
  if ( constrainPosition ) {
596
644
  if ( this.containment ) {
597
- if ( this.relativeContainer ){
645
+ if ( this.relativeContainer ) {
598
646
  co = this.relativeContainer.offset();
599
647
  containment = [
600
648
  this.containment[ 0 ] + co.left,
@@ -606,27 +654,40 @@ $.widget("ui.draggable", $.ui.mouse, {
606
654
  containment = this.containment;
607
655
  }
608
656
 
609
- if (event.pageX - this.offset.click.left < containment[0]) {
610
- pageX = containment[0] + this.offset.click.left;
657
+ if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
658
+ pageX = containment[ 0 ] + this.offset.click.left;
611
659
  }
612
- if (event.pageY - this.offset.click.top < containment[1]) {
613
- pageY = containment[1] + this.offset.click.top;
660
+ if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
661
+ pageY = containment[ 1 ] + this.offset.click.top;
614
662
  }
615
- if (event.pageX - this.offset.click.left > containment[2]) {
616
- pageX = containment[2] + this.offset.click.left;
663
+ if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
664
+ pageX = containment[ 2 ] + this.offset.click.left;
617
665
  }
618
- if (event.pageY - this.offset.click.top > containment[3]) {
619
- pageY = containment[3] + this.offset.click.top;
666
+ if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
667
+ pageY = containment[ 3 ] + this.offset.click.top;
620
668
  }
621
669
  }
622
670
 
623
- if (o.grid) {
624
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
625
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
626
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
627
-
628
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
629
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
671
+ if ( o.grid ) {
672
+
673
+ //Check for grid elements set to 0 to prevent divide by 0 error causing invalid
674
+ // argument errors in IE (see ticket #6950)
675
+ top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
676
+ this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
677
+ pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
678
+ top - this.offset.click.top > containment[ 3 ] ) ?
679
+ top :
680
+ ( ( top - this.offset.click.top >= containment[ 1 ] ) ?
681
+ top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
682
+
683
+ left = o.grid[ 0 ] ? this.originalPageX +
684
+ Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
685
+ this.originalPageX;
686
+ pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
687
+ left - this.offset.click.left > containment[ 2 ] ) ?
688
+ left :
689
+ ( ( left - this.offset.click.left >= containment[ 0 ] ) ?
690
+ left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
630
691
  }
631
692
 
632
693
  if ( o.axis === "y" ) {
@@ -640,26 +701,46 @@ $.widget("ui.draggable", $.ui.mouse, {
640
701
 
641
702
  return {
642
703
  top: (
643
- pageY - // The absolute mouse position
644
- this.offset.click.top - // Click offset (relative to the element)
645
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
646
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
647
- ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
704
+
705
+ // The absolute mouse position
706
+ pageY -
707
+
708
+ // Click offset (relative to the element)
709
+ this.offset.click.top -
710
+
711
+ // Only for relative positioned nodes: Relative offset from element to offset parent
712
+ this.offset.relative.top -
713
+
714
+ // The offsetParent's offset without borders (offset + border)
715
+ this.offset.parent.top +
716
+ ( this.cssPosition === "fixed" ?
717
+ -this.offset.scroll.top :
718
+ ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
648
719
  ),
649
720
  left: (
650
- pageX - // The absolute mouse position
651
- this.offset.click.left - // Click offset (relative to the element)
652
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
653
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
654
- ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
721
+
722
+ // The absolute mouse position
723
+ pageX -
724
+
725
+ // Click offset (relative to the element)
726
+ this.offset.click.left -
727
+
728
+ // Only for relative positioned nodes: Relative offset from element to offset parent
729
+ this.offset.relative.left -
730
+
731
+ // The offsetParent's offset without borders (offset + border)
732
+ this.offset.parent.left +
733
+ ( this.cssPosition === "fixed" ?
734
+ -this.offset.scroll.left :
735
+ ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
655
736
  )
656
737
  };
657
738
 
658
739
  },
659
740
 
660
741
  _clear: function() {
661
- this.helper.removeClass("ui-draggable-dragging");
662
- if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
742
+ this._removeClass( this.helper, "ui-draggable-dragging" );
743
+ if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
663
744
  this.helper.remove();
664
745
  }
665
746
  this.helper = null;
@@ -669,17 +750,6 @@ $.widget("ui.draggable", $.ui.mouse, {
669
750
  }
670
751
  },
671
752
 
672
- _normalizeRightBottom: function() {
673
- if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) {
674
- this.helper.width( this.helper.width() );
675
- this.helper.css( "right", "auto" );
676
- }
677
- if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) {
678
- this.helper.height( this.helper.height() );
679
- this.helper.css( "bottom", "auto" );
680
- }
681
- },
682
-
683
753
  // From now on bulk stuff - mainly helpers
684
754
 
685
755
  _trigger: function( type, event, ui ) {
@@ -705,33 +775,33 @@ $.widget("ui.draggable", $.ui.mouse, {
705
775
  };
706
776
  }
707
777
 
708
- });
778
+ } );
709
779
 
710
780
  $.ui.plugin.add( "draggable", "connectToSortable", {
711
781
  start: function( event, ui, draggable ) {
712
782
  var uiSortable = $.extend( {}, ui, {
713
783
  item: draggable.element
714
- });
784
+ } );
715
785
 
716
786
  draggable.sortables = [];
717
- $( draggable.options.connectToSortable ).each(function() {
787
+ $( draggable.options.connectToSortable ).each( function() {
718
788
  var sortable = $( this ).sortable( "instance" );
719
789
 
720
790
  if ( sortable && !sortable.options.disabled ) {
721
791
  draggable.sortables.push( sortable );
722
792
 
723
- // refreshPositions is called at drag start to refresh the containerCache
793
+ // RefreshPositions is called at drag start to refresh the containerCache
724
794
  // which is used in drag. This ensures it's initialized and synchronized
725
795
  // with any changes that might have happened on the page since initialization.
726
796
  sortable.refreshPositions();
727
- sortable._trigger("activate", event, uiSortable);
797
+ sortable._trigger( "activate", event, uiSortable );
728
798
  }
729
- });
799
+ } );
730
800
  },
731
801
  stop: function( event, ui, draggable ) {
732
802
  var uiSortable = $.extend( {}, ui, {
733
803
  item: draggable.element
734
- });
804
+ } );
735
805
 
736
806
  draggable.cancelHelperRemoval = false;
737
807
 
@@ -754,12 +824,13 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
754
824
  left: sortable.placeholder.css( "left" )
755
825
  };
756
826
 
757
- sortable._mouseStop(event);
827
+ sortable._mouseStop( event );
758
828
 
759
829
  // Once drag has ended, the sortable should return to using
760
830
  // its original helper, not the shared helper from draggable
761
831
  sortable.options.helper = sortable.options._helper;
762
832
  } else {
833
+
763
834
  // Prevent this Sortable from removing the helper.
764
835
  // However, don't set the draggable to remove the helper
765
836
  // either as another connected Sortable may yet handle the removal.
@@ -767,7 +838,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
767
838
 
768
839
  sortable._trigger( "deactivate", event, uiSortable );
769
840
  }
770
- });
841
+ } );
771
842
  },
772
843
  drag: function( event, ui, draggable ) {
773
844
  $.each( draggable.sortables, function() {
@@ -783,6 +854,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
783
854
  innermostIntersecting = true;
784
855
 
785
856
  $.each( draggable.sortables, function() {
857
+
786
858
  // Copy over variables that sortable's _intersectsWith uses
787
859
  this.positionAbs = draggable.positionAbs;
788
860
  this.helperProportions = draggable.helperProportions;
@@ -795,10 +867,11 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
795
867
  }
796
868
 
797
869
  return innermostIntersecting;
798
- });
870
+ } );
799
871
  }
800
872
 
801
873
  if ( innermostIntersecting ) {
874
+
802
875
  // If it intersects, we use a little isOver variable and set it once,
803
876
  // so that the move-in stuff gets fired only once.
804
877
  if ( !sortable.isOver ) {
@@ -843,21 +916,23 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
843
916
  // adding to one sortable changes the location of the other sortables (#9675)
844
917
  $.each( draggable.sortables, function() {
845
918
  this.refreshPositions();
846
- });
919
+ } );
847
920
 
848
- // hack so receive/update callbacks work (mostly)
921
+ // Hack so receive/update callbacks work (mostly)
849
922
  draggable.currentItem = draggable.element;
850
923
  sortable.fromOutside = draggable;
851
924
  }
852
925
 
853
926
  if ( sortable.currentItem ) {
854
927
  sortable._mouseDrag( event );
928
+
855
929
  // Copy the sortable's position because the draggable's can potentially reflect
856
930
  // a relative position, while sortable is always absolute, which the dragged
857
931
  // element has now become. (#8809)
858
932
  ui.position = sortable.position;
859
933
  }
860
934
  } else {
935
+
861
936
  // If it doesn't intersect with the sortable, and it intersected before,
862
937
  // we fake the drag stop of the sortable, but make sure it doesn't remove
863
938
  // the helper by using cancelHelperRemoval.
@@ -874,7 +949,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
874
949
  sortable._trigger( "out", event, sortable._uiHash( sortable ) );
875
950
  sortable._mouseStop( event, true );
876
951
 
877
- // restore sortable behaviors that were modfied
952
+ // Restore sortable behaviors that were modfied
878
953
  // when the draggable entered the sortable area (#9481)
879
954
  sortable.options.revert = sortable.options._revert;
880
955
  sortable.options.helper = sortable.options._helper;
@@ -898,55 +973,56 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
898
973
  // from one sortable changes the location of other sortables (#9675)
899
974
  $.each( draggable.sortables, function() {
900
975
  this.refreshPositions();
901
- });
976
+ } );
902
977
  }
903
978
  }
904
- });
979
+ } );
905
980
  }
906
- });
981
+ } );
907
982
 
908
- $.ui.plugin.add("draggable", "cursor", {
983
+ $.ui.plugin.add( "draggable", "cursor", {
909
984
  start: function( event, ui, instance ) {
910
985
  var t = $( "body" ),
911
986
  o = instance.options;
912
987
 
913
- if (t.css("cursor")) {
914
- o._cursor = t.css("cursor");
988
+ if ( t.css( "cursor" ) ) {
989
+ o._cursor = t.css( "cursor" );
915
990
  }
916
- t.css("cursor", o.cursor);
991
+ t.css( "cursor", o.cursor );
917
992
  },
918
993
  stop: function( event, ui, instance ) {
919
994
  var o = instance.options;
920
- if (o._cursor) {
921
- $("body").css("cursor", o._cursor);
995
+ if ( o._cursor ) {
996
+ $( "body" ).css( "cursor", o._cursor );
922
997
  }
923
998
  }
924
- });
999
+ } );
925
1000
 
926
- $.ui.plugin.add("draggable", "opacity", {
1001
+ $.ui.plugin.add( "draggable", "opacity", {
927
1002
  start: function( event, ui, instance ) {
928
1003
  var t = $( ui.helper ),
929
1004
  o = instance.options;
930
- if (t.css("opacity")) {
931
- o._opacity = t.css("opacity");
1005
+ if ( t.css( "opacity" ) ) {
1006
+ o._opacity = t.css( "opacity" );
932
1007
  }
933
- t.css("opacity", o.opacity);
1008
+ t.css( "opacity", o.opacity );
934
1009
  },
935
1010
  stop: function( event, ui, instance ) {
936
1011
  var o = instance.options;
937
- if (o._opacity) {
938
- $(ui.helper).css("opacity", o._opacity);
1012
+ if ( o._opacity ) {
1013
+ $( ui.helper ).css( "opacity", o._opacity );
939
1014
  }
940
1015
  }
941
- });
1016
+ } );
942
1017
 
943
- $.ui.plugin.add("draggable", "scroll", {
1018
+ $.ui.plugin.add( "draggable", "scroll", {
944
1019
  start: function( event, ui, i ) {
945
1020
  if ( !i.scrollParentNotHidden ) {
946
1021
  i.scrollParentNotHidden = i.helper.scrollParent( false );
947
1022
  }
948
1023
 
949
- if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
1024
+ if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
1025
+ i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
950
1026
  i.overflowOffset = i.scrollParentNotHidden.offset();
951
1027
  }
952
1028
  },
@@ -959,7 +1035,8 @@ $.ui.plugin.add("draggable", "scroll", {
959
1035
 
960
1036
  if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
961
1037
  if ( !o.axis || o.axis !== "x" ) {
962
- if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
1038
+ if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
1039
+ o.scrollSensitivity ) {
963
1040
  scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
964
1041
  } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
965
1042
  scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
@@ -967,7 +1044,8 @@ $.ui.plugin.add("draggable", "scroll", {
967
1044
  }
968
1045
 
969
1046
  if ( !o.axis || o.axis !== "y" ) {
970
- if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
1047
+ if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
1048
+ o.scrollSensitivity ) {
971
1049
  scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
972
1050
  } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
973
1051
  scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
@@ -976,49 +1054,56 @@ $.ui.plugin.add("draggable", "scroll", {
976
1054
 
977
1055
  } else {
978
1056
 
979
- if (!o.axis || o.axis !== "x") {
980
- if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
981
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
982
- } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
983
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
1057
+ if ( !o.axis || o.axis !== "x" ) {
1058
+ if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
1059
+ scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
1060
+ } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
1061
+ o.scrollSensitivity ) {
1062
+ scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
984
1063
  }
985
1064
  }
986
1065
 
987
- if (!o.axis || o.axis !== "y") {
988
- if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
989
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
990
- } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
991
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
1066
+ if ( !o.axis || o.axis !== "y" ) {
1067
+ if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
1068
+ scrolled = $( document ).scrollLeft(
1069
+ $( document ).scrollLeft() - o.scrollSpeed
1070
+ );
1071
+ } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
1072
+ o.scrollSensitivity ) {
1073
+ scrolled = $( document ).scrollLeft(
1074
+ $( document ).scrollLeft() + o.scrollSpeed
1075
+ );
992
1076
  }
993
1077
  }
994
1078
 
995
1079
  }
996
1080
 
997
- if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
998
- $.ui.ddmanager.prepareOffsets(i, event);
1081
+ if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
1082
+ $.ui.ddmanager.prepareOffsets( i, event );
999
1083
  }
1000
1084
 
1001
1085
  }
1002
- });
1086
+ } );
1003
1087
 
1004
- $.ui.plugin.add("draggable", "snap", {
1088
+ $.ui.plugin.add( "draggable", "snap", {
1005
1089
  start: function( event, ui, i ) {
1006
1090
 
1007
1091
  var o = i.options;
1008
1092
 
1009
1093
  i.snapElements = [];
1010
1094
 
1011
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
1012
- var $t = $(this),
1013
- $o = $t.offset();
1014
- if (this !== i.element[0]) {
1015
- i.snapElements.push({
1016
- item: this,
1017
- width: $t.outerWidth(), height: $t.outerHeight(),
1018
- top: $o.top, left: $o.left
1019
- });
1020
- }
1021
- });
1095
+ $( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
1096
+ .each( function() {
1097
+ var $t = $( this ),
1098
+ $o = $t.offset();
1099
+ if ( this !== i.element[ 0 ] ) {
1100
+ i.snapElements.push( {
1101
+ item: this,
1102
+ width: $t.outerWidth(), height: $t.outerHeight(),
1103
+ top: $o.top, left: $o.left
1104
+ } );
1105
+ }
1106
+ } );
1022
1107
 
1023
1108
  },
1024
1109
  drag: function( event, ui, inst ) {
@@ -1029,108 +1114,146 @@ $.ui.plugin.add("draggable", "snap", {
1029
1114
  x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
1030
1115
  y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
1031
1116
 
1032
- for (i = inst.snapElements.length - 1; i >= 0; i--){
1033
-
1034
- l = inst.snapElements[i].left - inst.margins.left;
1035
- r = l + inst.snapElements[i].width;
1036
- t = inst.snapElements[i].top - inst.margins.top;
1037
- b = t + inst.snapElements[i].height;
1038
-
1039
- if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
1040
- if (inst.snapElements[i].snapping) {
1041
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
1117
+ for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
1118
+
1119
+ l = inst.snapElements[ i ].left - inst.margins.left;
1120
+ r = l + inst.snapElements[ i ].width;
1121
+ t = inst.snapElements[ i ].top - inst.margins.top;
1122
+ b = t + inst.snapElements[ i ].height;
1123
+
1124
+ if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
1125
+ !$.contains( inst.snapElements[ i ].item.ownerDocument,
1126
+ inst.snapElements[ i ].item ) ) {
1127
+ if ( inst.snapElements[ i ].snapping ) {
1128
+ ( inst.options.snap.release &&
1129
+ inst.options.snap.release.call(
1130
+ inst.element,
1131
+ event,
1132
+ $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
1133
+ ) );
1042
1134
  }
1043
- inst.snapElements[i].snapping = false;
1135
+ inst.snapElements[ i ].snapping = false;
1044
1136
  continue;
1045
1137
  }
1046
1138
 
1047
- if (o.snapMode !== "inner") {
1048
- ts = Math.abs(t - y2) <= d;
1049
- bs = Math.abs(b - y1) <= d;
1050
- ls = Math.abs(l - x2) <= d;
1051
- rs = Math.abs(r - x1) <= d;
1052
- if (ts) {
1053
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
1139
+ if ( o.snapMode !== "inner" ) {
1140
+ ts = Math.abs( t - y2 ) <= d;
1141
+ bs = Math.abs( b - y1 ) <= d;
1142
+ ls = Math.abs( l - x2 ) <= d;
1143
+ rs = Math.abs( r - x1 ) <= d;
1144
+ if ( ts ) {
1145
+ ui.position.top = inst._convertPositionTo( "relative", {
1146
+ top: t - inst.helperProportions.height,
1147
+ left: 0
1148
+ } ).top;
1054
1149
  }
1055
- if (bs) {
1056
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top;
1150
+ if ( bs ) {
1151
+ ui.position.top = inst._convertPositionTo( "relative", {
1152
+ top: b,
1153
+ left: 0
1154
+ } ).top;
1057
1155
  }
1058
- if (ls) {
1059
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
1156
+ if ( ls ) {
1157
+ ui.position.left = inst._convertPositionTo( "relative", {
1158
+ top: 0,
1159
+ left: l - inst.helperProportions.width
1160
+ } ).left;
1060
1161
  }
1061
- if (rs) {
1062
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left;
1162
+ if ( rs ) {
1163
+ ui.position.left = inst._convertPositionTo( "relative", {
1164
+ top: 0,
1165
+ left: r
1166
+ } ).left;
1063
1167
  }
1064
1168
  }
1065
1169
 
1066
- first = (ts || bs || ls || rs);
1067
-
1068
- if (o.snapMode !== "outer") {
1069
- ts = Math.abs(t - y1) <= d;
1070
- bs = Math.abs(b - y2) <= d;
1071
- ls = Math.abs(l - x1) <= d;
1072
- rs = Math.abs(r - x2) <= d;
1073
- if (ts) {
1074
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top;
1170
+ first = ( ts || bs || ls || rs );
1171
+
1172
+ if ( o.snapMode !== "outer" ) {
1173
+ ts = Math.abs( t - y1 ) <= d;
1174
+ bs = Math.abs( b - y2 ) <= d;
1175
+ ls = Math.abs( l - x1 ) <= d;
1176
+ rs = Math.abs( r - x2 ) <= d;
1177
+ if ( ts ) {
1178
+ ui.position.top = inst._convertPositionTo( "relative", {
1179
+ top: t,
1180
+ left: 0
1181
+ } ).top;
1075
1182
  }
1076
- if (bs) {
1077
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
1183
+ if ( bs ) {
1184
+ ui.position.top = inst._convertPositionTo( "relative", {
1185
+ top: b - inst.helperProportions.height,
1186
+ left: 0
1187
+ } ).top;
1078
1188
  }
1079
- if (ls) {
1080
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left;
1189
+ if ( ls ) {
1190
+ ui.position.left = inst._convertPositionTo( "relative", {
1191
+ top: 0,
1192
+ left: l
1193
+ } ).left;
1081
1194
  }
1082
- if (rs) {
1083
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
1195
+ if ( rs ) {
1196
+ ui.position.left = inst._convertPositionTo( "relative", {
1197
+ top: 0,
1198
+ left: r - inst.helperProportions.width
1199
+ } ).left;
1084
1200
  }
1085
1201
  }
1086
1202
 
1087
- if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
1088
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
1203
+ if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
1204
+ ( inst.options.snap.snap &&
1205
+ inst.options.snap.snap.call(
1206
+ inst.element,
1207
+ event,
1208
+ $.extend( inst._uiHash(), {
1209
+ snapItem: inst.snapElements[ i ].item
1210
+ } ) ) );
1089
1211
  }
1090
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
1212
+ inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
1091
1213
 
1092
1214
  }
1093
1215
 
1094
1216
  }
1095
- });
1217
+ } );
1096
1218
 
1097
- $.ui.plugin.add("draggable", "stack", {
1219
+ $.ui.plugin.add( "draggable", "stack", {
1098
1220
  start: function( event, ui, instance ) {
1099
1221
  var min,
1100
1222
  o = instance.options,
1101
- group = $.makeArray($(o.stack)).sort(function(a, b) {
1102
- return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
1103
- });
1104
-
1105
- if (!group.length) { return; }
1106
-
1107
- min = parseInt($(group[0]).css("zIndex"), 10) || 0;
1108
- $(group).each(function(i) {
1109
- $(this).css("zIndex", min + i);
1110
- });
1111
- this.css("zIndex", (min + group.length));
1223
+ group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
1224
+ return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
1225
+ ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
1226
+ } );
1227
+
1228
+ if ( !group.length ) { return; }
1229
+
1230
+ min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
1231
+ $( group ).each( function( i ) {
1232
+ $( this ).css( "zIndex", min + i );
1233
+ } );
1234
+ this.css( "zIndex", ( min + group.length ) );
1112
1235
  }
1113
- });
1236
+ } );
1114
1237
 
1115
- $.ui.plugin.add("draggable", "zIndex", {
1238
+ $.ui.plugin.add( "draggable", "zIndex", {
1116
1239
  start: function( event, ui, instance ) {
1117
1240
  var t = $( ui.helper ),
1118
1241
  o = instance.options;
1119
1242
 
1120
- if (t.css("zIndex")) {
1121
- o._zIndex = t.css("zIndex");
1243
+ if ( t.css( "zIndex" ) ) {
1244
+ o._zIndex = t.css( "zIndex" );
1122
1245
  }
1123
- t.css("zIndex", o.zIndex);
1246
+ t.css( "zIndex", o.zIndex );
1124
1247
  },
1125
1248
  stop: function( event, ui, instance ) {
1126
1249
  var o = instance.options;
1127
1250
 
1128
- if (o._zIndex) {
1129
- $(ui.helper).css("zIndex", o._zIndex);
1251
+ if ( o._zIndex ) {
1252
+ $( ui.helper ).css( "zIndex", o._zIndex );
1130
1253
  }
1131
1254
  }
1132
- });
1255
+ } );
1133
1256
 
1134
1257
  return $.ui.draggable;
1135
1258
 
1136
- }));
1259
+ } ) );