iqvoc 3.2.11 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (351) hide show
  1. data/Gemfile +9 -9
  2. data/Gemfile.lock +108 -101
  3. data/{public/images/iqvoc → app/assets/images}/arrow_down.gif +0 -0
  4. data/{public/images/iqvoc → app/assets/images}/arrow_up.gif +0 -0
  5. data/{public/stylesheets/iqvoc → app/assets}/images/back.png +0 -0
  6. data/{public/stylesheets/iqvoc → app/assets}/images/branch.png +0 -0
  7. data/{public/stylesheets/iqvoc → app/assets}/images/categ.png +0 -0
  8. data/{public/stylesheets/iqvoc → app/assets}/images/categ_open.png +0 -0
  9. data/{public/images/iqvoc → app/assets/images}/footer.png +0 -0
  10. data/{public/stylesheets/iqvoc → app/assets}/images/go_there.png +0 -0
  11. data/{public/images/iqvoc → app/assets/images}/header_long.png +0 -0
  12. data/{public/stylesheets/iqvoc → app/assets}/images/iqvoc.png +0 -0
  13. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_end.png +0 -0
  14. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_end_filled.png +0 -0
  15. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_mid.png +0 -0
  16. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_mid_filled.png +0 -0
  17. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_nothing.png +0 -0
  18. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_only.png +0 -0
  19. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_only_filled.png +0 -0
  20. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_top.png +0 -0
  21. data/{public/stylesheets/iqvoc → app/assets}/images/leaf_top_filled.png +0 -0
  22. data/{public/stylesheets/iqvoc → app/assets}/images/nothing.png +0 -0
  23. data/{public/images/iqvoc → app/assets/images}/ok.png +0 -0
  24. data/{public/images/iqvoc → app/assets/images}/rdf_flyer.gif +0 -0
  25. data/{public/images/iqvoc → app/assets/images}/red_arrow.png +0 -0
  26. data/{public/images/iqvoc → app/assets/images}/shadow.png +0 -0
  27. data/{public/images/iqvoc → app/assets/images}/spinner.gif +0 -0
  28. data/{public/images/iqvoc → app/assets/images}/tokenizer_delete.png +0 -0
  29. data/{public/images/iqvoc → app/assets/images}/tokenizer_pencile.png +0 -0
  30. data/{public/images/iqvoc → app/assets/images}/tokenizer_show.png +0 -0
  31. data/{public/stylesheets/iqvoc → app/assets}/images/top_01.png +0 -0
  32. data/{public/stylesheets/iqvoc → app/assets}/images/trunk.png +0 -0
  33. data/{public/images/iqvoc → app/assets/images}/unfinished.png +0 -0
  34. data/app/assets/javascripts/framework.js +7 -0
  35. data/{public/javascripts/iqvoc/entityselect.js → app/assets/javascripts/iqvoc/entityselect.js.erb} +1 -1
  36. data/{public/javascripts/iqvoc/application.js → app/assets/javascripts/iqvoc/iqvoc.js} +118 -1
  37. data/{public → app/assets}/javascripts/iqvoc/langselect.js +0 -0
  38. data/app/assets/javascripts/iqvoc/manifest.js +3 -0
  39. data/{public → app/assets}/javascripts/iqvoc/visualization.js +0 -0
  40. data/app/assets/javascripts/manifest.js +2 -0
  41. data/app/assets/stylesheets/framework.css +4 -0
  42. data/{public/stylesheets/iqvoc/forms.css → app/assets/stylesheets/iqvoc/forms.css.erb} +1 -1
  43. data/app/assets/stylesheets/iqvoc/ie_fixes.css +6 -0
  44. data/{public/stylesheets/iqvoc/iqvoc.css → app/assets/stylesheets/iqvoc/iqvoc.css.erb} +3 -3
  45. data/app/assets/stylesheets/iqvoc/manifest.css +5 -0
  46. data/{public → app/assets}/stylesheets/iqvoc/widgets.css +0 -0
  47. data/app/assets/stylesheets/manifest.css +4 -0
  48. data/app/controllers/collections_controller.rb +10 -4
  49. data/app/controllers/concepts/alphabetical_controller.rb +1 -2
  50. data/app/controllers/concepts/hierarchical_controller.rb +1 -1
  51. data/app/controllers/concepts_controller.rb +7 -6
  52. data/app/helpers/concepts_helper.rb +0 -1
  53. data/app/helpers/dashboard_helper.rb +2 -2
  54. data/app/models/concept/base.rb +6 -7
  55. data/app/models/concept/relation/base.rb +1 -1
  56. data/app/models/labeling/base.rb +1 -1
  57. data/app/models/labeling/skos/base.rb +5 -10
  58. data/app/models/match/base.rb +1 -1
  59. data/app/models/note/base.rb +1 -1
  60. data/app/models/user.rb +1 -0
  61. data/app/views/concepts/_visualization.html.erb +2 -2
  62. data/app/views/concepts/index.iqrdf +6 -2
  63. data/app/views/layouts/application.html.erb +7 -27
  64. data/app/views/partials/_rdf_logo.html.erb +1 -2
  65. data/config/application.rb +12 -3
  66. data/config/database.yml +21 -13
  67. data/config/engine.rb +6 -5
  68. data/config/environments/development.rb +45 -37
  69. data/config/environments/production.rb +45 -34
  70. data/config/environments/test.rb +43 -34
  71. data/config/initializers/iqvoc.rb +4 -8
  72. data/config/initializers/secret_token.rb +30 -0
  73. data/config/initializers/session_store.rb +1 -1
  74. data/config/locales/activerecord.de.yml +85 -111
  75. data/config/locales/activerecord.en.yml +85 -111
  76. data/db/iqvoc_test.sqlite3 +0 -0
  77. data/db/schema.rb +67 -153
  78. data/iqvoc.gemspec +3 -1
  79. data/lib/iqvoc/deep_cloning.rb +5 -5
  80. data/lib/iqvoc/version.rb +1 -1
  81. data/lib/iqvoc/versioning.rb +1 -1
  82. data/lib/iqvoc.rb +0 -6
  83. metadata +103 -369
  84. checksums.yaml +0 -7
  85. data/public/export/104047454295817920610168807659129435311.nt +0 -28
  86. data/public/export/10726.nt +0 -28
  87. data/public/export/10751365034669120987598940220863369604.nt +0 -28
  88. data/public/export/111691466774189666307584118743393932328.nt +0 -28
  89. data/public/export/12325399400132639231204595208154762660.nt +0 -28
  90. data/public/export/15263706163704853684442315777380853572.nt +0 -28
  91. data/public/export/15327.nt +0 -28
  92. data/public/export/15666.nt +0 -28
  93. data/public/export/173626129450223321263719262149444213847.nt +0 -28
  94. data/public/export/18948.nt +0 -28
  95. data/public/export/199578749544886032300136278910417855540.nt +0 -28
  96. data/public/export/213890660005255527251394676521741138403.nt +0 -28
  97. data/public/export/21930.nt +0 -28
  98. data/public/export/24509.nt +0 -28
  99. data/public/export/249458227092013520089223290936103182178.nt +0 -28
  100. data/public/export/271163890329327117562409702966294853312.nt +0 -28
  101. data/public/export/27484.nt +0 -28
  102. data/public/export/287251617830426667971006908766107175810.nt +0 -28
  103. data/public/export/28754.nt +0 -28
  104. data/public/export/29022.nt +0 -28
  105. data/public/export/293720064238755056739270868818770835353.nt +0 -28
  106. data/public/export/29976.nt +0 -28
  107. data/public/export/30643.nt +0 -28
  108. data/public/export/309135899928267675232062298368405782595.nt +0 -28
  109. data/public/export/32054.nt +0 -28
  110. data/public/export/327890543532187929176278243423558506722.nt +0 -28
  111. data/public/export/33055.nt +0 -28
  112. data/public/export/337748600310244218106909976567220577473.nt +0 -28
  113. data/public/export/33936.nt +0 -28
  114. data/public/export/33993.nt +0 -28
  115. data/public/export/34906.nt +0 -28
  116. data/public/export/35365.nt +0 -28
  117. data/public/export/37098.nt +0 -28
  118. data/public/export/37534146541112437090211766955764945845.nt +0 -28
  119. data/public/export/39353594202090916952403280275602550330.nt +0 -28
  120. data/public/export/41272.nt +0 -28
  121. data/public/export/42271.nt +0 -28
  122. data/public/export/44392.nt +0 -28
  123. data/public/export/45675.nt +0 -28
  124. data/public/export/47529.nt +0 -28
  125. data/public/export/48309.nt +0 -28
  126. data/public/export/4956.nt +0 -28
  127. data/public/export/49623.nt +0 -28
  128. data/public/export/50516.nt +0 -28
  129. data/public/export/54880.nt +0 -28
  130. data/public/export/55142.nt +0 -28
  131. data/public/export/55398.nt +0 -28
  132. data/public/export/5754.nt +0 -28
  133. data/public/export/57727.nt +0 -28
  134. data/public/export/58069939020968861674794480549301466954.nt +0 -28
  135. data/public/export/5890.nt +0 -28
  136. data/public/export/62809.nt +0 -28
  137. data/public/export/65156.nt +0 -28
  138. data/public/export/6520.nt +0 -28
  139. data/public/export/863.nt +0 -28
  140. data/public/export/9372.nt +0 -28
  141. data/public/javascripts/iqvoc/excanvas.js +0 -35
  142. data/public/javascripts/iqvoc/iqvoc.js +0 -118
  143. data/public/javascripts/iqvoc/jit_rgraph.js +0 -153
  144. data/public/javascripts/iqvoc/jquery-1.6.2.min.js +0 -18
  145. data/public/javascripts/iqvoc/jquery-treeview/changelog.txt +0 -29
  146. data/public/javascripts/iqvoc/jquery-treeview/demo/async.html +0 -44
  147. data/public/javascripts/iqvoc/jquery-treeview/demo/bg.gif +0 -0
  148. data/public/javascripts/iqvoc/jquery-treeview/demo/demo.js +0 -43
  149. data/public/javascripts/iqvoc/jquery-treeview/demo/images.html +0 -56
  150. data/public/javascripts/iqvoc/jquery-treeview/demo/index.html +0 -340
  151. data/public/javascripts/iqvoc/jquery-treeview/demo/large.html +0 -559
  152. data/public/javascripts/iqvoc/jquery-treeview/demo/prerendered.html +0 -621
  153. data/public/javascripts/iqvoc/jquery-treeview/demo/screen.css +0 -24
  154. data/public/javascripts/iqvoc/jquery-treeview/demo/simple.html +0 -82
  155. data/public/javascripts/iqvoc/jquery-treeview/demo/source.php +0 -87
  156. data/public/javascripts/iqvoc/jquery-treeview/demo/source.phps +0 -87
  157. data/public/javascripts/iqvoc/jquery-treeview/images/ajax-loader.gif +0 -0
  158. data/public/javascripts/iqvoc/jquery-treeview/images/file.gif +0 -0
  159. data/public/javascripts/iqvoc/jquery-treeview/images/folder-closed.gif +0 -0
  160. data/public/javascripts/iqvoc/jquery-treeview/images/folder.gif +0 -0
  161. data/public/javascripts/iqvoc/jquery-treeview/images/minus.gif +0 -0
  162. data/public/javascripts/iqvoc/jquery-treeview/images/plus.gif +0 -0
  163. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black-line.gif +0 -0
  164. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-black.gif +0 -0
  165. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default-line.gif +0 -0
  166. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-default.gif +0 -0
  167. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam-line.gif +0 -0
  168. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-famfamfam.gif +0 -0
  169. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray-line.gif +0 -0
  170. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-gray.gif +0 -0
  171. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red-line.gif +0 -0
  172. data/public/javascripts/iqvoc/jquery-treeview/images/treeview-red.gif +0 -0
  173. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.async.js +0 -82
  174. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.css +0 -75
  175. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.js +0 -251
  176. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.min.js +0 -15
  177. data/public/javascripts/iqvoc/jquery-treeview/jquery.treeview.pack.js +0 -16
  178. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.cookie.js +0 -92
  179. data/public/javascripts/iqvoc/jquery-treeview/lib/jquery.js +0 -3363
  180. data/public/javascripts/iqvoc/jquery-treeview/todo +0 -8
  181. data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.js +0 -3269
  182. data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.min.js +0 -165
  183. data/public/javascripts/iqvoc/jquery-ui.datepicker-de.js +0 -22
  184. data/public/javascripts/iqvoc/json2.js +0 -480
  185. data/public/javascripts/iqvoc/rails.js +0 -132
  186. data/public/javascripts/iqvoc/storage.js +0 -122
  187. data/public/stylesheets/iqvoc/blueprint/ie.css +0 -35
  188. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/cross.png +0 -0
  189. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/key.png +0 -0
  190. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/icons/tick.png +0 -0
  191. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/readme.txt +0 -32
  192. data/public/stylesheets/iqvoc/blueprint/plugins/buttons/screen.css +0 -97
  193. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/readme.txt +0 -14
  194. data/public/stylesheets/iqvoc/blueprint/plugins/fancy-type/screen.css +0 -71
  195. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/doc.png +0 -0
  196. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/email.png +0 -0
  197. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/external.png +0 -0
  198. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/feed.png +0 -0
  199. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/im.png +0 -0
  200. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  201. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/visited.png +0 -0
  202. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/icons/xls.png +0 -0
  203. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/readme.txt +0 -18
  204. data/public/stylesheets/iqvoc/blueprint/plugins/link-icons/screen.css +0 -40
  205. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/readme.txt +0 -10
  206. data/public/stylesheets/iqvoc/blueprint/plugins/rtl/screen.css +0 -110
  207. data/public/stylesheets/iqvoc/blueprint/print.css +0 -29
  208. data/public/stylesheets/iqvoc/blueprint/screen.css +0 -258
  209. data/public/stylesheets/iqvoc/blueprint/src/forms.css +0 -65
  210. data/public/stylesheets/iqvoc/blueprint/src/grid.css +0 -280
  211. data/public/stylesheets/iqvoc/blueprint/src/grid.png +0 -0
  212. data/public/stylesheets/iqvoc/blueprint/src/ie.css +0 -76
  213. data/public/stylesheets/iqvoc/blueprint/src/print.css +0 -85
  214. data/public/stylesheets/iqvoc/blueprint/src/reset.css +0 -45
  215. data/public/stylesheets/iqvoc/blueprint/src/typography.css +0 -106
  216. data/public/stylesheets/iqvoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  217. data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  218. data/public/stylesheets/iqvoc/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  219. data/public/stylesheets/iqvoc/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  220. data/public/stylesheets/iqvoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  221. data/public/stylesheets/iqvoc/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  222. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  223. data/public/stylesheets/iqvoc/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  224. data/public/stylesheets/iqvoc/images/ui-icons_217bc0_256x240.png +0 -0
  225. data/public/stylesheets/iqvoc/images/ui-icons_2e83ff_256x240.png +0 -0
  226. data/public/stylesheets/iqvoc/images/ui-icons_469bdd_256x240.png +0 -0
  227. data/public/stylesheets/iqvoc/images/ui-icons_6da8d5_256x240.png +0 -0
  228. data/public/stylesheets/iqvoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  229. data/public/stylesheets/iqvoc/images/ui-icons_d8e7f3_256x240.png +0 -0
  230. data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
  231. data/public/stylesheets/iqvoc/jquery-ui-1.8.16.custom.css +0 -410
  232. data/public/uploads/import/038dd516e01fe211375441c3af8d90e8.nt +0 -259
  233. data/public/uploads/import/07e71ca0235e798be39acd246114d962.nt +0 -259
  234. data/public/uploads/import/0a4c173bc9db7a5cd469c9454fdfa749.nt +0 -259
  235. data/public/uploads/import/0e8336cb2ef2c8b67767dfe8879d9cfb.nt +0 -259
  236. data/public/uploads/import/0f4eb8cd6390b1c5c5354a22e533ee0e.nt +0 -259
  237. data/public/uploads/import/105400714d68d2207209e23826345e76.nt +0 -259
  238. data/public/uploads/import/1147ab054ce55abf0a5bf93b99220231.nt +0 -259
  239. data/public/uploads/import/14b64b1f2252aba1e89d83f770d14e29.nt +0 -259
  240. data/public/uploads/import/1c6f11c300224248bf919885f8545daf.nt +0 -259
  241. data/public/uploads/import/21d34b65ef0a8156111e845992fd004f.nt +0 -259
  242. data/public/uploads/import/2783fade523132942999836a74228d64.nt +0 -259
  243. data/public/uploads/import/2bc90e07e5c42e5f26a1607756cc0ab3.nt +0 -259
  244. data/public/uploads/import/2e4073a94eeae98095de9f43b5e5774a.nt +0 -259
  245. data/public/uploads/import/32548678e7d47b3e256590d6eef6fb03.nt +0 -259
  246. data/public/uploads/import/330e08c32fde94fb80f656346d1f8383.nt +0 -259
  247. data/public/uploads/import/337790be2663214e66066b1215fdd137.nt +0 -259
  248. data/public/uploads/import/34b77ff970ca71511fb4b224b7dadd1c.nt +0 -259
  249. data/public/uploads/import/38de0d3c9cba92e8a3c312e7e95e7ec1.nt +0 -259
  250. data/public/uploads/import/3981aa91cf22e26fbf6b1312b2bcdcc8.nt +0 -259
  251. data/public/uploads/import/3d01f84539a62ebe6f76124e8cdbbb23.nt +0 -259
  252. data/public/uploads/import/3d05bb72c3751da3830cf53e966283d4.nt +0 -259
  253. data/public/uploads/import/3e1d2f770bfe3c79a367780731536a3a.nt +0 -259
  254. data/public/uploads/import/3e41bd1875dc23401278c73bd12be881.nt +0 -259
  255. data/public/uploads/import/3f3e3dbb09c3df6bfaed261311de3e7d.nt +0 -259
  256. data/public/uploads/import/4297d9970e47be5ced4991a083032eb9.nt +0 -259
  257. data/public/uploads/import/5925186958bd537ad5e79e76e3a1f714.nt +0 -259
  258. data/public/uploads/import/5dc5dcd978db1c59ec074e9137f0109c.nt +0 -259
  259. data/public/uploads/import/5e46663e7e2eb92e5e8846d7c0f8e713.nt +0 -259
  260. data/public/uploads/import/70022a2a7e808000dc3d55529d203480.nt +0 -259
  261. data/public/uploads/import/70b32583acaca5843ac7dbdc2a89de99.nt +0 -259
  262. data/public/uploads/import/8030e54313e2c7231c4c30cd4145d576.nt +0 -259
  263. data/public/uploads/import/8bb6484a9eb0c3266274c08ad8500669.nt +0 -259
  264. data/public/uploads/import/90711ea002f6b7b4e5476e414e185603.nt +0 -259
  265. data/public/uploads/import/918a5fc2c8fcdbaddc2a02588d599dcf.nt +0 -259
  266. data/public/uploads/import/923f9ebccb7b0e9e9fafddc60750b989.nt +0 -259
  267. data/public/uploads/import/933e4e2baee4d91b8f7681fa4d2ad9fa.nt +0 -259
  268. data/public/uploads/import/93f642eacd966c98645345d2ccdf578d.nt +0 -259
  269. data/public/uploads/import/9a3d0f8d1872d4ba5dd281194ddea4a2.nt +0 -259
  270. data/public/uploads/import/9a3f1c9de8e734b7e1d969d07ea57a83.nt +0 -259
  271. data/public/uploads/import/9f91263fee5275ecbf303c7da0a9e84d.nt +0 -259
  272. data/public/uploads/import/9f9d6b4293be8def1b406156a3e2bcd9.nt +0 -259
  273. data/public/uploads/import/a230b36c3666a6b16fec6283e99b221f.nt +0 -259
  274. data/public/uploads/import/a51b35089dc096f0f1f5d5250edb8d5c.nt +0 -259
  275. data/public/uploads/import/a5265a00946627588ecdac317c061c6c.nt +0 -259
  276. data/public/uploads/import/a95b7d93b7483116ff13c894a46b5c1c.nt +0 -259
  277. data/public/uploads/import/b5e47ea582afb81341f7b7084cc17a06.nt +0 -259
  278. data/public/uploads/import/b826bcfad8f18294a425d65482c46033.nt +0 -259
  279. data/public/uploads/import/bcf18c9e4dbe72745f4ec2878a4b1690.nt +0 -259
  280. data/public/uploads/import/c32855cb4b3e8616db2ef3f5f9cb5ca7.nt +0 -259
  281. data/public/uploads/import/c8ee5bc696312468c4354bad6c583321.nt +0 -259
  282. data/public/uploads/import/cfc73574fe398be7ce684fbc17aa1bb7.nt +0 -259
  283. data/public/uploads/import/d2366992f6e9e4377d02fc691fc2d3d3.nt +0 -259
  284. data/public/uploads/import/dc14a0fa30c105a5770da2c960daaf29.nt +0 -259
  285. data/public/uploads/import/e9289f6f920cf44d0e81599410b39090.nt +0 -259
  286. data/public/uploads/import/ed1c212d4f320e414caacda7a7988f83.nt +0 -259
  287. data/public/uploads/import/ed460af60bf4d0884d37a86bb02411e7.nt +0 -259
  288. data/public/uploads/import/f17024adf37be768041307528e848bd6.nt +0 -259
  289. data/public/uploads/import/f2f6025f6de90ee4609c2928a817c51d.nt +0 -259
  290. data/public/uploads/import/f427507b1c208ddf69204ea5414e5d18.nt +0 -259
  291. data/public/uploads/import/ffce91887b3ac5b7319a80926ff310ef.nt +0 -259
  292. data/public/uploads/tmp/1417625624-7926-3861/hobbies.nt +0 -259
  293. data/public/uploads/tmp/1417625658-7975-5171/hobbies.nt +0 -259
  294. data/public/uploads/tmp/1418649743-7886-1510/hobbies.nt +0 -259
  295. data/public/uploads/tmp/1418653029-9019-1572/hobbies.nt +0 -259
  296. data/public/uploads/tmp/1418656093-9614-5971/hobbies.nt +0 -259
  297. data/public/uploads/tmp/1418659992-10218-8665/hobbies.nt +0 -259
  298. data/public/uploads/tmp/1418664440-11199-8740/hobbies.nt +0 -259
  299. data/public/uploads/tmp/1418665022-11430-9919/hobbies.nt +0 -259
  300. data/public/uploads/tmp/1418665225-11485-5805/hobbies.nt +0 -259
  301. data/public/uploads/tmp/1418665744-11777-4958/hobbies.nt +0 -259
  302. data/public/uploads/tmp/1418666103-11837-9818/hobbies.nt +0 -259
  303. data/public/uploads/tmp/1418666157-11880-9002/hobbies.nt +0 -259
  304. data/public/uploads/tmp/1418666292-11920-9076/hobbies.nt +0 -259
  305. data/public/uploads/tmp/1418666482-11968-5799/hobbies.nt +0 -259
  306. data/public/uploads/tmp/1418666589-12006-6137/hobbies.nt +0 -259
  307. data/public/uploads/tmp/1419417707-62741-8601/hobbies.nt +0 -259
  308. data/public/uploads/tmp/1419418501-62977-9798/hobbies.nt +0 -259
  309. data/public/uploads/tmp/1419419091-63178-5200/hobbies.nt +0 -259
  310. data/public/uploads/tmp/1419845421-37940-7338/hobbies.nt +0 -259
  311. data/public/uploads/tmp/1419872019-93309-7785/hobbies.nt +0 -259
  312. data/public/uploads/tmp/1419872459-93489-7475/hobbies.nt +0 -259
  313. data/public/uploads/tmp/1420204292-55473-2339/hobbies.nt +0 -259
  314. data/public/uploads/tmp/1420469113-94913-1977/hobbies.nt +0 -259
  315. data/public/uploads/tmp/1420469218-94957-7818/hobbies.nt +0 -259
  316. data/public/uploads/tmp/1420471310-95437-1840/hobbies.nt +0 -259
  317. data/public/uploads/tmp/1420475764-97681-5693/hobbies.nt +0 -259
  318. data/public/uploads/tmp/1420475937-97729-2119/hobbies.nt +0 -259
  319. data/public/uploads/tmp/1420476857-98058-7891/hobbies.nt +0 -259
  320. data/public/uploads/tmp/1420535851-99018-0174/hobbies.nt +0 -259
  321. data/public/uploads/tmp/1420536204-1785-0172/hobbies.nt +0 -259
  322. data/public/uploads/tmp/1420551687-4559-4581/hobbies.nt +0 -259
  323. data/public/uploads/tmp/1420553228-5060-8398/hobbies.nt +0 -259
  324. data/public/uploads/tmp/1420554138-5330-1218/hobbies.nt +0 -259
  325. data/public/uploads/tmp/1420623682-11549-0730/hobbies.nt +0 -259
  326. data/public/uploads/tmp/1420627830-12489-1669/hobbies.nt +0 -259
  327. data/public/uploads/tmp/1420643849-18200-3932/hobbies.nt +0 -259
  328. data/public/uploads/tmp/1420649772-21728-5542/hobbies.nt +0 -259
  329. data/public/uploads/tmp/1420708117-27095-8292/hobbies.nt +0 -259
  330. data/public/uploads/tmp/1420708387-27223-6774/hobbies.nt +0 -259
  331. data/public/uploads/tmp/1420708470-27267-7475/hobbies.nt +0 -259
  332. data/public/uploads/tmp/1420708517-27294-4695/hobbies.nt +0 -259
  333. data/public/uploads/tmp/1420708539-27319-1354/hobbies.nt +0 -259
  334. data/public/uploads/tmp/1420708586-27334-3786/hobbies.nt +0 -259
  335. data/public/uploads/tmp/1420708992-27418-8019/hobbies.nt +0 -259
  336. data/public/uploads/tmp/1420709221-27495-1252/hobbies.nt +0 -259
  337. data/public/uploads/tmp/1420709888-27667-9904/hobbies.nt +0 -259
  338. data/public/uploads/tmp/1420710092-27729-5735/hobbies.nt +0 -259
  339. data/public/uploads/tmp/1420710448-27814-7190/hobbies.nt +0 -259
  340. data/public/uploads/tmp/1420710886-27909-4558/hobbies.nt +0 -259
  341. data/public/uploads/tmp/1420711474-28046-6914/hobbies.nt +0 -259
  342. data/public/uploads/tmp/1420711601-28081-0714/hobbies.nt +0 -259
  343. data/public/uploads/tmp/1420711904-28153-8591/hobbies.nt +0 -259
  344. data/public/uploads/tmp/1420712160-28240-2054/hobbies.nt +0 -259
  345. data/public/uploads/tmp/1420712349-28303-3685/hobbies.nt +0 -259
  346. data/public/uploads/tmp/1420712756-28475-0893/hobbies.nt +0 -259
  347. data/public/uploads/tmp/1420712995-28567-4743/hobbies.nt +0 -259
  348. data/public/uploads/tmp/1420722946-31448-5312/hobbies.nt +0 -259
  349. data/public/uploads/tmp/1420723021-31498-6069/hobbies.nt +0 -259
  350. data/public/uploads/tmp/1420723172-31541-4390/hobbies.nt +0 -259
  351. data/public/uploads/tmp/1420723249-31574-6508/hobbies.nt +0 -259
@@ -1,480 +0,0 @@
1
- /*
2
- http://www.JSON.org/json2.js
3
- 2011-02-23
4
-
5
- Public Domain.
6
-
7
- NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8
-
9
- See http://www.JSON.org/js.html
10
-
11
-
12
- This code should be minified before deployment.
13
- See http://javascript.crockford.com/jsmin.html
14
-
15
- USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
16
- NOT CONTROL.
17
-
18
-
19
- This file creates a global JSON object containing two methods: stringify
20
- and parse.
21
-
22
- JSON.stringify(value, replacer, space)
23
- value any JavaScript value, usually an object or array.
24
-
25
- replacer an optional parameter that determines how object
26
- values are stringified for objects. It can be a
27
- function or an array of strings.
28
-
29
- space an optional parameter that specifies the indentation
30
- of nested structures. If it is omitted, the text will
31
- be packed without extra whitespace. If it is a number,
32
- it will specify the number of spaces to indent at each
33
- level. If it is a string (such as '\t' or ' '),
34
- it contains the characters used to indent at each level.
35
-
36
- This method produces a JSON text from a JavaScript value.
37
-
38
- When an object value is found, if the object contains a toJSON
39
- method, its toJSON method will be called and the result will be
40
- stringified. A toJSON method does not serialize: it returns the
41
- value represented by the name/value pair that should be serialized,
42
- or undefined if nothing should be serialized. The toJSON method
43
- will be passed the key associated with the value, and this will be
44
- bound to the value
45
-
46
- For example, this would serialize Dates as ISO strings.
47
-
48
- Date.prototype.toJSON = function (key) {
49
- function f(n) {
50
- // Format integers to have at least two digits.
51
- return n < 10 ? '0' + n : n;
52
- }
53
-
54
- return this.getUTCFullYear() + '-' +
55
- f(this.getUTCMonth() + 1) + '-' +
56
- f(this.getUTCDate()) + 'T' +
57
- f(this.getUTCHours()) + ':' +
58
- f(this.getUTCMinutes()) + ':' +
59
- f(this.getUTCSeconds()) + 'Z';
60
- };
61
-
62
- You can provide an optional replacer method. It will be passed the
63
- key and value of each member, with this bound to the containing
64
- object. The value that is returned from your method will be
65
- serialized. If your method returns undefined, then the member will
66
- be excluded from the serialization.
67
-
68
- If the replacer parameter is an array of strings, then it will be
69
- used to select the members to be serialized. It filters the results
70
- such that only members with keys listed in the replacer array are
71
- stringified.
72
-
73
- Values that do not have JSON representations, such as undefined or
74
- functions, will not be serialized. Such values in objects will be
75
- dropped; in arrays they will be replaced with null. You can use
76
- a replacer function to replace those with JSON values.
77
- JSON.stringify(undefined) returns undefined.
78
-
79
- The optional space parameter produces a stringification of the
80
- value that is filled with line breaks and indentation to make it
81
- easier to read.
82
-
83
- If the space parameter is a non-empty string, then that string will
84
- be used for indentation. If the space parameter is a number, then
85
- the indentation will be that many spaces.
86
-
87
- Example:
88
-
89
- text = JSON.stringify(['e', {pluribus: 'unum'}]);
90
- // text is '["e",{"pluribus":"unum"}]'
91
-
92
-
93
- text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
94
- // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
95
-
96
- text = JSON.stringify([new Date()], function (key, value) {
97
- return this[key] instanceof Date ?
98
- 'Date(' + this[key] + ')' : value;
99
- });
100
- // text is '["Date(---current time---)"]'
101
-
102
-
103
- JSON.parse(text, reviver)
104
- This method parses a JSON text to produce an object or array.
105
- It can throw a SyntaxError exception.
106
-
107
- The optional reviver parameter is a function that can filter and
108
- transform the results. It receives each of the keys and values,
109
- and its return value is used instead of the original value.
110
- If it returns what it received, then the structure is not modified.
111
- If it returns undefined then the member is deleted.
112
-
113
- Example:
114
-
115
- // Parse the text. Values that look like ISO date strings will
116
- // be converted to Date objects.
117
-
118
- myData = JSON.parse(text, function (key, value) {
119
- var a;
120
- if (typeof value === 'string') {
121
- a =
122
- /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
123
- if (a) {
124
- return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
125
- +a[5], +a[6]));
126
- }
127
- }
128
- return value;
129
- });
130
-
131
- myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
132
- var d;
133
- if (typeof value === 'string' &&
134
- value.slice(0, 5) === 'Date(' &&
135
- value.slice(-1) === ')') {
136
- d = new Date(value.slice(5, -1));
137
- if (d) {
138
- return d;
139
- }
140
- }
141
- return value;
142
- });
143
-
144
-
145
- This is a reference implementation. You are free to copy, modify, or
146
- redistribute.
147
- */
148
-
149
- /*jslint evil: true, strict: false, regexp: false */
150
-
151
- /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
152
- call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
153
- getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
154
- lastIndex, length, parse, prototype, push, replace, slice, stringify,
155
- test, toJSON, toString, valueOf
156
- */
157
-
158
-
159
- // Create a JSON object only if one does not already exist. We create the
160
- // methods in a closure to avoid creating global variables.
161
-
162
- var JSON;
163
- if (!JSON) {
164
- JSON = {};
165
- }
166
-
167
- (function () {
168
- "use strict";
169
-
170
- function f(n) {
171
- // Format integers to have at least two digits.
172
- return n < 10 ? '0' + n : n;
173
- }
174
-
175
- if (typeof Date.prototype.toJSON !== 'function') {
176
-
177
- Date.prototype.toJSON = function (key) {
178
-
179
- return isFinite(this.valueOf()) ?
180
- this.getUTCFullYear() + '-' +
181
- f(this.getUTCMonth() + 1) + '-' +
182
- f(this.getUTCDate()) + 'T' +
183
- f(this.getUTCHours()) + ':' +
184
- f(this.getUTCMinutes()) + ':' +
185
- f(this.getUTCSeconds()) + 'Z' : null;
186
- };
187
-
188
- String.prototype.toJSON =
189
- Number.prototype.toJSON =
190
- Boolean.prototype.toJSON = function (key) {
191
- return this.valueOf();
192
- };
193
- }
194
-
195
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
196
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
197
- gap,
198
- indent,
199
- meta = { // table of character substitutions
200
- '\b': '\\b',
201
- '\t': '\\t',
202
- '\n': '\\n',
203
- '\f': '\\f',
204
- '\r': '\\r',
205
- '"' : '\\"',
206
- '\\': '\\\\'
207
- },
208
- rep;
209
-
210
-
211
- function quote(string) {
212
-
213
- // If the string contains no control characters, no quote characters, and no
214
- // backslash characters, then we can safely slap some quotes around it.
215
- // Otherwise we must also replace the offending characters with safe escape
216
- // sequences.
217
-
218
- escapable.lastIndex = 0;
219
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
220
- var c = meta[a];
221
- return typeof c === 'string' ? c :
222
- '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
223
- }) + '"' : '"' + string + '"';
224
- }
225
-
226
-
227
- function str(key, holder) {
228
-
229
- // Produce a string from holder[key].
230
-
231
- var i, // The loop counter.
232
- k, // The member key.
233
- v, // The member value.
234
- length,
235
- mind = gap,
236
- partial,
237
- value = holder[key];
238
-
239
- // If the value has a toJSON method, call it to obtain a replacement value.
240
-
241
- if (value && typeof value === 'object' &&
242
- typeof value.toJSON === 'function') {
243
- value = value.toJSON(key);
244
- }
245
-
246
- // If we were called with a replacer function, then call the replacer to
247
- // obtain a replacement value.
248
-
249
- if (typeof rep === 'function') {
250
- value = rep.call(holder, key, value);
251
- }
252
-
253
- // What happens next depends on the value's type.
254
-
255
- switch (typeof value) {
256
- case 'string':
257
- return quote(value);
258
-
259
- case 'number':
260
-
261
- // JSON numbers must be finite. Encode non-finite numbers as null.
262
-
263
- return isFinite(value) ? String(value) : 'null';
264
-
265
- case 'boolean':
266
- case 'null':
267
-
268
- // If the value is a boolean or null, convert it to a string. Note:
269
- // typeof null does not produce 'null'. The case is included here in
270
- // the remote chance that this gets fixed someday.
271
-
272
- return String(value);
273
-
274
- // If the type is 'object', we might be dealing with an object or an array or
275
- // null.
276
-
277
- case 'object':
278
-
279
- // Due to a specification blunder in ECMAScript, typeof null is 'object',
280
- // so watch out for that case.
281
-
282
- if (!value) {
283
- return 'null';
284
- }
285
-
286
- // Make an array to hold the partial results of stringifying this object value.
287
-
288
- gap += indent;
289
- partial = [];
290
-
291
- // Is the value an array?
292
-
293
- if (Object.prototype.toString.apply(value) === '[object Array]') {
294
-
295
- // The value is an array. Stringify every element. Use null as a placeholder
296
- // for non-JSON values.
297
-
298
- length = value.length;
299
- for (i = 0; i < length; i += 1) {
300
- partial[i] = str(i, value) || 'null';
301
- }
302
-
303
- // Join all of the elements together, separated with commas, and wrap them in
304
- // brackets.
305
-
306
- v = partial.length === 0 ? '[]' : gap ?
307
- '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
308
- '[' + partial.join(',') + ']';
309
- gap = mind;
310
- return v;
311
- }
312
-
313
- // If the replacer is an array, use it to select the members to be stringified.
314
-
315
- if (rep && typeof rep === 'object') {
316
- length = rep.length;
317
- for (i = 0; i < length; i += 1) {
318
- if (typeof rep[i] === 'string') {
319
- k = rep[i];
320
- v = str(k, value);
321
- if (v) {
322
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
323
- }
324
- }
325
- }
326
- } else {
327
-
328
- // Otherwise, iterate through all of the keys in the object.
329
-
330
- for (k in value) {
331
- if (Object.prototype.hasOwnProperty.call(value, k)) {
332
- v = str(k, value);
333
- if (v) {
334
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
335
- }
336
- }
337
- }
338
- }
339
-
340
- // Join all of the member texts together, separated with commas,
341
- // and wrap them in braces.
342
-
343
- v = partial.length === 0 ? '{}' : gap ?
344
- '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
345
- '{' + partial.join(',') + '}';
346
- gap = mind;
347
- return v;
348
- }
349
- }
350
-
351
- // If the JSON object does not yet have a stringify method, give it one.
352
-
353
- if (typeof JSON.stringify !== 'function') {
354
- JSON.stringify = function (value, replacer, space) {
355
-
356
- // The stringify method takes a value and an optional replacer, and an optional
357
- // space parameter, and returns a JSON text. The replacer can be a function
358
- // that can replace values, or an array of strings that will select the keys.
359
- // A default replacer method can be provided. Use of the space parameter can
360
- // produce text that is more easily readable.
361
-
362
- var i;
363
- gap = '';
364
- indent = '';
365
-
366
- // If the space parameter is a number, make an indent string containing that
367
- // many spaces.
368
-
369
- if (typeof space === 'number') {
370
- for (i = 0; i < space; i += 1) {
371
- indent += ' ';
372
- }
373
-
374
- // If the space parameter is a string, it will be used as the indent string.
375
-
376
- } else if (typeof space === 'string') {
377
- indent = space;
378
- }
379
-
380
- // If there is a replacer, it must be a function or an array.
381
- // Otherwise, throw an error.
382
-
383
- rep = replacer;
384
- if (replacer && typeof replacer !== 'function' &&
385
- (typeof replacer !== 'object' ||
386
- typeof replacer.length !== 'number')) {
387
- throw new Error('JSON.stringify');
388
- }
389
-
390
- // Make a fake root object containing our value under the key of ''.
391
- // Return the result of stringifying the value.
392
-
393
- return str('', {'': value});
394
- };
395
- }
396
-
397
-
398
- // If the JSON object does not yet have a parse method, give it one.
399
-
400
- if (typeof JSON.parse !== 'function') {
401
- JSON.parse = function (text, reviver) {
402
-
403
- // The parse method takes a text and an optional reviver function, and returns
404
- // a JavaScript value if the text is a valid JSON text.
405
-
406
- var j;
407
-
408
- function walk(holder, key) {
409
-
410
- // The walk method is used to recursively walk the resulting structure so
411
- // that modifications can be made.
412
-
413
- var k, v, value = holder[key];
414
- if (value && typeof value === 'object') {
415
- for (k in value) {
416
- if (Object.prototype.hasOwnProperty.call(value, k)) {
417
- v = walk(value, k);
418
- if (v !== undefined) {
419
- value[k] = v;
420
- } else {
421
- delete value[k];
422
- }
423
- }
424
- }
425
- }
426
- return reviver.call(holder, key, value);
427
- }
428
-
429
-
430
- // Parsing happens in four stages. In the first stage, we replace certain
431
- // Unicode characters with escape sequences. JavaScript handles many characters
432
- // incorrectly, either silently deleting them, or treating them as line endings.
433
-
434
- text = String(text);
435
- cx.lastIndex = 0;
436
- if (cx.test(text)) {
437
- text = text.replace(cx, function (a) {
438
- return '\\u' +
439
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
440
- });
441
- }
442
-
443
- // In the second stage, we run the text against regular expressions that look
444
- // for non-JSON patterns. We are especially concerned with '()' and 'new'
445
- // because they can cause invocation, and '=' because it can cause mutation.
446
- // But just to be safe, we want to reject all unexpected forms.
447
-
448
- // We split the second stage into 4 regexp operations in order to work around
449
- // crippling inefficiencies in IE's and Safari's regexp engines. First we
450
- // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
451
- // replace all simple value tokens with ']' characters. Third, we delete all
452
- // open brackets that follow a colon or comma or that begin the text. Finally,
453
- // we look to see that the remaining characters are only whitespace or ']' or
454
- // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
455
-
456
- if (/^[\],:{}\s]*$/
457
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
458
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
459
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
460
-
461
- // In the third stage we use the eval function to compile the text into a
462
- // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
463
- // in JavaScript: it can begin a block or an object literal. We wrap the text
464
- // in parens to eliminate the ambiguity.
465
-
466
- j = eval('(' + text + ')');
467
-
468
- // In the optional fourth stage, we recursively walk the new structure, passing
469
- // each name/value pair to a reviver function for possible transformation.
470
-
471
- return typeof reviver === 'function' ?
472
- walk({'': j}, '') : j;
473
- }
474
-
475
- // If the text is not JSON parseable, then a SyntaxError is thrown.
476
-
477
- throw new SyntaxError('JSON.parse');
478
- };
479
- }
480
- }());
@@ -1,132 +0,0 @@
1
- jQuery(function ($) {
2
- var csrf_token = $('meta[name=csrf-token]').attr('content'),
3
- csrf_param = $('meta[name=csrf-param]').attr('content');
4
-
5
- $.fn.extend({
6
- /**
7
- * Triggers a custom event on an element and returns the event result
8
- * this is used to get around not being able to ensure callbacks are placed
9
- * at the end of the chain.
10
- *
11
- * TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
12
- * own events and placing ourselves at the end of the chain.
13
- */
14
- triggerAndReturn: function (name, data) {
15
- var event = new $.Event(name);
16
- this.trigger(event, data);
17
-
18
- return event.result !== false;
19
- },
20
-
21
- /**
22
- * Handles execution of remote calls firing overridable events along the way
23
- */
24
- callRemote: function () {
25
- var el = this,
26
- method = el.attr('method') || el.attr('data-method') || 'GET',
27
- url = el.attr('action') || el.attr('href'),
28
- dataType = el.attr('data-type') || 'script';
29
-
30
- if (url === undefined) {
31
- throw "No URL specified for remote call (action or href must be present).";
32
- } else {
33
- if (el.triggerAndReturn('ajax:before')) {
34
- var data = el.is('form') ? el.serializeArray() : [];
35
- $.ajax({
36
- url: url,
37
- data: data,
38
- dataType: dataType,
39
- type: method.toUpperCase(),
40
- beforeSend: function (xhr) {
41
- el.trigger('ajax:loading', xhr);
42
- },
43
- success: function (data, status, xhr) {
44
- el.trigger('ajax:success', [data, status, xhr]);
45
- },
46
- complete: function (xhr) {
47
- el.trigger('ajax:complete', xhr);
48
- },
49
- error: function (xhr, status, error) {
50
- el.trigger('ajax:failure', [xhr, status, error]);
51
- }
52
- });
53
- }
54
-
55
- el.trigger('ajax:after');
56
- }
57
- }
58
- });
59
-
60
- /**
61
- * confirmation handler
62
- */
63
- $('a[data-confirm],input[data-confirm]').live('click', function () {
64
- var el = $(this);
65
- if (el.triggerAndReturn('confirm')) {
66
- if (!confirm(el.attr('data-confirm'))) {
67
- return false;
68
- }
69
- }
70
- });
71
-
72
-
73
- /**
74
- * remote handlers
75
- */
76
- $('form[data-remote]').live('submit', function (e) {
77
- $(this).callRemote();
78
- e.preventDefault();
79
- });
80
-
81
- $('a[data-remote],input[data-remote]').live('click', function (e) {
82
- $(this).callRemote();
83
- e.preventDefault();
84
- });
85
-
86
- $('a[data-method]:not([data-remote])').live('click', function (e){
87
- var link = $(this),
88
- href = link.attr('href'),
89
- method = link.attr('data-method'),
90
- form = $('<form method="post" action="'+href+'"></form>'),
91
- metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
92
-
93
- if (csrf_param != null && csrf_token != null) {
94
- metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
95
- }
96
-
97
- form.hide()
98
- .append(metadata_input)
99
- .appendTo('body');
100
-
101
- e.preventDefault();
102
- form.submit();
103
- });
104
-
105
- /**
106
- * disable-with handlers
107
- */
108
- var disable_with_input_selector = 'input[data-disable-with]';
109
- var disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')';
110
- var disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
111
-
112
- var disable_with_input_function = function () {
113
- $(this).find(disable_with_input_selector).each(function () {
114
- var input = $(this);
115
- input.data('enable-with', input.val())
116
- .attr('value', input.attr('data-disable-with'))
117
- .attr('disabled', 'disabled');
118
- });
119
- };
120
-
121
- $(disable_with_form_remote_selector).live('ajax:before', disable_with_input_function);
122
- $(disable_with_form_not_remote_selector).live('submit', disable_with_input_function);
123
-
124
- $(disable_with_form_remote_selector).live('ajax:complete', function () {
125
- $(this).find(disable_with_input_selector).each(function () {
126
- var input = $(this);
127
- input.removeAttr('disabled')
128
- .val(input.data('enable-with'));
129
- });
130
- });
131
-
132
- });