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