bcms_kcfinder 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (381) hide show
  1. data/COPYRIGHT.txt +23 -0
  2. data/GPL.txt +674 -0
  3. data/Gemfile +5 -0
  4. data/LICENSE.txt +165 -0
  5. data/app/assets/javascripts/bcms_kcfinder/application.js +20 -0
  6. data/app/assets/javascripts/bcms_kcfinder/browse.js +32 -0
  7. data/app/assets/javascripts/bcms_kcfinder/config.js +2 -0
  8. data/app/assets/javascripts/bcms_kcfinder/enable_kcfinder.js +10 -0
  9. data/app/assets/javascripts/bcms_kcfinder/files.js +613 -0
  10. data/app/assets/stylesheets/bcms_kcfinder/application.css +14 -0
  11. data/app/assets/stylesheets/bcms_kcfinder/browse.css +235 -0
  12. data/app/controllers/bcms_kcfinder/application_controller.rb +4 -0
  13. data/app/controllers/bcms_kcfinder/browse_controller.rb +121 -0
  14. data/app/helpers/bcms_kcfinder/application_helper.rb +4 -0
  15. data/app/helpers/bcms_kcfinder/browse_helper.rb +4 -0
  16. data/app/views/bcms_kcfinder/browse/index.html.erb +83 -0
  17. data/app/views/bcms_kcfinder/init.json +226 -0
  18. data/app/views/layouts/bcms_kcfinder/application.html.erb +45 -0
  19. data/config/routes.rb +7 -0
  20. data/lib/bcms_kcfinder.rb +4 -0
  21. data/lib/bcms_kcfinder/engine.rb +73 -0
  22. data/lib/bcms_kcfinder/version.rb +3 -0
  23. data/lib/generators/bcms_kcfinder/install/USAGE +3 -0
  24. data/lib/generators/bcms_kcfinder/install/install_generator.rb +23 -0
  25. data/lib/tasks/bcms_kcfinder_tasks.rake +4 -0
  26. data/lib/tasks/module_tasks.rake +10 -0
  27. data/test/bcms_kcfinder_test.rb +7 -0
  28. data/test/functional/bcms_kcfinder/browse_controller_test.rb +11 -0
  29. data/test/integration/navigation_test.rb +10 -0
  30. data/test/test_helper.rb +15 -0
  31. data/test/unit/helpers/bcms_kcfinder/browse_helper_test.rb +6 -0
  32. data/vendor/assets/javascript/kcfinder/doc/Changelog +141 -0
  33. data/vendor/assets/javascript/kcfinder/doc/LICENSE.GPL +340 -0
  34. data/vendor/assets/javascript/kcfinder/doc/LICENSE.LGPL +167 -0
  35. data/vendor/assets/javascript/kcfinder/doc/README +78 -0
  36. data/vendor/assets/javascript/kcfinder/js/browser/0bject.js +22 -0
  37. data/vendor/assets/javascript/kcfinder/js/browser/clipboard.js +297 -0
  38. data/vendor/assets/javascript/kcfinder/js/browser/dropUpload.js +229 -0
  39. data/vendor/assets/javascript/kcfinder/js/browser/folders.js +368 -0
  40. data/vendor/assets/javascript/kcfinder/js/browser/init.js +186 -0
  41. data/vendor/assets/javascript/kcfinder/js/browser/joiner.php +35 -0
  42. data/vendor/assets/javascript/kcfinder/js/browser/misc.js +383 -0
  43. data/vendor/assets/javascript/kcfinder/js/browser/settings.js +101 -0
  44. data/vendor/assets/javascript/kcfinder/js/browser/toolbar.js +328 -0
  45. data/vendor/assets/javascript/kcfinder/js/helper.js +412 -0
  46. data/vendor/assets/javascript/kcfinder/js/jquery.drag.js +6 -0
  47. data/vendor/assets/javascript/kcfinder/js/jquery.js +18 -0
  48. data/vendor/assets/javascript/kcfinder/js/jquery.rightClick.js +16 -0
  49. data/vendor/assets/javascript/kcfinder/themes/dark/about.txt +15 -0
  50. data/vendor/assets/javascript/kcfinder/themes/dark/img/bg_transparent.png +0 -0
  51. data/vendor/assets/javascript/kcfinder/themes/dark/img/cross.png +0 -0
  52. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/avi.png +0 -0
  53. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bat.png +0 -0
  54. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bmp.png +0 -0
  55. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/bz2.png +0 -0
  56. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ccd.png +0 -0
  57. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/cgi.png +0 -0
  58. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/com.png +0 -0
  59. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/csh.png +0 -0
  60. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/cue.png +0 -0
  61. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/deb.png +0 -0
  62. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/dll.png +0 -0
  63. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/doc.png +0 -0
  64. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/docx.png +0 -0
  65. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/exe.png +0 -0
  66. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/fla.png +0 -0
  67. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/flv.png +0 -0
  68. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/fon.png +0 -0
  69. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/gif.png +0 -0
  70. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/gz.png +0 -0
  71. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/htm.png +0 -0
  72. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/html.png +0 -0
  73. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ini.png +0 -0
  74. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/iso.png +0 -0
  75. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jar.png +0 -0
  76. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/java.png +0 -0
  77. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jpeg.png +0 -0
  78. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/jpg.png +0 -0
  79. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/js.png +0 -0
  80. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mds.png +0 -0
  81. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mdx.png +0 -0
  82. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mid.png +0 -0
  83. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/midi.png +0 -0
  84. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mkv.png +0 -0
  85. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mov.png +0 -0
  86. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mp3.png +0 -0
  87. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mpeg.png +0 -0
  88. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/mpg.png +0 -0
  89. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/nfo.png +0 -0
  90. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/nrg.png +0 -0
  91. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ogg.png +0 -0
  92. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pdf.png +0 -0
  93. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/php.png +0 -0
  94. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/phps.png +0 -0
  95. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pl.png +0 -0
  96. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pm.png +0 -0
  97. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/png.png +0 -0
  98. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ppt.png +0 -0
  99. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/pptx.png +0 -0
  100. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/qt.png +0 -0
  101. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/rpm.png +0 -0
  102. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/rtf.png +0 -0
  103. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/sh.png +0 -0
  104. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/srt.png +0 -0
  105. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/sub.png +0 -0
  106. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/swf.png +0 -0
  107. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tgz.png +0 -0
  108. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tif.png +0 -0
  109. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/tiff.png +0 -0
  110. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/torrent.png +0 -0
  111. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/ttf.png +0 -0
  112. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/txt.png +0 -0
  113. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/wav.png +0 -0
  114. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/wma.png +0 -0
  115. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/xls.png +0 -0
  116. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/xlsx.png +0 -0
  117. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/big/zip.png +0 -0
  118. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/avi.png +0 -0
  119. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bat.png +0 -0
  120. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bmp.png +0 -0
  121. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/bz2.png +0 -0
  122. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ccd.png +0 -0
  123. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/cgi.png +0 -0
  124. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/com.png +0 -0
  125. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/csh.png +0 -0
  126. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/cue.png +0 -0
  127. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/deb.png +0 -0
  128. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/dll.png +0 -0
  129. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/doc.png +0 -0
  130. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/docx.png +0 -0
  131. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/exe.png +0 -0
  132. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/fla.png +0 -0
  133. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/flv.png +0 -0
  134. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/fon.png +0 -0
  135. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/gif.png +0 -0
  136. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/gz.png +0 -0
  137. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/htm.png +0 -0
  138. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/html.png +0 -0
  139. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ini.png +0 -0
  140. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/iso.png +0 -0
  141. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jar.png +0 -0
  142. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/java.png +0 -0
  143. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jpeg.png +0 -0
  144. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/jpg.png +0 -0
  145. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/js.png +0 -0
  146. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mds.png +0 -0
  147. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mdx.png +0 -0
  148. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mid.png +0 -0
  149. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/midi.png +0 -0
  150. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mkv.png +0 -0
  151. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mov.png +0 -0
  152. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mp3.png +0 -0
  153. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mpeg.png +0 -0
  154. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/mpg.png +0 -0
  155. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/nfo.png +0 -0
  156. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/nrg.png +0 -0
  157. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ogg.png +0 -0
  158. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pdf.png +0 -0
  159. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/php.png +0 -0
  160. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/phps.png +0 -0
  161. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pl.png +0 -0
  162. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pm.png +0 -0
  163. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/png.png +0 -0
  164. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ppt.png +0 -0
  165. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/pptx.png +0 -0
  166. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/qt.png +0 -0
  167. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/rpm.png +0 -0
  168. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/rtf.png +0 -0
  169. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/sh.png +0 -0
  170. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/srt.png +0 -0
  171. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/sub.png +0 -0
  172. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/swf.png +0 -0
  173. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tgz.png +0 -0
  174. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tif.png +0 -0
  175. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/tiff.png +0 -0
  176. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/torrent.png +0 -0
  177. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/ttf.png +0 -0
  178. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/txt.png +0 -0
  179. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/wav.png +0 -0
  180. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/wma.png +0 -0
  181. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/xls.png +0 -0
  182. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/xlsx.png +0 -0
  183. data/vendor/assets/javascript/kcfinder/themes/dark/img/files/small/zip.png +0 -0
  184. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/about.png +0 -0
  185. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard-add.png +0 -0
  186. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard-clear.png +0 -0
  187. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/clipboard.png +0 -0
  188. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close-clicked.png +0 -0
  189. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close-hover.png +0 -0
  190. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/close.png +0 -0
  191. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/copy.png +0 -0
  192. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/delete.png +0 -0
  193. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/download.png +0 -0
  194. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/folder-new.png +0 -0
  195. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/maximize.png +0 -0
  196. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/move.png +0 -0
  197. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/refresh.png +0 -0
  198. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/rename.png +0 -0
  199. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/select.png +0 -0
  200. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/settings.png +0 -0
  201. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/upload.png +0 -0
  202. data/vendor/assets/javascript/kcfinder/themes/dark/img/icons/view.png +0 -0
  203. data/vendor/assets/javascript/kcfinder/themes/dark/img/kcf_logo.png +0 -0
  204. data/vendor/assets/javascript/kcfinder/themes/dark/img/loading.gif +0 -0
  205. data/vendor/assets/javascript/kcfinder/themes/dark/img/question.png +0 -0
  206. data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/denied.png +0 -0
  207. data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/folder.png +0 -0
  208. data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/folder_current.png +0 -0
  209. data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/minus.png +0 -0
  210. data/vendor/assets/javascript/kcfinder/themes/dark/img/tree/plus.png +0 -0
  211. data/vendor/assets/javascript/kcfinder/themes/dark/init.js +4 -0
  212. data/vendor/assets/javascript/kcfinder/themes/dark/style.css +560 -0
  213. data/vendor/assets/javascript/kcfinder/themes/oxygen/about.txt +11 -0
  214. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/alert.png +0 -0
  215. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/bg_transparent.png +0 -0
  216. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/confirm.png +0 -0
  217. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/avi.png +0 -0
  218. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bat.png +0 -0
  219. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bmp.png +0 -0
  220. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/bz2.png +0 -0
  221. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ccd.png +0 -0
  222. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/cgi.png +0 -0
  223. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/com.png +0 -0
  224. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/csh.png +0 -0
  225. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/cue.png +0 -0
  226. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/deb.png +0 -0
  227. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/dll.png +0 -0
  228. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/doc.png +0 -0
  229. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/docx.png +0 -0
  230. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/exe.png +0 -0
  231. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/fla.png +0 -0
  232. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/flv.png +0 -0
  233. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/fon.png +0 -0
  234. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/gif.png +0 -0
  235. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/gz.png +0 -0
  236. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/htm.png +0 -0
  237. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/html.png +0 -0
  238. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ini.png +0 -0
  239. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/iso.png +0 -0
  240. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jar.png +0 -0
  241. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/java.png +0 -0
  242. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jpeg.png +0 -0
  243. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/jpg.png +0 -0
  244. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/js.png +0 -0
  245. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mds.png +0 -0
  246. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mdx.png +0 -0
  247. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mid.png +0 -0
  248. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/midi.png +0 -0
  249. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mkv.png +0 -0
  250. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mov.png +0 -0
  251. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mp3.png +0 -0
  252. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mpeg.png +0 -0
  253. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/mpg.png +0 -0
  254. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/nfo.png +0 -0
  255. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/nrg.png +0 -0
  256. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ogg.png +0 -0
  257. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pdf.png +0 -0
  258. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/php.png +0 -0
  259. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/phps.png +0 -0
  260. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pl.png +0 -0
  261. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pm.png +0 -0
  262. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/png.png +0 -0
  263. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ppt.png +0 -0
  264. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/pptx.png +0 -0
  265. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/psd.png +0 -0
  266. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/qt.png +0 -0
  267. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rar.png +0 -0
  268. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rpm.png +0 -0
  269. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/rtf.png +0 -0
  270. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/sh.png +0 -0
  271. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/srt.png +0 -0
  272. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/sub.png +0 -0
  273. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/swf.png +0 -0
  274. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tgz.png +0 -0
  275. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tif.png +0 -0
  276. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/tiff.png +0 -0
  277. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/torrent.png +0 -0
  278. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/ttf.png +0 -0
  279. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/txt.png +0 -0
  280. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/wav.png +0 -0
  281. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/wma.png +0 -0
  282. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/xls.png +0 -0
  283. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/xlsx.png +0 -0
  284. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/big/zip.png +0 -0
  285. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/avi.png +0 -0
  286. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bat.png +0 -0
  287. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bmp.png +0 -0
  288. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/bz2.png +0 -0
  289. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ccd.png +0 -0
  290. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/cgi.png +0 -0
  291. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/com.png +0 -0
  292. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/csh.png +0 -0
  293. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/cue.png +0 -0
  294. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/deb.png +0 -0
  295. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/dll.png +0 -0
  296. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/doc.png +0 -0
  297. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/docx.png +0 -0
  298. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/exe.png +0 -0
  299. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/fla.png +0 -0
  300. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/flv.png +0 -0
  301. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/fon.png +0 -0
  302. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/gif.png +0 -0
  303. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/gz.png +0 -0
  304. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/htm.png +0 -0
  305. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/html.png +0 -0
  306. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ini.png +0 -0
  307. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/iso.png +0 -0
  308. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jar.png +0 -0
  309. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/java.png +0 -0
  310. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jpeg.png +0 -0
  311. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/jpg.png +0 -0
  312. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/js.png +0 -0
  313. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mds.png +0 -0
  314. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mdx.png +0 -0
  315. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mid.png +0 -0
  316. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/midi.png +0 -0
  317. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mkv.png +0 -0
  318. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mov.png +0 -0
  319. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mp3.png +0 -0
  320. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mpeg.png +0 -0
  321. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/mpg.png +0 -0
  322. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/nfo.png +0 -0
  323. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/nrg.png +0 -0
  324. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ogg.png +0 -0
  325. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pdf.png +0 -0
  326. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/php.png +0 -0
  327. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/phps.png +0 -0
  328. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pl.png +0 -0
  329. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pm.png +0 -0
  330. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/png.png +0 -0
  331. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ppt.png +0 -0
  332. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/pptx.png +0 -0
  333. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/psd.png +0 -0
  334. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/qt.png +0 -0
  335. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rar.png +0 -0
  336. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rpm.png +0 -0
  337. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/rtf.png +0 -0
  338. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/sh.png +0 -0
  339. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/srt.png +0 -0
  340. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/sub.png +0 -0
  341. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/swf.png +0 -0
  342. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tgz.png +0 -0
  343. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tif.png +0 -0
  344. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/tiff.png +0 -0
  345. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/torrent.png +0 -0
  346. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/ttf.png +0 -0
  347. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/txt.png +0 -0
  348. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/wav.png +0 -0
  349. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/wma.png +0 -0
  350. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/xls.png +0 -0
  351. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/xlsx.png +0 -0
  352. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/files/small/zip.png +0 -0
  353. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/about.png +0 -0
  354. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard-add.png +0 -0
  355. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard-clear.png +0 -0
  356. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/clipboard.png +0 -0
  357. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close-clicked.png +0 -0
  358. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close-hover.png +0 -0
  359. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/close.png +0 -0
  360. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/copy.png +0 -0
  361. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/delete.png +0 -0
  362. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/download.png +0 -0
  363. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/folder-new.png +0 -0
  364. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/maximize.png +0 -0
  365. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/move.png +0 -0
  366. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/refresh.png +0 -0
  367. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/rename.png +0 -0
  368. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/select.png +0 -0
  369. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/settings.png +0 -0
  370. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/upload.png +0 -0
  371. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/icons/view.png +0 -0
  372. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/kcf_logo.png +0 -0
  373. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/loading.gif +0 -0
  374. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/denied.png +0 -0
  375. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/folder.png +0 -0
  376. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/folder_current.png +0 -0
  377. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/minus.png +0 -0
  378. data/vendor/assets/javascript/kcfinder/themes/oxygen/img/tree/plus.png +0 -0
  379. data/vendor/assets/javascript/kcfinder/themes/oxygen/init.js +4 -0
  380. data/vendor/assets/javascript/kcfinder/themes/oxygen/style.css +566 -0
  381. metadata +453 -0
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+ gem 'sqlite3'
5
+ gem 'thin'
data/LICENSE.txt ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,20 @@
1
+ // Don't require_tree because some files in this directory need to be loaded by CKEditor directly.
2
+ //
3
+ //= require jquery
4
+ //= require jquery_ujs
5
+ //= require kcfinder/js/helper
6
+ //= require kcfinder/js/jquery.drag
7
+ //= require kcfinder/js/jquery.rightClick
8
+ //= require kcfinder/js/browser/0bject
9
+ //= require kcfinder/js/browser/clipboard
10
+ //= require kcfinder/js/browser/dropUpload
11
+ //= require kcfinder/js/browser/folders
12
+ //= require kcfinder/js/browser/init
13
+ //= require kcfinder/js/browser/misc
14
+ //= require kcfinder/js/browser/settings
15
+ //= require kcfinder/js/browser/toolbar
16
+ //= require kcfinder/themes/oxygen/init
17
+ //= require bcms_kcfinder/browse
18
+ //= require bcms_kcfinder/files
19
+
20
+
@@ -0,0 +1,32 @@
1
+ // Determine the URL or Path to a given file
2
+ // @param [String | Object] file A string or JSON object representing a file
3
+ browser.fileUrl = function(file){
4
+ console.log("Path is:" + file.data('path'));
5
+ var fileURL = "";
6
+ if(file.substr){
7
+ fileURL = file
8
+ } else if(file.data('path') != undefined){
9
+ fileURL = file.data('path');
10
+ }else{
11
+ fileURL = browser.uploadURL + '/' + browser.dir + '/' + file.data('name');
12
+ }
13
+ fileURL = _.escapeDirs(fileURL);
14
+ return fileURL;
15
+
16
+ }
17
+
18
+ browser.smallIconFor = function(icon){
19
+ return browser.iconFor('small', icon);
20
+ }
21
+
22
+ browser.bigIconFor = function(icon){
23
+ return browser.iconFor('big', icon);
24
+ }
25
+ browser.iconFor = function(size, icon){
26
+ // For missing extensions (i.e. CMS Pages), use the .html icon
27
+ if(icon == "."){
28
+ icon = "html";
29
+ }
30
+ return '/assets/kcfinder/themes/' + browser.theme + '/img/files/'+ size +'/' + icon + '.png';
31
+
32
+ }
@@ -0,0 +1,2 @@
1
+ //= require bcms/ckeditor_standard_config
2
+ //= require bcms_kcfinder/enable_kcfinder
@@ -0,0 +1,10 @@
1
+ // Additional configuration to enable KCFinder
2
+
3
+ CKEDITOR.editorConfig = function(config) {
4
+ config.filebrowserBrowseUrl = '/bcms_kcfinder/browse';
5
+ config.filebrowserImageBrowseUrl = '/bcms_kcfinder/browse?type=images';
6
+ // config.filebrowserFlashBrowseUrl = '/assets/kcfinder/browse.php?type=flash';
7
+ // config.filebrowserUploadUrl = '/assets/kcfinder/upload.php?type=files';
8
+ // config.filebrowserImageUploadUrl = '/assets/kcfinder/upload.php?type=images';
9
+ // config.filebrowserFlashUploadUrl = '/assets/kcfinder/upload.php?type=flash';
10
+ };
@@ -0,0 +1,613 @@
1
+
2
+ /** This file is part of KCFinder project
3
+ *
4
+ * @desc File related functionality
5
+ * @package KCFinder
6
+ * @version 2.51
7
+ * @author Pavel Tzonkov <pavelc@users.sourceforge.net>
8
+ * @copyright 2010, 2011 KCFinder Project
9
+ * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
10
+ * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
11
+ * @link http://kcfinder.sunhater.com
12
+ */
13
+
14
+ // This file has been modified from the original KCFinder project to add new functionality
15
+ // Including:
16
+ // 1. Per file paths
17
+
18
+ browser.initFiles = function() {
19
+ $(document).unbind('keydown');
20
+ $(document).keydown(function(e) {
21
+ return !browser.selectAll(e);
22
+ });
23
+ $('#files').unbind();
24
+ $('#files').scroll(function() {
25
+ browser.hideDialog();
26
+ });
27
+ $('.file').unbind();
28
+ $('.file').click(function(e) {
29
+ _.unselect();
30
+ browser.selectFile($(this), e);
31
+ });
32
+ $('.file').rightClick(function(e) {
33
+ _.unselect();
34
+ browser.menuFile($(this), e);
35
+ });
36
+ $('.file').dblclick(function() {
37
+ _.unselect();
38
+ browser.returnFile($(this));
39
+ });
40
+ $('.file').mouseup(function() {
41
+ _.unselect();
42
+ });
43
+ $('.file').mouseout(function() {
44
+ _.unselect();
45
+ });
46
+ $.each(this.shows, function(i, val) {
47
+ var display = (_.kuki.get('show' + val) == 'off')
48
+ ? 'none' : 'block';
49
+ $('#files .file div.' + val).css('display', display);
50
+ });
51
+ this.statusDir();
52
+ };
53
+
54
+ // @fork - Look up the icon using the asset pipeline
55
+ browser.showFiles = function(callBack, selected) {
56
+ this.fadeFiles();
57
+ setTimeout(function() {
58
+ var html = '';
59
+ $.each(browser.files, function(i, file) {
60
+ var stamp = [];
61
+ $.each(file, function(key, val) {
62
+ stamp[stamp.length] = key + "|" + val;
63
+ });
64
+ stamp = _.md5(stamp.join('|'));
65
+ if (_.kuki.get('view') == 'list') {
66
+ if (!i) html += '<table summary="list">';
67
+ var icon = _.getFileExtension(file.name);
68
+ if (file.thumb)
69
+ icon = '.image';
70
+ else if (!icon.length || !file.smallIcon)
71
+ icon = '.';
72
+ icon = browser.smallIconFor(icon);
73
+ html += '<tr class="file">' +
74
+ '<td class="name" style="background-image:url(' + icon + ')">' + _.htmlData(file.name) + '</td>' +
75
+ '<td class="time">' + file.date + '</td>' +
76
+ '<td class="size">' + browser.humanSize(file.size) + '</td>' +
77
+ '</tr>';
78
+ if (i == browser.files.length - 1) html += '</table>';
79
+ } else {
80
+ if (file.thumb)
81
+ var icon = browser.baseGetData('thumb') + '&file=' + encodeURIComponent(file.name) + '&dir=' + encodeURIComponent(browser.dir) + '&stamp=' + stamp;
82
+ else if (file.smallThumb) {
83
+ var icon = browser.uploadURL + '/' + browser.dir + '/' + file.name;
84
+ icon = _.escapeDirs(icon).replace(/\'/g, "%27");
85
+ } else {
86
+ var icon = file.bigIcon ? _.getFileExtension(file.name) : '.';
87
+ if (!icon.length) icon = '.';
88
+ icon = browser.bigIconFor(icon);
89
+ }
90
+ html += '<div class="file">' +
91
+ '<div class="thumb" style="background-image:url(\'' + icon + '\')" ></div>' +
92
+ '<div class="name">' + _.htmlData(file.name) + '</div>' +
93
+ '<div class="time">' + file.date + '</div>' +
94
+ '<div class="size">' + browser.humanSize(file.size) + '</div>' +
95
+ '</div>';
96
+ }
97
+ });
98
+ $('#files').html('<div>' + html + '<div>');
99
+ $.each(browser.files, function(i, file) {
100
+ var item = $('#files .file').get(i);
101
+ $(item).data(file);
102
+ if (_.inArray(file.name, selected) ||
103
+ ((typeof selected != 'undefined') && !selected.push && (file.name == selected))
104
+ )
105
+ $(item).addClass('selected');
106
+ });
107
+ $('#files > div').css({opacity:'', filter:''});
108
+ if (callBack) callBack();
109
+ browser.initFiles();
110
+ }, 200);
111
+ };
112
+
113
+ browser.selectFile = function(file, e) {
114
+ if (e.ctrlKey || e.metaKey) {
115
+ if (file.hasClass('selected'))
116
+ file.removeClass('selected');
117
+ else
118
+ file.addClass('selected');
119
+ var files = $('.file.selected').get();
120
+ var size = 0;
121
+ if (!files.length)
122
+ this.statusDir();
123
+ else {
124
+ $.each(files, function(i, cfile) {
125
+ size += parseInt($(cfile).data('size'));
126
+ });
127
+ size = this.humanSize(size);
128
+ if (files.length > 1)
129
+ $('#fileinfo').html(files.length + ' ' + this.label("selected files") + ' (' + size + ')');
130
+ else {
131
+ var data = $(files[0]).data();
132
+ $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')');
133
+ }
134
+ }
135
+ } else {
136
+ var data = file.data();
137
+ $('.file').removeClass('selected');
138
+ file.addClass('selected');
139
+ $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')');
140
+ }
141
+ };
142
+
143
+ browser.selectAll = function(e) {
144
+ if ((!e.ctrlKey && !e.metaKey) || ((e.keyCode != 65) && (e.keyCode != 97)))
145
+ return false;
146
+ var files = $('.file').get();
147
+ if (files.length) {
148
+ var size = 0;
149
+ $.each(files, function(i, file) {
150
+ if (!$(file).hasClass('selected'))
151
+ $(file).addClass('selected');
152
+ size += parseInt($(file).data('size'));
153
+ });
154
+ size = this.humanSize(size);
155
+ $('#fileinfo').html(files.length + ' ' + this.label("selected files") + ' (' + size + ')');
156
+ }
157
+ return true;
158
+ };
159
+
160
+ // @fork - This has been altered to use a custom function to determine the URL to return.
161
+ browser.returnFile = function(file) {
162
+
163
+ var fileURL = browser.fileUrl(file);
164
+
165
+ if (this.opener.CKEditor) {
166
+ this.opener.CKEditor.object.tools.callFunction(this.opener.CKEditor.funcNum, fileURL, '');
167
+ window.close();
168
+
169
+ } else if (this.opener.FCKeditor) {
170
+ window.opener.SetUrl(fileURL) ;
171
+ window.close() ;
172
+
173
+ } else if (this.opener.TinyMCE) {
174
+ var win = tinyMCEPopup.getWindowArg('window');
175
+ win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = fileURL;
176
+ if (win.getImageData) win.getImageData();
177
+ if (typeof(win.ImageDialog) != "undefined") {
178
+ if (win.ImageDialog.getImageData)
179
+ win.ImageDialog.getImageData();
180
+ if (win.ImageDialog.showPreviewImage)
181
+ win.ImageDialog.showPreviewImage(fileURL);
182
+ }
183
+ tinyMCEPopup.close();
184
+
185
+ } else if (this.opener.callBack) {
186
+
187
+ if (window.opener && window.opener.KCFinder) {
188
+ this.opener.callBack(fileURL);
189
+ window.close();
190
+ }
191
+
192
+ if (window.parent && window.parent.KCFinder) {
193
+ var button = $('#toolbar a[href="kcact:maximize"]');
194
+ if (button.hasClass('selected'))
195
+ this.maximize(button);
196
+ this.opener.callBack(fileURL);
197
+ }
198
+
199
+ } else if (this.opener.callBackMultiple) {
200
+ if (window.opener && window.opener.KCFinder) {
201
+ this.opener.callBackMultiple([fileURL]);
202
+ window.close();
203
+ }
204
+
205
+ if (window.parent && window.parent.KCFinder) {
206
+ var button = $('#toolbar a[href="kcact:maximize"]');
207
+ if (button.hasClass('selected'))
208
+ this.maximize(button);
209
+ this.opener.callBackMultiple([fileURL]);
210
+ }
211
+
212
+ }
213
+ };
214
+
215
+ browser.returnFiles = function(files) {
216
+ if (this.opener.callBackMultiple && files.length) {
217
+ var rfiles = [];
218
+ $.each(files, function(i, file) {
219
+ rfiles[i] = browser.uploadURL + '/' + browser.dir + '/' + $(file).data('name');
220
+ rfiles[i] = _.escapeDirs(rfiles[i]);
221
+ });
222
+ this.opener.callBackMultiple(rfiles);
223
+ if (window.opener) window.close()
224
+ }
225
+ };
226
+
227
+ browser.returnThumbnails = function(files) {
228
+ if (this.opener.callBackMultiple) {
229
+ var rfiles = [];
230
+ var j = 0;
231
+ $.each(files, function(i, file) {
232
+ if ($(file).data('thumb')) {
233
+ rfiles[j] = browser.thumbsURL + '/' + browser.dir + '/' + $(file).data('name');
234
+ rfiles[j] = _.escapeDirs(rfiles[j++]);
235
+ }
236
+ });
237
+ this.opener.callBackMultiple(rfiles);
238
+ if (window.opener) window.close()
239
+ }
240
+ };
241
+
242
+ browser.menuFile = function(file, e) {
243
+ var data = file.data();
244
+ var path = this.dir + '/' + data.name;
245
+ var files = $('.file.selected').get();
246
+ var html = '';
247
+
248
+ if (file.hasClass('selected') && files.length && (files.length > 1)) {
249
+ var thumb = false;
250
+ var notWritable = 0;
251
+ var cdata;
252
+ $.each(files, function(i, cfile) {
253
+ cdata = $(cfile).data();
254
+ if (cdata.thumb) thumb = true;
255
+ if (!data.writable) notWritable++;
256
+ });
257
+ if (this.opener.callBackMultiple) {
258
+ html += '<a href="kcact:pick">' + this.label("Select") + '</a>';
259
+ if (thumb) html +=
260
+ '<a href="kcact:pick_thumb">' + this.label("Select Thumbnails") + '</a>';
261
+ }
262
+ if (data.thumb || data.smallThumb || this.support.zip) {
263
+ html += (html.length ? '<div class="delimiter"></div>' : '');
264
+ if (data.thumb || data.smallThumb)
265
+ html +='<a href="kcact:view">' + this.label("View") + '</a>';
266
+ if (this.support.zip) html += (html.length ? '<div class="delimiter"></div>' : '') +
267
+ '<a href="kcact:download">' + this.label("Download") + '</a>';
268
+ }
269
+
270
+ if (this.access.files.copy || this.access.files.move)
271
+ html += (html.length ? '<div class="delimiter"></div>' : '') +
272
+ '<a href="kcact:clpbrdadd">' + this.label("Add to Clipboard") + '</a>';
273
+ if (this.access.files['delete'])
274
+ html += (html.length ? '<div class="delimiter"></div>' : '') +
275
+ '<a href="kcact:rm"' + ((notWritable == files.length) ? ' class="denied"' : '') +
276
+ '>' + this.label("Delete") + '</a>';
277
+
278
+ if (html.length) {
279
+ html = '<div class="menu">' + html + '</div>';
280
+ $('#dialog').html(html);
281
+ this.showMenu(e);
282
+ } else
283
+ return;
284
+
285
+ $('.menu a[href="kcact:pick"]').click(function() {
286
+ browser.returnFiles(files);
287
+ browser.hideDialog();
288
+ return false;
289
+ });
290
+
291
+ $('.menu a[href="kcact:pick_thumb"]').click(function() {
292
+ browser.returnThumbnails(files);
293
+ browser.hideDialog();
294
+ return false;
295
+ });
296
+
297
+ $('.menu a[href="kcact:download"]').click(function() {
298
+ browser.hideDialog();
299
+ var pfiles = [];
300
+ $.each(files, function(i, cfile) {
301
+ pfiles[i] = $(cfile).data('name');
302
+ });
303
+ browser.post(browser.baseGetData('downloadSelected'), {dir:browser.dir, files:pfiles});
304
+ return false;
305
+ });
306
+
307
+ $('.menu a[href="kcact:clpbrdadd"]').click(function() {
308
+ browser.hideDialog();
309
+ var msg = '';
310
+ $.each(files, function(i, cfile) {
311
+ var cdata = $(cfile).data();
312
+ var failed = false;
313
+ for (i = 0; i < browser.clipboard.length; i++)
314
+ if ((browser.clipboard[i].name == cdata.name) &&
315
+ (browser.clipboard[i].dir == browser.dir)
316
+ ) {
317
+ failed = true
318
+ msg += cdata.name + ": " + browser.label("This file is already added to the Clipboard.") + "\n";
319
+ break;
320
+ }
321
+
322
+ if (!failed) {
323
+ cdata.dir = browser.dir;
324
+ browser.clipboard[browser.clipboard.length] = cdata;
325
+ }
326
+ });
327
+ browser.initClipboard();
328
+ if (msg.length) browser.alert(msg.substr(0, msg.length - 1));
329
+ return false;
330
+ });
331
+
332
+ $('.menu a[href="kcact:rm"]').click(function() {
333
+ if ($(this).hasClass('denied')) return false;
334
+ browser.hideDialog();
335
+ var failed = 0;
336
+ var dfiles = [];
337
+ $.each(files, function(i, cfile) {
338
+ var cdata = $(cfile).data();
339
+ if (!cdata.writable)
340
+ failed++;
341
+ else
342
+ dfiles[dfiles.length] = browser.dir + "/" + cdata.name;
343
+ });
344
+ if (failed == files.length) {
345
+ browser.alert(browser.label("The selected files are not removable."));
346
+ return false;
347
+ }
348
+
349
+ var go = function(callBack) {
350
+ browser.fadeFiles();
351
+ $.ajax({
352
+ type: 'POST',
353
+ dataType: 'json',
354
+ url: browser.baseGetData('rm_cbd'),
355
+ data: {files:dfiles},
356
+ async: false,
357
+ success: function(data) {
358
+ if (callBack) callBack();
359
+ browser.check4errors(data);
360
+ browser.refresh();
361
+ },
362
+ error: function() {
363
+ if (callBack) callBack();
364
+ $('#files > div').css({
365
+ opacity: '',
366
+ filter: ''
367
+ });
368
+ browser.alert(browser.label("Unknown error."));
369
+ }
370
+ });
371
+ };
372
+
373
+ if (failed)
374
+ browser.confirm(
375
+ browser.label("{count} selected files are not removable. Do you want to delete the rest?", {count:failed}),
376
+ go
377
+ )
378
+
379
+ else
380
+ browser.confirm(
381
+ browser.label("Are you sure you want to delete all selected files?"),
382
+ go
383
+ );
384
+
385
+ return false;
386
+ });
387
+
388
+ } else {
389
+ html += '<div class="menu">';
390
+ $('.file').removeClass('selected');
391
+ file.addClass('selected');
392
+ $('#fileinfo').html(data.name + ' (' + this.humanSize(data.size) + ', ' + data.date + ')');
393
+ if (this.opener.callBack || this.opener.callBackMultiple) {
394
+ html += '<a href="kcact:pick">' + this.label("Select") + '</a>';
395
+ if (data.thumb) html +=
396
+ '<a href="kcact:pick_thumb">' + this.label("Select Thumbnail") + '</a>';
397
+ html += '<div class="delimiter"></div>';
398
+ }
399
+
400
+ if (data.thumb || data.smallThumb)
401
+ html +='<a href="kcact:view">' + this.label("View") + '</a>';
402
+
403
+ html +=
404
+ '<a href="kcact:download">' + this.label("Download") + '</a>';
405
+
406
+ if (this.access.files.copy || this.access.files.move)
407
+ html += '<div class="delimiter"></div>' +
408
+ '<a href="kcact:clpbrdadd">' + this.label("Add to Clipboard") + '</a>';
409
+ if (this.access.files.rename || this.access.files['delete'])
410
+ html += '<div class="delimiter"></div>';
411
+ if (this.access.files.rename)
412
+ html += '<a href="kcact:mv"' + (!data.writable ? ' class="denied"' : '') + '>' +
413
+ this.label("Rename...") + '</a>';
414
+ if (this.access.files['delete'])
415
+ html += '<a href="kcact:rm"' + (!data.writable ? ' class="denied"' : '') + '>' +
416
+ this.label("Delete") + '</a>';
417
+ html += '</div>';
418
+
419
+ $('#dialog').html(html);
420
+ this.showMenu(e);
421
+
422
+ $('.menu a[href="kcact:pick"]').click(function() {
423
+ browser.returnFile(file);
424
+ browser.hideDialog();
425
+ return false;
426
+ });
427
+
428
+ $('.menu a[href="kcact:pick_thumb"]').click(function() {
429
+ var path = browser.thumbsURL + '/' + browser.dir + '/' + data.name;
430
+ browser.returnFile(path);
431
+ browser.hideDialog();
432
+ return false;
433
+ });
434
+
435
+ $('.menu a[href="kcact:download"]').click(function() {
436
+ var html = '<form id="downloadForm" method="post" action="' + browser.baseGetData('download') + '">' +
437
+ '<input type="hidden" name="dir" />' +
438
+ '<input type="hidden" name="file" />' +
439
+ '</form>';
440
+ $('#dialog').html(html);
441
+ $('#downloadForm input').get(0).value = browser.dir;
442
+ $('#downloadForm input').get(1).value = data.name;
443
+ $('#downloadForm').submit();
444
+ return false;
445
+ });
446
+
447
+ $('.menu a[href="kcact:clpbrdadd"]').click(function() {
448
+ for (i = 0; i < browser.clipboard.length; i++)
449
+ if ((browser.clipboard[i].name == data.name) &&
450
+ (browser.clipboard[i].dir == browser.dir)
451
+ ) {
452
+ browser.hideDialog();
453
+ browser.alert(browser.label("This file is already added to the Clipboard."));
454
+ return false;
455
+ }
456
+ var cdata = data;
457
+ cdata.dir = browser.dir;
458
+ browser.clipboard[browser.clipboard.length] = cdata;
459
+ browser.initClipboard();
460
+ browser.hideDialog();
461
+ return false;
462
+ });
463
+
464
+ $('.menu a[href="kcact:mv"]').click(function(e) {
465
+ if (!data.writable) return false;
466
+ browser.fileNameDialog(
467
+ e, {dir: browser.dir, file: data.name},
468
+ 'newName', data.name, browser.baseGetData('rename'), {
469
+ title: "New file name:",
470
+ errEmpty: "Please enter new file name.",
471
+ errSlash: "Unallowable characters in file name.",
472
+ errDot: "File name shouldn't begins with '.'"
473
+ },
474
+ function() {
475
+ browser.refresh();
476
+ }
477
+ );
478
+ return false;
479
+ });
480
+
481
+ $('.menu a[href="kcact:rm"]').click(function() {
482
+ if (!data.writable) return false;
483
+ browser.hideDialog();
484
+ browser.confirm(browser.label("Are you sure you want to delete this file?"),
485
+ function(callBack) {
486
+ $.ajax({
487
+ type: 'POST',
488
+ dataType: 'json',
489
+ url: browser.baseGetData('delete'),
490
+ data: {dir:browser.dir, file:data.name},
491
+ async: false,
492
+ success: function(data) {
493
+ if (callBack) callBack();
494
+ browser.clearClipboard();
495
+ if (browser.check4errors(data))
496
+ return;
497
+ browser.refresh();
498
+ },
499
+ error: function() {
500
+ if (callBack) callBack();
501
+ browser.alert(browser.label("Unknown error."));
502
+ }
503
+ });
504
+ }
505
+ );
506
+ return false;
507
+ });
508
+ }
509
+
510
+ $('.menu a[href="kcact:view"]').click(function() {
511
+ browser.hideDialog();
512
+ var ts = new Date().getTime();
513
+ var showImage = function(data) {
514
+ url = _.escapeDirs(browser.uploadURL + '/' + browser.dir + '/' + data.name) + '?ts=' + ts,
515
+ $('#loading').html(browser.label("Loading image..."));
516
+ $('#loading').css('display', 'inline');
517
+ var img = new Image();
518
+ img.src = url;
519
+ img.onerror = function() {
520
+ browser.lock = false;
521
+ $('#loading').css('display', 'none');
522
+ browser.alert(browser.label("Unknown error."));
523
+ $(document).unbind('keydown');
524
+ $(document).keydown(function(e) {
525
+ return !browser.selectAll(e);
526
+ });
527
+ browser.refresh();
528
+ };
529
+ var onImgLoad = function() {
530
+ browser.lock = false;
531
+ $('#files .file').each(function() {
532
+ if ($(this).data('name') == data.name)
533
+ browser.ssImage = this;
534
+ });
535
+ $('#loading').css('display', 'none');
536
+ $('#dialog').html('<div class="slideshow"><img /></div>');
537
+ $('#dialog img').attr({
538
+ src: url,
539
+ title: data.name
540
+ }).fadeIn('fast', function() {
541
+ var o_w = $('#dialog').outerWidth();
542
+ var o_h = $('#dialog').outerHeight();
543
+ var f_w = $(window).width() - 30;
544
+ var f_h = $(window).height() - 30;
545
+ if ((o_w > f_w) || (o_h > f_h)) {
546
+ if ((f_w / f_h) > (o_w / o_h))
547
+ f_w = parseInt((o_w * f_h) / o_h);
548
+ else if ((f_w / f_h) < (o_w / o_h))
549
+ f_h = parseInt((o_h * f_w) / o_w);
550
+ $('#dialog img').attr({
551
+ width: f_w,
552
+ height: f_h
553
+ });
554
+ }
555
+ $('#dialog').unbind('click');
556
+ $('#dialog').click(function(e) {
557
+ browser.hideDialog();
558
+ $(document).unbind('keydown');
559
+ $(document).keydown(function(e) {
560
+ return !browser.selectAll(e);
561
+ });
562
+ if (browser.ssImage) {
563
+ browser.selectFile($(browser.ssImage), e);
564
+ }
565
+ });
566
+ browser.showDialog();
567
+ var images = [];
568
+ $.each(browser.files, function(i, file) {
569
+ if (file.thumb || file.smallThumb)
570
+ images[images.length] = file;
571
+ });
572
+ if (images.length)
573
+ $.each(images, function(i, image) {
574
+ if (image.name == data.name) {
575
+ $(document).unbind('keydown');
576
+ $(document).keydown(function(e) {
577
+ if (images.length > 1) {
578
+ if (!browser.lock && (e.keyCode == 37)) {
579
+ var nimg = i
580
+ ? images[i - 1]
581
+ : images[images.length - 1];
582
+ browser.lock = true;
583
+ showImage(nimg);
584
+ }
585
+ if (!browser.lock && (e.keyCode == 39)) {
586
+ var nimg = (i >= images.length - 1)
587
+ ? images[0]
588
+ : images[i + 1];
589
+ browser.lock = true;
590
+ showImage(nimg);
591
+ }
592
+ }
593
+ if (e.keyCode == 27) {
594
+ browser.hideDialog();
595
+ $(document).unbind('keydown');
596
+ $(document).keydown(function(e) {
597
+ return !browser.selectAll(e);
598
+ });
599
+ }
600
+ });
601
+ }
602
+ });
603
+ });
604
+ };
605
+ if (img.complete)
606
+ onImgLoad();
607
+ else
608
+ img.onload = onImgLoad;
609
+ };
610
+ showImage(data);
611
+ return false;
612
+ });
613
+ };