magic_grid 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (360) hide show
  1. data/lib/assets/javascripts/magic_grid.js +4 -1
  2. data/lib/magic_grid/definition.rb +2 -6
  3. data/lib/magic_grid/helpers.rb +21 -16
  4. data/lib/magic_grid/version.rb +1 -1
  5. data/test/dummy/config/database.yml +1 -1
  6. data/test/dummy/db/test.sqlite3 +0 -0
  7. data/test/dummy/log/development.log +506 -0
  8. data/test/dummy/log/test.log +21 -21
  9. data/test/dummy/tmp/cache/assets/C8C/B80/sprockets%2F371bf96e99717688ed7313a0c53f4212 +0 -0
  10. data/test/dummy/tmp/cache/assets/CAA/620/sprockets%2F87b209c0c9da28094a8d5581a21262c6 +0 -0
  11. data/test/dummy/tmp/cache/assets/CC7/220/sprockets%2Fd066c004d1fd26ae76a61303a7a18145 +0 -0
  12. data/test/dummy/tmp/cache/assets/CC9/CD0/sprockets%2Fd14b4504301b7b44b32bbb81929e419a +0 -0
  13. data/test/dummy/tmp/cache/assets/CD5/B70/sprockets%2F416150dc3ac35079c94273cc46e90aa6 +0 -0
  14. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  15. data/test/dummy/tmp/cache/assets/CD8/B70/sprockets%2F4050a4e5062ab95c9f32e9b6940821ea +0 -0
  16. data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  17. data/test/dummy/tmp/cache/assets/D1A/310/sprockets%2F5384ad85f52d3272dbc64d46ef3876a4 +0 -0
  18. data/test/dummy/tmp/cache/assets/D30/820/sprockets%2Ffbb017837adf4b4486b10683c4c1af30 +0 -0
  19. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  20. data/test/dummy/tmp/cache/assets/D46/650/sprockets%2Ff56253b5f374fff1a33fbbc9881c9124 +0 -0
  21. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  22. data/test/dummy/tmp/cache/assets/D59/BC0/sprockets%2Fb3a75b50e55b5cc61ca234ea3e684a30 +0 -0
  23. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  24. data/test/dummy/tmp/cache/assets/D5F/9C0/sprockets%2Fa3922762ba5091b4a27f1c09f2fbb4fb +0 -0
  25. data/test/dummy/tmp/cache/assets/D67/B60/sprockets%2F5f1a0d05e77ca8b9a1fc2a47e17a8174 +0 -0
  26. data/test/dummy/tmp/cache/assets/D71/EE0/sprockets%2Fca1606e8fd72d043cc6746bad760b9f7 +0 -0
  27. data/test/dummy/tmp/cache/assets/D8E/B70/sprockets%2F5175c0aae5001ef8abf8671aa2456cdd +0 -0
  28. data/test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b +0 -0
  29. data/test/dummy/tmp/cache/assets/DA1/E20/sprockets%2F84c2bd8ba93beb86bb554f84b37bf710 +0 -0
  30. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  31. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  32. data/test/dummy/tmp/tarantula/images/header_bg.jpg +0 -0
  33. data/test/dummy/tmp/tarantula/images/logo.png +0 -0
  34. data/test/dummy/tmp/tarantula/images/tagline.png +0 -0
  35. data/test/dummy/tmp/tarantula/index.html +7834 -0
  36. data/test/dummy/tmp/tarantula/javascripts/jquery-1.2.3.js +3408 -0
  37. data/test/dummy/tmp/tarantula/javascripts/jquery-ui-tabs.js +890 -0
  38. data/test/dummy/tmp/tarantula/javascripts/jquery.tablesorter.js +861 -0
  39. data/test/dummy/tmp/tarantula/javascripts/tarantula.js +10 -0
  40. data/test/dummy/tmp/tarantula/stylesheets/tarantula.css +346 -0
  41. data/test/dummy/tmp/tarantula/test_posts/1.html +71 -0
  42. data/test/dummy/tmp/tarantula/test_posts/10.html +71 -0
  43. data/test/dummy/tmp/tarantula/test_posts/11.html +71 -0
  44. data/test/dummy/tmp/tarantula/test_posts/12.html +71 -0
  45. data/test/dummy/tmp/tarantula/test_posts/13.html +71 -0
  46. data/test/dummy/tmp/tarantula/test_posts/14.html +71 -0
  47. data/test/dummy/tmp/tarantula/test_posts/15.html +71 -0
  48. data/test/dummy/tmp/tarantula/test_posts/16.html +71 -0
  49. data/test/dummy/tmp/tarantula/test_posts/17.html +71 -0
  50. data/test/dummy/tmp/tarantula/test_posts/18.html +71 -0
  51. data/test/dummy/tmp/tarantula/test_posts/19.html +71 -0
  52. data/test/dummy/tmp/tarantula/test_posts/2.html +71 -0
  53. data/test/dummy/tmp/tarantula/test_posts/20.html +71 -0
  54. data/test/dummy/tmp/tarantula/test_posts/21.html +71 -0
  55. data/test/dummy/tmp/tarantula/test_posts/22.html +71 -0
  56. data/test/dummy/tmp/tarantula/test_posts/23.html +71 -0
  57. data/test/dummy/tmp/tarantula/test_posts/24.html +71 -0
  58. data/test/dummy/tmp/tarantula/test_posts/25.html +71 -0
  59. data/test/dummy/tmp/tarantula/test_posts/26.html +71 -0
  60. data/test/dummy/tmp/tarantula/test_posts/27.html +71 -0
  61. data/test/dummy/tmp/tarantula/test_posts/28.html +71 -0
  62. data/test/dummy/tmp/tarantula/test_posts/29.html +71 -0
  63. data/test/dummy/tmp/tarantula/test_posts/3.html +71 -0
  64. data/test/dummy/tmp/tarantula/test_posts/30.html +71 -0
  65. data/test/dummy/tmp/tarantula/test_posts/31.html +71 -0
  66. data/test/dummy/tmp/tarantula/test_posts/32.html +71 -0
  67. data/test/dummy/tmp/tarantula/test_posts/4.html +71 -0
  68. data/test/dummy/tmp/tarantula/test_posts/5.html +69 -0
  69. data/test/dummy/tmp/tarantula/test_posts/6.html +71 -0
  70. data/test/dummy/tmp/tarantula/test_posts/7.html +71 -0
  71. data/test/dummy/tmp/tarantula/test_posts/8.html +71 -0
  72. data/test/dummy/tmp/tarantula/test_posts/9.html +71 -0
  73. data/test/dummy/tmp/tarantula/test_users/100.html +71 -0
  74. data/test/dummy/tmp/tarantula/test_users/101.html +71 -0
  75. data/test/dummy/tmp/tarantula/test_users/102.html +71 -0
  76. data/test/dummy/tmp/tarantula/test_users/103.html +71 -0
  77. data/test/dummy/tmp/tarantula/test_users/104.html +71 -0
  78. data/test/dummy/tmp/tarantula/test_users/105.html +71 -0
  79. data/test/dummy/tmp/tarantula/test_users/106.html +71 -0
  80. data/test/dummy/tmp/tarantula/test_users/107.html +71 -0
  81. data/test/dummy/tmp/tarantula/test_users/108.html +71 -0
  82. data/test/dummy/tmp/tarantula/test_users/109.html +71 -0
  83. data/test/dummy/tmp/tarantula/test_users/110.html +71 -0
  84. data/test/dummy/tmp/tarantula/test_users/111.html +71 -0
  85. data/test/dummy/tmp/tarantula/test_users/112.html +71 -0
  86. data/test/dummy/tmp/tarantula/test_users/113.html +71 -0
  87. data/test/dummy/tmp/tarantula/test_users/114.html +71 -0
  88. data/test/dummy/tmp/tarantula/test_users/115.html +71 -0
  89. data/test/dummy/tmp/tarantula/test_users/116.html +71 -0
  90. data/test/dummy/tmp/tarantula/test_users/117.html +71 -0
  91. data/test/dummy/tmp/tarantula/test_users/118.html +71 -0
  92. data/test/dummy/tmp/tarantula/test_users/119.html +71 -0
  93. data/test/dummy/tmp/tarantula/test_users/120.html +71 -0
  94. data/test/dummy/tmp/tarantula/test_users/121.html +71 -0
  95. data/test/dummy/tmp/tarantula/test_users/122.html +71 -0
  96. data/test/dummy/tmp/tarantula/test_users/123.html +71 -0
  97. data/test/dummy/tmp/tarantula/test_users/124.html +71 -0
  98. data/test/dummy/tmp/tarantula/test_users/125.html +71 -0
  99. data/test/dummy/tmp/tarantula/test_users/126.html +71 -0
  100. data/test/dummy/tmp/tarantula/test_users/127.html +71 -0
  101. data/test/dummy/tmp/tarantula/test_users/128.html +71 -0
  102. data/test/dummy/tmp/tarantula/test_users/129.html +71 -0
  103. data/test/dummy/tmp/tarantula/test_users/130.html +71 -0
  104. data/test/dummy/tmp/tarantula/test_users/131.html +71 -0
  105. data/test/dummy/tmp/tarantula/test_users/132.html +71 -0
  106. data/test/dummy/tmp/tarantula/test_users/133.html +71 -0
  107. data/test/dummy/tmp/tarantula/test_users/134.html +71 -0
  108. data/test/dummy/tmp/tarantula/test_users/135.html +71 -0
  109. data/test/dummy/tmp/tarantula/test_users/136.html +71 -0
  110. data/test/dummy/tmp/tarantula/test_users/137.html +71 -0
  111. data/test/dummy/tmp/tarantula/test_users/138.html +71 -0
  112. data/test/dummy/tmp/tarantula/test_users/139.html +71 -0
  113. data/test/dummy/tmp/tarantula/test_users/140.html +71 -0
  114. data/test/dummy/tmp/tarantula/test_users/141.html +71 -0
  115. data/test/dummy/tmp/tarantula/test_users/142.html +71 -0
  116. data/test/dummy/tmp/tarantula/test_users/143.html +71 -0
  117. data/test/dummy/tmp/tarantula/test_users/144.html +71 -0
  118. data/test/dummy/tmp/tarantula/test_users/145.html +71 -0
  119. data/test/dummy/tmp/tarantula/test_users/146.html +71 -0
  120. data/test/dummy/tmp/tarantula/test_users/147.html +71 -0
  121. data/test/dummy/tmp/tarantula/test_users/148.html +71 -0
  122. data/test/dummy/tmp/tarantula/test_users/149.html +71 -0
  123. data/test/dummy/tmp/tarantula/test_users/150.html +71 -0
  124. data/test/dummy/tmp/tarantula/test_users/151.html +71 -0
  125. data/test/dummy/tmp/tarantula/test_users/152.html +71 -0
  126. data/test/dummy/tmp/tarantula/test_users/153.html +71 -0
  127. data/test/dummy/tmp/tarantula/test_users/154.html +71 -0
  128. data/test/dummy/tmp/tarantula/test_users/155.html +71 -0
  129. data/test/dummy/tmp/tarantula/test_users/156.html +71 -0
  130. data/test/dummy/tmp/tarantula/test_users/157.html +71 -0
  131. data/test/dummy/tmp/tarantula/test_users/158.html +71 -0
  132. data/test/dummy/tmp/tarantula/test_users/159.html +71 -0
  133. data/test/dummy/tmp/tarantula/test_users/160.html +71 -0
  134. data/test/dummy/tmp/tarantula/test_users/161.html +71 -0
  135. data/test/dummy/tmp/tarantula/test_users/162.html +71 -0
  136. data/test/dummy/tmp/tarantula/test_users/163.html +71 -0
  137. data/test/dummy/tmp/tarantula/test_users/164.html +71 -0
  138. data/test/dummy/tmp/tarantula/test_users/165.html +71 -0
  139. data/test/dummy/tmp/tarantula/test_users/166.html +71 -0
  140. data/test/dummy/tmp/tarantula/test_users/167.html +71 -0
  141. data/test/dummy/tmp/tarantula/test_users/168.html +71 -0
  142. data/test/dummy/tmp/tarantula/test_users/169.html +71 -0
  143. data/test/dummy/tmp/tarantula/test_users/170.html +71 -0
  144. data/test/dummy/tmp/tarantula/test_users/171.html +71 -0
  145. data/test/dummy/tmp/tarantula/test_users/172.html +71 -0
  146. data/test/dummy/tmp/tarantula/test_users/173.html +71 -0
  147. data/test/dummy/tmp/tarantula/test_users/174.html +71 -0
  148. data/test/dummy/tmp/tarantula/test_users/175.html +71 -0
  149. data/test/dummy/tmp/tarantula/test_users/176.html +71 -0
  150. data/test/dummy/tmp/tarantula/test_users/177.html +71 -0
  151. data/test/dummy/tmp/tarantula/test_users/178.html +71 -0
  152. data/test/dummy/tmp/tarantula/test_users/179.html +71 -0
  153. data/test/dummy/tmp/tarantula/test_users/180.html +71 -0
  154. data/test/dummy/tmp/tarantula/test_users/181.html +71 -0
  155. data/test/dummy/tmp/tarantula/test_users/182.html +71 -0
  156. data/test/dummy/tmp/tarantula/test_users/183.html +71 -0
  157. data/test/dummy/tmp/tarantula/test_users/184.html +71 -0
  158. data/test/dummy/tmp/tarantula/test_users/185.html +71 -0
  159. data/test/dummy/tmp/tarantula/test_users/186.html +71 -0
  160. data/test/dummy/tmp/tarantula/test_users/187.html +71 -0
  161. data/test/dummy/tmp/tarantula/test_users/188.html +71 -0
  162. data/test/dummy/tmp/tarantula/test_users/189.html +71 -0
  163. data/test/dummy/tmp/tarantula/test_users/190.html +71 -0
  164. data/test/dummy/tmp/tarantula/test_users/191.html +71 -0
  165. data/test/dummy/tmp/tarantula/test_users/192.html +71 -0
  166. data/test/dummy/tmp/tarantula/test_users/193.html +71 -0
  167. data/test/dummy/tmp/tarantula/test_users/194.html +71 -0
  168. data/test/dummy/tmp/tarantula/test_users/195.html +71 -0
  169. data/test/dummy/tmp/tarantula/test_users/196.html +71 -0
  170. data/test/dummy/tmp/tarantula/test_users/197.html +71 -0
  171. data/test/dummy/tmp/tarantula/test_users/198.html +71 -0
  172. data/test/dummy/tmp/tarantula/test_users/199.html +71 -0
  173. data/test/dummy/tmp/tarantula/test_users/200.html +71 -0
  174. data/test/dummy/tmp/tarantula/test_users/201.html +71 -0
  175. data/test/dummy/tmp/tarantula/test_users/202.html +71 -0
  176. data/test/dummy/tmp/tarantula/test_users/203.html +71 -0
  177. data/test/dummy/tmp/tarantula/test_users/204.html +71 -0
  178. data/test/dummy/tmp/tarantula/test_users/205.html +71 -0
  179. data/test/dummy/tmp/tarantula/test_users/206.html +71 -0
  180. data/test/dummy/tmp/tarantula/test_users/207.html +71 -0
  181. data/test/dummy/tmp/tarantula/test_users/208.html +71 -0
  182. data/test/dummy/tmp/tarantula/test_users/209.html +71 -0
  183. data/test/dummy/tmp/tarantula/test_users/210.html +71 -0
  184. data/test/dummy/tmp/tarantula/test_users/211.html +71 -0
  185. data/test/dummy/tmp/tarantula/test_users/212.html +71 -0
  186. data/test/dummy/tmp/tarantula/test_users/213.html +71 -0
  187. data/test/dummy/tmp/tarantula/test_users/214.html +71 -0
  188. data/test/dummy/tmp/tarantula/test_users/215.html +71 -0
  189. data/test/dummy/tmp/tarantula/test_users/216.html +71 -0
  190. data/test/dummy/tmp/tarantula/test_users/217.html +71 -0
  191. data/test/dummy/tmp/tarantula/test_users/218.html +71 -0
  192. data/test/dummy/tmp/tarantula/test_users/219.html +71 -0
  193. data/test/dummy/tmp/tarantula/test_users/220.html +71 -0
  194. data/test/dummy/tmp/tarantula/test_users/221.html +71 -0
  195. data/test/dummy/tmp/tarantula/test_users/222.html +71 -0
  196. data/test/dummy/tmp/tarantula/test_users/223.html +71 -0
  197. data/test/dummy/tmp/tarantula/test_users/224.html +71 -0
  198. data/test/dummy/tmp/tarantula/test_users/225.html +71 -0
  199. data/test/dummy/tmp/tarantula/test_users/226.html +71 -0
  200. data/test/dummy/tmp/tarantula/test_users/227.html +71 -0
  201. data/test/dummy/tmp/tarantula/test_users/228.html +71 -0
  202. data/test/dummy/tmp/tarantula/test_users/229.html +71 -0
  203. data/test/dummy/tmp/tarantula/test_users/230.html +71 -0
  204. data/test/dummy/tmp/tarantula/test_users/231.html +71 -0
  205. data/test/dummy/tmp/tarantula/test_users/232.html +71 -0
  206. data/test/dummy/tmp/tarantula/test_users/233.html +71 -0
  207. data/test/dummy/tmp/tarantula/test_users/234.html +71 -0
  208. data/test/dummy/tmp/tarantula/test_users/235.html +71 -0
  209. data/test/dummy/tmp/tarantula/test_users/236.html +71 -0
  210. data/test/dummy/tmp/tarantula/test_users/237.html +71 -0
  211. data/test/dummy/tmp/tarantula/test_users/238.html +71 -0
  212. data/test/dummy/tmp/tarantula/test_users/239.html +71 -0
  213. data/test/dummy/tmp/tarantula/test_users/240.html +71 -0
  214. data/test/dummy/tmp/tarantula/test_users/241.html +71 -0
  215. data/test/dummy/tmp/tarantula/test_users/242.html +71 -0
  216. data/test/dummy/tmp/tarantula/test_users/243.html +71 -0
  217. data/test/dummy/tmp/tarantula/test_users/244.html +71 -0
  218. data/test/dummy/tmp/tarantula/test_users/245.html +71 -0
  219. data/test/dummy/tmp/tarantula/test_users/246.html +71 -0
  220. data/test/dummy/tmp/tarantula/test_users/247.html +71 -0
  221. data/test/dummy/tmp/tarantula/test_users/248.html +71 -0
  222. data/test/dummy/tmp/tarantula/test_users/249.html +71 -0
  223. data/test/dummy/tmp/tarantula/test_users/250.html +71 -0
  224. data/test/dummy/tmp/tarantula/test_users/251.html +71 -0
  225. data/test/dummy/tmp/tarantula/test_users/252.html +71 -0
  226. data/test/dummy/tmp/tarantula/test_users/253.html +71 -0
  227. data/test/dummy/tmp/tarantula/test_users/254.html +71 -0
  228. data/test/dummy/tmp/tarantula/test_users/255.html +71 -0
  229. data/test/dummy/tmp/tarantula/test_users/256.html +71 -0
  230. data/test/dummy/tmp/tarantula/test_users/257.html +71 -0
  231. data/test/dummy/tmp/tarantula/test_users/258.html +71 -0
  232. data/test/dummy/tmp/tarantula/test_users/259.html +71 -0
  233. data/test/dummy/tmp/tarantula/test_users/260.html +71 -0
  234. data/test/dummy/tmp/tarantula/test_users/261.html +71 -0
  235. data/test/dummy/tmp/tarantula/test_users/262.html +71 -0
  236. data/test/dummy/tmp/tarantula/test_users/263.html +71 -0
  237. data/test/dummy/tmp/tarantula/test_users/264.html +71 -0
  238. data/test/dummy/tmp/tarantula/test_users/265.html +71 -0
  239. data/test/dummy/tmp/tarantula/test_users/266.html +71 -0
  240. data/test/dummy/tmp/tarantula/test_users/267.html +71 -0
  241. data/test/dummy/tmp/tarantula/test_users/268.html +71 -0
  242. data/test/dummy/tmp/tarantula/test_users/269.html +71 -0
  243. data/test/dummy/tmp/tarantula/test_users/270.html +71 -0
  244. data/test/dummy/tmp/tarantula/test_users/271.html +71 -0
  245. data/test/dummy/tmp/tarantula/test_users/272.html +71 -0
  246. data/test/dummy/tmp/tarantula/test_users/273.html +71 -0
  247. data/test/dummy/tmp/tarantula/test_users/274.html +71 -0
  248. data/test/dummy/tmp/tarantula/test_users/275.html +71 -0
  249. data/test/dummy/tmp/tarantula/test_users/276.html +71 -0
  250. data/test/dummy/tmp/tarantula/test_users/277.html +71 -0
  251. data/test/dummy/tmp/tarantula/test_users/278.html +71 -0
  252. data/test/dummy/tmp/tarantula/test_users/279.html +71 -0
  253. data/test/dummy/tmp/tarantula/test_users/280.html +71 -0
  254. data/test/dummy/tmp/tarantula/test_users/281.html +71 -0
  255. data/test/dummy/tmp/tarantula/test_users/282.html +71 -0
  256. data/test/dummy/tmp/tarantula/test_users/283.html +71 -0
  257. data/test/dummy/tmp/tarantula/test_users/284.html +71 -0
  258. data/test/dummy/tmp/tarantula/test_users/285.html +71 -0
  259. data/test/dummy/tmp/tarantula/test_users/286.html +71 -0
  260. data/test/dummy/tmp/tarantula/test_users/287.html +71 -0
  261. data/test/dummy/tmp/tarantula/test_users/288.html +71 -0
  262. data/test/dummy/tmp/tarantula/test_users/289.html +71 -0
  263. data/test/dummy/tmp/tarantula/test_users/290.html +71 -0
  264. data/test/dummy/tmp/tarantula/test_users/291.html +71 -0
  265. data/test/dummy/tmp/tarantula/test_users/292.html +71 -0
  266. data/test/dummy/tmp/tarantula/test_users/293.html +71 -0
  267. data/test/dummy/tmp/tarantula/test_users/294.html +71 -0
  268. data/test/dummy/tmp/tarantula/test_users/295.html +71 -0
  269. data/test/dummy/tmp/tarantula/test_users/296.html +71 -0
  270. data/test/dummy/tmp/tarantula/test_users/297.html +71 -0
  271. data/test/dummy/tmp/tarantula/test_users/298.html +71 -0
  272. data/test/dummy/tmp/tarantula/test_users/299.html +71 -0
  273. data/test/dummy/tmp/tarantula/test_users/300.html +71 -0
  274. data/test/dummy/tmp/tarantula/test_users/301.html +71 -0
  275. data/test/dummy/tmp/tarantula/test_users/302.html +71 -0
  276. data/test/dummy/tmp/tarantula/test_users/303.html +71 -0
  277. data/test/dummy/tmp/tarantula/test_users/304.html +71 -0
  278. data/test/dummy/tmp/tarantula/test_users/305.html +71 -0
  279. data/test/dummy/tmp/tarantula/test_users/306.html +71 -0
  280. data/test/dummy/tmp/tarantula/test_users/307.html +71 -0
  281. data/test/dummy/tmp/tarantula/test_users/308.html +71 -0
  282. data/test/dummy/tmp/tarantula/test_users/309.html +71 -0
  283. data/test/dummy/tmp/tarantula/test_users/31.html +71 -0
  284. data/test/dummy/tmp/tarantula/test_users/310.html +71 -0
  285. data/test/dummy/tmp/tarantula/test_users/311.html +71 -0
  286. data/test/dummy/tmp/tarantula/test_users/312.html +71 -0
  287. data/test/dummy/tmp/tarantula/test_users/313.html +71 -0
  288. data/test/dummy/tmp/tarantula/test_users/314.html +71 -0
  289. data/test/dummy/tmp/tarantula/test_users/315.html +71 -0
  290. data/test/dummy/tmp/tarantula/test_users/316.html +71 -0
  291. data/test/dummy/tmp/tarantula/test_users/32.html +71 -0
  292. data/test/dummy/tmp/tarantula/test_users/33.html +71 -0
  293. data/test/dummy/tmp/tarantula/test_users/34.html +71 -0
  294. data/test/dummy/tmp/tarantula/test_users/35.html +71 -0
  295. data/test/dummy/tmp/tarantula/test_users/36.html +71 -0
  296. data/test/dummy/tmp/tarantula/test_users/37.html +69 -0
  297. data/test/dummy/tmp/tarantula/test_users/38.html +71 -0
  298. data/test/dummy/tmp/tarantula/test_users/39.html +71 -0
  299. data/test/dummy/tmp/tarantula/test_users/40.html +71 -0
  300. data/test/dummy/tmp/tarantula/test_users/41.html +71 -0
  301. data/test/dummy/tmp/tarantula/test_users/42.html +71 -0
  302. data/test/dummy/tmp/tarantula/test_users/43.html +71 -0
  303. data/test/dummy/tmp/tarantula/test_users/44.html +71 -0
  304. data/test/dummy/tmp/tarantula/test_users/45.html +71 -0
  305. data/test/dummy/tmp/tarantula/test_users/46.html +71 -0
  306. data/test/dummy/tmp/tarantula/test_users/47.html +71 -0
  307. data/test/dummy/tmp/tarantula/test_users/48.html +71 -0
  308. data/test/dummy/tmp/tarantula/test_users/49.html +71 -0
  309. data/test/dummy/tmp/tarantula/test_users/50.html +71 -0
  310. data/test/dummy/tmp/tarantula/test_users/51.html +71 -0
  311. data/test/dummy/tmp/tarantula/test_users/52.html +71 -0
  312. data/test/dummy/tmp/tarantula/test_users/53.html +71 -0
  313. data/test/dummy/tmp/tarantula/test_users/54.html +71 -0
  314. data/test/dummy/tmp/tarantula/test_users/55.html +71 -0
  315. data/test/dummy/tmp/tarantula/test_users/56.html +71 -0
  316. data/test/dummy/tmp/tarantula/test_users/57.html +71 -0
  317. data/test/dummy/tmp/tarantula/test_users/58.html +71 -0
  318. data/test/dummy/tmp/tarantula/test_users/59.html +71 -0
  319. data/test/dummy/tmp/tarantula/test_users/60.html +71 -0
  320. data/test/dummy/tmp/tarantula/test_users/61.html +71 -0
  321. data/test/dummy/tmp/tarantula/test_users/62.html +71 -0
  322. data/test/dummy/tmp/tarantula/test_users/63.html +71 -0
  323. data/test/dummy/tmp/tarantula/test_users/64.html +71 -0
  324. data/test/dummy/tmp/tarantula/test_users/65.html +71 -0
  325. data/test/dummy/tmp/tarantula/test_users/66.html +71 -0
  326. data/test/dummy/tmp/tarantula/test_users/67.html +71 -0
  327. data/test/dummy/tmp/tarantula/test_users/68.html +71 -0
  328. data/test/dummy/tmp/tarantula/test_users/69.html +71 -0
  329. data/test/dummy/tmp/tarantula/test_users/70.html +71 -0
  330. data/test/dummy/tmp/tarantula/test_users/71.html +71 -0
  331. data/test/dummy/tmp/tarantula/test_users/72.html +71 -0
  332. data/test/dummy/tmp/tarantula/test_users/73.html +71 -0
  333. data/test/dummy/tmp/tarantula/test_users/74.html +71 -0
  334. data/test/dummy/tmp/tarantula/test_users/75.html +71 -0
  335. data/test/dummy/tmp/tarantula/test_users/76.html +71 -0
  336. data/test/dummy/tmp/tarantula/test_users/77.html +71 -0
  337. data/test/dummy/tmp/tarantula/test_users/78.html +71 -0
  338. data/test/dummy/tmp/tarantula/test_users/79.html +71 -0
  339. data/test/dummy/tmp/tarantula/test_users/80.html +71 -0
  340. data/test/dummy/tmp/tarantula/test_users/81.html +71 -0
  341. data/test/dummy/tmp/tarantula/test_users/82.html +71 -0
  342. data/test/dummy/tmp/tarantula/test_users/83.html +71 -0
  343. data/test/dummy/tmp/tarantula/test_users/84.html +71 -0
  344. data/test/dummy/tmp/tarantula/test_users/85.html +71 -0
  345. data/test/dummy/tmp/tarantula/test_users/86.html +71 -0
  346. data/test/dummy/tmp/tarantula/test_users/87.html +71 -0
  347. data/test/dummy/tmp/tarantula/test_users/88.html +71 -0
  348. data/test/dummy/tmp/tarantula/test_users/89.html +71 -0
  349. data/test/dummy/tmp/tarantula/test_users/90.html +71 -0
  350. data/test/dummy/tmp/tarantula/test_users/91.html +71 -0
  351. data/test/dummy/tmp/tarantula/test_users/92.html +71 -0
  352. data/test/dummy/tmp/tarantula/test_users/93.html +71 -0
  353. data/test/dummy/tmp/tarantula/test_users/94.html +71 -0
  354. data/test/dummy/tmp/tarantula/test_users/95.html +71 -0
  355. data/test/dummy/tmp/tarantula/test_users/96.html +71 -0
  356. data/test/dummy/tmp/tarantula/test_users/97.html +71 -0
  357. data/test/dummy/tmp/tarantula/test_users/98.html +71 -0
  358. data/test/dummy/tmp/tarantula/test_users/99.html +71 -0
  359. data/test/test_helper.rb +2 -1
  360. metadata +708 -2
@@ -0,0 +1,890 @@
1
+ /*
2
+ * jQuery UI @VERSION
3
+ *
4
+ * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ ;(function($) {
11
+
12
+ $.ui = {
13
+ plugin: {
14
+ add: function(module, option, set) {
15
+ var proto = $.ui[module].prototype;
16
+ for(var i in set) {
17
+ proto.plugins[i] = proto.plugins[i] || [];
18
+ proto.plugins[i].push([option, set[i]]);
19
+ }
20
+ },
21
+ call: function(instance, name, args) {
22
+ var set = instance.plugins[name];
23
+ if(!set) { return; }
24
+
25
+ for (var i = 0; i < set.length; i++) {
26
+ if (instance.options[set[i][0]]) {
27
+ set[i][1].apply(instance.element, args);
28
+ }
29
+ }
30
+ }
31
+ },
32
+ cssCache: {},
33
+ css: function(name) {
34
+ if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
35
+ var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
36
+
37
+ //if (!$.browser.safari)
38
+ //tmp.appendTo('body');
39
+
40
+ //Opera and Safari set width and height to 0px instead of auto
41
+ //Safari returns rgba(0,0,0,0) when bgcolor is not set
42
+ $.ui.cssCache[name] = !!(
43
+ (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||
44
+ !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
45
+ );
46
+ try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
47
+ return $.ui.cssCache[name];
48
+ },
49
+ disableSelection: function(el) {
50
+ $(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
51
+ },
52
+ enableSelection: function(el) {
53
+ $(el).attr('unselectable', 'off').css('MozUserSelect', '');
54
+ },
55
+ hasScroll: function(e, a) {
56
+ var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
57
+ if (e[scroll] > 0) return true; e[scroll] = 1;
58
+ has = e[scroll] > 0 ? true : false; e[scroll] = 0;
59
+ return has;
60
+ }
61
+ };
62
+
63
+
64
+ /** jQuery core modifications and additions **/
65
+
66
+ var _remove = $.fn.remove;
67
+ $.fn.remove = function() {
68
+ $("*", this).add(this).triggerHandler("remove");
69
+ return _remove.apply(this, arguments );
70
+ };
71
+
72
+ // $.widget is a factory to create jQuery plugins
73
+ // taking some boilerplate code out of the plugin code
74
+ // created by Scott González and Jörn Zaefferer
75
+ function getter(namespace, plugin, method) {
76
+ var methods = $[namespace][plugin].getter || [];
77
+ methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
78
+ return ($.inArray(method, methods) != -1);
79
+ }
80
+
81
+ $.widget = function(name, prototype) {
82
+ var namespace = name.split(".")[0];
83
+ name = name.split(".")[1];
84
+
85
+ // create plugin method
86
+ $.fn[name] = function(options) {
87
+ var isMethodCall = (typeof options == 'string'),
88
+ args = Array.prototype.slice.call(arguments, 1);
89
+
90
+ if (isMethodCall && getter(namespace, name, options)) {
91
+ var instance = $.data(this[0], name);
92
+ return (instance ? instance[options].apply(instance, args)
93
+ : undefined);
94
+ }
95
+
96
+ return this.each(function() {
97
+ var instance = $.data(this, name);
98
+ if (isMethodCall && instance && $.isFunction(instance[options])) {
99
+ instance[options].apply(instance, args);
100
+ } else if (!isMethodCall) {
101
+ $.data(this, name, new $[namespace][name](this, options));
102
+ }
103
+ });
104
+ };
105
+
106
+ // create widget constructor
107
+ $[namespace][name] = function(element, options) {
108
+ var self = this;
109
+
110
+ this.widgetName = name;
111
+ this.widgetBaseClass = namespace + '-' + name;
112
+
113
+ this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
114
+ this.element = $(element)
115
+ .bind('setData.' + name, function(e, key, value) {
116
+ return self.setData(key, value);
117
+ })
118
+ .bind('getData.' + name, function(e, key) {
119
+ return self.getData(key);
120
+ })
121
+ .bind('remove', function() {
122
+ return self.destroy();
123
+ });
124
+ this.init();
125
+ };
126
+
127
+ // add widget prototype
128
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
129
+ };
130
+
131
+ $.widget.prototype = {
132
+ init: function() {},
133
+ destroy: function() {
134
+ this.element.removeData(this.widgetName);
135
+ },
136
+
137
+ getData: function(key) {
138
+ return this.options[key];
139
+ },
140
+ setData: function(key, value) {
141
+ this.options[key] = value;
142
+
143
+ if (key == 'disabled') {
144
+ this.element[value ? 'addClass' : 'removeClass'](
145
+ this.widgetBaseClass + '-disabled');
146
+ }
147
+ },
148
+
149
+ enable: function() {
150
+ this.setData('disabled', false);
151
+ },
152
+ disable: function() {
153
+ this.setData('disabled', true);
154
+ }
155
+ };
156
+
157
+ $.widget.defaults = {
158
+ disabled: false
159
+ };
160
+
161
+
162
+ /** Mouse Interaction Plugin **/
163
+
164
+ $.ui.mouse = {
165
+ mouseInit: function() {
166
+ var self = this;
167
+
168
+ this.element.bind('mousedown.'+this.widgetName, function(e) {
169
+ return self.mouseDown(e);
170
+ });
171
+
172
+ // Prevent text selection in IE
173
+ if ($.browser.msie) {
174
+ this._mouseUnselectable = this.element.attr('unselectable');
175
+ this.element.attr('unselectable', 'on');
176
+ }
177
+
178
+ this.started = false;
179
+ },
180
+
181
+ // TODO: make sure destroying one instance of mouse doesn't mess with
182
+ // other instances of mouse
183
+ mouseDestroy: function() {
184
+ this.element.unbind('.'+this.widgetName);
185
+
186
+ // Restore text selection in IE
187
+ ($.browser.msie
188
+ && this.element.attr('unselectable', this._mouseUnselectable));
189
+ },
190
+
191
+ mouseDown: function(e) {
192
+ // we may have missed mouseup (out of window)
193
+ (this._mouseStarted && this.mouseUp(e));
194
+
195
+ this._mouseDownEvent = e;
196
+
197
+ var self = this,
198
+ btnIsLeft = (e.which == 1),
199
+ elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
200
+ if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
201
+ return true;
202
+ }
203
+
204
+ this._mouseDelayMet = !this.options.delay;
205
+ if (!this._mouseDelayMet) {
206
+ this._mouseDelayTimer = setTimeout(function() {
207
+ self._mouseDelayMet = true;
208
+ }, this.options.delay);
209
+ }
210
+
211
+ if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
212
+ this._mouseStarted = (this.mouseStart(e) !== false);
213
+ if (!this._mouseStarted) {
214
+ e.preventDefault();
215
+ return true;
216
+ }
217
+ }
218
+
219
+ // these delegates are required to keep context
220
+ this._mouseMoveDelegate = function(e) {
221
+ return self.mouseMove(e);
222
+ };
223
+ this._mouseUpDelegate = function(e) {
224
+ return self.mouseUp(e);
225
+ };
226
+ $(document)
227
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
228
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
229
+
230
+ return false;
231
+ },
232
+
233
+ mouseMove: function(e) {
234
+ // IE mouseup check - mouseup happened when mouse was out of window
235
+ if ($.browser.msie && !e.button) {
236
+ return this.mouseUp(e);
237
+ }
238
+
239
+ if (this._mouseStarted) {
240
+ this.mouseDrag(e);
241
+ return false;
242
+ }
243
+
244
+ if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
245
+ this._mouseStarted =
246
+ (this.mouseStart(this._mouseDownEvent, e) !== false);
247
+ (this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
248
+ }
249
+
250
+ return !this._mouseStarted;
251
+ },
252
+
253
+ mouseUp: function(e) {
254
+ $(document)
255
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
256
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
257
+
258
+ if (this._mouseStarted) {
259
+ this._mouseStarted = false;
260
+ this.mouseStop(e);
261
+ }
262
+
263
+ return false;
264
+ },
265
+
266
+ mouseDistanceMet: function(e) {
267
+ return (Math.max(
268
+ Math.abs(this._mouseDownEvent.pageX - e.pageX),
269
+ Math.abs(this._mouseDownEvent.pageY - e.pageY)
270
+ ) >= this.options.distance
271
+ );
272
+ },
273
+
274
+ mouseDelayMet: function(e) {
275
+ return this._mouseDelayMet;
276
+ },
277
+
278
+ // These are placeholder methods, to be overriden by extending plugin
279
+ mouseStart: function(e) {},
280
+ mouseDrag: function(e) {},
281
+ mouseStop: function(e) {},
282
+ mouseCapture: function(e) { return true; }
283
+ };
284
+
285
+ $.ui.mouse.defaults = {
286
+ cancel: null,
287
+ distance: 1,
288
+ delay: 0
289
+ };
290
+
291
+ })(jQuery);
292
+ /*
293
+ * jQuery UI Tabs
294
+ *
295
+ * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
296
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
297
+ * and GPL (GPL-LICENSE.txt) licenses.
298
+ *
299
+ * http://docs.jquery.com/UI/Tabs
300
+ *
301
+ * Depends:
302
+ * ui.core.js
303
+ */
304
+ (function($) {
305
+
306
+ $.widget("ui.tabs", {
307
+ init: function() {
308
+ this.options.event += '.tabs'; // namespace event
309
+
310
+ // create tabs
311
+ this.tabify(true);
312
+ },
313
+ setData: function(key, value) {
314
+ if ((/^selected/).test(key))
315
+ this.select(value);
316
+ else {
317
+ this.options[key] = value;
318
+ this.tabify();
319
+ }
320
+ },
321
+ length: function() {
322
+ return this.$tabs.length;
323
+ },
324
+ tabId: function(a) {
325
+ return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
326
+ || this.options.idPrefix + $.data(a);
327
+ },
328
+ ui: function(tab, panel) {
329
+ return {
330
+ options: this.options,
331
+ tab: tab,
332
+ panel: panel,
333
+ index: this.$tabs.index(tab)
334
+ };
335
+ },
336
+ tabify: function(init) {
337
+
338
+ this.$lis = $('li:has(a[href])', this.element);
339
+ this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
340
+ this.$panels = $([]);
341
+
342
+ var self = this, o = this.options;
343
+
344
+ this.$tabs.each(function(i, a) {
345
+ // inline tab
346
+ if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
347
+ self.$panels = self.$panels.add(a.hash);
348
+ // remote tab
349
+ else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
350
+ $.data(a, 'href.tabs', a.href); // required for restore on destroy
351
+ $.data(a, 'load.tabs', a.href); // mutable
352
+ var id = self.tabId(a);
353
+ a.href = '#' + id;
354
+ var $panel = $('#' + id);
355
+ if (!$panel.length) {
356
+ $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
357
+ .insertAfter( self.$panels[i - 1] || self.element );
358
+ $panel.data('destroy.tabs', true);
359
+ }
360
+ self.$panels = self.$panels.add( $panel );
361
+ }
362
+ // invalid tab href
363
+ else
364
+ o.disabled.push(i + 1);
365
+ });
366
+
367
+ if (init) {
368
+
369
+ // attach necessary classes for styling if not present
370
+ this.element.addClass(o.navClass);
371
+ this.$panels.each(function() {
372
+ var $this = $(this);
373
+ $this.addClass(o.panelClass);
374
+ });
375
+
376
+ // Selected tab
377
+ // use "selected" option or try to retrieve:
378
+ // 1. from fragment identifier in url
379
+ // 2. from cookie
380
+ // 3. from selected class attribute on <li>
381
+ if (o.selected === undefined) {
382
+ if (location.hash) {
383
+ this.$tabs.each(function(i, a) {
384
+ if (a.hash == location.hash) {
385
+ o.selected = i;
386
+ // prevent page scroll to fragment
387
+ if ($.browser.msie || $.browser.opera) { // && !o.remote
388
+ var $toShow = $(location.hash), toShowId = $toShow.attr('id');
389
+ $toShow.attr('id', '');
390
+ setTimeout(function() {
391
+ $toShow.attr('id', toShowId); // restore id
392
+ }, 500);
393
+ }
394
+ scrollTo(0, 0);
395
+ return false; // break
396
+ }
397
+ });
398
+ }
399
+ else if (o.cookie) {
400
+ var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
401
+ if (index && self.$tabs[index])
402
+ o.selected = index;
403
+ }
404
+ else if (self.$lis.filter('.' + o.selectedClass).length)
405
+ o.selected = self.$lis.index( self.$lis.filter('.' + o.selectedClass)[0] );
406
+ }
407
+ o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default
408
+
409
+ // Take disabling tabs via class attribute from HTML
410
+ // into account and update option properly.
411
+ // A selected tab cannot become disabled.
412
+ o.disabled = $.unique(o.disabled.concat(
413
+ $.map(this.$lis.filter('.' + o.disabledClass),
414
+ function(n, i) { return self.$lis.index(n); } )
415
+ )).sort();
416
+ if ($.inArray(o.selected, o.disabled) != -1)
417
+ o.disabled.splice($.inArray(o.selected, o.disabled), 1);
418
+
419
+ // highlight selected tab
420
+ this.$panels.addClass(o.hideClass);
421
+ this.$lis.removeClass(o.selectedClass);
422
+ if (o.selected !== null) {
423
+ this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
424
+ this.$lis.eq(o.selected).addClass(o.selectedClass);
425
+
426
+ // seems to be expected behavior that the show callback is fired
427
+ var onShow = function() {
428
+ $(self.element).triggerHandler('tabsshow',
429
+ [self.fakeEvent('tabsshow'), self.ui(self.$tabs[o.selected], self.$panels[o.selected])], o.show);
430
+ };
431
+
432
+ // load if remote tab
433
+ if ($.data(this.$tabs[o.selected], 'load.tabs'))
434
+ this.load(o.selected, onShow);
435
+ // just trigger show event
436
+ else
437
+ onShow();
438
+
439
+ }
440
+
441
+ // clean up to avoid memory leaks in certain versions of IE 6
442
+ $(window).bind('unload', function() {
443
+ self.$tabs.unbind('.tabs');
444
+ self.$lis = self.$tabs = self.$panels = null;
445
+ });
446
+
447
+ }
448
+
449
+ // disable tabs
450
+ for (var i = 0, li; li = this.$lis[i]; i++)
451
+ $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
452
+
453
+ // reset cache if switching from cached to not cached
454
+ if (o.cache === false)
455
+ this.$tabs.removeData('cache.tabs');
456
+
457
+ // set up animations
458
+ var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
459
+ if (o.fx && o.fx.constructor == Array)
460
+ hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
461
+ else
462
+ hideFx = showFx = o.fx || baseFx;
463
+
464
+ // reset some styles to maintain print style sheets etc.
465
+ var resetCSS = { display: '', overflow: '', height: '' };
466
+ if (!$.browser.msie) // not in IE to prevent ClearType font issue
467
+ resetCSS.opacity = '';
468
+
469
+ // Hide a tab, animation prevents browser scrolling to fragment,
470
+ // $show is optional.
471
+ function hideTab(clicked, $hide, $show) {
472
+ $hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
473
+ $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
474
+ if ($.browser.msie && hideFx.opacity)
475
+ $hide[0].style.filter = '';
476
+ if ($show)
477
+ showTab(clicked, $show, $hide);
478
+ });
479
+ }
480
+
481
+ // Show a tab, animation prevents browser scrolling to fragment,
482
+ // $hide is optional.
483
+ function showTab(clicked, $show, $hide) {
484
+ if (showFx === baseFx)
485
+ $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
486
+ $show.animate(showFx, showFx.duration || baseDuration, function() {
487
+ $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
488
+ if ($.browser.msie && showFx.opacity)
489
+ $show[0].style.filter = '';
490
+
491
+ // callback
492
+ $(self.element).triggerHandler('tabsshow',
493
+ [self.fakeEvent('tabsshow'), self.ui(clicked, $show[0])], o.show);
494
+
495
+ });
496
+ }
497
+
498
+ // switch a tab
499
+ function switchTab(clicked, $li, $hide, $show) {
500
+ /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
501
+ $.ajaxHistory.update(clicked.hash);
502
+ }*/
503
+ $li.addClass(o.selectedClass)
504
+ .siblings().removeClass(o.selectedClass);
505
+ hideTab(clicked, $hide, $show);
506
+ }
507
+
508
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
509
+ this.$tabs.unbind('.tabs').bind(o.event, function() {
510
+
511
+ //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
512
+ var $li = $(this).parents('li:eq(0)'),
513
+ $hide = self.$panels.filter(':visible'),
514
+ $show = $(this.hash);
515
+
516
+ // If tab is already selected and not unselectable or tab disabled or
517
+ // or is already loading or click callback returns false stop here.
518
+ // Check if click handler returns false last so that it is not executed
519
+ // for a disabled or loading tab!
520
+ if (($li.hasClass(o.selectedClass) && !o.unselect)
521
+ || $li.hasClass(o.disabledClass)
522
+ || $(this).hasClass(o.loadingClass)
523
+ || $(self.element).triggerHandler('tabsselect', [self.fakeEvent('tabsselect'), self.ui(this, $show[0])], o.select) === false
524
+ ) {
525
+ this.blur();
526
+ return false;
527
+ }
528
+
529
+ self.options.selected = self.$tabs.index(this);
530
+
531
+ // if tab may be closed
532
+ if (o.unselect) {
533
+ if ($li.hasClass(o.selectedClass)) {
534
+ self.options.selected = null;
535
+ $li.removeClass(o.selectedClass);
536
+ self.$panels.stop();
537
+ hideTab(this, $hide);
538
+ this.blur();
539
+ return false;
540
+ } else if (!$hide.length) {
541
+ self.$panels.stop();
542
+ var a = this;
543
+ self.load(self.$tabs.index(this), function() {
544
+ $li.addClass(o.selectedClass).addClass(o.unselectClass);
545
+ showTab(a, $show);
546
+ });
547
+ this.blur();
548
+ return false;
549
+ }
550
+ }
551
+
552
+ if (o.cookie)
553
+ $.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
554
+
555
+ // stop possibly running animations
556
+ self.$panels.stop();
557
+
558
+ // show new tab
559
+ if ($show.length) {
560
+
561
+ // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
562
+ /*if ($.browser.msie && o.bookmarkable) {
563
+ var showId = this.hash.replace('#', '');
564
+ $show.attr('id', '');
565
+ setTimeout(function() {
566
+ $show.attr('id', showId); // restore id
567
+ }, 0);
568
+ }*/
569
+
570
+ var a = this;
571
+ self.load(self.$tabs.index(this), $hide.length ?
572
+ function() {
573
+ switchTab(a, $li, $hide, $show);
574
+ } :
575
+ function() {
576
+ $li.addClass(o.selectedClass);
577
+ showTab(a, $show);
578
+ }
579
+ );
580
+
581
+ // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
582
+ /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
583
+ var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
584
+ setTimeout(function() {
585
+ scrollTo(scrollX, scrollY);
586
+ }, 0);*/
587
+
588
+ } else
589
+ throw 'jQuery UI Tabs: Mismatching fragment identifier.';
590
+
591
+ // Prevent IE from keeping other link focussed when using the back button
592
+ // and remove dotted border from clicked link. This is controlled in modern
593
+ // browsers via CSS, also blur removes focus from address bar in Firefox
594
+ // which can become a usability and annoying problem with tabsRotate.
595
+ if ($.browser.msie)
596
+ this.blur();
597
+
598
+ //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
599
+ return false;
600
+
601
+ });
602
+
603
+ // disable click if event is configured to something else
604
+ if (!(/^click/).test(o.event))
605
+ this.$tabs.bind('click.tabs', function() { return false; });
606
+
607
+ },
608
+ add: function(url, label, index) {
609
+ if (index == undefined)
610
+ index = this.$tabs.length; // append by default
611
+
612
+ var o = this.options;
613
+ var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
614
+ $li.data('destroy.tabs', true);
615
+
616
+ var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
617
+
618
+ // try to find an existing element before creating a new one
619
+ var $panel = $('#' + id);
620
+ if (!$panel.length) {
621
+ $panel = $(o.panelTemplate).attr('id', id)
622
+ .addClass(o.hideClass)
623
+ .data('destroy.tabs', true);
624
+ }
625
+ $panel.addClass(o.panelClass);
626
+ if (index >= this.$lis.length) {
627
+ $li.appendTo(this.element);
628
+ $panel.appendTo(this.element[0].parentNode);
629
+ } else {
630
+ $li.insertBefore(this.$lis[index]);
631
+ $panel.insertBefore(this.$panels[index]);
632
+ }
633
+
634
+ o.disabled = $.map(o.disabled,
635
+ function(n, i) { return n >= index ? ++n : n });
636
+
637
+ this.tabify();
638
+
639
+ if (this.$tabs.length == 1) {
640
+ $li.addClass(o.selectedClass);
641
+ $panel.removeClass(o.hideClass);
642
+ var href = $.data(this.$tabs[0], 'load.tabs');
643
+ if (href)
644
+ this.load(index, href);
645
+ }
646
+
647
+ // callback
648
+ this.element.triggerHandler('tabsadd',
649
+ [this.fakeEvent('tabsadd'), this.ui(this.$tabs[index], this.$panels[index])], o.add
650
+ );
651
+ },
652
+ remove: function(index) {
653
+ var o = this.options, $li = this.$lis.eq(index).remove(),
654
+ $panel = this.$panels.eq(index).remove();
655
+
656
+ // If selected tab was removed focus tab to the right or
657
+ // in case the last tab was removed the tab to the left.
658
+ if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
659
+ this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
660
+
661
+ o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
662
+ function(n, i) { return n >= index ? --n : n });
663
+
664
+ this.tabify();
665
+
666
+ // callback
667
+ this.element.triggerHandler('tabsremove',
668
+ [this.fakeEvent('tabsremove'), this.ui($li.find('a')[0], $panel[0])], o.remove
669
+ );
670
+ },
671
+ enable: function(index) {
672
+ var o = this.options;
673
+ if ($.inArray(index, o.disabled) == -1)
674
+ return;
675
+
676
+ var $li = this.$lis.eq(index).removeClass(o.disabledClass);
677
+ if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
678
+ $li.css('display', 'inline-block');
679
+ setTimeout(function() {
680
+ $li.css('display', 'block');
681
+ }, 0);
682
+ }
683
+
684
+ o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
685
+
686
+ // callback
687
+ this.element.triggerHandler('tabsenable',
688
+ [this.fakeEvent('tabsenable'), this.ui(this.$tabs[index], this.$panels[index])], o.enable
689
+ );
690
+
691
+ },
692
+ disable: function(index) {
693
+ var self = this, o = this.options;
694
+ if (index != o.selected) { // cannot disable already selected tab
695
+ this.$lis.eq(index).addClass(o.disabledClass);
696
+
697
+ o.disabled.push(index);
698
+ o.disabled.sort();
699
+
700
+ // callback
701
+ this.element.triggerHandler('tabsdisable',
702
+ [this.fakeEvent('tabsdisable'), this.ui(this.$tabs[index], this.$panels[index])], o.disable
703
+ );
704
+ }
705
+ },
706
+ select: function(index) {
707
+ if (typeof index == 'string')
708
+ index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
709
+ this.$tabs.eq(index).trigger(this.options.event);
710
+ },
711
+ load: function(index, callback) { // callback is for internal usage only
712
+
713
+ var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
714
+ bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');
715
+
716
+ callback = callback || function() {};
717
+
718
+ // no remote or from cache - just finish with callback
719
+ if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
720
+ callback();
721
+ return;
722
+ }
723
+
724
+ // load remote from here on
725
+
726
+ var inner = function(parent) {
727
+ var $parent = $(parent), $inner = $parent.find('*:last');
728
+ return $inner.length && $inner.is(':not(img)') && $inner || $parent;
729
+ };
730
+ var cleanup = function() {
731
+ self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
732
+ .each(function() {
733
+ if (o.spinner)
734
+ inner(this).parent().html(inner(this).data('label.tabs'));
735
+ });
736
+ self.xhr = null;
737
+ };
738
+
739
+ if (o.spinner) {
740
+ var label = inner(a).html();
741
+ inner(a).wrapInner('<em></em>')
742
+ .find('em').data('label.tabs', label).html(o.spinner);
743
+ }
744
+
745
+ var ajaxOptions = $.extend({}, o.ajaxOptions, {
746
+ url: url,
747
+ success: function(r, s) {
748
+ $(a.hash).html(r);
749
+ cleanup();
750
+
751
+ if (o.cache)
752
+ $.data(a, 'cache.tabs', true); // if loaded once do not load them again
753
+
754
+ // callbacks
755
+ $(self.element).triggerHandler('tabsload',
756
+ [self.fakeEvent('tabsload'), self.ui(self.$tabs[index], self.$panels[index])], o.load
757
+ );
758
+ o.ajaxOptions.success && o.ajaxOptions.success(r, s);
759
+
760
+ // This callback is required because the switch has to take
761
+ // place after loading has completed. Call last in order to
762
+ // fire load before show callback...
763
+ callback();
764
+ }
765
+ });
766
+ if (this.xhr) {
767
+ // terminate pending requests from other tabs and restore tab label
768
+ this.xhr.abort();
769
+ cleanup();
770
+ }
771
+ $a.addClass(o.loadingClass);
772
+ setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
773
+ self.xhr = $.ajax(ajaxOptions);
774
+ }, 0);
775
+
776
+ },
777
+ url: function(index, url) {
778
+ this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
779
+ },
780
+ destroy: function() {
781
+ var o = this.options;
782
+ this.element.unbind('.tabs')
783
+ .removeClass(o.navClass).removeData('tabs');
784
+ this.$tabs.each(function() {
785
+ var href = $.data(this, 'href.tabs');
786
+ if (href)
787
+ this.href = href;
788
+ var $this = $(this).unbind('.tabs');
789
+ $.each(['href', 'load', 'cache'], function(i, prefix) {
790
+ $this.removeData(prefix + '.tabs');
791
+ });
792
+ });
793
+ this.$lis.add(this.$panels).each(function() {
794
+ if ($.data(this, 'destroy.tabs'))
795
+ $(this).remove();
796
+ else
797
+ $(this).removeClass([o.selectedClass, o.unselectClass,
798
+ o.disabledClass, o.panelClass, o.hideClass].join(' '));
799
+ });
800
+ },
801
+ fakeEvent: function(type) {
802
+ return $.event.fix({
803
+ type: type,
804
+ target: this.element[0]
805
+ });
806
+ }
807
+ });
808
+
809
+ $.ui.tabs.defaults = {
810
+ // basic setup
811
+ unselect: false,
812
+ event: 'click',
813
+ disabled: [],
814
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
815
+ // TODO history: false,
816
+
817
+ // Ajax
818
+ spinner: 'Loading&#8230;',
819
+ cache: false,
820
+ idPrefix: 'ui-tabs-',
821
+ ajaxOptions: {},
822
+
823
+ // animations
824
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
825
+
826
+ // templates
827
+ tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
828
+ panelTemplate: '<div></div>',
829
+
830
+ // CSS classes
831
+ navClass: 'ui-tabs-nav',
832
+ selectedClass: 'ui-tabs-selected',
833
+ unselectClass: 'ui-tabs-unselect',
834
+ disabledClass: 'ui-tabs-disabled',
835
+ panelClass: 'ui-tabs-panel',
836
+ hideClass: 'ui-tabs-hide',
837
+ loadingClass: 'ui-tabs-loading'
838
+ };
839
+
840
+ $.ui.tabs.getter = "length";
841
+
842
+ /*
843
+ * Tabs Extensions
844
+ */
845
+
846
+ /*
847
+ * Rotate
848
+ */
849
+ $.extend($.ui.tabs.prototype, {
850
+ rotation: null,
851
+ rotate: function(ms, continuing) {
852
+
853
+ continuing = continuing || false;
854
+
855
+ var self = this, t = this.options.selected;
856
+
857
+ function start() {
858
+ self.rotation = setInterval(function() {
859
+ t = ++t < self.$tabs.length ? t : 0;
860
+ self.select(t);
861
+ }, ms);
862
+ }
863
+
864
+ function stop(e) {
865
+ if (!e || e.clientX) { // only in case of a true click
866
+ clearInterval(self.rotation);
867
+ }
868
+ }
869
+
870
+ // start interval
871
+ if (ms) {
872
+ start();
873
+ if (!continuing)
874
+ this.$tabs.bind(this.options.event, stop);
875
+ else
876
+ this.$tabs.bind(this.options.event, function() {
877
+ stop();
878
+ t = self.options.selected;
879
+ start();
880
+ });
881
+ }
882
+ // stop interval
883
+ else {
884
+ stop();
885
+ this.$tabs.unbind(this.options.event, stop);
886
+ }
887
+ }
888
+ });
889
+
890
+ })(jQuery);