boss-cms 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1029) hide show
  1. data/COPYING +16 -0
  2. data/README.rdoc +63 -0
  3. data/Rakefile +38 -0
  4. data/app/assets/images/boss/ajax-loader.gif +0 -0
  5. data/app/assets/images/boss/icons/Small Icons/accdb.ico +0 -0
  6. data/app/assets/images/boss/icons/Small Icons/avi.ico +0 -0
  7. data/app/assets/images/boss/icons/Small Icons/bmp.ico +0 -0
  8. data/app/assets/images/boss/icons/Small Icons/css.ico +0 -0
  9. data/app/assets/images/boss/icons/Small Icons/docx_mac.ico +0 -0
  10. data/app/assets/images/boss/icons/Small Icons/docx_win.ico +0 -0
  11. data/app/assets/images/boss/icons/Small Icons/eml.ico +0 -0
  12. data/app/assets/images/boss/icons/Small Icons/eps.ico +0 -0
  13. data/app/assets/images/boss/icons/Small Icons/fla.ico +0 -0
  14. data/app/assets/images/boss/icons/Small Icons/gif.ico +0 -0
  15. data/app/assets/images/boss/icons/Small Icons/html.ico +0 -0
  16. data/app/assets/images/boss/icons/Small Icons/ind.ico +0 -0
  17. data/app/assets/images/boss/icons/Small Icons/ini.ico +0 -0
  18. data/app/assets/images/boss/icons/Small Icons/jpeg.ico +0 -0
  19. data/app/assets/images/boss/icons/Small Icons/jsf.ico +0 -0
  20. data/app/assets/images/boss/icons/Small Icons/midi.ico +0 -0
  21. data/app/assets/images/boss/icons/Small Icons/mov.ico +0 -0
  22. data/app/assets/images/boss/icons/Small Icons/mp3.ico +0 -0
  23. data/app/assets/images/boss/icons/Small Icons/mpeg.ico +0 -0
  24. data/app/assets/images/boss/icons/Small Icons/pdf.ico +0 -0
  25. data/app/assets/images/boss/icons/Small Icons/png.ico +0 -0
  26. data/app/assets/images/boss/icons/Small Icons/pptx_mac.ico +0 -0
  27. data/app/assets/images/boss/icons/Small Icons/pptx_win.ico +0 -0
  28. data/app/assets/images/boss/icons/Small Icons/proj.ico +0 -0
  29. data/app/assets/images/boss/icons/Small Icons/psd.ico +0 -0
  30. data/app/assets/images/boss/icons/Small Icons/pst.ico +0 -0
  31. data/app/assets/images/boss/icons/Small Icons/pub.ico +0 -0
  32. data/app/assets/images/boss/icons/Small Icons/rar.ico +0 -0
  33. data/app/assets/images/boss/icons/Small Icons/readme.ico +0 -0
  34. data/app/assets/images/boss/icons/Small Icons/settings.ico +0 -0
  35. data/app/assets/images/boss/icons/Small Icons/text.ico +0 -0
  36. data/app/assets/images/boss/icons/Small Icons/tiff.ico +0 -0
  37. data/app/assets/images/boss/icons/Small Icons/url.ico +0 -0
  38. data/app/assets/images/boss/icons/Small Icons/vsd.ico +0 -0
  39. data/app/assets/images/boss/icons/Small Icons/wav.ico +0 -0
  40. data/app/assets/images/boss/icons/Small Icons/wma.ico +0 -0
  41. data/app/assets/images/boss/icons/Small Icons/wmv.ico +0 -0
  42. data/app/assets/images/boss/icons/Small Icons/xlsx_mac.ico +0 -0
  43. data/app/assets/images/boss/icons/Small Icons/xlsx_win.ico +0 -0
  44. data/app/assets/images/boss/icons/Small Icons/zip.ico +0 -0
  45. data/app/assets/images/boss/icons/accdb/accdb-128_32.png +0 -0
  46. data/app/assets/images/boss/icons/accdb/accdb-16_32.png +0 -0
  47. data/app/assets/images/boss/icons/accdb/accdb-24_32.png +0 -0
  48. data/app/assets/images/boss/icons/accdb/accdb-256_32.png +0 -0
  49. data/app/assets/images/boss/icons/accdb/accdb-32_32.png +0 -0
  50. data/app/assets/images/boss/icons/accdb/accdb-48_32.png +0 -0
  51. data/app/assets/images/boss/icons/accdb/accdb-64_32.png +0 -0
  52. data/app/assets/images/boss/icons/accdb/accdb-72_32.png +0 -0
  53. data/app/assets/images/boss/icons/accdb/accdb-80_32.png +0 -0
  54. data/app/assets/images/boss/icons/accdb/accdb-96_32.png +0 -0
  55. data/app/assets/images/boss/icons/accdb/accdb-sm-16_32.png +0 -0
  56. data/app/assets/images/boss/icons/accdb/accdb-sm-24_32.png +0 -0
  57. data/app/assets/images/boss/icons/accdb/accdb-sm-32_32.png +0 -0
  58. data/app/assets/images/boss/icons/accdb/accdb-sm.ico +0 -0
  59. data/app/assets/images/boss/icons/accdb/accdb.ico +0 -0
  60. data/app/assets/images/boss/icons/avi/avi-128_32.png +0 -0
  61. data/app/assets/images/boss/icons/avi/avi-16_32.png +0 -0
  62. data/app/assets/images/boss/icons/avi/avi-24_32.png +0 -0
  63. data/app/assets/images/boss/icons/avi/avi-256_32.png +0 -0
  64. data/app/assets/images/boss/icons/avi/avi-32_32.png +0 -0
  65. data/app/assets/images/boss/icons/avi/avi-48_32.png +0 -0
  66. data/app/assets/images/boss/icons/avi/avi-64_32.png +0 -0
  67. data/app/assets/images/boss/icons/avi/avi-72_32.png +0 -0
  68. data/app/assets/images/boss/icons/avi/avi-80_32.png +0 -0
  69. data/app/assets/images/boss/icons/avi/avi-96_32.png +0 -0
  70. data/app/assets/images/boss/icons/avi/avi-sm-16_32.png +0 -0
  71. data/app/assets/images/boss/icons/avi/avi-sm-24_32.png +0 -0
  72. data/app/assets/images/boss/icons/avi/avi-sm-32_32.png +0 -0
  73. data/app/assets/images/boss/icons/avi/avi-sm.ico +0 -0
  74. data/app/assets/images/boss/icons/avi/avi.icns +0 -0
  75. data/app/assets/images/boss/icons/avi/avi.ico +0 -0
  76. data/app/assets/images/boss/icons/bmp/bmp-128_32.png +0 -0
  77. data/app/assets/images/boss/icons/bmp/bmp-16_32.png +0 -0
  78. data/app/assets/images/boss/icons/bmp/bmp-24_32.png +0 -0
  79. data/app/assets/images/boss/icons/bmp/bmp-256_32.png +0 -0
  80. data/app/assets/images/boss/icons/bmp/bmp-32_32.png +0 -0
  81. data/app/assets/images/boss/icons/bmp/bmp-48_32.png +0 -0
  82. data/app/assets/images/boss/icons/bmp/bmp-64_32.png +0 -0
  83. data/app/assets/images/boss/icons/bmp/bmp-72_32.png +0 -0
  84. data/app/assets/images/boss/icons/bmp/bmp-80_32.png +0 -0
  85. data/app/assets/images/boss/icons/bmp/bmp-96_32.png +0 -0
  86. data/app/assets/images/boss/icons/bmp/bmp-sm-16_32.png +0 -0
  87. data/app/assets/images/boss/icons/bmp/bmp-sm-24_32.png +0 -0
  88. data/app/assets/images/boss/icons/bmp/bmp-sm-32_32.png +0 -0
  89. data/app/assets/images/boss/icons/bmp/bmp-sm.ico +0 -0
  90. data/app/assets/images/boss/icons/bmp/bmp.icns +0 -0
  91. data/app/assets/images/boss/icons/bmp/bmp.ico +0 -0
  92. data/app/assets/images/boss/icons/css/css-128_32.png +0 -0
  93. data/app/assets/images/boss/icons/css/css-16_32.png +0 -0
  94. data/app/assets/images/boss/icons/css/css-24_32.png +0 -0
  95. data/app/assets/images/boss/icons/css/css-256_32.png +0 -0
  96. data/app/assets/images/boss/icons/css/css-32_32.png +0 -0
  97. data/app/assets/images/boss/icons/css/css-48_32.png +0 -0
  98. data/app/assets/images/boss/icons/css/css-64_32.png +0 -0
  99. data/app/assets/images/boss/icons/css/css-72_32.png +0 -0
  100. data/app/assets/images/boss/icons/css/css-80_32.png +0 -0
  101. data/app/assets/images/boss/icons/css/css-96_32.png +0 -0
  102. data/app/assets/images/boss/icons/css/css-sm-16_32.png +0 -0
  103. data/app/assets/images/boss/icons/css/css-sm-24_32.png +0 -0
  104. data/app/assets/images/boss/icons/css/css-sm-32_32.png +0 -0
  105. data/app/assets/images/boss/icons/css/css-sm.ico +0 -0
  106. data/app/assets/images/boss/icons/css/css.icns +0 -0
  107. data/app/assets/images/boss/icons/css/css.ico +0 -0
  108. data/app/assets/images/boss/icons/docx_mac/docx_mac-128_32.png +0 -0
  109. data/app/assets/images/boss/icons/docx_mac/docx_mac-16_32.png +0 -0
  110. data/app/assets/images/boss/icons/docx_mac/docx_mac-24_32.png +0 -0
  111. data/app/assets/images/boss/icons/docx_mac/docx_mac-256_32.png +0 -0
  112. data/app/assets/images/boss/icons/docx_mac/docx_mac-32_32.png +0 -0
  113. data/app/assets/images/boss/icons/docx_mac/docx_mac-48_32.png +0 -0
  114. data/app/assets/images/boss/icons/docx_mac/docx_mac-64_32.png +0 -0
  115. data/app/assets/images/boss/icons/docx_mac/docx_mac-72_32.png +0 -0
  116. data/app/assets/images/boss/icons/docx_mac/docx_mac-80_32.png +0 -0
  117. data/app/assets/images/boss/icons/docx_mac/docx_mac-96_32.png +0 -0
  118. data/app/assets/images/boss/icons/docx_mac/docx_mac-sm-16_32.png +0 -0
  119. data/app/assets/images/boss/icons/docx_mac/docx_mac-sm-24_32.png +0 -0
  120. data/app/assets/images/boss/icons/docx_mac/docx_mac-sm-32_32.png +0 -0
  121. data/app/assets/images/boss/icons/docx_mac/docx_mac-sm.ico +0 -0
  122. data/app/assets/images/boss/icons/docx_mac/docx_mac.icns +0 -0
  123. data/app/assets/images/boss/icons/docx_mac/docx_mac.ico +0 -0
  124. data/app/assets/images/boss/icons/docx_win/docx_win-128_32.png +0 -0
  125. data/app/assets/images/boss/icons/docx_win/docx_win-16_32.png +0 -0
  126. data/app/assets/images/boss/icons/docx_win/docx_win-24_32.png +0 -0
  127. data/app/assets/images/boss/icons/docx_win/docx_win-256_32.png +0 -0
  128. data/app/assets/images/boss/icons/docx_win/docx_win-32_32.png +0 -0
  129. data/app/assets/images/boss/icons/docx_win/docx_win-48_32.png +0 -0
  130. data/app/assets/images/boss/icons/docx_win/docx_win-64_32.png +0 -0
  131. data/app/assets/images/boss/icons/docx_win/docx_win-72_32.png +0 -0
  132. data/app/assets/images/boss/icons/docx_win/docx_win-80_32.png +0 -0
  133. data/app/assets/images/boss/icons/docx_win/docx_win-96_32.png +0 -0
  134. data/app/assets/images/boss/icons/docx_win/docx_win-sm-16_32.png +0 -0
  135. data/app/assets/images/boss/icons/docx_win/docx_win-sm-24_32.png +0 -0
  136. data/app/assets/images/boss/icons/docx_win/docx_win-sm-32_32.png +0 -0
  137. data/app/assets/images/boss/icons/docx_win/docx_win-sm.ico +0 -0
  138. data/app/assets/images/boss/icons/docx_win/docx_win.ico +0 -0
  139. data/app/assets/images/boss/icons/eml/eml-128_32.png +0 -0
  140. data/app/assets/images/boss/icons/eml/eml-16_32.png +0 -0
  141. data/app/assets/images/boss/icons/eml/eml-24_32.png +0 -0
  142. data/app/assets/images/boss/icons/eml/eml-256_32.png +0 -0
  143. data/app/assets/images/boss/icons/eml/eml-32_32.png +0 -0
  144. data/app/assets/images/boss/icons/eml/eml-48_32.png +0 -0
  145. data/app/assets/images/boss/icons/eml/eml-64_32.png +0 -0
  146. data/app/assets/images/boss/icons/eml/eml-72_32.png +0 -0
  147. data/app/assets/images/boss/icons/eml/eml-80_32.png +0 -0
  148. data/app/assets/images/boss/icons/eml/eml-96_32.png +0 -0
  149. data/app/assets/images/boss/icons/eml/eml-sm-16_32.png +0 -0
  150. data/app/assets/images/boss/icons/eml/eml-sm-24_32.png +0 -0
  151. data/app/assets/images/boss/icons/eml/eml-sm-32_32.png +0 -0
  152. data/app/assets/images/boss/icons/eml/eml-sm.ico +0 -0
  153. data/app/assets/images/boss/icons/eml/eml.icns +0 -0
  154. data/app/assets/images/boss/icons/eml/eml.ico +0 -0
  155. data/app/assets/images/boss/icons/eps/eps-128_32.png +0 -0
  156. data/app/assets/images/boss/icons/eps/eps-16_32.png +0 -0
  157. data/app/assets/images/boss/icons/eps/eps-24_32.png +0 -0
  158. data/app/assets/images/boss/icons/eps/eps-256_32.png +0 -0
  159. data/app/assets/images/boss/icons/eps/eps-32_32.png +0 -0
  160. data/app/assets/images/boss/icons/eps/eps-48_32.png +0 -0
  161. data/app/assets/images/boss/icons/eps/eps-64_32.png +0 -0
  162. data/app/assets/images/boss/icons/eps/eps-72_32.png +0 -0
  163. data/app/assets/images/boss/icons/eps/eps-80_32.png +0 -0
  164. data/app/assets/images/boss/icons/eps/eps-96_32.png +0 -0
  165. data/app/assets/images/boss/icons/eps/eps-sm-16_32.png +0 -0
  166. data/app/assets/images/boss/icons/eps/eps-sm-24_32.png +0 -0
  167. data/app/assets/images/boss/icons/eps/eps-sm-32_32.png +0 -0
  168. data/app/assets/images/boss/icons/eps/eps-sm.ico +0 -0
  169. data/app/assets/images/boss/icons/eps/eps.icns +0 -0
  170. data/app/assets/images/boss/icons/eps/eps.ico +0 -0
  171. data/app/assets/images/boss/icons/fla/fla-128_32.png +0 -0
  172. data/app/assets/images/boss/icons/fla/fla-16_32.png +0 -0
  173. data/app/assets/images/boss/icons/fla/fla-24_32.png +0 -0
  174. data/app/assets/images/boss/icons/fla/fla-256_32.png +0 -0
  175. data/app/assets/images/boss/icons/fla/fla-32_32.png +0 -0
  176. data/app/assets/images/boss/icons/fla/fla-48_32.png +0 -0
  177. data/app/assets/images/boss/icons/fla/fla-64_32.png +0 -0
  178. data/app/assets/images/boss/icons/fla/fla-72_32.png +0 -0
  179. data/app/assets/images/boss/icons/fla/fla-80_32.png +0 -0
  180. data/app/assets/images/boss/icons/fla/fla-96_32.png +0 -0
  181. data/app/assets/images/boss/icons/fla/fla-sm-16_32.png +0 -0
  182. data/app/assets/images/boss/icons/fla/fla-sm-24_32.png +0 -0
  183. data/app/assets/images/boss/icons/fla/fla-sm-32_32.png +0 -0
  184. data/app/assets/images/boss/icons/fla/fla-sm.ico +0 -0
  185. data/app/assets/images/boss/icons/fla/fla.icns +0 -0
  186. data/app/assets/images/boss/icons/fla/fla.ico +0 -0
  187. data/app/assets/images/boss/icons/gif/gif-128_32.png +0 -0
  188. data/app/assets/images/boss/icons/gif/gif-16_32.png +0 -0
  189. data/app/assets/images/boss/icons/gif/gif-24_32.png +0 -0
  190. data/app/assets/images/boss/icons/gif/gif-256_32.png +0 -0
  191. data/app/assets/images/boss/icons/gif/gif-32_32.png +0 -0
  192. data/app/assets/images/boss/icons/gif/gif-48_32.png +0 -0
  193. data/app/assets/images/boss/icons/gif/gif-64_32.png +0 -0
  194. data/app/assets/images/boss/icons/gif/gif-72_32.png +0 -0
  195. data/app/assets/images/boss/icons/gif/gif-80_32.png +0 -0
  196. data/app/assets/images/boss/icons/gif/gif-96_32.png +0 -0
  197. data/app/assets/images/boss/icons/gif/gif-sm-16_32.png +0 -0
  198. data/app/assets/images/boss/icons/gif/gif-sm-24_32.png +0 -0
  199. data/app/assets/images/boss/icons/gif/gif-sm-32_32.png +0 -0
  200. data/app/assets/images/boss/icons/gif/gif-sm.ico +0 -0
  201. data/app/assets/images/boss/icons/gif/gif.icns +0 -0
  202. data/app/assets/images/boss/icons/gif/gif.ico +0 -0
  203. data/app/assets/images/boss/icons/html/html-128_32.png +0 -0
  204. data/app/assets/images/boss/icons/html/html-16_32.png +0 -0
  205. data/app/assets/images/boss/icons/html/html-24_32.png +0 -0
  206. data/app/assets/images/boss/icons/html/html-256_32.png +0 -0
  207. data/app/assets/images/boss/icons/html/html-32_32.png +0 -0
  208. data/app/assets/images/boss/icons/html/html-48_32.png +0 -0
  209. data/app/assets/images/boss/icons/html/html-64_32.png +0 -0
  210. data/app/assets/images/boss/icons/html/html-72_32.png +0 -0
  211. data/app/assets/images/boss/icons/html/html-80_32.png +0 -0
  212. data/app/assets/images/boss/icons/html/html-96_32.png +0 -0
  213. data/app/assets/images/boss/icons/html/html-sm-16_32.png +0 -0
  214. data/app/assets/images/boss/icons/html/html-sm-24_32.png +0 -0
  215. data/app/assets/images/boss/icons/html/html-sm-32_32.png +0 -0
  216. data/app/assets/images/boss/icons/html/html-sm.ico +0 -0
  217. data/app/assets/images/boss/icons/html/html.icns +0 -0
  218. data/app/assets/images/boss/icons/html/html.ico +0 -0
  219. data/app/assets/images/boss/icons/ind/ind-128_32.png +0 -0
  220. data/app/assets/images/boss/icons/ind/ind-16_32.png +0 -0
  221. data/app/assets/images/boss/icons/ind/ind-24_32.png +0 -0
  222. data/app/assets/images/boss/icons/ind/ind-256_32.png +0 -0
  223. data/app/assets/images/boss/icons/ind/ind-32_32.png +0 -0
  224. data/app/assets/images/boss/icons/ind/ind-48_32.png +0 -0
  225. data/app/assets/images/boss/icons/ind/ind-64_32.png +0 -0
  226. data/app/assets/images/boss/icons/ind/ind-72_32.png +0 -0
  227. data/app/assets/images/boss/icons/ind/ind-80_32.png +0 -0
  228. data/app/assets/images/boss/icons/ind/ind-96_32.png +0 -0
  229. data/app/assets/images/boss/icons/ind/ind-sm-16_32.png +0 -0
  230. data/app/assets/images/boss/icons/ind/ind-sm-24_32.png +0 -0
  231. data/app/assets/images/boss/icons/ind/ind-sm-32_32.png +0 -0
  232. data/app/assets/images/boss/icons/ind/ind-sm.ico +0 -0
  233. data/app/assets/images/boss/icons/ind/ind.icns +0 -0
  234. data/app/assets/images/boss/icons/ind/ind.ico +0 -0
  235. data/app/assets/images/boss/icons/ini/ini-128_32.png +0 -0
  236. data/app/assets/images/boss/icons/ini/ini-16_32.png +0 -0
  237. data/app/assets/images/boss/icons/ini/ini-24_32.png +0 -0
  238. data/app/assets/images/boss/icons/ini/ini-256_32.png +0 -0
  239. data/app/assets/images/boss/icons/ini/ini-32_32.png +0 -0
  240. data/app/assets/images/boss/icons/ini/ini-48_32.png +0 -0
  241. data/app/assets/images/boss/icons/ini/ini-64_32.png +0 -0
  242. data/app/assets/images/boss/icons/ini/ini-72_32.png +0 -0
  243. data/app/assets/images/boss/icons/ini/ini-80_32.png +0 -0
  244. data/app/assets/images/boss/icons/ini/ini-96_32.png +0 -0
  245. data/app/assets/images/boss/icons/ini/ini-sm-16_32.png +0 -0
  246. data/app/assets/images/boss/icons/ini/ini-sm-24_32.png +0 -0
  247. data/app/assets/images/boss/icons/ini/ini-sm-32_32.png +0 -0
  248. data/app/assets/images/boss/icons/ini/ini-sm.ico +0 -0
  249. data/app/assets/images/boss/icons/ini/ini.icns +0 -0
  250. data/app/assets/images/boss/icons/ini/ini.ico +0 -0
  251. data/app/assets/images/boss/icons/jpeg/jpeg-128_32.png +0 -0
  252. data/app/assets/images/boss/icons/jpeg/jpeg-16_32.png +0 -0
  253. data/app/assets/images/boss/icons/jpeg/jpeg-24_32.png +0 -0
  254. data/app/assets/images/boss/icons/jpeg/jpeg-256_32.png +0 -0
  255. data/app/assets/images/boss/icons/jpeg/jpeg-32_32.png +0 -0
  256. data/app/assets/images/boss/icons/jpeg/jpeg-48_32.png +0 -0
  257. data/app/assets/images/boss/icons/jpeg/jpeg-64_32.png +0 -0
  258. data/app/assets/images/boss/icons/jpeg/jpeg-72_32.png +0 -0
  259. data/app/assets/images/boss/icons/jpeg/jpeg-80_32.png +0 -0
  260. data/app/assets/images/boss/icons/jpeg/jpeg-96_32.png +0 -0
  261. data/app/assets/images/boss/icons/jpeg/jpeg-sm-16_32.png +0 -0
  262. data/app/assets/images/boss/icons/jpeg/jpeg-sm-24_32.png +0 -0
  263. data/app/assets/images/boss/icons/jpeg/jpeg-sm-32_32.png +0 -0
  264. data/app/assets/images/boss/icons/jpeg/jpeg-sm.ico +0 -0
  265. data/app/assets/images/boss/icons/jpeg/jpeg.icns +0 -0
  266. data/app/assets/images/boss/icons/jpeg/jpeg.ico +0 -0
  267. data/app/assets/images/boss/icons/jsf/jsf-128_32.png +0 -0
  268. data/app/assets/images/boss/icons/jsf/jsf-16_32.png +0 -0
  269. data/app/assets/images/boss/icons/jsf/jsf-24_32.png +0 -0
  270. data/app/assets/images/boss/icons/jsf/jsf-256_32.png +0 -0
  271. data/app/assets/images/boss/icons/jsf/jsf-32_32.png +0 -0
  272. data/app/assets/images/boss/icons/jsf/jsf-48_32.png +0 -0
  273. data/app/assets/images/boss/icons/jsf/jsf-64_32.png +0 -0
  274. data/app/assets/images/boss/icons/jsf/jsf-72_32.png +0 -0
  275. data/app/assets/images/boss/icons/jsf/jsf-80_32.png +0 -0
  276. data/app/assets/images/boss/icons/jsf/jsf-96_32.png +0 -0
  277. data/app/assets/images/boss/icons/jsf/jsf-sm-16_32.png +0 -0
  278. data/app/assets/images/boss/icons/jsf/jsf-sm-24_32.png +0 -0
  279. data/app/assets/images/boss/icons/jsf/jsf-sm-32_32.png +0 -0
  280. data/app/assets/images/boss/icons/jsf/jsf-sm.ico +0 -0
  281. data/app/assets/images/boss/icons/jsf/jsf.icns +0 -0
  282. data/app/assets/images/boss/icons/jsf/jsf.ico +0 -0
  283. data/app/assets/images/boss/icons/midi/midi-128_32.png +0 -0
  284. data/app/assets/images/boss/icons/midi/midi-16_32.png +0 -0
  285. data/app/assets/images/boss/icons/midi/midi-24_32.png +0 -0
  286. data/app/assets/images/boss/icons/midi/midi-256_32.png +0 -0
  287. data/app/assets/images/boss/icons/midi/midi-32_32.png +0 -0
  288. data/app/assets/images/boss/icons/midi/midi-48_32.png +0 -0
  289. data/app/assets/images/boss/icons/midi/midi-64_32.png +0 -0
  290. data/app/assets/images/boss/icons/midi/midi-72_32.png +0 -0
  291. data/app/assets/images/boss/icons/midi/midi-80_32.png +0 -0
  292. data/app/assets/images/boss/icons/midi/midi-96_32.png +0 -0
  293. data/app/assets/images/boss/icons/midi/midi-sm-16_32.png +0 -0
  294. data/app/assets/images/boss/icons/midi/midi-sm-24_32.png +0 -0
  295. data/app/assets/images/boss/icons/midi/midi-sm-32_32.png +0 -0
  296. data/app/assets/images/boss/icons/midi/midi-sm.ico +0 -0
  297. data/app/assets/images/boss/icons/midi/midi.icns +0 -0
  298. data/app/assets/images/boss/icons/midi/midi.ico +0 -0
  299. data/app/assets/images/boss/icons/mov/mov-128_32.png +0 -0
  300. data/app/assets/images/boss/icons/mov/mov-16_32.png +0 -0
  301. data/app/assets/images/boss/icons/mov/mov-24_32.png +0 -0
  302. data/app/assets/images/boss/icons/mov/mov-256_32.png +0 -0
  303. data/app/assets/images/boss/icons/mov/mov-32_32.png +0 -0
  304. data/app/assets/images/boss/icons/mov/mov-48_32.png +0 -0
  305. data/app/assets/images/boss/icons/mov/mov-64_32.png +0 -0
  306. data/app/assets/images/boss/icons/mov/mov-72_32.png +0 -0
  307. data/app/assets/images/boss/icons/mov/mov-80_32.png +0 -0
  308. data/app/assets/images/boss/icons/mov/mov-96_32.png +0 -0
  309. data/app/assets/images/boss/icons/mov/mov-sm-16_32.png +0 -0
  310. data/app/assets/images/boss/icons/mov/mov-sm-24_32.png +0 -0
  311. data/app/assets/images/boss/icons/mov/mov-sm-32_32.png +0 -0
  312. data/app/assets/images/boss/icons/mov/mov-sm.ico +0 -0
  313. data/app/assets/images/boss/icons/mov/mov.icns +0 -0
  314. data/app/assets/images/boss/icons/mov/mov.ico +0 -0
  315. data/app/assets/images/boss/icons/mp3/mp3-128_32.png +0 -0
  316. data/app/assets/images/boss/icons/mp3/mp3-16_32.png +0 -0
  317. data/app/assets/images/boss/icons/mp3/mp3-24_32.png +0 -0
  318. data/app/assets/images/boss/icons/mp3/mp3-256_32.png +0 -0
  319. data/app/assets/images/boss/icons/mp3/mp3-32_32.png +0 -0
  320. data/app/assets/images/boss/icons/mp3/mp3-48_32.png +0 -0
  321. data/app/assets/images/boss/icons/mp3/mp3-64_32.png +0 -0
  322. data/app/assets/images/boss/icons/mp3/mp3-72_32.png +0 -0
  323. data/app/assets/images/boss/icons/mp3/mp3-80_32.png +0 -0
  324. data/app/assets/images/boss/icons/mp3/mp3-96_32.png +0 -0
  325. data/app/assets/images/boss/icons/mp3/mp3-sm-16_32.png +0 -0
  326. data/app/assets/images/boss/icons/mp3/mp3-sm-24_32.png +0 -0
  327. data/app/assets/images/boss/icons/mp3/mp3-sm-32_32.png +0 -0
  328. data/app/assets/images/boss/icons/mp3/mp3-sm.ico +0 -0
  329. data/app/assets/images/boss/icons/mp3/mp3.icns +0 -0
  330. data/app/assets/images/boss/icons/mp3/mp3.ico +0 -0
  331. data/app/assets/images/boss/icons/mpeg/mpeg-128_32.png +0 -0
  332. data/app/assets/images/boss/icons/mpeg/mpeg-16_32.png +0 -0
  333. data/app/assets/images/boss/icons/mpeg/mpeg-24_32.png +0 -0
  334. data/app/assets/images/boss/icons/mpeg/mpeg-256_32.png +0 -0
  335. data/app/assets/images/boss/icons/mpeg/mpeg-32_32.png +0 -0
  336. data/app/assets/images/boss/icons/mpeg/mpeg-48_32.png +0 -0
  337. data/app/assets/images/boss/icons/mpeg/mpeg-64_32.png +0 -0
  338. data/app/assets/images/boss/icons/mpeg/mpeg-72_32.png +0 -0
  339. data/app/assets/images/boss/icons/mpeg/mpeg-80_32.png +0 -0
  340. data/app/assets/images/boss/icons/mpeg/mpeg-96_32.png +0 -0
  341. data/app/assets/images/boss/icons/mpeg/mpeg-sm-16_32.png +0 -0
  342. data/app/assets/images/boss/icons/mpeg/mpeg-sm-24_32.png +0 -0
  343. data/app/assets/images/boss/icons/mpeg/mpeg-sm-32_32.png +0 -0
  344. data/app/assets/images/boss/icons/mpeg/mpeg-sm.ico +0 -0
  345. data/app/assets/images/boss/icons/mpeg/mpeg.icns +0 -0
  346. data/app/assets/images/boss/icons/mpeg/mpeg.ico +0 -0
  347. data/app/assets/images/boss/icons/pdf/pdf-128_32.png +0 -0
  348. data/app/assets/images/boss/icons/pdf/pdf-16_32.png +0 -0
  349. data/app/assets/images/boss/icons/pdf/pdf-24_32.png +0 -0
  350. data/app/assets/images/boss/icons/pdf/pdf-256_32.png +0 -0
  351. data/app/assets/images/boss/icons/pdf/pdf-32_32.png +0 -0
  352. data/app/assets/images/boss/icons/pdf/pdf-48_32.png +0 -0
  353. data/app/assets/images/boss/icons/pdf/pdf-64_32.png +0 -0
  354. data/app/assets/images/boss/icons/pdf/pdf-72_32.png +0 -0
  355. data/app/assets/images/boss/icons/pdf/pdf-80_32.png +0 -0
  356. data/app/assets/images/boss/icons/pdf/pdf-96_32.png +0 -0
  357. data/app/assets/images/boss/icons/pdf/pdf-sm-16_32.png +0 -0
  358. data/app/assets/images/boss/icons/pdf/pdf-sm-24_32.png +0 -0
  359. data/app/assets/images/boss/icons/pdf/pdf-sm-32_32.png +0 -0
  360. data/app/assets/images/boss/icons/pdf/pdf-sm.ico +0 -0
  361. data/app/assets/images/boss/icons/pdf/pdf.icns +0 -0
  362. data/app/assets/images/boss/icons/pdf/pdf.ico +0 -0
  363. data/app/assets/images/boss/icons/png/png-128_32.png +0 -0
  364. data/app/assets/images/boss/icons/png/png-16_32.png +0 -0
  365. data/app/assets/images/boss/icons/png/png-24_32.png +0 -0
  366. data/app/assets/images/boss/icons/png/png-256_32.png +0 -0
  367. data/app/assets/images/boss/icons/png/png-32_32.png +0 -0
  368. data/app/assets/images/boss/icons/png/png-48_32.png +0 -0
  369. data/app/assets/images/boss/icons/png/png-64_32.png +0 -0
  370. data/app/assets/images/boss/icons/png/png-72_32.png +0 -0
  371. data/app/assets/images/boss/icons/png/png-80_32.png +0 -0
  372. data/app/assets/images/boss/icons/png/png-96_32.png +0 -0
  373. data/app/assets/images/boss/icons/png/png-sm-16_32.png +0 -0
  374. data/app/assets/images/boss/icons/png/png-sm-24_32.png +0 -0
  375. data/app/assets/images/boss/icons/png/png-sm-32_32.png +0 -0
  376. data/app/assets/images/boss/icons/png/png-sm.ico +0 -0
  377. data/app/assets/images/boss/icons/png/png.icns +0 -0
  378. data/app/assets/images/boss/icons/png/png.ico +0 -0
  379. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-128_32.png +0 -0
  380. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-16_32.png +0 -0
  381. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-24_32.png +0 -0
  382. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-256_32.png +0 -0
  383. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-32_32.png +0 -0
  384. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-48_32.png +0 -0
  385. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-64_32.png +0 -0
  386. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-72_32.png +0 -0
  387. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-80_32.png +0 -0
  388. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-96_32.png +0 -0
  389. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-sm-16_32.png +0 -0
  390. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-sm-24_32.png +0 -0
  391. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-sm-32_32.png +0 -0
  392. data/app/assets/images/boss/icons/pptx_mac/pptx_mac-sm.ico +0 -0
  393. data/app/assets/images/boss/icons/pptx_mac/pptx_mac.icns +0 -0
  394. data/app/assets/images/boss/icons/pptx_mac/pptx_mac.ico +0 -0
  395. data/app/assets/images/boss/icons/pptx_win/pptx_win-128_32.png +0 -0
  396. data/app/assets/images/boss/icons/pptx_win/pptx_win-16_32.png +0 -0
  397. data/app/assets/images/boss/icons/pptx_win/pptx_win-24_32.png +0 -0
  398. data/app/assets/images/boss/icons/pptx_win/pptx_win-256_32.png +0 -0
  399. data/app/assets/images/boss/icons/pptx_win/pptx_win-32_32.png +0 -0
  400. data/app/assets/images/boss/icons/pptx_win/pptx_win-48_32.png +0 -0
  401. data/app/assets/images/boss/icons/pptx_win/pptx_win-64_32.png +0 -0
  402. data/app/assets/images/boss/icons/pptx_win/pptx_win-72_32.png +0 -0
  403. data/app/assets/images/boss/icons/pptx_win/pptx_win-80_32.png +0 -0
  404. data/app/assets/images/boss/icons/pptx_win/pptx_win-96_32.png +0 -0
  405. data/app/assets/images/boss/icons/pptx_win/pptx_win-sm-16_32.png +0 -0
  406. data/app/assets/images/boss/icons/pptx_win/pptx_win-sm-24_32.png +0 -0
  407. data/app/assets/images/boss/icons/pptx_win/pptx_win-sm-32_32.png +0 -0
  408. data/app/assets/images/boss/icons/pptx_win/pptx_win-sm.ico +0 -0
  409. data/app/assets/images/boss/icons/pptx_win/pptx_win.ico +0 -0
  410. data/app/assets/images/boss/icons/proj/proj-128_32.png +0 -0
  411. data/app/assets/images/boss/icons/proj/proj-16_32.png +0 -0
  412. data/app/assets/images/boss/icons/proj/proj-24_32.png +0 -0
  413. data/app/assets/images/boss/icons/proj/proj-256_32.png +0 -0
  414. data/app/assets/images/boss/icons/proj/proj-32_32.png +0 -0
  415. data/app/assets/images/boss/icons/proj/proj-48_32.png +0 -0
  416. data/app/assets/images/boss/icons/proj/proj-64_32.png +0 -0
  417. data/app/assets/images/boss/icons/proj/proj-72_32.png +0 -0
  418. data/app/assets/images/boss/icons/proj/proj-80_32.png +0 -0
  419. data/app/assets/images/boss/icons/proj/proj-96_32.png +0 -0
  420. data/app/assets/images/boss/icons/proj/proj-sm-16_32.png +0 -0
  421. data/app/assets/images/boss/icons/proj/proj-sm-24_32.png +0 -0
  422. data/app/assets/images/boss/icons/proj/proj-sm-32_32.png +0 -0
  423. data/app/assets/images/boss/icons/proj/proj-sm.ico +0 -0
  424. data/app/assets/images/boss/icons/proj/proj.icns +0 -0
  425. data/app/assets/images/boss/icons/proj/proj.ico +0 -0
  426. data/app/assets/images/boss/icons/psd/psd-128_32.png +0 -0
  427. data/app/assets/images/boss/icons/psd/psd-16_32.png +0 -0
  428. data/app/assets/images/boss/icons/psd/psd-24_32.png +0 -0
  429. data/app/assets/images/boss/icons/psd/psd-256_32.png +0 -0
  430. data/app/assets/images/boss/icons/psd/psd-32_32.png +0 -0
  431. data/app/assets/images/boss/icons/psd/psd-48_32.png +0 -0
  432. data/app/assets/images/boss/icons/psd/psd-64_32.png +0 -0
  433. data/app/assets/images/boss/icons/psd/psd-72_32.png +0 -0
  434. data/app/assets/images/boss/icons/psd/psd-80_32.png +0 -0
  435. data/app/assets/images/boss/icons/psd/psd-96_32.png +0 -0
  436. data/app/assets/images/boss/icons/psd/psd-sm-16_32.png +0 -0
  437. data/app/assets/images/boss/icons/psd/psd-sm-24_32.png +0 -0
  438. data/app/assets/images/boss/icons/psd/psd-sm-32_32.png +0 -0
  439. data/app/assets/images/boss/icons/psd/psd-sm.ico +0 -0
  440. data/app/assets/images/boss/icons/psd/psd.icns +0 -0
  441. data/app/assets/images/boss/icons/psd/psd.ico +0 -0
  442. data/app/assets/images/boss/icons/pst/pst-128_32.png +0 -0
  443. data/app/assets/images/boss/icons/pst/pst-16_32.png +0 -0
  444. data/app/assets/images/boss/icons/pst/pst-24_32.png +0 -0
  445. data/app/assets/images/boss/icons/pst/pst-256_32.png +0 -0
  446. data/app/assets/images/boss/icons/pst/pst-32_32.png +0 -0
  447. data/app/assets/images/boss/icons/pst/pst-48_32.png +0 -0
  448. data/app/assets/images/boss/icons/pst/pst-64_32.png +0 -0
  449. data/app/assets/images/boss/icons/pst/pst-72_32.png +0 -0
  450. data/app/assets/images/boss/icons/pst/pst-80_32.png +0 -0
  451. data/app/assets/images/boss/icons/pst/pst-96_32.png +0 -0
  452. data/app/assets/images/boss/icons/pst/pst-sm-16_32.png +0 -0
  453. data/app/assets/images/boss/icons/pst/pst-sm-24_32.png +0 -0
  454. data/app/assets/images/boss/icons/pst/pst-sm-32_32.png +0 -0
  455. data/app/assets/images/boss/icons/pst/pst-sm.ico +0 -0
  456. data/app/assets/images/boss/icons/pst/pst.ico +0 -0
  457. data/app/assets/images/boss/icons/pub/pub-128_32.png +0 -0
  458. data/app/assets/images/boss/icons/pub/pub-16_32.png +0 -0
  459. data/app/assets/images/boss/icons/pub/pub-24_32.png +0 -0
  460. data/app/assets/images/boss/icons/pub/pub-256_32.png +0 -0
  461. data/app/assets/images/boss/icons/pub/pub-32_32.png +0 -0
  462. data/app/assets/images/boss/icons/pub/pub-48_32.png +0 -0
  463. data/app/assets/images/boss/icons/pub/pub-64_32.png +0 -0
  464. data/app/assets/images/boss/icons/pub/pub-72_32.png +0 -0
  465. data/app/assets/images/boss/icons/pub/pub-80_32.png +0 -0
  466. data/app/assets/images/boss/icons/pub/pub-96_32.png +0 -0
  467. data/app/assets/images/boss/icons/pub/pub-sm-16_32.png +0 -0
  468. data/app/assets/images/boss/icons/pub/pub-sm-24_32.png +0 -0
  469. data/app/assets/images/boss/icons/pub/pub-sm-32_32.png +0 -0
  470. data/app/assets/images/boss/icons/pub/pub-sm.ico +0 -0
  471. data/app/assets/images/boss/icons/pub/pub.ico +0 -0
  472. data/app/assets/images/boss/icons/rar/rar-128_32.png +0 -0
  473. data/app/assets/images/boss/icons/rar/rar-16_32.png +0 -0
  474. data/app/assets/images/boss/icons/rar/rar-24_32.png +0 -0
  475. data/app/assets/images/boss/icons/rar/rar-256_32.png +0 -0
  476. data/app/assets/images/boss/icons/rar/rar-32_32.png +0 -0
  477. data/app/assets/images/boss/icons/rar/rar-48_32.png +0 -0
  478. data/app/assets/images/boss/icons/rar/rar-64_32.png +0 -0
  479. data/app/assets/images/boss/icons/rar/rar-72_32.png +0 -0
  480. data/app/assets/images/boss/icons/rar/rar-80_32.png +0 -0
  481. data/app/assets/images/boss/icons/rar/rar-96_32.png +0 -0
  482. data/app/assets/images/boss/icons/rar/rar-sm-16_32.png +0 -0
  483. data/app/assets/images/boss/icons/rar/rar-sm-24_32.png +0 -0
  484. data/app/assets/images/boss/icons/rar/rar-sm-32_32.png +0 -0
  485. data/app/assets/images/boss/icons/rar/rar-sm.ico +0 -0
  486. data/app/assets/images/boss/icons/rar/rar.ico +0 -0
  487. data/app/assets/images/boss/icons/readme/readme-128_32.png +0 -0
  488. data/app/assets/images/boss/icons/readme/readme-16_32.png +0 -0
  489. data/app/assets/images/boss/icons/readme/readme-24_32.png +0 -0
  490. data/app/assets/images/boss/icons/readme/readme-256_32.png +0 -0
  491. data/app/assets/images/boss/icons/readme/readme-32_32.png +0 -0
  492. data/app/assets/images/boss/icons/readme/readme-48_32.png +0 -0
  493. data/app/assets/images/boss/icons/readme/readme-64_32.png +0 -0
  494. data/app/assets/images/boss/icons/readme/readme-72_32.png +0 -0
  495. data/app/assets/images/boss/icons/readme/readme-80_32.png +0 -0
  496. data/app/assets/images/boss/icons/readme/readme-96_32.png +0 -0
  497. data/app/assets/images/boss/icons/readme/readme-sm-16_32.png +0 -0
  498. data/app/assets/images/boss/icons/readme/readme-sm-24_32.png +0 -0
  499. data/app/assets/images/boss/icons/readme/readme-sm-32_32.png +0 -0
  500. data/app/assets/images/boss/icons/readme/readme-sm.ico +0 -0
  501. data/app/assets/images/boss/icons/readme/readme.icns +0 -0
  502. data/app/assets/images/boss/icons/readme/readme.ico +0 -0
  503. data/app/assets/images/boss/icons/settings/settings-128_32.png +0 -0
  504. data/app/assets/images/boss/icons/settings/settings-16_32.png +0 -0
  505. data/app/assets/images/boss/icons/settings/settings-24_32.png +0 -0
  506. data/app/assets/images/boss/icons/settings/settings-256_32.png +0 -0
  507. data/app/assets/images/boss/icons/settings/settings-32_32.png +0 -0
  508. data/app/assets/images/boss/icons/settings/settings-48_32.png +0 -0
  509. data/app/assets/images/boss/icons/settings/settings-64_32.png +0 -0
  510. data/app/assets/images/boss/icons/settings/settings-72_32.png +0 -0
  511. data/app/assets/images/boss/icons/settings/settings-80_32.png +0 -0
  512. data/app/assets/images/boss/icons/settings/settings-96_32.png +0 -0
  513. data/app/assets/images/boss/icons/settings/settings-sm-16_32.png +0 -0
  514. data/app/assets/images/boss/icons/settings/settings-sm-24_32.png +0 -0
  515. data/app/assets/images/boss/icons/settings/settings-sm-32_32.png +0 -0
  516. data/app/assets/images/boss/icons/settings/settings-sm.ico +0 -0
  517. data/app/assets/images/boss/icons/settings/settings.icns +0 -0
  518. data/app/assets/images/boss/icons/settings/settings.ico +0 -0
  519. data/app/assets/images/boss/icons/text/text-128_32.png +0 -0
  520. data/app/assets/images/boss/icons/text/text-16_32.png +0 -0
  521. data/app/assets/images/boss/icons/text/text-24_32.png +0 -0
  522. data/app/assets/images/boss/icons/text/text-256_32.png +0 -0
  523. data/app/assets/images/boss/icons/text/text-32_32.png +0 -0
  524. data/app/assets/images/boss/icons/text/text-48_32.png +0 -0
  525. data/app/assets/images/boss/icons/text/text-64_32.png +0 -0
  526. data/app/assets/images/boss/icons/text/text-72_32.png +0 -0
  527. data/app/assets/images/boss/icons/text/text-80_32.png +0 -0
  528. data/app/assets/images/boss/icons/text/text-96_32.png +0 -0
  529. data/app/assets/images/boss/icons/text/text-sm-16_32.png +0 -0
  530. data/app/assets/images/boss/icons/text/text-sm-24_32.png +0 -0
  531. data/app/assets/images/boss/icons/text/text-sm-32_32.png +0 -0
  532. data/app/assets/images/boss/icons/text/text-sm.ico +0 -0
  533. data/app/assets/images/boss/icons/text/text.icns +0 -0
  534. data/app/assets/images/boss/icons/text/text.ico +0 -0
  535. data/app/assets/images/boss/icons/tiff/tiff-128_32.png +0 -0
  536. data/app/assets/images/boss/icons/tiff/tiff-16_32.png +0 -0
  537. data/app/assets/images/boss/icons/tiff/tiff-24_32.png +0 -0
  538. data/app/assets/images/boss/icons/tiff/tiff-256_32.png +0 -0
  539. data/app/assets/images/boss/icons/tiff/tiff-32_32.png +0 -0
  540. data/app/assets/images/boss/icons/tiff/tiff-48_32.png +0 -0
  541. data/app/assets/images/boss/icons/tiff/tiff-64_32.png +0 -0
  542. data/app/assets/images/boss/icons/tiff/tiff-72_32.png +0 -0
  543. data/app/assets/images/boss/icons/tiff/tiff-80_32.png +0 -0
  544. data/app/assets/images/boss/icons/tiff/tiff-96_32.png +0 -0
  545. data/app/assets/images/boss/icons/tiff/tiff-sm-16_32.png +0 -0
  546. data/app/assets/images/boss/icons/tiff/tiff-sm-24_32.png +0 -0
  547. data/app/assets/images/boss/icons/tiff/tiff-sm-32_32.png +0 -0
  548. data/app/assets/images/boss/icons/tiff/tiff-sm.ico +0 -0
  549. data/app/assets/images/boss/icons/tiff/tiff.icns +0 -0
  550. data/app/assets/images/boss/icons/tiff/tiff.ico +0 -0
  551. data/app/assets/images/boss/icons/url/url-128_32.png +0 -0
  552. data/app/assets/images/boss/icons/url/url-16_32.png +0 -0
  553. data/app/assets/images/boss/icons/url/url-24_32.png +0 -0
  554. data/app/assets/images/boss/icons/url/url-256_32.png +0 -0
  555. data/app/assets/images/boss/icons/url/url-32_32.png +0 -0
  556. data/app/assets/images/boss/icons/url/url-48_32.png +0 -0
  557. data/app/assets/images/boss/icons/url/url-64_32.png +0 -0
  558. data/app/assets/images/boss/icons/url/url-72_32.png +0 -0
  559. data/app/assets/images/boss/icons/url/url-80_32.png +0 -0
  560. data/app/assets/images/boss/icons/url/url-96_32.png +0 -0
  561. data/app/assets/images/boss/icons/url/url-sm-16_32.png +0 -0
  562. data/app/assets/images/boss/icons/url/url-sm-24_32.png +0 -0
  563. data/app/assets/images/boss/icons/url/url-sm-32_32.png +0 -0
  564. data/app/assets/images/boss/icons/url/url-sm.ico +0 -0
  565. data/app/assets/images/boss/icons/url/url.icns +0 -0
  566. data/app/assets/images/boss/icons/url/url.ico +0 -0
  567. data/app/assets/images/boss/icons/vsd/vsd-128_32.png +0 -0
  568. data/app/assets/images/boss/icons/vsd/vsd-16_32.png +0 -0
  569. data/app/assets/images/boss/icons/vsd/vsd-24_32.png +0 -0
  570. data/app/assets/images/boss/icons/vsd/vsd-256_32.png +0 -0
  571. data/app/assets/images/boss/icons/vsd/vsd-32_32.png +0 -0
  572. data/app/assets/images/boss/icons/vsd/vsd-48_32.png +0 -0
  573. data/app/assets/images/boss/icons/vsd/vsd-64_32.png +0 -0
  574. data/app/assets/images/boss/icons/vsd/vsd-72_32.png +0 -0
  575. data/app/assets/images/boss/icons/vsd/vsd-80_32.png +0 -0
  576. data/app/assets/images/boss/icons/vsd/vsd-96_32.png +0 -0
  577. data/app/assets/images/boss/icons/vsd/vsd-sm-16_32.png +0 -0
  578. data/app/assets/images/boss/icons/vsd/vsd-sm-24_32.png +0 -0
  579. data/app/assets/images/boss/icons/vsd/vsd-sm-32_32.png +0 -0
  580. data/app/assets/images/boss/icons/vsd/vsd-sm.ico +0 -0
  581. data/app/assets/images/boss/icons/vsd/vsd.ico +0 -0
  582. data/app/assets/images/boss/icons/wav/wav-128_32.png +0 -0
  583. data/app/assets/images/boss/icons/wav/wav-16_32.png +0 -0
  584. data/app/assets/images/boss/icons/wav/wav-24_32.png +0 -0
  585. data/app/assets/images/boss/icons/wav/wav-256_32.png +0 -0
  586. data/app/assets/images/boss/icons/wav/wav-32_32.png +0 -0
  587. data/app/assets/images/boss/icons/wav/wav-48_32.png +0 -0
  588. data/app/assets/images/boss/icons/wav/wav-64_32.png +0 -0
  589. data/app/assets/images/boss/icons/wav/wav-72_32.png +0 -0
  590. data/app/assets/images/boss/icons/wav/wav-80_32.png +0 -0
  591. data/app/assets/images/boss/icons/wav/wav-96_32.png +0 -0
  592. data/app/assets/images/boss/icons/wav/wav-sm-16_32.png +0 -0
  593. data/app/assets/images/boss/icons/wav/wav-sm-24_32.png +0 -0
  594. data/app/assets/images/boss/icons/wav/wav-sm-32_32.png +0 -0
  595. data/app/assets/images/boss/icons/wav/wav-sm.ico +0 -0
  596. data/app/assets/images/boss/icons/wav/wav.icns +0 -0
  597. data/app/assets/images/boss/icons/wav/wav.ico +0 -0
  598. data/app/assets/images/boss/icons/wma/wma-128_32.png +0 -0
  599. data/app/assets/images/boss/icons/wma/wma-16_32.png +0 -0
  600. data/app/assets/images/boss/icons/wma/wma-24_32.png +0 -0
  601. data/app/assets/images/boss/icons/wma/wma-256_32.png +0 -0
  602. data/app/assets/images/boss/icons/wma/wma-32_32.png +0 -0
  603. data/app/assets/images/boss/icons/wma/wma-48_32.png +0 -0
  604. data/app/assets/images/boss/icons/wma/wma-64_32.png +0 -0
  605. data/app/assets/images/boss/icons/wma/wma-72_32.png +0 -0
  606. data/app/assets/images/boss/icons/wma/wma-80_32.png +0 -0
  607. data/app/assets/images/boss/icons/wma/wma-96_32.png +0 -0
  608. data/app/assets/images/boss/icons/wma/wma-sm-16_32.png +0 -0
  609. data/app/assets/images/boss/icons/wma/wma-sm-24_32.png +0 -0
  610. data/app/assets/images/boss/icons/wma/wma-sm-32_32.png +0 -0
  611. data/app/assets/images/boss/icons/wma/wma-sm.ico +0 -0
  612. data/app/assets/images/boss/icons/wma/wma.icns +0 -0
  613. data/app/assets/images/boss/icons/wma/wma.ico +0 -0
  614. data/app/assets/images/boss/icons/wmv/wmv-128_32.png +0 -0
  615. data/app/assets/images/boss/icons/wmv/wmv-16_32.png +0 -0
  616. data/app/assets/images/boss/icons/wmv/wmv-24_32.png +0 -0
  617. data/app/assets/images/boss/icons/wmv/wmv-256_32.png +0 -0
  618. data/app/assets/images/boss/icons/wmv/wmv-32_32.png +0 -0
  619. data/app/assets/images/boss/icons/wmv/wmv-48_32.png +0 -0
  620. data/app/assets/images/boss/icons/wmv/wmv-64_32.png +0 -0
  621. data/app/assets/images/boss/icons/wmv/wmv-72_32.png +0 -0
  622. data/app/assets/images/boss/icons/wmv/wmv-80_32.png +0 -0
  623. data/app/assets/images/boss/icons/wmv/wmv-96_32.png +0 -0
  624. data/app/assets/images/boss/icons/wmv/wmv-sm-16_32.png +0 -0
  625. data/app/assets/images/boss/icons/wmv/wmv-sm-24_32.png +0 -0
  626. data/app/assets/images/boss/icons/wmv/wmv-sm-32_32.png +0 -0
  627. data/app/assets/images/boss/icons/wmv/wmv-sm.ico +0 -0
  628. data/app/assets/images/boss/icons/wmv/wmv.icns +0 -0
  629. data/app/assets/images/boss/icons/wmv/wmv.ico +0 -0
  630. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-128_32.png +0 -0
  631. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-16_32.png +0 -0
  632. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-24_32.png +0 -0
  633. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-256_32.png +0 -0
  634. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-32_32.png +0 -0
  635. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-48_32.png +0 -0
  636. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-64_32.png +0 -0
  637. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-72_32.png +0 -0
  638. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-80_32.png +0 -0
  639. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-96_32.png +0 -0
  640. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-sm-16_32.png +0 -0
  641. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-sm-24_32.png +0 -0
  642. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-sm-32_32.png +0 -0
  643. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac-sm.ico +0 -0
  644. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac.icns +0 -0
  645. data/app/assets/images/boss/icons/xlsx_mac/xlsx_mac.ico +0 -0
  646. data/app/assets/images/boss/icons/xlsx_win/xlsx-win.ico +0 -0
  647. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-128_32.png +0 -0
  648. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-16_32.png +0 -0
  649. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-24_32.png +0 -0
  650. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-256_32.png +0 -0
  651. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-32_32.png +0 -0
  652. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-48_32.png +0 -0
  653. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-64_32.png +0 -0
  654. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-72_32.png +0 -0
  655. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-80_32.png +0 -0
  656. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-96_32.png +0 -0
  657. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-sm-16_32.png +0 -0
  658. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-sm-24_32.png +0 -0
  659. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-sm-32_32.png +0 -0
  660. data/app/assets/images/boss/icons/xlsx_win/xlsx_win-sm.ico +0 -0
  661. data/app/assets/images/boss/icons/zip/zip-128_32.png +0 -0
  662. data/app/assets/images/boss/icons/zip/zip-16_32.png +0 -0
  663. data/app/assets/images/boss/icons/zip/zip-24_32.png +0 -0
  664. data/app/assets/images/boss/icons/zip/zip-256_32.png +0 -0
  665. data/app/assets/images/boss/icons/zip/zip-32_32.png +0 -0
  666. data/app/assets/images/boss/icons/zip/zip-48_32.png +0 -0
  667. data/app/assets/images/boss/icons/zip/zip-64_32.png +0 -0
  668. data/app/assets/images/boss/icons/zip/zip-72_32.png +0 -0
  669. data/app/assets/images/boss/icons/zip/zip-80_32.png +0 -0
  670. data/app/assets/images/boss/icons/zip/zip-96_32.png +0 -0
  671. data/app/assets/images/boss/icons/zip/zip-sm-16_32.png +0 -0
  672. data/app/assets/images/boss/icons/zip/zip-sm-24_32.png +0 -0
  673. data/app/assets/images/boss/icons/zip/zip-sm-32_32.png +0 -0
  674. data/app/assets/images/boss/icons/zip/zip-sm.ico +0 -0
  675. data/app/assets/images/boss/icons/zip/zip.icns +0 -0
  676. data/app/assets/images/boss/icons/zip/zip.ico +0 -0
  677. data/app/assets/javascripts/boss.js +25 -0
  678. data/app/assets/javascripts/boss/banners.js.coffee +14 -0
  679. data/app/assets/javascripts/boss/better-pagination.js.coffee +84 -0
  680. data/app/assets/javascripts/boss/posts.js.coffee.erb +42 -0
  681. data/app/assets/javascripts/boss/resources.js.coffee.erb +13 -0
  682. data/app/assets/javascripts/boss/utils.js.coffee +17 -0
  683. data/app/assets/javascripts/datepicker-locales/jquery.ui.datepicker-en-GB.js +23 -0
  684. data/app/assets/javascripts/datepicker-locales/jquery.ui.datepicker-pt-BR.js +23 -0
  685. data/app/assets/javascripts/jQueryFileUpload/jquery.fileupload-fp.js +219 -0
  686. data/app/assets/javascripts/jQueryFileUpload/jquery.fileupload-ui.js +736 -0
  687. data/app/assets/javascripts/jQueryFileUpload/jquery.fileupload.js +975 -0
  688. data/app/assets/javascripts/jQueryFileUpload/jquery.iframe-transport.js +172 -0
  689. data/app/assets/javascripts/jQueryFileUpload/load-image.min.js +1 -0
  690. data/app/assets/javascripts/jQueryFileUpload/locale.js +29 -0
  691. data/app/assets/javascripts/jQueryFileUpload/tmpl.min.js +1 -0
  692. data/app/assets/javascripts/jquery-ui-1.8.23.custom.min.js +9 -0
  693. data/app/assets/javascripts/redactor/langs/bg.js +67 -0
  694. data/app/assets/javascripts/redactor/langs/by.js +65 -0
  695. data/app/assets/javascripts/redactor/langs/cs.js +77 -0
  696. data/app/assets/javascripts/redactor/langs/de.js +70 -0
  697. data/app/assets/javascripts/redactor/langs/en.js +66 -0
  698. data/app/assets/javascripts/redactor/langs/es.js +66 -0
  699. data/app/assets/javascripts/redactor/langs/fi.js +69 -0
  700. data/app/assets/javascripts/redactor/langs/fr.js +76 -0
  701. data/app/assets/javascripts/redactor/langs/hr.js +69 -0
  702. data/app/assets/javascripts/redactor/langs/hu.js +67 -0
  703. data/app/assets/javascripts/redactor/langs/it.js +68 -0
  704. data/app/assets/javascripts/redactor/langs/ja.js +66 -0
  705. data/app/assets/javascripts/redactor/langs/ko.js +66 -0
  706. data/app/assets/javascripts/redactor/langs/lv.js +65 -0
  707. data/app/assets/javascripts/redactor/langs/nl.js +69 -0
  708. data/app/assets/javascripts/redactor/langs/pl.js +66 -0
  709. data/app/assets/javascripts/redactor/langs/pt_br.js +72 -0
  710. data/app/assets/javascripts/redactor/langs/ru.js +66 -0
  711. data/app/assets/javascripts/redactor/langs/sk.js +66 -0
  712. data/app/assets/javascripts/redactor/langs/sq.js +69 -0
  713. data/app/assets/javascripts/redactor/langs/tr.js +66 -0
  714. data/app/assets/javascripts/redactor/langs/ua.js +67 -0
  715. data/app/assets/javascripts/redactor/langs/zh_cn.js +67 -0
  716. data/app/assets/javascripts/redactor/redactor.js +3254 -0
  717. data/app/assets/javascripts/redactor/redactor.min.js +1 -0
  718. data/app/assets/javascripts/slides/slides.jquery.js +555 -0
  719. data/app/assets/javascripts/slides/slides.min.jquery.js +20 -0
  720. data/app/assets/javascripts/yepnope.1.5.4-min.js +2 -0
  721. data/app/assets/stylesheets/boss.css +15 -0
  722. data/app/assets/stylesheets/boss/structure.sass +14 -0
  723. data/app/assets/stylesheets/boss/style.sass +15 -0
  724. data/app/assets/stylesheets/jQueryFileUpload/jquery.fileupload-ui.css +84 -0
  725. data/app/assets/stylesheets/redactor.css +13 -0
  726. data/app/assets/stylesheets/redactor/css/docstyle.css +139 -0
  727. data/app/assets/stylesheets/redactor/css/redactor.css +409 -0
  728. data/app/assets/stylesheets/redactor/css/style.css +135 -0
  729. data/app/assets/stylesheets/redactor/css/wym.css +151 -0
  730. data/app/assets/stylesheets/redactor/img/icons.png +0 -0
  731. data/app/assets/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  732. data/app/assets/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  733. data/app/assets/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  734. data/app/assets/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  735. data/app/assets/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  736. data/app/assets/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  737. data/app/assets/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  738. data/app/assets/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  739. data/app/assets/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  740. data/app/assets/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  741. data/app/assets/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  742. data/app/assets/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  743. data/app/assets/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  744. data/app/assets/stylesheets/smoothness/jquery-ui-1.8.23.custom.css +563 -0
  745. data/app/controllers/boss/admin/application_controller.rb +14 -0
  746. data/app/controllers/boss/admin/banners_controller.rb +19 -0
  747. data/app/controllers/boss/admin/posts_controller.rb +14 -0
  748. data/app/controllers/boss/admin/resources_controller.rb +44 -0
  749. data/app/controllers/boss/application_controller.rb +2 -0
  750. data/app/controllers/boss/posts_controller.rb +86 -0
  751. data/app/controllers/boss/resources_controller.rb +33 -0
  752. data/app/helpers/boss/application_helper.rb +23 -0
  753. data/app/models/boss/banner.rb +28 -0
  754. data/app/models/boss/category.rb +5 -0
  755. data/app/models/boss/post.rb +20 -0
  756. data/app/models/boss/resource.rb +52 -0
  757. data/app/views/boss/admin/banners/new.html.erb +38 -0
  758. data/app/views/boss/admin/posts/_post.html.erb +8 -0
  759. data/app/views/boss/admin/posts/index.html.erb +3 -0
  760. data/app/views/boss/admin/resources/_resource.html.erb +5 -0
  761. data/app/views/boss/admin/resources/_upload.html.erb +22 -0
  762. data/app/views/boss/admin/resources/index.html.erb +75 -0
  763. data/app/views/boss/banners/_banner_viewer.html.erb +14 -0
  764. data/app/views/boss/posts/_footer.html.erb +7 -0
  765. data/app/views/boss/posts/_header.html.erb +3 -0
  766. data/app/views/boss/posts/_meta.html.erb +1 -0
  767. data/app/views/boss/posts/_post.html.erb +4 -0
  768. data/app/views/boss/posts/archive.html.erb +0 -0
  769. data/app/views/boss/posts/edit.html.erb +18 -0
  770. data/app/views/boss/posts/index.html.erb +11 -0
  771. data/app/views/boss/posts/new.html.erb +24 -0
  772. data/app/views/boss/posts/show.html.erb +11 -0
  773. data/app/views/layouts/admin.html.erb +21 -0
  774. data/app/views/layouts/application.html.erb +21 -0
  775. data/config/initializers/add_stuff_to_main_app.rb +32 -0
  776. data/config/initializers/generate_post_tmpl.rb +7 -0
  777. data/config/initializers/load_config.rb +3 -0
  778. data/config/locales/controllers/banners/en.yml +5 -0
  779. data/config/locales/controllers/posts/en.yml +5 -0
  780. data/config/locales/models/banners/en.yml +3 -0
  781. data/config/locales/models/posts/en.yml +3 -0
  782. data/config/locales/views/banners/form/en.yml +9 -0
  783. data/config/locales/views/banners/form/pt.yml +9 -0
  784. data/config/locales/views/pagination/en.yml +8 -0
  785. data/config/locales/views/posts/new/en.yml +8 -0
  786. data/config/locales/views/posts/post/en.yml +9 -0
  787. data/config/locales/views/posts/publish/en.yml +5 -0
  788. data/config/locales/views/resources/form/en.yml +5 -0
  789. data/config/posts_config.yml +1 -0
  790. data/config/resource_styles.yml +2 -0
  791. data/config/resources_config.yml +1 -0
  792. data/config/routes.rb +39 -0
  793. data/db/migrate/20120624233540_create_boss_posts.rb +12 -0
  794. data/db/migrate/20120706130424_create_resources_table.rb +10 -0
  795. data/db/migrate/20120706155028_add_content_type_index_to_resources.rb +5 -0
  796. data/db/migrate/20120810095209_add_extension_column_to_resources.rb +8 -0
  797. data/db/migrate/20120810170007_change_start_date_to_published_date.rb +5 -0
  798. data/db/migrate/20120814163213_create_banners.rb +11 -0
  799. data/db/migrate/20120903112923_create_categories.rb +18 -0
  800. data/db/migrate/20120907014143_acts_as_taggable_on_migration.rb +30 -0
  801. data/db/seeds.rb +8 -0
  802. data/lib/boss.rb +5 -0
  803. data/lib/boss/engine.rb +11 -0
  804. data/lib/boss/pagination.rb +26 -0
  805. data/lib/boss/post_generator.rb +32 -0
  806. data/lib/boss/version.rb +3 -0
  807. data/lib/tasks/boss_tasks.rake +4 -0
  808. data/spec/dummy/README.rdoc +261 -0
  809. data/spec/dummy/Rakefile +17 -0
  810. data/spec/dummy/app/assets/javascripts/application.js +17 -0
  811. data/spec/dummy/app/assets/stylesheets/application.css +14 -0
  812. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  813. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  814. data/spec/dummy/app/views/layouts/application.html.erb +19 -0
  815. data/spec/dummy/config.ru +4 -0
  816. data/spec/dummy/config/accounts.yml +3 -0
  817. data/spec/dummy/config/application.rb +59 -0
  818. data/spec/dummy/config/boot.rb +10 -0
  819. data/spec/dummy/config/cucumber.yml +8 -0
  820. data/spec/dummy/config/database.yml +28 -0
  821. data/spec/dummy/config/environment.rb +5 -0
  822. data/spec/dummy/config/environments/development.rb +39 -0
  823. data/spec/dummy/config/environments/production.rb +67 -0
  824. data/spec/dummy/config/environments/test.rb +37 -0
  825. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  826. data/spec/dummy/config/initializers/inflections.rb +15 -0
  827. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  828. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  829. data/spec/dummy/config/initializers/session_store.rb +8 -0
  830. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  831. data/spec/dummy/config/locales/en.yml +5 -0
  832. data/spec/dummy/config/routes.rb +3 -0
  833. data/spec/dummy/db/development.sqlite3 +0 -0
  834. data/spec/dummy/db/migrate/20120712230935_devise_create_users.citygate.rb +50 -0
  835. data/spec/dummy/db/migrate/20120712230936_add_name_to_users.citygate.rb +7 -0
  836. data/spec/dummy/db/migrate/20120712230937_add_confirmable_to_users.citygate.rb +12 -0
  837. data/spec/dummy/db/migrate/20120712230938_devise_invitable_add_to_users.citygate.rb +24 -0
  838. data/spec/dummy/db/migrate/20120712230939_add_omniauth_to_devise.citygate.rb +20 -0
  839. data/spec/dummy/db/migrate/20120712230940_create_roles.citygate.rb +11 -0
  840. data/spec/dummy/db/migrate/20120712230950_create_boss_posts.boss.rb +13 -0
  841. data/spec/dummy/db/migrate/20120712230951_create_resources_table.boss.rb +11 -0
  842. data/spec/dummy/db/migrate/20120712230952_add_content_type_index_to_resources.boss.rb +6 -0
  843. data/spec/dummy/db/migrate/20120727151629_create_permissions_table.citygate.rb +13 -0
  844. data/spec/dummy/db/migrate/20120810095503_add_extension_column_to_resources.boss.rb +9 -0
  845. data/spec/dummy/db/migrate/20120810170148_change_start_date_to_published_date.boss.rb +6 -0
  846. data/spec/dummy/db/migrate/20120814170416_create_banners.boss.rb +12 -0
  847. data/spec/dummy/db/migrate/20120903135116_create_categories.boss.rb +19 -0
  848. data/spec/dummy/db/migrate/20120907014721_acts_as_taggable_on_migration.boss.rb +31 -0
  849. data/spec/dummy/db/migrate/20121008164320_add_conditions_to_permissions.citygate.rb +6 -0
  850. data/spec/dummy/db/production.sqlite3 +0 -0
  851. data/spec/dummy/db/schema.rb +134 -0
  852. data/spec/dummy/db/seeds.rb +2 -0
  853. data/spec/dummy/db/test.sqlite3 +0 -0
  854. data/spec/dummy/features/support/env.rb +59 -0
  855. data/spec/dummy/lib/ability.rb +26 -0
  856. data/spec/dummy/lib/tasks/cucumber.rake +65 -0
  857. data/spec/dummy/log/development.log +148449 -0
  858. data/spec/dummy/log/production.log +2 -0
  859. data/spec/dummy/log/test.log +82744 -0
  860. data/spec/dummy/public/404.html +26 -0
  861. data/spec/dummy/public/422.html +26 -0
  862. data/spec/dummy/public/500.html +25 -0
  863. data/spec/dummy/public/favicon.ico +0 -0
  864. data/spec/dummy/public/system/boss/resources/resources/000/000/001/original/basketball.pdf +0 -0
  865. data/spec/dummy/public/system/boss/resources/resources/000/000/001/original/computer_0050.jpg +0 -0
  866. data/spec/dummy/public/system/boss/resources/resources/000/000/001/original/gb_logo100.png +0 -0
  867. data/spec/dummy/public/system/boss/resources/resources/000/000/002/original/basketball.pdf +0 -0
  868. data/spec/dummy/public/system/boss/resources/resources/000/000/002/original/computer_0050.jpg +0 -0
  869. data/spec/dummy/public/system/boss/resources/resources/000/000/002/original/example_file.txt +3 -0
  870. data/spec/dummy/public/system/boss/resources/resources/000/000/003/original/computer_0050.jpg +0 -0
  871. data/spec/dummy/public/system/boss/resources/resources/000/000/003/original/example_file.txt +3 -0
  872. data/spec/dummy/public/system/boss/resources/resources/000/000/004/original/example_file.txt +3 -0
  873. data/spec/dummy/public/system/boss/resources/resources/000/000/004/original/gb_logo100.png +0 -0
  874. data/spec/dummy/public/system/resources/1/original/56883622_18f242e114_b.jpg +0 -0
  875. data/spec/dummy/public/system/resources/1/original/basketball.pdf +0 -0
  876. data/spec/dummy/public/system/resources/1/original/computer_0050.jpg +0 -0
  877. data/spec/dummy/public/system/resources/10/original/1310855824664.jpg +0 -0
  878. data/spec/dummy/public/system/resources/2/original/1310855824664.jpg +0 -0
  879. data/spec/dummy/public/system/resources/2/original/basketball.pdf +0 -0
  880. data/spec/dummy/public/system/resources/2/original/computer_0050.jpg +0 -0
  881. data/spec/dummy/public/system/resources/3/original/1310856290635.jpg +0 -0
  882. data/spec/dummy/public/system/resources/4/original/1310856399167.jpg +0 -0
  883. data/spec/dummy/public/system/resources/5/original/158_7915_0.jpg +0 -0
  884. data/spec/dummy/public/system/resources/6/original/1310855824664.jpg +0 -0
  885. data/spec/dummy/public/system/resources/7/original/1310856290635.jpg +0 -0
  886. data/spec/dummy/public/system/resources/8/original/1310855824664.jpg +0 -0
  887. data/spec/dummy/public/system/resources/9/original/2257284249_4620b85e05.jpg +0 -0
  888. data/spec/dummy/script/cucumber +10 -0
  889. data/spec/dummy/script/rails +6 -0
  890. data/spec/dummy/spec/controllers/admin/banners_controller_spec.rb +41 -0
  891. data/spec/dummy/spec/controllers/admin/posts_controller_spec.rb +11 -0
  892. data/spec/dummy/spec/controllers/admin/resources_controller_spec.rb +33 -0
  893. data/spec/dummy/spec/controllers/posts_controller_spec.rb +171 -0
  894. data/spec/dummy/spec/controllers/resources_controller_spec.rb +49 -0
  895. data/spec/dummy/spec/fixtures/boss_banners.yml +17 -0
  896. data/spec/dummy/spec/fixtures/boss_posts.yml +14 -0
  897. data/spec/dummy/spec/fixtures/citygate_users.yml +16 -0
  898. data/spec/dummy/spec/fixtures/files/basketball.pdf +0 -0
  899. data/spec/dummy/spec/fixtures/files/computer_0050.jpg +0 -0
  900. data/spec/dummy/spec/helpers/boss_application_helper_spec.rb +23 -0
  901. data/spec/dummy/spec/models/banners_spec.rb +24 -0
  902. data/spec/dummy/spec/models/posts_spec.rb +41 -0
  903. data/spec/dummy/spec/models/resource_spec.rb +60 -0
  904. data/spec/dummy/spec/routing/routing_spec.rb +61 -0
  905. data/spec/dummy/spec/spec_helper.rb +42 -0
  906. data/spec/dummy/tmp/cache/assets/BC2/850/sprockets%2F878400110743687d61711159c65f8c22 +0 -0
  907. data/spec/dummy/tmp/cache/assets/C24/520/sprockets%2F2f3a8489d25374d44119141585f115e5 +0 -0
  908. data/spec/dummy/tmp/cache/assets/C40/030/sprockets%2F54436c0d13893197751ee6999856ad68 +0 -0
  909. data/spec/dummy/tmp/cache/assets/C53/0E0/sprockets%2F121790135397621ab7af6984cb91566b +0 -0
  910. data/spec/dummy/tmp/cache/assets/C5A/5F0/sprockets%2F52259544bea2a61627b95987a6d86044 +0 -0
  911. data/spec/dummy/tmp/cache/assets/C5D/7D0/sprockets%2Faa929f78240346438e0086eca2977087 +0 -0
  912. data/spec/dummy/tmp/cache/assets/C63/E40/sprockets%2F36a675f52eb281488964b58be8971051 +0 -0
  913. data/spec/dummy/tmp/cache/assets/C6F/580/sprockets%2F22851f7af64e526bab14507232230e55 +0 -0
  914. data/spec/dummy/tmp/cache/assets/C72/B10/sprockets%2F21a4b8118f1f4254bf815e306027b951 +0 -0
  915. data/spec/dummy/tmp/cache/assets/C79/470/sprockets%2F7247bad709a775b6100a0864e463e704 +0 -0
  916. data/spec/dummy/tmp/cache/assets/C79/600/sprockets%2F3b480b741c938623c715006562f7a5bd +0 -0
  917. data/spec/dummy/tmp/cache/assets/C7A/C80/sprockets%2Fd520714793fb36dc6631414827206ade +0 -0
  918. data/spec/dummy/tmp/cache/assets/C88/300/sprockets%2F423f0a9f7a3b8f3395957d890e105900 +0 -0
  919. data/spec/dummy/tmp/cache/assets/C89/540/sprockets%2F606a455261f8f047c994c4b9a582f126 +0 -0
  920. data/spec/dummy/tmp/cache/assets/C90/E00/sprockets%2F0e5cc463f8d36795635981b11d9819c1 +0 -0
  921. data/spec/dummy/tmp/cache/assets/C92/F90/sprockets%2F920438082fee7d6098e3cd0278b49287 +0 -0
  922. data/spec/dummy/tmp/cache/assets/CA2/A80/sprockets%2F7b2db319590bc1c8134a3e338e604506 +0 -0
  923. data/spec/dummy/tmp/cache/assets/CA6/B10/sprockets%2F3111836e637405cf7106ecf0d37c70a7 +0 -0
  924. data/spec/dummy/tmp/cache/assets/CA8/F30/sprockets%2Fd74b20422f5218a62a02c7f48628d83d +0 -0
  925. data/spec/dummy/tmp/cache/assets/CAD/200/sprockets%2F50793597dc52344a9e10c12a79b264ea +0 -0
  926. data/spec/dummy/tmp/cache/assets/CAD/860/sprockets%2Fd73482fc43b147c1c401c2569dd92393 +0 -0
  927. data/spec/dummy/tmp/cache/assets/CAF/7B0/sprockets%2F9143406f63303f9fd28ab3658e161a4e +0 -0
  928. data/spec/dummy/tmp/cache/assets/CAF/FD0/sprockets%2F6026648844c17c73d917e3cda02d08a7 +0 -0
  929. data/spec/dummy/tmp/cache/assets/CB5/850/sprockets%2F011afbabcc10d620043300f28f499101 +0 -0
  930. data/spec/dummy/tmp/cache/assets/CB8/120/sprockets%2F46e2c48936a7976a3cb1f04aa8571278 +0 -0
  931. data/spec/dummy/tmp/cache/assets/CB9/940/sprockets%2Fd292ab0519813823cf786f6f620c4e94 +0 -0
  932. data/spec/dummy/tmp/cache/assets/CBF/370/sprockets%2F4e92e9ef55274628e8a46a27f23196b0 +0 -0
  933. data/spec/dummy/tmp/cache/assets/CC5/020/sprockets%2Ffa39f3f719158fea829829617391b42c +0 -0
  934. data/spec/dummy/tmp/cache/assets/CCF/230/sprockets%2F75a20a5e4f06832a4224a5f4a6314d8d +0 -0
  935. data/spec/dummy/tmp/cache/assets/CD5/180/sprockets%2F1e035230c4b6e464f1146973f0c7bc5e +0 -0
  936. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  937. data/spec/dummy/tmp/cache/assets/CD9/C70/sprockets%2Fb120f38a079fa9924c79c7a8101d53c0 +0 -0
  938. data/spec/dummy/tmp/cache/assets/CD9/CC0/sprockets%2F0c3ccc56507dd6594d72265d72c0318a +0 -0
  939. data/spec/dummy/tmp/cache/assets/CDA/3C0/sprockets%2F7413c4409dccf4fb698a42d020c02688 +0 -0
  940. data/spec/dummy/tmp/cache/assets/CDE/400/sprockets%2F58e8203723604e6bde11c0eb480c85f9 +0 -0
  941. data/spec/dummy/tmp/cache/assets/CDF/140/sprockets%2Fb5f8e1000e499f4b6787017ce16322af +0 -0
  942. data/spec/dummy/tmp/cache/assets/CE1/400/sprockets%2F25fe90052e1eaac8751c1960196d865d +0 -0
  943. data/spec/dummy/tmp/cache/assets/CE1/760/sprockets%2F6485f6d500193d364be392c118e4ebd5 +0 -0
  944. data/spec/dummy/tmp/cache/assets/CE3/150/sprockets%2F7d7a09e1df5c7510266a8d752683c4b3 +0 -0
  945. data/spec/dummy/tmp/cache/assets/CE6/D70/sprockets%2Fdf419b464fb39e134b7354fb933e0565 +0 -0
  946. data/spec/dummy/tmp/cache/assets/CE8/510/sprockets%2F0d85ab6e3972f70636a990e91fec8301 +0 -0
  947. data/spec/dummy/tmp/cache/assets/CE8/830/sprockets%2Fbc45b7ec3697c73450861834ee1336de +0 -0
  948. data/spec/dummy/tmp/cache/assets/CE9/5C0/sprockets%2Fdbe1c3a9e49d07916422e46149e8f318 +0 -0
  949. data/spec/dummy/tmp/cache/assets/CEF/C10/sprockets%2Fee370705f1ec41a8f49d30066798ef67 +0 -0
  950. data/spec/dummy/tmp/cache/assets/CF6/600/sprockets%2Fbcad79f4640490fa8743c56693e4e794 +0 -0
  951. data/spec/dummy/tmp/cache/assets/CF9/DB0/sprockets%2F2c0c81d15b23ec2123be4e299b047d42 +0 -0
  952. data/spec/dummy/tmp/cache/assets/CFA/080/sprockets%2F332a10f033129bd16ecfc2d9fc629023 +0 -0
  953. data/spec/dummy/tmp/cache/assets/D00/6D0/sprockets%2Fbb3256f3c4232c8a34543ae1f82e165b +0 -0
  954. data/spec/dummy/tmp/cache/assets/D00/980/sprockets%2Fe4eaa22e351f850345723ac2429c2f5b +0 -0
  955. data/spec/dummy/tmp/cache/assets/D07/3E0/sprockets%2Fbc15323161b84e2c1764d726aec772fd +0 -0
  956. data/spec/dummy/tmp/cache/assets/D0C/870/sprockets%2F47b59bc508d38b0709f3be16ccd12572 +0 -0
  957. data/spec/dummy/tmp/cache/assets/D0D/DE0/sprockets%2Fa35442f02b0b2479f22d83d639d8c4fd +0 -0
  958. data/spec/dummy/tmp/cache/assets/D10/870/sprockets%2F113a9b82b3ca5f41b5c9dac767646881 +0 -0
  959. data/spec/dummy/tmp/cache/assets/D15/5F0/sprockets%2F60f459141be5f877fb1f8cf38ca12452 +0 -0
  960. data/spec/dummy/tmp/cache/assets/D19/8B0/sprockets%2Fe8e7c72b55150f9a3f6917b0a7dd0299 +0 -0
  961. data/spec/dummy/tmp/cache/assets/D1A/400/sprockets%2F68bf61e296672914dcad81f9d1c806a3 +0 -0
  962. data/spec/dummy/tmp/cache/assets/D1C/B60/sprockets%2F4562fff067923d7e68b607c2f360d6dc +0 -0
  963. data/spec/dummy/tmp/cache/assets/D24/F60/sprockets%2Fe36a043fa2b3b9a221b015dffc471462 +0 -0
  964. data/spec/dummy/tmp/cache/assets/D2C/720/sprockets%2Fe4490972a26bb2f531212009dfcafa1f +0 -0
  965. data/spec/dummy/tmp/cache/assets/D2F/100/sprockets%2F95ffc0bd9499bacd4991f99f29381722 +0 -0
  966. data/spec/dummy/tmp/cache/assets/D31/1A0/sprockets%2Fe4e3cb247a17e0b1b89b510f70d380b8 +0 -0
  967. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  968. data/spec/dummy/tmp/cache/assets/D32/B30/sprockets%2F6ea2d01e1b76df9a9a003f35074d7f21 +0 -0
  969. data/spec/dummy/tmp/cache/assets/D38/0E0/sprockets%2F14794728d5ac05d5bace06f724f6c11b +0 -0
  970. data/spec/dummy/tmp/cache/assets/D39/8A0/sprockets%2F9a7afbe1b38452ba73fd008fd2562274 +0 -0
  971. data/spec/dummy/tmp/cache/assets/D40/580/sprockets%2Fe0e2cce283e3539345a7c317ea58c83d +0 -0
  972. data/spec/dummy/tmp/cache/assets/D41/3B0/sprockets%2F905d433e4ccd08f1c83aac66f4d95480 +0 -0
  973. data/spec/dummy/tmp/cache/assets/D41/B60/sprockets%2Ffc2aa47706f31fc127476ef51e37e5d4 +0 -0
  974. data/spec/dummy/tmp/cache/assets/D41/BC0/sprockets%2Ff0542487ca3fd0d2d9a8f66fc2557d02 +0 -0
  975. data/spec/dummy/tmp/cache/assets/D44/100/sprockets%2F5740af7d5182613d7ca172e87ecef37b +0 -0
  976. data/spec/dummy/tmp/cache/assets/D4A/B80/sprockets%2F9c633774f5ed1a90dcf2082bb874d6e6 +0 -0
  977. data/spec/dummy/tmp/cache/assets/D4C/B00/sprockets%2F3977e1b47c9709026f354f47fbc0dbef +0 -0
  978. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  979. data/spec/dummy/tmp/cache/assets/D54/DC0/sprockets%2Fc135f87fe97a983cb7f6129251c6edd5 +0 -0
  980. data/spec/dummy/tmp/cache/assets/D55/4A0/sprockets%2F9f3585d6944fecfd21b9f37e97043b2d +0 -0
  981. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  982. data/spec/dummy/tmp/cache/assets/D5B/E80/sprockets%2F799adf29fe5a95e34f60f607ae37a759 +0 -0
  983. data/spec/dummy/tmp/cache/assets/D62/280/sprockets%2Fbe1d43fe20a23e4593bd52af6455e1b6 +0 -0
  984. data/spec/dummy/tmp/cache/assets/D68/920/sprockets%2Fb7eb6668f9387c950b87e57f48d9bbb9 +0 -0
  985. data/spec/dummy/tmp/cache/assets/D69/320/sprockets%2F79251cf5abbd4fa5ef49c48383021cb1 +0 -0
  986. data/spec/dummy/tmp/cache/assets/D6D/040/sprockets%2F8ce54cfeeabda42540f18e3751631d57 +0 -0
  987. data/spec/dummy/tmp/cache/assets/D6D/2D0/sprockets%2Fb7137c8c11def4ce710a890d95c3f09a +0 -0
  988. data/spec/dummy/tmp/cache/assets/D70/DD0/sprockets%2F76aa685bacba69f3578ee40ab6211e85 +0 -0
  989. data/spec/dummy/tmp/cache/assets/D73/010/sprockets%2F834fa37dfa7f28148e125baf3f9d91b0 +0 -0
  990. data/spec/dummy/tmp/cache/assets/D74/CC0/sprockets%2F0883849eeadbcaf588706f6c1a5f103c +0 -0
  991. data/spec/dummy/tmp/cache/assets/D75/DB0/sprockets%2F9ab37622fdef7070f42a0d37a757f8de +0 -0
  992. data/spec/dummy/tmp/cache/assets/D76/360/sprockets%2F3ff9a318f34d309c6d4c7be4737ec60c +0 -0
  993. data/spec/dummy/tmp/cache/assets/D77/0A0/sprockets%2Fd388097cc8fda1663fa0d805faa592b9 +0 -0
  994. data/spec/dummy/tmp/cache/assets/D77/400/sprockets%2F3f9e137933597c5abf943eb401e8aead +0 -0
  995. data/spec/dummy/tmp/cache/assets/D78/BD0/sprockets%2Fd0c9ac69560ea197444b7f759ecd06da +0 -0
  996. data/spec/dummy/tmp/cache/assets/D7B/530/sprockets%2F994683a9d7bd17be1814cd8ce84cb13d +0 -0
  997. data/spec/dummy/tmp/cache/assets/D7D/FE0/sprockets%2Fdc33f319e81df25ef8f283e179b0c5c9 +0 -0
  998. data/spec/dummy/tmp/cache/assets/D99/BF0/sprockets%2F2fd8d582e234f8d0a741c1b4cafb716e +0 -0
  999. data/spec/dummy/tmp/cache/assets/D9A/070/sprockets%2Fcf06bf41615e3c42efaab85673ecb591 +0 -0
  1000. data/spec/dummy/tmp/cache/assets/D9B/0B0/sprockets%2F609a6d0b06eb3752679f6e1f0adcb4fc +0 -0
  1001. data/spec/dummy/tmp/cache/assets/D9E/F10/sprockets%2F9ab223df888d724dcad09eb1163cc5f4 +0 -0
  1002. data/spec/dummy/tmp/cache/assets/D9E/F70/sprockets%2Fc5d4a6e7d907804c52cbf910339dafdb +0 -0
  1003. data/spec/dummy/tmp/cache/assets/DA1/A00/sprockets%2Fc20a87edd6bfdcca68f83b81471770e1 +0 -0
  1004. data/spec/dummy/tmp/cache/assets/DB0/A60/sprockets%2F543dcca95ec9c45dd5f88d64fc9f1620 +0 -0
  1005. data/spec/dummy/tmp/cache/assets/DBB/F90/sprockets%2Fba83ff631b0cae1097016bf1acecb863 +0 -0
  1006. data/spec/dummy/tmp/cache/assets/DC9/A10/sprockets%2F8af6bbb4c92572eafb144047bbfb76c4 +0 -0
  1007. data/spec/dummy/tmp/cache/assets/DCC/AB0/sprockets%2F666d2c1f4eb7d60e9b27d5b52ad3f0ed +0 -0
  1008. data/spec/dummy/tmp/cache/assets/DCD/2C0/sprockets%2F70bed510995762fcd03cc5adf38eba6d +0 -0
  1009. data/spec/dummy/tmp/cache/assets/DD0/CC0/sprockets%2F5dc3e3dd4a62a8f03f9382c3dc9b5f3d +0 -0
  1010. data/spec/dummy/tmp/cache/assets/DD5/DF0/sprockets%2F5fcfa0c08af9e7eda4660905e491d7eb +0 -0
  1011. data/spec/dummy/tmp/cache/assets/DD7/B50/sprockets%2F52b6bca7ef09caf889327a0d19edcd76 +0 -0
  1012. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  1013. data/spec/dummy/tmp/cache/assets/DE3/490/sprockets%2F08c27bc6c1fc0f4f363e1a1ad4c0bda4 +0 -0
  1014. data/spec/dummy/tmp/cache/assets/DE4/E60/sprockets%2F9ca060c2613d9e0ee003e7babcdd06cb +0 -0
  1015. data/spec/dummy/tmp/cache/assets/DF8/930/sprockets%2F73e117a1d3fd83fbcfe7a21e6b68eb2a +0 -0
  1016. data/spec/dummy/tmp/cache/assets/DFD/2A0/sprockets%2Fb5ea1d5e0e1cefdde6fe0982ab051878 +0 -0
  1017. data/spec/dummy/tmp/cache/assets/DFD/810/sprockets%2F6a607a98f71d7eec0fa22eced69a1ca4 +0 -0
  1018. data/spec/dummy/tmp/cache/assets/E03/BA0/sprockets%2Ffc0b3e556a2adbef7659cdd773a9b1c8 +0 -0
  1019. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  1020. data/spec/dummy/tmp/cache/assets/E05/CF0/sprockets%2Fd3e87cf247dcc6c74cacb13c9f14af96 +0 -0
  1021. data/spec/dummy/tmp/cache/assets/E11/560/sprockets%2Fe5be2e9dd3ce26fb822c6d93fbe8369e +0 -0
  1022. data/spec/dummy/tmp/cache/assets/E18/240/sprockets%2Ff2f4de0be24db7a3b7b60c216adc0df4 +0 -0
  1023. data/spec/dummy/tmp/cache/assets/E29/D30/sprockets%2F8df60efdb80e123c26a8bb7be1dc4be8 +0 -0
  1024. data/spec/dummy/tmp/cache/assets/E2B/670/sprockets%2Feac21904ecb266ce92aecadb8681b7fe +0 -0
  1025. data/spec/dummy/tmp/cache/assets/E98/710/sprockets%2Fd95dbf0cd6cefb9477f7efba5d410cee +0 -0
  1026. data/spec/dummy/tmp/cache/assets/EA4/0A0/sprockets%2Ffabaa55761ccaaabaeb0bba2fd55e990 +0 -0
  1027. data/spec/dummy/tmp/restart.txt +0 -0
  1028. data/spec/spec_helper.rb +34 -0
  1029. metadata +1454 -0
@@ -0,0 +1,66 @@
1
+ var RELANG = {};
2
+ RELANG['sk'] = {
3
+ html: 'HTML',
4
+ video: 'Video',
5
+ image: 'Obrázok',
6
+ table: 'Tabulka',
7
+ link: 'Odkaz',
8
+ link_insert: 'Vložiť odkaz ...',
9
+ unlink: 'Odstrániť odkaz',
10
+ formatting: 'Štýl',
11
+ paragraph: 'Odstavec',
12
+ quote: 'Citácia',
13
+ code: 'Kód',
14
+ header1: 'Nadpis 1',
15
+ header2: 'Nadpis 2',
16
+ header3: 'Nadpis 3',
17
+ header4: 'Nadpis 4',
18
+ bold: 'Tučné',
19
+ italic: 'Kurzíva',
20
+ fontcolor: 'Farba písma',
21
+ backcolor: 'Farba pozadia',
22
+ unorderedlist: 'Zoznam s odrážkami',
23
+ orderedlist: 'Číslovaný zoznam',
24
+ outdent: 'Zmenšiť odsadenie',
25
+ indent: 'Zväčšiť odsadenie',
26
+ cancel: 'Zrušiť',
27
+ insert: 'Vložiť',
28
+ save: 'Uložiť',
29
+ _delete: 'Smazať',
30
+ insert_table: 'Vložiť tabulku',
31
+ insert_row_above: 'Pridať riadok hore',
32
+ insert_row_below: 'Pridať riadok dole',
33
+ insert_column_left: 'Pridať stĺpec vľavo',
34
+ insert_column_right: 'Pridať stľpec vpravo',
35
+ delete_column: 'Zmazať stľpec',
36
+ delete_row: 'Zmazať riadok',
37
+ delete_table: 'Zmazať tabulku',
38
+ rows: 'Riadky',
39
+ columns: 'Stľpce',
40
+ add_head: 'Pridať záhlavie',
41
+ delete_head: 'Zmazať záhlavie',
42
+ title: 'Titulok',
43
+ image_position: 'Pozícia',
44
+ none: 'žiadny',
45
+ left: 'vľavo',
46
+ right: 'vpravo',
47
+ image_web_link: 'Odkaz na obrázok',
48
+ text: 'Text',
49
+ mailto: 'Email',
50
+ web: 'URL',
51
+ video_html_code: 'Kód pre vloženie videa na stránku',
52
+ file: 'Súbor',
53
+ upload: 'Nahrát',
54
+ download: 'Stiahnúť',
55
+ choose: 'Vybrať',
56
+ or_choose: 'alebo',
57
+ drop_file_here: 'Pretiahnite súbor sem',
58
+ align_left: 'Zarovnať vľavo',
59
+ align_center: 'Zarovnať na stred',
60
+ align_right: 'Zarovnať vpravo',
61
+ align_justify: 'Zarovnať do bloku',
62
+ horizontalrule: 'Vodorovná čiara',
63
+ fullscreen: 'Celá obrazovka',
64
+ deleted: 'Prečiarknuté',
65
+ anchor: 'Záložka'
66
+ };
@@ -0,0 +1,69 @@
1
+ var RELANG = {};
2
+ RELANG['sq'] = {
3
+ html: 'HTML',
4
+ video: 'Video',
5
+ image: 'Fotografi',
6
+ table: 'Tabelë',
7
+ link: 'Link',
8
+ link_insert: 'Lidh linq ...',
9
+ unlink: 'Hiq linkun',
10
+ formatting: 'Stilet',
11
+ paragraph: 'Paragraf',
12
+ quote: 'Kuotë',
13
+ code: 'Kod',
14
+ header1: 'Header 1',
15
+ header2: 'Header 2',
16
+ header3: 'Header 3',
17
+ header4: 'Header 4',
18
+ bold: 'Te trasha / Bold',
19
+ italic: 'Kursive / Italic',
20
+ fontcolor: 'Ngjyra e shkronjave',
21
+ backcolor: 'Ngjyra e mbrapavisë së shkronjave',
22
+ unorderedlist: 'Liste pa renditje',
23
+ orderedlist: 'Liste me renditje',
24
+ outdent: 'Outdent',
25
+ indent: 'Indent',
26
+ redo: 'Ribëj',
27
+ undo: 'Zhbëj',
28
+ cut: 'Cut',
29
+ cancel: 'Anulo',
30
+ insert: 'Insert',
31
+ save: 'Ruaje',
32
+ _delete: 'Fshije',
33
+ insert_table: 'Shto tabelë',
34
+ insert_row_above: 'Shto rresht sipër',
35
+ insert_row_below: 'Shto rresht përfundi',
36
+ insert_column_left: 'Shto kolonë majtas',
37
+ insert_column_right: 'Shto kolonë djathtas',
38
+ delete_column: 'Fshije kolonën',
39
+ delete_row: 'Fshije rreshtin',
40
+ delete_table: 'Fshije tabelën',
41
+ rows: 'Rreshta',
42
+ columns: 'Kolona',
43
+ add_head: 'Shto titujt e tabelës',
44
+ delete_head: 'Fshije titujt e tabelës',
45
+ title: 'Titulli',
46
+ image_position: 'Pozita',
47
+ none: 'Normale',
48
+ left: 'Majtas',
49
+ right: 'Djathtas',
50
+ image_web_link: 'Linku i fotografisë në internet',
51
+ text: 'Teksti',
52
+ mailto: 'Email',
53
+ web: 'URL',
54
+ video_html_code: 'Video embed code',
55
+ file: 'Fajll',
56
+ upload: 'Ngarko',
57
+ download: 'Shkarko',
58
+ choose: 'Zgjedh',
59
+ or_choose: 'Ose zgjedh',
60
+ drop_file_here: 'Gjuaje fajllin këtu',
61
+ align_left: 'Rreshtoje majtas',
62
+ align_center: 'Rreshtoje në mes',
63
+ align_right: 'Rreshtoje djathtas',
64
+ align_justify: 'Rreshtoje të gjithin njejt',
65
+ horizontalrule: 'Vizë horizontale',
66
+ fullscreen: 'Pamje e plotë',
67
+ deleted: 'E fshirë',
68
+ anchor: 'Anchor'
69
+ };
@@ -0,0 +1,66 @@
1
+ var RELANG = {};
2
+ RELANG['tr'] = {
3
+ html: 'HTML',
4
+ video: 'Video',
5
+ image: 'Görsel',
6
+ table: 'Tablo',
7
+ link: 'Bağlantı',
8
+ link_insert: 'Bağlantı Ekle ...',
9
+ unlink: 'Bağlantı Kaldır',
10
+ formatting: 'Stiller',
11
+ paragraph: 'Paragraf',
12
+ quote: 'Alıntı',
13
+ code: 'Kod',
14
+ header1: 'Başlık 1',
15
+ header2: 'Başlık 2',
16
+ header3: 'Başlık 3',
17
+ header4: 'Başlık 4',
18
+ bold: 'Kalın',
19
+ italic: 'Eğik',
20
+ fontcolor: 'Yazı rengi',
21
+ backcolor: 'Arkaplan rengi',
22
+ unorderedlist: 'Sırasız liste',
23
+ orderedlist: 'Sıralı liste',
24
+ outdent: 'Girintiyi azalt',
25
+ indent: 'Girintiyi artır',
26
+ cancel: 'İptal',
27
+ insert: 'Ekle',
28
+ save: 'Kaydet',
29
+ _delete: 'Sil',
30
+ insert_table: 'Tablo ekle',
31
+ insert_row_above: 'Yukarı satır ekle',
32
+ insert_row_below: 'Alta satır ekle',
33
+ insert_column_left: 'Sola sütun ekle',
34
+ insert_column_right: 'Sağa sütun ekle',
35
+ delete_column: 'Sütun sil',
36
+ delete_row: 'Satır sil',
37
+ delete_table: 'Tablo sil',
38
+ rows: 'Satırlar',
39
+ columns: 'Sütunlar',
40
+ add_head: 'Başlık ekle',
41
+ delete_head: 'Başlık sil',
42
+ title: 'Başlık',
43
+ image_position: 'Pozisyon',
44
+ none: 'hiçbiri',
45
+ left: 'sol',
46
+ right: 'sağ',
47
+ image_web_link: 'Görselin web bağlantısı',
48
+ text: 'Yazı',
49
+ mailto: 'E-Posta',
50
+ web: 'URL',
51
+ video_html_code: 'Video embed kodu',
52
+ file: 'Dosya',
53
+ upload: 'Yükle',
54
+ download: 'İndir',
55
+ choose: 'Seç',
56
+ or_choose: 'Veya seç',
57
+ drop_file_here: 'Dosyayı buraya bırak',
58
+ align_left: 'Sola hizala',
59
+ align_center: 'Ortala',
60
+ align_right: 'Sağa hizala',
61
+ align_justify: 'Satır uzunluğuna ayarla',
62
+ horizontalrule: 'Yatay çizgi',
63
+ fullscreen: 'Tam ekran',
64
+ deleted: 'Silindi',
65
+ anchor: 'Çapa'
66
+ };
@@ -0,0 +1,67 @@
1
+ var RELANG = {};
2
+ RELANG['ua'] = {
3
+ html: 'Код',
4
+ video: 'Відео',
5
+ image: 'Зображення',
6
+ table: 'Таблиця',
7
+ link: 'Посилання',
8
+ link_insert: 'Вставити посилання ...',
9
+ unlink: 'Видалити посилання',
10
+ formatting: 'Стилі',
11
+ paragraph: 'Звичайний текст',
12
+ quote: 'Цитата',
13
+ code: 'Код',
14
+ header1: 'Заголовок 1',
15
+ header2: 'Заголовок 2',
16
+ header3: 'Заголовок 3',
17
+ header4: 'Заголовок 4',
18
+ bold: 'Жирний',
19
+ italic: 'Похилий',
20
+ fontcolor: 'Колір тексту',
21
+ backcolor: 'Заливка тексту',
22
+ unorderedlist: 'Звичайний список',
23
+ orderedlist: 'Нумерований список',
24
+ outdent: 'Зменшити відступ',
25
+ indent: 'Збільшити відступ',
26
+ cancel: 'Скасувати',
27
+ insert: 'Вставити',
28
+ save: 'Зберегти',
29
+ _delete: 'Видалити',
30
+ insert_table: 'Вставити таблицю',
31
+ insert_row_above: 'Додати рядок зверху',
32
+ insert_row_below: 'Додати рядок знизу',
33
+ insert_column_left: 'Додати стовпець ліворуч',
34
+ insert_column_right: 'Додати стовпець праворуч',
35
+ delete_column: 'Видалити стовпець',
36
+ delete_row: 'Видалити рядок',
37
+ delete_table: 'Видалити таблицю',
38
+ rows: 'Рядки',
39
+ columns: 'Стовпці',
40
+ add_head: 'Додати заголовок',
41
+ delete_head: 'Видалити заголовок',
42
+ title: 'Підказка',
43
+ image_view: 'Завантажити зображення',
44
+ image_position: 'Обтікання текстом',
45
+ none: 'ні',
46
+ left: 'ліворуч',
47
+ right: 'праворуч',
48
+ image_web_link: 'Посилання на зображення',
49
+ text: 'Текст',
50
+ mailto: 'Ел. пошта',
51
+ web: 'URL',
52
+ video_html_code: 'Код відео ролика',
53
+ file: 'Файл',
54
+ upload: 'Вивантажити',
55
+ download: 'Завантажити',
56
+ choose: 'Выбрать',
57
+ or_choose: 'Или выберите',
58
+ drop_file_here: 'Перетащите файл сюда',
59
+ align_left: 'По левому краю',
60
+ align_center: 'По центру',
61
+ align_right: 'По правому краю',
62
+ align_justify: 'Выровнять текст по ширине',
63
+ horizontalrule: 'Горизонтальная линейка',
64
+ fullscreen: 'Во весь экран',
65
+ deleted: 'Зачеркнутый',
66
+ anchor: 'Anchor'
67
+ };
@@ -0,0 +1,67 @@
1
+ //@chen1706@gmail.com
2
+ var RELANG = {};
3
+ RELANG['zh_cn'] = {
4
+ html: 'HTML代码',
5
+ video: '视频',
6
+ image: '图片',
7
+ table: '表格',
8
+ link: '链接',
9
+ link_insert: '插入链接',
10
+ unlink: '取消链接',
11
+ formatting: '样式',
12
+ paragraph: '段落',
13
+ quote: '引用',
14
+ code: '代码',
15
+ header1: '一级标题',
16
+ header2: '二级标题',
17
+ header3: '三级标题',
18
+ header4: '四级标题',
19
+ bold: '粗体',
20
+ italic: '斜体',
21
+ fontcolor: '字体颜色',
22
+ backcolor: '背景颜色',
23
+ unorderedlist: '项目编号',
24
+ orderedlist: '数字编号',
25
+ outdent: '减少缩进',
26
+ indent: '增加缩进',
27
+ cancel: '取消',
28
+ insert: '插入',
29
+ save: '保存',
30
+ _delete: '删除',
31
+ insert_table: '插入表格',
32
+ insert_row_above: '在上方插入',
33
+ insert_row_below: '在下方插入',
34
+ insert_column_left: '在左侧插入',
35
+ insert_column_right: '在右侧插入',
36
+ delete_column: '删除整列',
37
+ delete_row: '删除整行',
38
+ delete_table: '删除表格',
39
+ rows: '行',
40
+ columns: '列',
41
+ add_head: '添加标题',
42
+ delete_head: '删除标题',
43
+ title: '标题',
44
+ image_position: '位置',
45
+ none: '无',
46
+ left: '左',
47
+ right: '右',
48
+ image_web_link: '图片网页链接',
49
+ text: '文本',
50
+ mailto: '邮箱',
51
+ web: '网址',
52
+ video_html_code: '视频嵌入代码',
53
+ file: '文件',
54
+ upload: '上传',
55
+ download: '下载',
56
+ choose: '选择',
57
+ or_choose: '或选择',
58
+ drop_file_here: '将文件拖拽至此区域',
59
+ align_left: '左对齐',
60
+ align_center: '居中',
61
+ align_right: '右对齐',
62
+ align_justify: '两端对齐',
63
+ horizontalrule: '水平线',
64
+ fullscreen: '全屏',
65
+ deleted: '删除',
66
+ anchor: '锚点'
67
+ };
@@ -0,0 +1,3254 @@
1
+ /*
2
+ Redactor v7.7.0
3
+ Updated 27.06.2012
4
+
5
+ http://redactorjs.com/
6
+
7
+ Copyright (c) 2009-2012, Imperavi Ltd.
8
+ License: http://redactorjs.com/license/
9
+
10
+ Usage: $('#content').redactor();
11
+ */
12
+
13
+ if (typeof RELANG === 'undefined')
14
+ {
15
+ var RELANG = {};
16
+ }
17
+
18
+ var RLANG = {
19
+ html: 'HTML',
20
+ video: 'Insert Video...',
21
+ image: 'Insert Image...',
22
+ table: 'Table',
23
+ link: 'Link',
24
+ link_insert: 'Insert Link ...',
25
+ unlink: 'Unlink',
26
+ formatting: 'Formatting',
27
+ paragraph: 'Paragraph',
28
+ quote: 'Quote',
29
+ code: 'Code',
30
+ header1: 'Header 1',
31
+ header2: 'Header 2',
32
+ header3: 'Header 3',
33
+ header4: 'Header 4',
34
+ bold: 'Bold',
35
+ italic: 'Italic',
36
+ fontcolor: 'Font Color',
37
+ backcolor: 'Back Color',
38
+ unorderedlist: 'Unordered List',
39
+ orderedlist: 'Ordered List',
40
+ outdent: 'Outdent',
41
+ indent: 'Indent',
42
+ cancel: 'Cancel',
43
+ insert: 'Insert',
44
+ save: 'Save',
45
+ _delete: 'Delete',
46
+ insert_table: 'Insert Table...',
47
+ insert_row_above: 'Add Row Above',
48
+ insert_row_below: 'Add Row Below',
49
+ insert_column_left: 'Add Column Left',
50
+ insert_column_right: 'Add Column Right',
51
+ delete_column: 'Delete Column',
52
+ delete_row: 'Delete Row',
53
+ delete_table: 'Delete Table',
54
+ rows: 'Rows',
55
+ columns: 'Columns',
56
+ add_head: 'Add Head',
57
+ delete_head: 'Delete Head',
58
+ title: 'Title',
59
+ image_position: 'Position',
60
+ none: 'None',
61
+ left: 'Left',
62
+ right: 'Right',
63
+ image_web_link: 'Image Web Link',
64
+ text: 'Text',
65
+ mailto: 'Email',
66
+ web: 'URL',
67
+ video_html_code: 'Video Embed Code',
68
+ file: 'Insert File...',
69
+ upload: 'Upload',
70
+ download: 'Download',
71
+ choose: 'Choose',
72
+ or_choose: 'Or choose',
73
+ drop_file_here: 'Drop file here',
74
+ align_left: 'Align Left',
75
+ align_center: 'Align Center',
76
+ align_right: 'Align Right',
77
+ align_justify: 'Justify',
78
+ horizontalrule: 'Insert Horizontal Rule',
79
+ fullscreen: 'Fullscreen',
80
+ deleted: 'Deleted',
81
+ anchor: 'Anchor'
82
+ };
83
+
84
+
85
+
86
+
87
+ (function($){
88
+
89
+ "use strict";
90
+
91
+ // Plugin
92
+ jQuery.fn.redactor = function(option)
93
+ {
94
+ return this.each(function()
95
+ {
96
+ var $obj = $(this);
97
+
98
+ var data = $obj.data('redactor');
99
+ if (!data)
100
+ {
101
+ $obj.data('redactor', (data = new Redactor(this, option)));
102
+ }
103
+ });
104
+ };
105
+
106
+
107
+ // Initialization
108
+ var Redactor = function(element, options)
109
+ {
110
+ // Element
111
+ this.$el = $(element);
112
+
113
+ // Lang
114
+ if (typeof options !== 'undefined' && typeof options.lang !== 'undefined' && options.lang !== 'en' && typeof RELANG[options.lang] !== 'undefined')
115
+ {
116
+ RLANG = RELANG[options.lang];
117
+ }
118
+
119
+ // Options
120
+ this.opts = $.extend({
121
+
122
+ lang: 'en',
123
+ direction: 'ltr', // ltr or rtl
124
+
125
+ callback: false, // function
126
+ keyupCallback: false, // function
127
+ keydownCallback: false, // function
128
+ execCommandCallback: false, // function
129
+
130
+ path: false,
131
+ css: 'style.css',
132
+ focus: false,
133
+ resize: true,
134
+ autoresize: false,
135
+ fixed: false,
136
+
137
+ autoformat: true,
138
+ cleanUp: true,
139
+ removeStyles: false,
140
+ removeClasses: false,
141
+ convertDivs: true,
142
+ convertLinks: true,
143
+ xhtml: false,
144
+
145
+ handler: false, // false or url
146
+
147
+ autosave: false, // false or url
148
+ interval: 60, // seconds
149
+
150
+ imageGetJson: false, // url (ex. /folder/images.json ) or false
151
+
152
+ imageUpload: false, // url
153
+ imageUploadCallback: false, // function
154
+
155
+ fileUpload: false, // url
156
+ fileUploadCallback: false, // function
157
+
158
+ visual: true,
159
+ fullscreen: false,
160
+ overlay: true, // modal overlay
161
+
162
+ buttonsCustom: {},
163
+ buttonsAdd: [],
164
+ buttons: ['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|',
165
+ 'image', 'video', 'file', 'table', 'link', '|',
166
+ 'fontcolor', 'backcolor', '|', 'alignleft', 'aligncenter', 'alignright', 'justify', '|',
167
+ 'horizontalrule', 'fullscreen'],
168
+
169
+ colors: [
170
+ '#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00',
171
+ '#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca',
172
+ '#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694',
173
+ '#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314',
174
+ '#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100',
175
+ '#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'],
176
+
177
+ // private
178
+ allEmptyHtml: '<p><br /></p>',
179
+ mozillaEmptyHtml: '<p>&nbsp;</p>',
180
+
181
+ // modal windows container
182
+ modal_file: String() +
183
+ '<form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data">' +
184
+ '<label>Name (optional)</label>' +
185
+ '<input type="text" id="redactor_filename" class="redactor_input" />' +
186
+ '<div style="margin-top: 7px;">' +
187
+ '<input type="file" id="redactor_file" name="file" />' +
188
+ '</div>' +
189
+ '</form>',
190
+
191
+ modal_image_edit: String() +
192
+ '<label>' + RLANG.title + '</label>' +
193
+ '<input id="redactor_file_alt" class="redactor_input" />' +
194
+ '<label>' + RLANG.link + '</label>' +
195
+ '<input id="redactor_file_link" class="redactor_input" />' +
196
+ '<label>' + RLANG.image_position + '</label>' +
197
+ '<select id="redactor_form_image_align">' +
198
+ '<option value="none">' + RLANG.none + '</option>' +
199
+ '<option value="left">' + RLANG.left + '</option>' +
200
+ '<option value="right">' + RLANG.right + '</option>' +
201
+ '</select>' +
202
+ '<div id="redactor_modal_footer">' +
203
+ '<a href="javascript:void(null);" id="redactor_image_delete_btn" style="color: #000;">' + RLANG._delete + '</a>' +
204
+ '<span class="redactor_btns_box">' +
205
+ '<input type="button" name="save" id="redactorSaveBtn" value="' + RLANG.save + '" />' +
206
+ '<a href="javascript:void(null);" id="redactor_btn_modal_close">' + RLANG.cancel + '</a>' +
207
+ '</span>' +
208
+ '</div>',
209
+
210
+ modal_image: String() +
211
+ '<div id="redactor_tabs">' +
212
+ '<a href="javascript:void(null);" class="redactor_tabs_act">' + RLANG.upload + '</a>' +
213
+ '<a href="javascript:void(null);">' + RLANG.choose + '</a>' +
214
+ '<a href="javascript:void(null);">' + RLANG.link + '</a>' +
215
+ '</div>' +
216
+ '<form id="redactorInsertImageForm" method="post" action="" enctype="multipart/form-data">' +
217
+ '<div id="redactor_tab1" class="redactor_tab">' +
218
+ '<input type="file" id="redactor_file" name="file" />' +
219
+ '</div>' +
220
+ '<div id="redactor_tab2" class="redactor_tab" style="display: none;">' +
221
+ '<div id="redactor_image_box"></div>' +
222
+ '</div>' +
223
+ '</form>' +
224
+ '<div id="redactor_tab3" class="redactor_tab" style="display: none;">' +
225
+ '<label>' + RLANG.image_web_link + '</label>' +
226
+ '<input name="redactor_file_link" id="redactor_file_link" class="redactor_input" />' +
227
+ '</div>' +
228
+ '<div id="redactor_modal_footer">' +
229
+ '<span class="redactor_btns_box">' +
230
+ '<input type="button" name="upload" id="redactor_upload_btn" value="' + RLANG.insert + '" />' +
231
+ '<a href="javascript:void(null);" id="redactor_btn_modal_close">' + RLANG.cancel + '</a>' +
232
+ '</span>' +
233
+ '</div>',
234
+
235
+ modal_link: String() +
236
+ '<form id="redactorInsertLinkForm" method="post" action="">' +
237
+ '<div id="redactor_tabs">' +
238
+ '<a href="javascript:void(null);" class="redactor_tabs_act">URL</a>' +
239
+ '<a href="javascript:void(null);">Email</a>' +
240
+ '<a href="javascript:void(null);">' + RLANG.anchor + '</a>' +
241
+ '</div>' +
242
+ '<input type="hidden" id="redactor_tab_selected" value="1" />' +
243
+ '<div class="redactor_tab" id="redactor_tab1">' +
244
+ '<label>URL</label><input id="redactor_link_url" class="redactor_input" />' +
245
+ '<label>' + RLANG.text + '</label><input class="redactor_input redactor_link_text" id="redactor_link_url_text" />' +
246
+ '</div>' +
247
+ '<div class="redactor_tab" id="redactor_tab2" style="display: none;">' +
248
+ '<label>Email</label><input id="redactor_link_mailto" class="redactor_input" />' +
249
+ '<label>' + RLANG.text + '</label><input class="redactor_input redactor_link_text" id="redactor_link_mailto_text" />' +
250
+ '</div>' +
251
+ '<div class="redactor_tab" id="redactor_tab3" style="display: none;">' +
252
+ '<label>' + RLANG.anchor + '</label><input class="redactor_input" id="redactor_link_anchor" />' +
253
+ '<label>' + RLANG.text + '</label><input class="redactor_input redactor_link_text" id="redactor_link_anchor_text" />' +
254
+ '</div>' +
255
+ '</form>' +
256
+ '<div id="redactor_modal_footer">' +
257
+ '<span class="redactor_btns_box">' +
258
+ '<input type="button" id="redactor_insert_link_btn" value="' + RLANG.insert + '" />' +
259
+ '<a href="javascript:void(null);" id="redactor_btn_modal_close">' + RLANG.cancel + '</a>' +
260
+ '</span>' +
261
+ '</div>',
262
+
263
+ modal_table: String() +
264
+ '<label>' + RLANG.rows + '</label>' +
265
+ '<input size="5" value="2" id="redactor_table_rows" />' +
266
+ '<label>' + RLANG.columns + '</label>' +
267
+ '<input size="5" value="3" id="redactor_table_columns" />' +
268
+ '<div id="redactor_modal_footer">' +
269
+ '<span class="redactor_btns_box">' +
270
+ '<input type="button" name="upload" id="redactor_insert_table_btn" value="' + RLANG.insert + '" />' +
271
+ '<a href="javascript:void(null);" id="redactor_btn_modal_close">' + RLANG.cancel + '</a>' +
272
+ '</span>' +
273
+ '</div>',
274
+
275
+ modal_video: String() +
276
+ '<form id="redactorInsertVideoForm">' +
277
+ '<label>' + RLANG.video_html_code + '</label>' +
278
+ '<textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea>' +
279
+ '</form>' +
280
+ '<div id="redactor_modal_footer">' +
281
+ '<span class="redactor_btns_box">' +
282
+ '<input type="button" id="redactor_insert_video_btn" value="' + RLANG.insert + '" />' +
283
+ '<a href="javascript:void(null);" id="redactor_btn_modal_close">' + RLANG.cancel + '</a>' +
284
+ '</span>' +
285
+ '</div>',
286
+
287
+
288
+ toolbar: {
289
+ html:
290
+ {
291
+ title: RLANG.html,
292
+ func: 'toggle'
293
+ },
294
+ formatting:
295
+ {
296
+ title: RLANG.formatting,
297
+ func: 'show',
298
+ dropdown:
299
+ {
300
+ p:
301
+ {
302
+ title: RLANG.paragraph,
303
+ exec: 'formatblock'
304
+ },
305
+ blockquote:
306
+ {
307
+ title: RLANG.quote,
308
+ exec: 'formatblock',
309
+ className: 'redactor_format_blockquote'
310
+ },
311
+ pre:
312
+ {
313
+ title: RLANG.code,
314
+ exec: 'formatblock',
315
+ className: 'redactor_format_pre'
316
+ },
317
+ h1:
318
+ {
319
+ title: RLANG.header1,
320
+ exec: 'formatblock',
321
+ className: 'redactor_format_h1'
322
+ },
323
+ h2:
324
+ {
325
+ title: RLANG.header2,
326
+ exec: 'formatblock',
327
+ className: 'redactor_format_h2'
328
+ },
329
+ h3:
330
+ {
331
+ title: RLANG.header3,
332
+ exec: 'formatblock',
333
+ className: 'redactor_format_h3'
334
+ },
335
+ h4:
336
+ {
337
+ title: RLANG.header4,
338
+ exec: 'formatblock',
339
+ className: 'redactor_format_h4'
340
+ }
341
+ }
342
+ },
343
+ bold:
344
+ {
345
+ title: RLANG.bold,
346
+ exec: 'bold'
347
+ },
348
+ italic:
349
+ {
350
+ title: RLANG.italic,
351
+ exec: 'italic'
352
+ },
353
+ deleted:
354
+ {
355
+ title: RLANG.deleted,
356
+ exec: 'strikethrough'
357
+ },
358
+ unorderedlist:
359
+ {
360
+ title: '&bull; ' + RLANG.unorderedlist,
361
+ exec: 'insertunorderedlist'
362
+ },
363
+ orderedlist:
364
+ {
365
+ title: '1. ' + RLANG.orderedlist,
366
+ exec: 'insertorderedlist'
367
+ },
368
+ outdent:
369
+ {
370
+ title: '< ' + RLANG.outdent,
371
+ exec: 'outdent'
372
+ },
373
+ indent:
374
+ {
375
+ title: '> ' + RLANG.indent,
376
+ exec: 'indent'
377
+ },
378
+ image:
379
+ {
380
+ title: RLANG.image,
381
+ func: 'showImage'
382
+ },
383
+ video:
384
+ {
385
+ title: RLANG.video,
386
+ func: 'showVideo'
387
+ },
388
+ file:
389
+ {
390
+ title: RLANG.file,
391
+ func: 'showFile'
392
+ },
393
+ table:
394
+ {
395
+ title: RLANG.table,
396
+ func: 'show',
397
+ dropdown:
398
+ {
399
+ insert_table:
400
+ {
401
+ title: RLANG.insert_table,
402
+ func: 'showTable'
403
+ },
404
+ separator_drop1:
405
+ {
406
+ name: 'separator'
407
+ },
408
+ insert_row_above:
409
+ {
410
+ title: RLANG.insert_row_above,
411
+ func: 'insertRowAbove'
412
+ },
413
+ insert_row_below:
414
+ {
415
+ title: RLANG.insert_row_below,
416
+ func: 'insertRowBelow'
417
+ },
418
+ insert_column_left:
419
+ {
420
+ title: RLANG.insert_column_left,
421
+ func: 'insertColumnLeft'
422
+ },
423
+ insert_column_right:
424
+ {
425
+ title: RLANG.insert_column_right,
426
+ func: 'insertColumnRight'
427
+ },
428
+ separator_drop2:
429
+ {
430
+ name: 'separator'
431
+ },
432
+ add_head:
433
+ {
434
+ title: RLANG.add_head,
435
+ func: 'addHead'
436
+ },
437
+ delete_head:
438
+ {
439
+ title: RLANG.delete_head,
440
+ func: 'deleteHead'
441
+ },
442
+ separator_drop3:
443
+ {
444
+ name: 'separator'
445
+ },
446
+ delete_column:
447
+ {
448
+ title: RLANG.delete_column,
449
+ func: 'deleteColumn'
450
+ },
451
+ delete_row:
452
+ {
453
+ title: RLANG.delete_row,
454
+ func: 'deleteRow'
455
+ },
456
+ delete_table:
457
+ {
458
+ title: RLANG.delete_table,
459
+ func: 'deleteTable'
460
+ }
461
+ }
462
+ },
463
+ link:
464
+ {
465
+ title: RLANG.link,
466
+ func: 'show',
467
+ dropdown:
468
+ {
469
+ link:
470
+ {
471
+ title: RLANG.link_insert,
472
+ func: 'showLink'
473
+ },
474
+ unlink:
475
+ {
476
+ title: RLANG.unlink,
477
+ exec: 'unlink'
478
+ }
479
+ }
480
+ },
481
+ fontcolor:
482
+ {
483
+ title: RLANG.fontcolor,
484
+ func: 'show'
485
+ },
486
+ backcolor:
487
+ {
488
+ title: RLANG.backcolor,
489
+ func: 'show'
490
+ },
491
+ alignleft:
492
+ {
493
+ exec: 'JustifyLeft',
494
+ title: RLANG.align_left
495
+ },
496
+ aligncenter:
497
+ {
498
+ exec: 'JustifyCenter',
499
+ title: RLANG.align_center
500
+ },
501
+ alignright:
502
+ {
503
+ exec: 'JustifyRight',
504
+ title: RLANG.align_right
505
+ },
506
+ justify:
507
+ {
508
+ exec: 'justifyfull',
509
+ title: RLANG.align_justify
510
+ },
511
+ horizontalrule:
512
+ {
513
+ exec: 'inserthorizontalrule',
514
+ title: RLANG.horizontalrule
515
+ },
516
+ fullscreen:
517
+ {
518
+ title: RLANG.fullscreen,
519
+ func: 'fullscreen'
520
+ }
521
+ }
522
+
523
+
524
+ }, options, this.$el.data());
525
+
526
+ this.dropdowns = [];
527
+
528
+ // Init
529
+ this.init();
530
+ };
531
+
532
+ // Functionality
533
+ Redactor.prototype = {
534
+
535
+
536
+ // Initialization
537
+ init: function()
538
+ {
539
+ // get path to styles
540
+ this.getPath();
541
+
542
+ if (this.opts.toolbar !== false)
543
+ {
544
+ $.extend(this.opts.toolbar, this.opts.buttonsCustom);
545
+
546
+ $.each(this.opts.buttonsAdd, $.proxy(function(i,s)
547
+ {
548
+ this.opts.buttons.push(s);
549
+ }, this));
550
+ }
551
+
552
+ // get dimensions
553
+ this.height = this.$el.css('height');
554
+ this.width = this.$el.css('width');
555
+
556
+ // construct editor
557
+ this.build();
558
+
559
+ // get html
560
+ var html = this.$el.val();
561
+
562
+ // preformatter
563
+ html = this.preformater(html);
564
+
565
+ // enable
566
+ this.$editor = this.enable(html);
567
+
568
+ // focus always on page
569
+ this.observeFocus();
570
+
571
+ // cleanup
572
+ if (this.opts.cleanUp === true)
573
+ {
574
+ $(this.doc).bind('paste', $.proxy(function(e)
575
+ {
576
+ setTimeout($.proxy(function ()
577
+ {
578
+ var marker = Math.floor(Math.random() * 99999);
579
+ var marker_text = '';
580
+ if ($.browser.mozilla) marker_text = '&nbsp;';
581
+ var node = $('<span rel="pastemarkerend" id="pastemarkerend' + marker + '">' + marker_text + '</span>');
582
+ this.insertNodeAtCaret(node.get(0));
583
+
584
+ this.pasteCleanUp(marker);
585
+
586
+ }, this), 100);
587
+
588
+ }, this));
589
+ }
590
+
591
+ // keyup
592
+ $(this.doc).keyup($.proxy(function(e)
593
+ {
594
+ var key = e.keyCode || e.which;
595
+
596
+ // callback as you type
597
+ if (typeof this.opts.keyupCallback === 'function')
598
+ {
599
+ this.opts.keyupCallback(this, e);
600
+ }
601
+
602
+ if (this.opts.autoformat)
603
+ {
604
+ // if empty
605
+ if (key === 8 || key === 46)
606
+ {
607
+ return this.formatEmpty(e);
608
+ }
609
+
610
+ // new line p
611
+ if (key === 13 && !e.shiftKey && !e.ctrlKey && !e.metaKey)
612
+ {
613
+ return this.formatNewLine(e);
614
+ }
615
+ }
616
+
617
+ this.syncCode();
618
+
619
+ }, this));
620
+
621
+ // toolbar
622
+ this.buildToolbar();
623
+
624
+ // resizer
625
+ if (this.opts.autoresize === false)
626
+ {
627
+ this.buildResizer();
628
+ }
629
+ else
630
+ {
631
+ this.observeAutoResize();
632
+ }
633
+
634
+ // shortcuts
635
+ this.shortcuts();
636
+
637
+ // autosave
638
+ this.autoSave();
639
+
640
+ // observers
641
+ this.observeImages();
642
+ this.observeTables();
643
+
644
+ // fullscreen on start
645
+ if (this.opts.fullscreen)
646
+ {
647
+ this.opts.fullscreen = false;
648
+ this.fullscreen();
649
+ }
650
+
651
+ // focus
652
+ if (this.opts.focus)
653
+ {
654
+ this.focus();
655
+ }
656
+
657
+ // fixed
658
+ if (this.opts.fixed)
659
+ {
660
+ this.observeScroll();
661
+ $(document).scroll($.proxy(this.observeScroll, this));
662
+ }
663
+
664
+ // callback
665
+ if (typeof this.opts.callback === 'function')
666
+ {
667
+ this.opts.callback(this);
668
+ }
669
+
670
+ },
671
+ shortcuts: function()
672
+ {
673
+ $(this.doc).keydown($.proxy(function(e)
674
+ {
675
+ var key = e.keyCode || e.which;
676
+
677
+ // callback keydown
678
+ if (typeof this.opts.keydownCallback === 'function')
679
+ {
680
+ this.opts.keydownCallback(this, e);
681
+ }
682
+
683
+ if (e.ctrlKey)
684
+ {
685
+ if (key === 90)
686
+ {
687
+ this._shortcuts(e, 'undo'); // Ctrl + z
688
+ }
689
+ else if (key === 90 && e.shiftKey)
690
+ {
691
+ this._shortcuts(e, 'redo'); // Ctrl + Shift + z
692
+ }
693
+ else if (key === 77)
694
+ {
695
+ this._shortcuts(e, 'removeFormat'); // Ctrl + m
696
+ }
697
+ else if (key === 66)
698
+ {
699
+ this._shortcuts(e, 'bold'); // Ctrl + b
700
+ }
701
+ else if (key === 73)
702
+ {
703
+ this._shortcuts(e, 'italic'); // Ctrl + i
704
+ }
705
+ else if (key === 74)
706
+ {
707
+ this._shortcuts(e, 'insertunorderedlist'); // Ctrl + j
708
+ }
709
+ else if (key === 75)
710
+ {
711
+ this._shortcuts(e, 'insertorderedlist'); // Ctrl + k
712
+ }
713
+ else if (key === 76)
714
+ {
715
+ this._shortcuts(e, 'superscript'); // Ctrl + l
716
+ }
717
+ else if (key === 72)
718
+ {
719
+ this._shortcuts(e, 'subscript'); // Ctrl + h
720
+ }
721
+ }
722
+
723
+ if (!e.shiftKey && key === 9)
724
+ {
725
+ this._shortcuts(e, 'indent'); // Tab
726
+ }
727
+ else if (e.shiftKey && key === 9 )
728
+ {
729
+ this._shortcuts(e, 'outdent'); // Shift + tab
730
+ }
731
+
732
+ // safari shift key + enter
733
+ if ($.browser.webkit && navigator.userAgent.indexOf('Chrome') === -1)
734
+ {
735
+ return this.safariShiftKeyEnter(e, key);
736
+ }
737
+
738
+ }, this));
739
+
740
+ },
741
+ _shortcuts: function(e, cmd)
742
+ {
743
+ if (e.preventDefault)
744
+ {
745
+ e.preventDefault();
746
+ }
747
+ this.execCommand(cmd, null);
748
+ },
749
+ getPath: function()
750
+ {
751
+ if (this.opts.path !== false)
752
+ {
753
+ return this.opts.path;
754
+ }
755
+
756
+ $('script').each($.proxy(function(i,s)
757
+ {
758
+ if (s.src)
759
+ {
760
+ // Match redactor.js or redactor.min.js, followed by an optional querystring (often used for cache purposes)
761
+ var regexp = new RegExp(/\/redactor(\.min)?\.js(\?.*)?/);
762
+ if (s.src.match(regexp))
763
+ {
764
+ this.opts.path = s.src.replace(regexp, '');
765
+ }
766
+ }
767
+ }, this));
768
+
769
+ },
770
+ build: function()
771
+ {
772
+ // container
773
+ this.$box = $('<div class="redactor_box"></div>');
774
+
775
+ // frame
776
+ this.$frame = $('<iframe frameborder="0" scrolling="auto" style="height: ' + this.height + ';" class="redactor_frame"></iframe>');
777
+
778
+ // hide textarea
779
+ this.$el.css('width', '100%').hide();
780
+
781
+ // append box and frame
782
+ this.$box.insertAfter(this.$el).append(this.$frame).append(this.$el);
783
+
784
+ },
785
+ write: function(html)
786
+ {
787
+ this.doc.open();
788
+ this.doc.write(html);
789
+ this.doc.close();
790
+ },
791
+ enable: function(html)
792
+ {
793
+ this.doc = this.getDoc(this.$frame.get(0));
794
+
795
+ if (this.doc !== null)
796
+ {
797
+ this.write(this.setDoc(html));
798
+ if ($.browser.mozilla)
799
+ {
800
+ this.doc.execCommand("useCSS", false, true);
801
+ }
802
+ return $(this.doc).find('#page');
803
+ }
804
+ else
805
+ {
806
+ return false;
807
+ }
808
+ },
809
+ setDoc: function(html)
810
+ {
811
+ var frameHtml = '<!DOCTYPE html>\n' +
812
+ '<html><head><link media="all" type="text/css" href="' + this.opts.path + '/css/' + this.opts.css + '" rel="stylesheet"></head>' +
813
+ '<body><div id="page" contenteditable="true" dir="' + this.opts.direction + '">' +
814
+ html +
815
+ '</div></body></html>';
816
+
817
+ return frameHtml;
818
+ },
819
+ getDoc: function(frame)
820
+ {
821
+ if (frame.contentDocument)
822
+ {
823
+ return frame.contentDocument;
824
+ }
825
+ else if (frame.contentWindow && frame.contentWindow.document)
826
+ {
827
+ return frame.contentWindow.document;
828
+ }
829
+ else if (frame.document)
830
+ {
831
+ return frame.document;
832
+ }
833
+ else
834
+ {
835
+ return null;
836
+ }
837
+ },
838
+ focus: function()
839
+ {
840
+ this.$editor.focus();
841
+ },
842
+ syncCode: function()
843
+ {
844
+ var html = this.formatting(this.$editor.html());
845
+ this.$el.val(html);
846
+ },
847
+
848
+ // API functions
849
+ setCode: function(html)
850
+ {
851
+ html = this.preformater(html);
852
+
853
+ this.$editor.html(html).focus();
854
+
855
+ this.syncCode();
856
+ },
857
+ getCode: function()
858
+ {
859
+ var html = this.$editor ? this.$editor.html() : this.$el.val();
860
+ html = this.reformater(html);
861
+
862
+ return html;
863
+ },
864
+ insertHtml: function(html)
865
+ {
866
+ this.execCommand('inserthtml', html);
867
+ this.observeImages();
868
+ },
869
+ destroy: function()
870
+ {
871
+ var html = this.getCode();
872
+
873
+ this.$box.after(this.$el);
874
+ this.$box.remove();
875
+ this.$el.val(html).show();
876
+
877
+ for (var i = 0; i < this.dropdowns.length; i++)
878
+ {
879
+ this.dropdowns[i].remove();
880
+ delete(this.dropdowns[i]);
881
+ }
882
+
883
+ },
884
+ handler: function()
885
+ {
886
+ $.ajax({
887
+ url: this.opts.handler,
888
+ type: 'POST',
889
+ data: 'redactor=' + escape(encodeURIComponent(this.getCode())),
890
+ success: $.proxy(function(data)
891
+ {
892
+ this.setCode(data);
893
+ this.syncCode();
894
+
895
+ }, this)
896
+ });
897
+
898
+ },
899
+ // end API functions
900
+
901
+ // OBSERVERS
902
+ observeFocus: function()
903
+ {
904
+ if ($(this.doc).find('body').height() < $(this.$frame.get(0).contentWindow).height())
905
+ {
906
+ $(this.doc).click($.proxy(function(e) { this.$editor.focus(); }, this));
907
+ }
908
+ },
909
+ observeImages: function()
910
+ {
911
+ if ($.browser.mozilla)
912
+ {
913
+ this.doc.execCommand("enableObjectResizing", false, "false");
914
+ }
915
+
916
+ $(this.doc).find('img').each($.proxy(function(i,s)
917
+ {
918
+ if ($.browser.msie) $(s).attr('unselectable', 'on');
919
+ this.resizeImage(s);
920
+
921
+ }, this));
922
+
923
+ },
924
+ observeTables: function()
925
+ {
926
+ $(this.doc).find('body').find('table').click($.proxy(this.tableObserver, this));
927
+ },
928
+ observeScroll: function()
929
+ {
930
+ var scrolltop = $(document).scrollTop();
931
+ var boxtop = this.$box.offset().top;
932
+
933
+ if (scrolltop > boxtop)
934
+ {
935
+ this.fixed = true;
936
+ this.$toolbar.css({ position: 'fixed', width: '100%' });
937
+ }
938
+ else
939
+ {
940
+ this.fixed = false;
941
+ this.$toolbar.css({ position: 'relative', width: 'auto' });
942
+ }
943
+ },
944
+ observeAutoResize: function()
945
+ {
946
+ this.$editor.css({ 'min-height': this.$el.height() + 'px' });
947
+ $(this.doc).find('body').css({ 'overflow': 'hidden' });
948
+ this.setAutoSize(false);
949
+ $(this.doc).keyup($.proxy(this.setAutoSize, this));
950
+ },
951
+ setAutoSize: function(e)
952
+ {
953
+ var key = false;
954
+ if (e !== false)
955
+ {
956
+ key = e.keyCode || e.which;
957
+ }
958
+
959
+ if (e === false || key === 13)
960
+ {
961
+ this.$frame.height(this.$editor.outerHeight(true)+30);
962
+ }
963
+ else if (key === 8 || key === 46)
964
+ {
965
+ this.$frame.height(this.$editor.outerHeight(true));
966
+ }
967
+ },
968
+
969
+
970
+ // EXECCOMMAND
971
+ execCommand: function(cmd, param)
972
+ {
973
+ if (this.opts.visual && this.doc)
974
+ {
975
+ try
976
+ {
977
+ if ($.browser.msie)
978
+ {
979
+ this.focus();
980
+ }
981
+
982
+ if (cmd === 'inserthtml' && $.browser.msie)
983
+ {
984
+ this.doc.selection.createRange().pasteHTML(param);
985
+ }
986
+ else if (cmd === 'formatblock' && $.browser.msie)
987
+ {
988
+ this.doc.execCommand(cmd, false, '<' +param + '>');
989
+ }
990
+ else
991
+ {
992
+ this.doc.execCommand(cmd, false, param);
993
+ }
994
+
995
+ this.syncCode();
996
+ this.focus();
997
+
998
+ if (typeof this.opts.execCommandCallback === 'function')
999
+ {
1000
+ this.opts.execCommandCallback(this, cmd);
1001
+ }
1002
+ }
1003
+ catch (e) { }
1004
+
1005
+ }
1006
+ },
1007
+
1008
+ // FORMAT NEW LINE
1009
+ formatNewLine: function(e)
1010
+ {
1011
+ var parent = this.getParentNode();
1012
+ if (parent.nodeName === 'DIV' && parent.id === 'page')
1013
+ {
1014
+ if (e.preventDefault)
1015
+ {
1016
+ e.preventDefault();
1017
+ }
1018
+
1019
+ var element = $(this.getCurrentNode());
1020
+ if (element.get(0).tagName === 'DIV' && (element.html() === '' || element.html() === '<br>'))
1021
+ {
1022
+ var newElement = $('<p>').append(element.clone().get(0).childNodes);
1023
+ element.replaceWith(newElement);
1024
+ newElement.html('<br />');
1025
+ this.setFocusNode(newElement.get(0));
1026
+
1027
+ this.syncCode();
1028
+ return false;
1029
+ }
1030
+ else
1031
+ {
1032
+ this.syncCode();
1033
+ }
1034
+
1035
+ // convert links
1036
+ if (this.opts.convertLinks)
1037
+ {
1038
+ this.$editor.linkify();
1039
+ }
1040
+ }
1041
+ else
1042
+ {
1043
+ this.syncCode();
1044
+ return true;
1045
+ }
1046
+ },
1047
+
1048
+ // SAFARI SHIFT KEY + ENTER
1049
+ safariShiftKeyEnter: function(e, key)
1050
+ {
1051
+ if (e.shiftKey && key === 13)
1052
+ {
1053
+ e.preventDefault();
1054
+
1055
+ var node1 = $('<span><br /></span>');
1056
+ this.insertNodeAtCaret(node1.get(0));
1057
+ this.setFocusNode(node1.get(0));
1058
+
1059
+ this.syncCode();
1060
+
1061
+ return false;
1062
+ }
1063
+ else
1064
+ {
1065
+ return true;
1066
+ }
1067
+ },
1068
+
1069
+ // FORMAT EMPTY
1070
+ formatEmpty: function(e)
1071
+ {
1072
+ var html = $.trim(this.$editor.html());
1073
+
1074
+ if ($.browser.mozilla)
1075
+ {
1076
+ html = html.replace(/<br>/gi, '');
1077
+ }
1078
+
1079
+ if (html === '')
1080
+ {
1081
+ if (e.preventDefault)
1082
+ {
1083
+ e.preventDefault();
1084
+ }
1085
+
1086
+ var nodehtml = this.opts.allEmptyHtml;
1087
+ if ($.browser.mozilla)
1088
+ {
1089
+ nodehtml = this.opts.mozillaEmptyHtml;
1090
+ }
1091
+
1092
+ var node = $(nodehtml).get(0);
1093
+ this.$editor.html(node);
1094
+ this.setFocusNode(node);
1095
+
1096
+ this.syncCode();
1097
+ return false;
1098
+ }
1099
+ else
1100
+ {
1101
+ this.syncCode();
1102
+ }
1103
+ },
1104
+
1105
+ // PREPARE FORMATER
1106
+ preformater: function(html)
1107
+ {
1108
+ if (html !== null)
1109
+ {
1110
+ html = html.replace(/<br>/gi,'<br />');
1111
+ //html = html.replace(/<blockquote\b[^>]*>([\w\W]*?)<p>([\w\W]*?)<\/p>([\w\W]*?)<\/blockquote[^>]*>/gi,'<blockquote>$1$2<br />$3</blockquote>');
1112
+ html = html.replace(/<strong\b[^>]*>([\w\W]*?)<\/strong[^>]*>/gi,'<b>$1</b>');
1113
+ html = html.replace(/<em\b[^>]*>([\w\W]*?)<\/em[^>]*>/gi,'<i>$1</i>');
1114
+ html = html.replace(/<del\b[^>]*>([\w\W]*?)<\/del[^>]*>/gi,'<strike>$1</strike>');
1115
+ }
1116
+ else
1117
+ {
1118
+ html = '';
1119
+ }
1120
+
1121
+ return html;
1122
+ },
1123
+
1124
+ // REVERT FORMATER
1125
+ reformater: function(html)
1126
+ {
1127
+ html = html.replace(/<br>/gi,'<br />');
1128
+ html = html.replace(/<b\b[^>]*>([\w\W]*?)<\/b[^>]*>/gi,'<strong>$1</strong>');
1129
+ html = html.replace(/<i\b[^>]*>([\w\W]*?)<\/i[^>]*>/gi,'<em>$1</em>');
1130
+ html = html.replace(/<strike\b[^>]*>([\w\W]*?)<\/strike[^>]*>/gi,'<del>$1</del>');
1131
+ html = html.replace(/<span(.*?)style="font-weight: bold;">([\w\W]*?)<\/span>/gi, "<strong>$2</strong>");
1132
+ html = html.replace(/<span(.*?)style="font-style: italic;">([\w\W]*?)<\/span>/gi, "<em>$2</em>");
1133
+ html = html.replace(/<span(.*?)style="font-weight: bold; font-style: italic;">([\w\W]*?)<\/span>/gi, "<em><strong>$2</strong></em>");
1134
+ html = html.replace(/<span(.*?)style="font-style: italic; font-weight: bold;">([\w\W]*?)<\/span>/gi, "<strong><em>$2</em></strong>");
1135
+
1136
+ return html;
1137
+ },
1138
+
1139
+ // REMOVE TAGS
1140
+ stripTags: function(html)
1141
+ {
1142
+ var allowed = ["code", "span", "div", "label", "a", "br", "p", "b", "i", "del", "strike", "img", "video", "audio", "iframe", "object", "embed", "param", "blockquote", "mark", "cite", "small", "ul", "ol", "li", "hr", "dl", "dt", "dd", "sup", "sub", "big", "pre", "code", "figure", "figcaption", "strong", "em", "table", "tr", "td", "th", "tbody", "thead", "tfoot", "h1", "h2", "h3", "h4", "h5", "h6"];
1143
+ var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;
1144
+ return html.replace(tags, function ($0, $1)
1145
+ {
1146
+ return $.inArray($1.toLowerCase(), allowed) > '-1' ? $0 : '';
1147
+ });
1148
+ },
1149
+ cleanStyles: function (properties, str, m)
1150
+ {
1151
+
1152
+ var attr = m.split('=');
1153
+ var prop = attr[1].split(';');
1154
+
1155
+ var t = '';
1156
+ $.each(prop, function(z,s)
1157
+ {
1158
+ if (typeof s == 'undefined') return true;
1159
+ if (s == '"' || s == "'") return true;
1160
+
1161
+ s = s.replace(/(^"|^')/,'').replace(/("$|'$)/,'').replace(/"(.*?)"/gi, '');
1162
+ s = $.trim(s);
1163
+
1164
+ var p = s.split(':');
1165
+
1166
+ if (typeof p[1] !== 'undefined' && (p[1].search('pt') === -1 && p[1].search('cm') === -1))
1167
+ {
1168
+ if ($.inArray($.trim(p[0]), properties) != '-1') t += s + '; ';
1169
+ }
1170
+ });
1171
+
1172
+ return str.replace(m, 'style="' + t + '"');
1173
+ },
1174
+
1175
+
1176
+ // PASTE CLEANUP
1177
+ pasteCleanUp: function(marker)
1178
+ {
1179
+ var html = this.$editor.html();
1180
+
1181
+ // remove comments and php tags
1182
+ html = html.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi, '')
1183
+
1184
+ // remove formatting
1185
+ html = this.formattingRemove(html);
1186
+
1187
+ // remove tags
1188
+ html = this.stripTags(html);
1189
+
1190
+ // remove classes
1191
+ if (this.opts.removeClasses)
1192
+ {
1193
+ html = html.replace(/ class="([\w\W]*?)"/gi, '');
1194
+ }
1195
+ else
1196
+ {
1197
+ html = html.replace(/\s*class="TOC(.*?)"/gi, "" );
1198
+ html = html.replace(/\s*class="Heading(.*?)"/gi, "" );
1199
+ html = html.replace(/\s*class="Body(.*?)"/gi, "" );
1200
+ html = html.replace(/\sclass="Nonformat"/gi, '');
1201
+ html = html.replace(/\sclass="Mso(.*?)"/gi, '');
1202
+ html = html.replace(/\sclass="Apple(.*?)"/gi, '');
1203
+ html = html.replace(/"Times New Roman"/gi, '');
1204
+ }
1205
+
1206
+ var attributes = ['width', 'height', 'src', 'style', 'href', 'frameborder', 'class', 'id', 'rel', 'unselectable'];
1207
+ var properties = ['color', 'background-color', 'font-style', 'margin', 'margin-top', 'margin-bottom', 'margin-left', 'margin-right', 'text-align', 'width', 'height', 'cursor', 'float'];
1208
+
1209
+ // remove attributes
1210
+ var matches = html.match(/([\w\-.:]+)\s*=\s*("[^"]*"|'[^']*'|[\w\-.:]+)/gi);
1211
+ $.each(matches, $.proxy(function(i,m)
1212
+ {
1213
+ var attr = m.split('=');
1214
+ if ($.inArray(attr[0], attributes) == '-1')
1215
+ {
1216
+ html = html.replace(m, '');
1217
+ }
1218
+
1219
+ // remove styles
1220
+ if (this.opts.removeStyles === false && attr[0] == 'style') html = this.cleanStyles(properties, html, m);
1221
+
1222
+ }, this));
1223
+
1224
+ // remove styles
1225
+ if (this.opts.removeStyles === false)
1226
+ {
1227
+ html = html.replace(/background-color:(\s+)transparent;\s/gi, '');
1228
+ html = html.replace(/font-style:(\s+)normal;\s/gi, '');
1229
+ }
1230
+ else
1231
+ {
1232
+ html = html.replace(/ style="([\w\W]*?)"/gi, '');
1233
+ }
1234
+
1235
+ // remove empty styles
1236
+ html = html.replace(/((\s{2,})?|\s)style=(""|'')/gi, '');
1237
+
1238
+ // remove nbsp
1239
+ html = html.replace(/(&nbsp;){1,}/gi, '&nbsp;');
1240
+
1241
+ // remove empty span
1242
+ html = html.replace(/<span(\s)?>(\s)?<\/span>/gi, ' ');
1243
+
1244
+ // remove double white spaces
1245
+ html = html.replace(/\s{2,}/g, ' ');
1246
+
1247
+ // remove span without styles
1248
+ html = html.replace(/<span>([\w\W]*?)<\/span>/gi, '$1');
1249
+ html = html.replace(/<span>([\w\W]*?)<\/span>/gi, '$1');
1250
+ html = html.replace(/<span(\s)?>([\w\W]*?)<\/span>/gi, '$2');
1251
+
1252
+ // empty tags
1253
+ html = this.formattingEmptyTags(html);
1254
+
1255
+ // add formatting before
1256
+ html = this.formattingAddBefore(html);
1257
+
1258
+ // add formatting after
1259
+ html = this.formattingAddAfter(html);
1260
+
1261
+ // indenting
1262
+ html = this.formattingIndenting(html);
1263
+
1264
+ // dirty paragraphs
1265
+ html = html.replace(/<p><div>/gi, "");
1266
+ html = html.replace(/<p>\s+\n+<(.*?)/gi, "<$1");
1267
+ html = html.replace(/<\/(.*?)>\s+\n+<\/p>/gi, "</$1>");
1268
+ html = html.replace(/<p style="(.*?)">(\s)?<\/p>/gi, '');
1269
+ html = html.replace(/<p style="(.*?)"><\/p>/gi, '');
1270
+
1271
+ // remove google docs marker
1272
+ html = html.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi, "$2");
1273
+
1274
+ // trim spaces
1275
+ html = html.replace(/; ">/gi, ';">');
1276
+
1277
+ // SET HTML
1278
+ this.$editor.html(html);
1279
+
1280
+ // RETURN FOCUS
1281
+ var node = $(this.doc.body).find('#pastemarkerend' + marker).get(0);
1282
+ this.setFocusNode(node);
1283
+
1284
+ this.syncCode();
1285
+
1286
+
1287
+ setTimeout($.proxy(function()
1288
+ {
1289
+ // remove pastemarker
1290
+ $(this.doc.body).find('span[rel=pastemarkerend]').remove();
1291
+
1292
+ if (this.opts.autoresize === true) this.setAutoSize(false);
1293
+
1294
+ this.observeImages();
1295
+ this.observeTables();
1296
+
1297
+ }, this), 100);
1298
+
1299
+
1300
+ },
1301
+
1302
+ // TEXTAREA CODE FORMATTING
1303
+ formattingRemove: function(html)
1304
+ {
1305
+ html = html.replace(/\s{2,}/g, ' ');
1306
+ html = html.replace(/\n/g, ' ');
1307
+ html = html.replace(/[\t]*/g, '');
1308
+ html = html.replace(/\n\s*\n/g, "\n");
1309
+ html = html.replace(/^[\s\n]*/g, '');
1310
+ html = html.replace(/[\s\n]*$/g, '');
1311
+ html = html.replace(/>\s+</g, '><');
1312
+
1313
+ return html;
1314
+ },
1315
+ formattingIndenting: function(html)
1316
+ {
1317
+ html = html.replace(/<li/g, "\t<li");
1318
+ html = html.replace(/<tr/g, "\t<tr");
1319
+ html = html.replace(/<td/g, "\t\t<td");
1320
+ html = html.replace(/<\/tr>/g, "\t</tr>");
1321
+
1322
+ return html;
1323
+ },
1324
+ formattingEmptyTags: function(html)
1325
+ {
1326
+ var etags = ["<pre></pre>","<blockquote>\\s*</blockquote>","<em>\\s*</em>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>", "<span>&nbsp;<span>", "<b>\\s*</b>", "<b>&nbsp;</b>", "<p>\\s*</p>", "<p>&nbsp;</p>", "<p>\\s*<br>\\s*</p>", "<div>\\s*</div>", "<div>\\s*<br>\\s*</div>"];
1327
+ for (var i = 0; i < etags.length; ++i)
1328
+ {
1329
+ var bbb = etags[i];
1330
+ html = html.replace(new RegExp(bbb,'gi'), "");
1331
+ }
1332
+
1333
+ return html;
1334
+ },
1335
+ formattingAddBefore: function(html)
1336
+ {
1337
+ var lb = '\r\n';
1338
+ var btags = ["<p", "<form","</ul>", '</ol>', "<fieldset","<legend","<object","<embed","<select","<option","<input","<textarea","<pre","<blockquote","<ul","<ol","<li","<dl","<dt","<dd","<table", "<thead","<tbody","<caption","</caption>","<th","<tr","<td","<figure"];
1339
+ for (var i = 0; i < btags.length; ++i)
1340
+ {
1341
+ var eee = btags[i];
1342
+ html = html.replace(new RegExp(eee,'gi'),lb+eee);
1343
+ }
1344
+
1345
+ return html;
1346
+ },
1347
+ formattingAddAfter: function(html)
1348
+ {
1349
+ var lb = '\r\n';
1350
+ var atags = ['</p>', '</div>', '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>', '<br>', '<br />', '</dl>', '</dt>', '</dd>', '</form>', '</blockquote>', '</pre>', '</legend>', '</fieldset>', '</object>', '</embed>', '</textarea>', '</select>', '</option>', '</table>', '</thead>', '</tbody>', '</tr>', '</td>', '</th>', '</figure>'];
1351
+ for (var i = 0; i < atags.length; ++i)
1352
+ {
1353
+ var aaa = atags[i];
1354
+ html = html.replace(new RegExp(aaa,'gi'),aaa+lb);
1355
+ }
1356
+
1357
+ return html;
1358
+ },
1359
+ formatting: function(html)
1360
+ {
1361
+ // lowercase
1362
+ if ($.browser.msie)
1363
+ {
1364
+ var match = html.match(/<(.*?)>/gi);
1365
+ $.each(match, function(i,s)
1366
+ {
1367
+ html = html.replace(s, s.toLowerCase());
1368
+ })
1369
+ html = html.replace(/style="(.*?)"/gi, function(w) { return w.toLowerCase(); });
1370
+ html = html.replace(/ jQuery(.*?)=\"(.*?)\"/gi, '');
1371
+ }
1372
+
1373
+ html = html.replace(/<span([\w\W]*?)style="color:(.*?);"><span([\w\W]*?)style="background-color:(.*?);">([\w\W]*?)<\/span><\/span>/gi, '<span style="color: $2; background-color: $4;">$5</span>');
1374
+ html = html.replace(/<span([\w\W]*?)style="background-color:(.*?);"><span([\w\W]*?)style="color:(.*?);">([\w\W]*?)<\/span><\/span>/gi, '<span style="color: $2; background-color: $4;">$5</span>');
1375
+
1376
+ html = html.replace(/<span([\w\W]*?)color="(.*?)">([\w\W]*?)<\/span\>/gi, '<span$1style="color: $2;">$3</span>');
1377
+ html = html.replace(/<font([\w\W]*?)color="(.*?)">([\w\W]*?)<\/font\>/gi, '<span$1style="color: $2;">$3</span>');
1378
+ html = html.replace(/<span style="(.*?)"\s+style="(.*?)"[\s]*>([\w\W]*?)<\/span\>/gi, '<span style="$1;$2">$3</span>');
1379
+ html = html.replace(/<font([\w\W]*?)>([\w\W]*?)<\/font\>/gi, "<span$1>$2</span>");
1380
+ html = html.replace(/<span>([\w\W]*?)<\/span>/gi, '$1');
1381
+
1382
+ if (this.opts.xhtml)
1383
+ {
1384
+ html = html.replace(/<br>/gi,'<br />');
1385
+ html = html.replace(/<br ?\/?>$/gi,'');
1386
+ html = html.replace(/^<br ?\/?>/gi,'');
1387
+ html = html.replace(/(<img [^>]+[^\/])>/gi,'$1 />');
1388
+ }
1389
+
1390
+ // mini clean
1391
+ html = html.replace(/<p><p>/g, '<p>');
1392
+ html = html.replace(/<\/p><\/p>/g, '</p>');
1393
+ html = html.replace(/<hr(.*?)>/g, '<hr />');
1394
+ html = html.replace(/<p>&nbsp;/g, '<p>');
1395
+ html = html.replace(/<p><ul>/g, '<ul>');
1396
+ html = html.replace(/<p><ol>/g, '<ol>');
1397
+ html = html.replace(/<\/ul><\/p>/g, '</ul>');
1398
+ html = html.replace(/<\/ol><\/p>/g, '</ol>');
1399
+ html = html.replace( /<p(.*?)>&nbsp;<\/p>/gi, '');
1400
+
1401
+ // remove formatting
1402
+ html = this.formattingRemove(html);
1403
+
1404
+ // empty tags
1405
+ html = this.formattingEmptyTags(html);
1406
+
1407
+ // add formatting before
1408
+ html = this.formattingAddBefore(html);
1409
+
1410
+ // add formatting after
1411
+ html = this.formattingAddAfter(html);
1412
+
1413
+ // indenting
1414
+ html = this.formattingIndenting(html);
1415
+
1416
+ return html;
1417
+ },
1418
+
1419
+ // TOGGLE
1420
+ toggle: function()
1421
+ {
1422
+ var html;
1423
+
1424
+ if (this.opts.visual)
1425
+ {
1426
+ this.$frame.hide();
1427
+
1428
+ html = this.$editor.html();
1429
+ html = $.trim(this.formatting(html));
1430
+
1431
+ this.$el.val(html).show().focus();
1432
+
1433
+ this.setBtnActive('html');
1434
+ this.opts.visual = false;
1435
+ }
1436
+ else
1437
+ {
1438
+ this.$el.hide();
1439
+
1440
+ this.$editor.html(this.$el.val());
1441
+
1442
+ this.$frame.show();
1443
+
1444
+ if (this.$editor.html() === '')
1445
+ {
1446
+ if (!$.browser.mozilla)
1447
+ {
1448
+ html = this.opts.allEmptyHtml;
1449
+ }
1450
+ else
1451
+ {
1452
+ html = this.opts.mozillaEmptyHtml;
1453
+ }
1454
+
1455
+ this.setCode(html);
1456
+ }
1457
+
1458
+ this.focus();
1459
+
1460
+ this.setBtnInactive('html');
1461
+ this.opts.visual = true;
1462
+
1463
+ this.observeImages();
1464
+ this.observeTables();
1465
+
1466
+ if (this.opts.autoresize === true) this.setAutoSize(false);
1467
+ }
1468
+ },
1469
+
1470
+ // AUTOSAVE
1471
+ autoSave: function()
1472
+ {
1473
+ if (this.opts.autosave === false)
1474
+ {
1475
+ return false;
1476
+ }
1477
+
1478
+ setInterval($.proxy(function()
1479
+ {
1480
+ $.post(this.opts.autosave, { data: this.getCode() });
1481
+
1482
+ }, this), this.opts.interval*1000);
1483
+ },
1484
+
1485
+ // TOOLBAR
1486
+ buildToolbar: function()
1487
+ {
1488
+ if (this.opts.toolbar === false)
1489
+ {
1490
+ return false;
1491
+ }
1492
+
1493
+ this.$toolbar = $('<ul>').addClass('redactor_toolbar');
1494
+ this.$box.prepend(this.$toolbar);
1495
+
1496
+ $.each(this.opts.buttons, $.proxy(function(i,key)
1497
+ {
1498
+
1499
+ if (key !== '|' && typeof this.opts.toolbar[key] !== 'undefined')
1500
+ {
1501
+ var s = this.opts.toolbar[key];
1502
+
1503
+ if (this.opts.fileUpload === false && key === 'file')
1504
+ {
1505
+ return true;
1506
+ }
1507
+
1508
+ var li = $('<li>');
1509
+
1510
+ if (key === 'fullscreen')
1511
+ {
1512
+ $(li).addClass('redactor_toolbar_right');
1513
+ }
1514
+
1515
+ var a = this.buildButton(key, s);
1516
+
1517
+ // dropdown
1518
+ if (key === 'backcolor' || key === 'fontcolor' || typeof(s.dropdown) !== 'undefined')
1519
+ {
1520
+ var dropdown = $('<div class="redactor_dropdown" style="display: none;">');
1521
+
1522
+ if (key === 'backcolor' || key === 'fontcolor')
1523
+ {
1524
+ dropdown = this.buildColorPicker(dropdown, key);
1525
+ }
1526
+ else
1527
+ {
1528
+ dropdown = this.buildDropdown(dropdown, s.dropdown);
1529
+ }
1530
+
1531
+ this.dropdowns.push(dropdown.appendTo($(document.body)));
1532
+
1533
+ // observing dropdown
1534
+ this.hdlHideDropDown = $.proxy(function(e) { this.hideDropDown(e, dropdown, key); }, this);
1535
+ this.hdlShowDropDown = $.proxy(function(e) { this.showDropDown(e, dropdown, key); }, this);
1536
+
1537
+ a.click(this.hdlShowDropDown);
1538
+ }
1539
+
1540
+ this.$toolbar.append($(li).append(a));
1541
+ }
1542
+
1543
+
1544
+ if (key === '|')
1545
+ {
1546
+ this.$toolbar.append($('<li class="redactor_separator"></li>'));
1547
+ }
1548
+
1549
+ }, this));
1550
+
1551
+ $(document).click(this.hdlHideDropDown);
1552
+ $(this.doc).click(this.hdlHideDropDown);
1553
+
1554
+ },
1555
+ buildButton: function(key, s)
1556
+ {
1557
+ var button = $('<a href="javascript:void(null);" title="' + s.title + '" class="redactor_btn_' + key + '"><span>&nbsp;</span></a>');
1558
+
1559
+ if (typeof s.func === 'undefined')
1560
+ {
1561
+ button.click($.proxy(function() { this.execCommand(s.exec, key); }, this));
1562
+ }
1563
+ else if (s.func !== 'show')
1564
+ {
1565
+ button.click($.proxy(function(e) { this[s.func](e); }, this));
1566
+ }
1567
+
1568
+ if (typeof s.callback !== 'undefined')
1569
+ {
1570
+ button.click($.proxy(function(e) { s.callback(this, e, key); }, this));
1571
+ }
1572
+
1573
+ return button;
1574
+ },
1575
+ buildDropdown: function(dropdown, obj)
1576
+ {
1577
+ $.each(obj, $.proxy(
1578
+ function (x, d)
1579
+ {
1580
+ if (typeof(d.className) === 'undefined')
1581
+ {
1582
+ d.className = '';
1583
+ }
1584
+
1585
+ var drop_a;
1586
+ if (typeof d.name !== 'undefined' && d.name === 'separator')
1587
+ {
1588
+ drop_a = $('<a class="redactor_separator_drop">');
1589
+ }
1590
+ else
1591
+ {
1592
+ drop_a = $('<a href="javascript:void(null);" class="' + d.className + '">' + d.title + '</a>');
1593
+
1594
+ if (typeof(d.func) === 'undefined')
1595
+ {
1596
+ $(drop_a).click($.proxy(function() { this.execCommand(d.exec, x); }, this));
1597
+ }
1598
+ else
1599
+ {
1600
+ $(drop_a).click($.proxy(function(e) { this[d.func](e); }, this));
1601
+ }
1602
+ }
1603
+
1604
+ $(dropdown).append(drop_a);
1605
+
1606
+ }, this)
1607
+ );
1608
+
1609
+ return dropdown;
1610
+
1611
+ },
1612
+ buildColorPicker: function(dropdown, key)
1613
+ {
1614
+ var mode;
1615
+ if (key === 'backcolor')
1616
+ {
1617
+ if ($.browser.msie)
1618
+ {
1619
+ mode = 'BackColor';
1620
+ }
1621
+ else
1622
+ {
1623
+ mode = 'hilitecolor';
1624
+ }
1625
+ }
1626
+ else
1627
+ {
1628
+ mode = 'forecolor';
1629
+ }
1630
+
1631
+ $(dropdown).width(210);
1632
+
1633
+ var len = this.opts.colors.length;
1634
+ for (var i = 0; i < len; ++i)
1635
+ {
1636
+ var color = this.opts.colors[i];
1637
+
1638
+ var swatch = $('<a rel="' + color + '" href="javascript:void(null);" class="redactor_color_link"></a>').css({ 'backgroundColor': color });
1639
+ $(dropdown).append(swatch);
1640
+
1641
+ var _self = this;
1642
+ $(swatch).click(function()
1643
+ {
1644
+ if ($.browser.mozilla)
1645
+ {
1646
+ if (mode == 'hilitecolor')
1647
+ {
1648
+ _self.execCommand('useCSS', false, false);
1649
+ _self.execCommand(mode, $(this).attr('rel'));
1650
+ _self.execCommand('useCSS', false, true);
1651
+ }
1652
+ else
1653
+ {
1654
+ _self.execCommand('styleWithCSS', false, false);
1655
+ _self.execCommand(mode, $(this).attr('rel'));
1656
+ _self.execCommand('styleWithCSS', false, true);
1657
+ }
1658
+ }
1659
+ else
1660
+ {
1661
+ _self.execCommand(mode, $(this).attr('rel'));
1662
+ }
1663
+
1664
+ });
1665
+ }
1666
+
1667
+ var elnone = $('<a href="javascript:void(null);" class="redactor_color_none"></a>').html(RLANG.none);
1668
+
1669
+ if (key === 'backcolor')
1670
+ {
1671
+ elnone.click($.proxy(this.setBackgroundNone, this));
1672
+ }
1673
+ else
1674
+ {
1675
+ elnone.click($.proxy(this.setColorNone, this));
1676
+ }
1677
+
1678
+ $(dropdown).append(elnone);
1679
+
1680
+ return dropdown;
1681
+ },
1682
+ setBackgroundNone: function()
1683
+ {
1684
+ $(this.getParentNode()).css('background-color', 'transparent');
1685
+ this.syncCode();
1686
+ },
1687
+ setColorNone: function()
1688
+ {
1689
+ $(this.getParentNode()).attr('color', '').css('color', '');
1690
+ this.syncCode();
1691
+ },
1692
+
1693
+
1694
+ // DROPDOWNS
1695
+ showDropDown: function(e, dropdown, key)
1696
+ {
1697
+ if (this.getBtn(key).hasClass('dropact'))
1698
+ {
1699
+ this.hideAllDropDown();
1700
+ }
1701
+ else
1702
+ {
1703
+ this.hideAllDropDown();
1704
+
1705
+ this.setBtnActive(key);
1706
+ this.getBtn(key).addClass('dropact');
1707
+
1708
+ var left = this.getBtn(key).offset().left;
1709
+
1710
+
1711
+ if (this.opts.fixed && this.fixed)
1712
+ {
1713
+ $(dropdown).css({ position: 'fixed', left: left + 'px', top: '30px' }).show();
1714
+ }
1715
+ else
1716
+ {
1717
+ var top = this.$toolbar.offset().top + 30;
1718
+ $(dropdown).css({ position: 'absolute', left: left + 'px', top: top + 'px' }).show();
1719
+ }
1720
+ }
1721
+
1722
+ },
1723
+ hideAllDropDown: function()
1724
+ {
1725
+ this.$toolbar.find('a.dropact').removeClass('act').removeClass('dropact');
1726
+ $('.redactor_dropdown').hide();
1727
+ },
1728
+ hideDropDown: function(e, dropdown, key)
1729
+ {
1730
+ if (!$(e.target).parent().hasClass('dropact'))
1731
+ {
1732
+ $(dropdown).removeClass('act');
1733
+ this.showedDropDown = false;
1734
+ this.hideAllDropDown();
1735
+ }
1736
+ },
1737
+
1738
+ // SELECTION AND NODE MANIPULATION
1739
+ getSelection: function ()
1740
+ {
1741
+ if (this.$frame.get(0).contentWindow.getSelection)
1742
+ {
1743
+ return this.$frame.get(0).contentWindow.getSelection();
1744
+ }
1745
+ else if (this.$frame.get(0).contentWindow.document.selection)
1746
+ {
1747
+ return this.$frame.get(0).contentWindow.document.selection.createRange();
1748
+ }
1749
+ },
1750
+ getParentNode: function()
1751
+ {
1752
+ if (window.getSelection)
1753
+ {
1754
+ return this.getSelection().getRangeAt(0).startContainer.parentNode;
1755
+ }
1756
+ else if (document.selection)
1757
+ {
1758
+ return this.getSelection().parentElement();
1759
+ }
1760
+ },
1761
+ getCurrentNode: function()
1762
+ {
1763
+ if (window.getSelection)
1764
+ {
1765
+ return this.getSelection().getRangeAt(0).startContainer;
1766
+ }
1767
+ else if (document.selection)
1768
+ {
1769
+ return this.getSelection();
1770
+ }
1771
+ },
1772
+ setFocusNode: function(node, toStart)
1773
+ {
1774
+ var range = this.doc.createRange();
1775
+
1776
+ var selection = this.getSelection();
1777
+ toStart = toStart ? 0 : 1;
1778
+
1779
+ if (selection !== null)
1780
+ {
1781
+ range.selectNodeContents(node);
1782
+ selection.addRange(range);
1783
+ selection.collapse(node, toStart);
1784
+ }
1785
+
1786
+ this.focus();
1787
+ },
1788
+ insertNodeAtCaret: function (node)
1789
+ {
1790
+ if (typeof window.getSelection !== "undefined")
1791
+ {
1792
+ var sel = this.getSelection();
1793
+ if (sel.rangeCount)
1794
+ {
1795
+ var range = sel.getRangeAt(0);
1796
+ range.collapse(false);
1797
+ range.insertNode(node);
1798
+ range = range.cloneRange();
1799
+ range.selectNodeContents(node);
1800
+ range.collapse(false);
1801
+ sel.removeAllRanges();
1802
+ sel.addRange(range);
1803
+ }
1804
+ }
1805
+ else if (typeof document.selection !== "undefined" && document.selection.type !== "Control")
1806
+ {
1807
+ var html = (node.nodeType === 1) ? node.outerHTML : node.data;
1808
+ var id = "marker_" + ("" + Math.random()).slice(2);
1809
+ html += '<span id="' + id + '"></span>';
1810
+ var textRange = this.getSelection();
1811
+ textRange.collapse(false);
1812
+ textRange.pasteHTML(html);
1813
+ var markerSpan = document.getElementById(id);
1814
+ textRange.moveToElementText(markerSpan);
1815
+ textRange.select();
1816
+ markerSpan.parentNode.removeChild(markerSpan);
1817
+ }
1818
+ },
1819
+
1820
+ // BUTTONS MANIPULATIONS
1821
+ getBtn: function(key)
1822
+ {
1823
+ return $(this.$toolbar.find('a.redactor_btn_' + key));
1824
+ },
1825
+ setBtnActive: function(key)
1826
+ {
1827
+ this.getBtn(key).addClass('act');
1828
+ },
1829
+ setBtnInactive: function(key)
1830
+ {
1831
+ this.getBtn(key).removeClass('act');
1832
+ },
1833
+ changeBtnIcon: function(key, classname)
1834
+ {
1835
+ this.getBtn(key).addClass('redactor_btn_' + classname);
1836
+ },
1837
+ removeBtnIcon: function(key, classname)
1838
+ {
1839
+ this.getBtn(key).removeClass('redactor_btn_' + classname);
1840
+ },
1841
+ removeBtn: function(key)
1842
+ {
1843
+ this.getBtn(key).remove();
1844
+ },
1845
+ addBtn: function(key, obj)
1846
+ {
1847
+ this.$toolbar.append($('<li>').append(this.buildButton(key, obj)));
1848
+ },
1849
+
1850
+ // FULLSCREEN
1851
+ fullscreen: function()
1852
+ {
1853
+ var html;
1854
+
1855
+ if (this.opts.fullscreen === false)
1856
+ {
1857
+ this.changeBtnIcon('fullscreen', 'normalscreen');
1858
+ this.setBtnActive('fullscreen');
1859
+ this.opts.fullscreen = true;
1860
+
1861
+ this.height = this.$frame.css('height');
1862
+ this.width = (this.$box.width() - 2) + 'px';
1863
+
1864
+ html = this.getCode();
1865
+
1866
+ this.tmpspan = $('<span></span>');
1867
+ this.$box.addClass('redactor_box_fullscreen').after(this.tmpspan);
1868
+
1869
+ $(document.body).prepend(this.$box).css('overflow', 'hidden');
1870
+
1871
+ this.$editor = this.enable(html);
1872
+
1873
+ $(this.doc).click($.proxy(this.hideAllDropDown, this));
1874
+
1875
+ // focus always on page
1876
+ this.observeFocus();
1877
+
1878
+ this.observeImages();
1879
+ this.observeTables();
1880
+
1881
+ this.$box.find('.redactor_resizer').hide();
1882
+
1883
+ this.fullScreenResize();
1884
+ $(window).resize($.proxy(this.fullScreenResize, this));
1885
+ $(document).scrollTop(0,0);
1886
+ this.focus();
1887
+
1888
+ }
1889
+ else
1890
+ {
1891
+ this.removeBtnIcon('fullscreen', 'normalscreen');
1892
+ this.setBtnInactive('fullscreen');
1893
+ this.opts.fullscreen = false;
1894
+
1895
+ $(window).unbind('resize', $.proxy(this.fullScreenResize, this));
1896
+ $(document.body).css('overflow', '');
1897
+
1898
+ html = this.getCode();
1899
+
1900
+ this.$box.removeClass('redactor_box_fullscreen').css('width', 'auto');
1901
+
1902
+ this.tmpspan.after(this.$box).remove();
1903
+
1904
+ this.$editor = this.enable(html);
1905
+
1906
+ this.observeImages();
1907
+ this.observeTables();
1908
+
1909
+ if (this.opts.autoresize)
1910
+ {
1911
+ this.observeAutoResize();
1912
+ }
1913
+ this.$box.find('.redactor_resizer').show();
1914
+
1915
+ $(this.doc).click($.proxy(this.hideAllDropDown, this));
1916
+
1917
+ // focus always on page
1918
+ this.observeFocus();
1919
+
1920
+ this.syncCode();
1921
+
1922
+ this.$frame.css('height', this.height);
1923
+ this.$el.css('height', this.height);
1924
+ this.focus();
1925
+ }
1926
+ },
1927
+ fullScreenResize: function()
1928
+ {
1929
+ if (this.opts.fullscreen === false)
1930
+ {
1931
+ return false;
1932
+ }
1933
+
1934
+ var height = $(window).height() - 42;
1935
+ this.$box.width($(window).width() - 2);
1936
+ this.$frame.height(height);
1937
+ this.$el.height(height);
1938
+ },
1939
+
1940
+ // RESIZE
1941
+ buildResizer: function()
1942
+ {
1943
+ if (this.opts.resize === false)
1944
+ {
1945
+ return false;
1946
+ }
1947
+
1948
+ this.$resizer = $('<div class="redactor_resizer">&mdash;</div>');
1949
+ this.$box.append(this.$resizer);
1950
+ this.$resizer.mousedown($.proxy(this.initResize, this));
1951
+
1952
+ },
1953
+ initResize: function(e)
1954
+ {
1955
+ if (e.preventDefault)
1956
+ {
1957
+ e.preventDefault();
1958
+ }
1959
+
1960
+ this.splitter = e.target;
1961
+
1962
+ if (this.opts.visual)
1963
+ {
1964
+ this.element_resize = this.$frame;
1965
+ this.element_resize.get(0).style.visibility = 'hidden';
1966
+ this.element_resize_parent = this.$el;
1967
+ }
1968
+ else
1969
+ {
1970
+ this.element_resize = this.$el;
1971
+ this.element_resize_parent = this.$frame;
1972
+ }
1973
+
1974
+ this.stopResizeHdl = $.proxy(this.stopResize, this);
1975
+ this.startResizeHdl = $.proxy(this.startResize, this);
1976
+ this.resizeHdl = $.proxy(this.resize, this);
1977
+
1978
+ $(document).mousedown(this.startResizeHdl);
1979
+ $(document).mouseup(this.stopResizeHdl);
1980
+ $(this.splitter).mouseup(this.stopResizeHdl);
1981
+
1982
+ this.null_point = false;
1983
+ this.h_new = false;
1984
+ this.h = this.element_resize.height();
1985
+ },
1986
+ startResize: function()
1987
+ {
1988
+ $(document).mousemove(this.resizeHdl);
1989
+ },
1990
+ resize: function(e)
1991
+ {
1992
+ if (e.preventDefault)
1993
+ {
1994
+ e.preventDefault();
1995
+ }
1996
+
1997
+ var y = e.pageY;
1998
+
1999
+ if (this.null_point === false)
2000
+ {
2001
+ this.null_point = y;
2002
+ }
2003
+
2004
+ if (this.h_new === false)
2005
+ {
2006
+ this.h_new = this.element_resize.height();
2007
+ }
2008
+
2009
+ var s_new = (this.h_new + y - this.null_point) - 10;
2010
+
2011
+ if (s_new <= 30)
2012
+ {
2013
+ return true;
2014
+ }
2015
+
2016
+ if (s_new >= 0)
2017
+ {
2018
+ this.element_resize.get(0).style.height = s_new + 'px';
2019
+ this.element_resize_parent.get(0).style.height = s_new + 'px';
2020
+ }
2021
+ },
2022
+ stopResize: function(e)
2023
+ {
2024
+ $(document).unbind('mousemove', this.resizeHdl);
2025
+ $(document).unbind('mousedown', this.startResizeHdl);
2026
+ $(document).unbind('mouseup', this.stopResizeHdl);
2027
+ $(this.splitter).unbind('mouseup', this.stopResizeHdl);
2028
+
2029
+ this.element_resize.get(0).style.visibility = 'visible';
2030
+ },
2031
+
2032
+ // RESIZE IMAGES
2033
+ resizeImage: function(resize)
2034
+ {
2035
+ var clicked = false;
2036
+ var clicker = false;
2037
+ var start_x;
2038
+ var start_y;
2039
+ var ratio = $(resize).width()/$(resize).height();
2040
+
2041
+ var y = 1;
2042
+ var x = 1;
2043
+ var min_w = 1;
2044
+ var min_h = 1;
2045
+
2046
+ $(resize).hover(function() { $(resize).css('cursor', 'nw-resize'); }, function() { $(resize).css('cursor','default'); clicked=false; });
2047
+
2048
+ $(resize).mousedown(function(e)
2049
+ {
2050
+ if (e.preventDefault)
2051
+ {
2052
+ e.preventDefault();
2053
+ }
2054
+
2055
+ clicked = true;
2056
+ clicker = true;
2057
+
2058
+ start_x = Math.round(e.pageX - $(resize).eq(0).offset().left);
2059
+ start_y = Math.round(e.pageY - $(resize).eq(0).offset().top);
2060
+ });
2061
+
2062
+ $(resize).mouseup($.proxy(function(e)
2063
+ {
2064
+ clicked = false;
2065
+ this.syncCode();
2066
+ if (this.opts.autoresize === true) this.setAutoSize(false);
2067
+
2068
+ }, this));
2069
+
2070
+ $(resize).click($.proxy(function(e)
2071
+ {
2072
+ if (clicker)
2073
+ {
2074
+ this.imageEdit(e);
2075
+ }
2076
+
2077
+ }, this));
2078
+
2079
+ $(resize).mousemove(function(e)
2080
+ {
2081
+ if (clicked)
2082
+ {
2083
+ clicker = false;
2084
+
2085
+ var mouse_x = Math.round(e.pageX - $(this).eq(0).offset().left) - start_x;
2086
+ var mouse_y = Math.round(e.pageY - $(this).eq(0).offset().top) - start_y;
2087
+
2088
+ var div_h = $(resize).height();
2089
+
2090
+ var new_h = parseInt(div_h, 10) + mouse_y;
2091
+ var new_w = new_h*ratio;
2092
+
2093
+ if (x === 1 || (typeof(x) === "number" && new_w < x && new_w > min_w))
2094
+ {
2095
+ $(resize).width(new_w);
2096
+ }
2097
+ if (y === 1 || (typeof(y) === "number" && new_h < y && new_h > min_h))
2098
+ {
2099
+ $(resize).height(new_h);
2100
+ }
2101
+ start_x = Math.round(e.pageX - $(this).eq(0).offset().left);
2102
+ start_y = Math.round(e.pageY - $(this).eq(0).offset().top);
2103
+ }
2104
+ });
2105
+ },
2106
+
2107
+ // TABLE
2108
+ showTable: function()
2109
+ {
2110
+ this.modalInit(RLANG.table, 'table', 300, $.proxy(function()
2111
+ {
2112
+ $('#redactor_insert_table_btn').click($.proxy(this.insertTable, this));
2113
+ }, this),
2114
+
2115
+ function()
2116
+ {
2117
+ $('#redactor_table_rows').focus();
2118
+ }
2119
+ );
2120
+ },
2121
+ insertTable: function()
2122
+ {
2123
+ var rows = $('#redactor_table_rows').val();
2124
+ var columns = $('#redactor_table_columns').val();
2125
+
2126
+ var table_box = $('<div></div>');
2127
+
2128
+ var tableid = Math.floor(Math.random() * 99999);
2129
+ var table = $('<table id="table' + tableid + '"><tbody></tbody></table>');
2130
+
2131
+ for (var i = 0; i < rows; i++)
2132
+ {
2133
+ var row = $('<tr></tr>');
2134
+ for (var z = 0; z < columns; z++)
2135
+ {
2136
+ var column = $('<td>&nbsp;</td>');
2137
+ $(row).append(column);
2138
+ }
2139
+ $(table).append(row);
2140
+ }
2141
+
2142
+ $(table_box).append(table);
2143
+ var html = $(table_box).html();
2144
+
2145
+ if ($.browser.msie)
2146
+ {
2147
+ html += '<p></p>';
2148
+ }
2149
+ else
2150
+ {
2151
+ html += '<p>&nbsp;</p>';
2152
+ }
2153
+
2154
+ this.execCommand('inserthtml', html);
2155
+ this.modalClose();
2156
+
2157
+ this.$table = $(this.doc).find('body').find('#table' + tableid);
2158
+ this.$table.click($.proxy(this.tableObserver, this));
2159
+
2160
+ if (this.opts.autoresize === true) this.setAutoSize(false);
2161
+ },
2162
+ tableObserver: function(e)
2163
+ {
2164
+ this.$table = $(e.target).parents('table');
2165
+
2166
+ this.$table_tr = this.$table.find('tr');
2167
+ this.$table_td = this.$table.find('td');
2168
+
2169
+ this.$table_td.removeClass('current');
2170
+
2171
+ this.$tbody = $(e.target).parents('tbody');
2172
+ this.$thead = $(this.$table).find('thead');
2173
+
2174
+ this.$current_td = $(e.target);
2175
+ this.$current_td.addClass('current');
2176
+
2177
+ this.$current_tr = $(e.target).parents('tr');
2178
+ },
2179
+ deleteTable: function()
2180
+ {
2181
+ $(this.$table).remove();
2182
+ this.$table = false;
2183
+ this.syncCode();
2184
+ },
2185
+ deleteRow: function()
2186
+ {
2187
+ $(this.$current_tr).remove();
2188
+ this.syncCode();
2189
+ },
2190
+ deleteColumn: function()
2191
+ {
2192
+ var index = $(this.$current_td).get(0).cellIndex;
2193
+
2194
+ $(this.$table).find('tr').each(function()
2195
+ {
2196
+ $(this).find('td').eq(index).remove();
2197
+ });
2198
+
2199
+ this.syncCode();
2200
+ },
2201
+ addHead: function()
2202
+ {
2203
+ if ($(this.$table).find('thead').size() !== 0)
2204
+ {
2205
+ this.deleteHead();
2206
+ }
2207
+ else
2208
+ {
2209
+ var tr = $(this.$table).find('tr').first().clone();
2210
+ tr.find('td').html('&nbsp;');
2211
+ this.$thead = $('<thead></thead>');
2212
+ this.$thead.append(tr);
2213
+ $(this.$table).prepend(this.$thead);
2214
+ this.syncCode();
2215
+ }
2216
+ },
2217
+ deleteHead: function()
2218
+ {
2219
+ $(this.$thead).remove();
2220
+ this.$thead = false;
2221
+ this.syncCode();
2222
+ },
2223
+ insertRowAbove: function()
2224
+ {
2225
+ this.insertRow('before');
2226
+ },
2227
+ insertRowBelow: function()
2228
+ {
2229
+ this.insertRow('after');
2230
+ },
2231
+ insertColumnLeft: function()
2232
+ {
2233
+ this.insertColumn('before');
2234
+ },
2235
+ insertColumnRight: function()
2236
+ {
2237
+ this.insertColumn('after');
2238
+ },
2239
+ insertRow: function(type)
2240
+ {
2241
+ var new_tr = $(this.$current_tr).clone();
2242
+ new_tr.find('td').html('&nbsp;');
2243
+ if (type === 'after')
2244
+ {
2245
+ $(this.$current_tr).after(new_tr);
2246
+ }
2247
+ else
2248
+ {
2249
+ $(this.$current_tr).before(new_tr);
2250
+ }
2251
+
2252
+ this.syncCode();
2253
+ },
2254
+ insertColumn: function(type)
2255
+ {
2256
+ var index = 0;
2257
+
2258
+ this.$current_td.addClass('current');
2259
+
2260
+ this.$current_tr.find('td').each(function(i,s)
2261
+ {
2262
+ if ($(s).hasClass('current'))
2263
+ {
2264
+ index = i;
2265
+ }
2266
+ });
2267
+
2268
+ this.$table_tr.each(function(i,s)
2269
+ {
2270
+ var current = $(s).find('td').eq(index);
2271
+
2272
+ var td = current.clone();
2273
+ td.html('&nbsp;');
2274
+
2275
+ if (type === 'after')
2276
+ {
2277
+ $(current).after(td);
2278
+ }
2279
+ else
2280
+ {
2281
+ $(current).before(td);
2282
+ }
2283
+
2284
+ });
2285
+
2286
+ this.syncCode();
2287
+ },
2288
+
2289
+ // INSERT VIDEO
2290
+ showVideo: function()
2291
+ {
2292
+ if ($.browser.msie)
2293
+ {
2294
+ this.markerIE();
2295
+ }
2296
+
2297
+ this.modalInit(RLANG.video, 'video', 600, $.proxy(function()
2298
+ {
2299
+ $('#redactor_insert_video_btn').click($.proxy(this.insertVideo, this));
2300
+ }, this),
2301
+
2302
+ function()
2303
+ {
2304
+ $('#redactor_insert_video_area').focus();
2305
+ }
2306
+ );
2307
+ },
2308
+ insertVideo: function()
2309
+ {
2310
+ var data = $('#redactor_insert_video_area').val();
2311
+ data = this.stripTags(data);
2312
+
2313
+ if ($.browser.msie)
2314
+ {
2315
+ $(this.doc.getElementById('span' + this.spanid)).after(data).remove();
2316
+ this.syncCode();
2317
+ }
2318
+ else
2319
+ {
2320
+ this.execCommand('inserthtml', data);
2321
+ }
2322
+
2323
+ this.modalClose();
2324
+ if (this.opts.autoresize === true) this.setAutoSize(false);
2325
+ },
2326
+
2327
+ // INSERT IMAGE
2328
+ imageEdit: function(e)
2329
+ {
2330
+ var $el = $(e.target);
2331
+ var parent = $el.parent();
2332
+
2333
+ var handler = $.proxy(function()
2334
+ {
2335
+ $('#redactor_file_alt').val($el.attr('alt'));
2336
+ $('#redactor_image_edit_src').attr('href', $el.attr('src'));
2337
+ $('#redactor_form_image_align').val($el.css('float'));
2338
+
2339
+ if ($(parent).get(0).tagName === 'A')
2340
+ {
2341
+ $('#redactor_file_link').val($(parent).attr('href'));
2342
+ }
2343
+
2344
+ $('#redactor_image_delete_btn').click($.proxy(function() { this.imageDelete($el); }, this));
2345
+ $('#redactorSaveBtn').click($.proxy(function() { this.imageSave($el); }, this));
2346
+
2347
+ }, this);
2348
+
2349
+ this.modalInit(RLANG.image, 'image_edit', 380, handler);
2350
+
2351
+ },
2352
+ imageDelete: function(el)
2353
+ {
2354
+ $(el).remove();
2355
+ this.modalClose();
2356
+ this.syncCode();
2357
+ },
2358
+ imageSave: function(el)
2359
+ {
2360
+ var parent = $(el).parent();
2361
+
2362
+ $(el).attr('alt', $('#redactor_file_alt').val());
2363
+
2364
+ var floating = $('#redactor_form_image_align').val();
2365
+
2366
+ if (floating === 'left')
2367
+ {
2368
+ $(el).css({ 'float': 'left', margin: '0 10px 10px 0' });
2369
+ }
2370
+ else if (floating === 'right')
2371
+ {
2372
+ $(el).css({ 'float': 'right', margin: '0 0 10px 10px' });
2373
+ }
2374
+ else
2375
+ {
2376
+ $(el).css({ 'float': 'none', margin: '0' });
2377
+ }
2378
+
2379
+ // as link
2380
+ var link = $.trim($('#redactor_file_link').val());
2381
+ if (link !== '')
2382
+ {
2383
+ if ($(parent).get(0).tagName !== 'A')
2384
+ {
2385
+ $(el).replaceWith('<a href="' + link + '">' + this.outerHTML(el) + '</a>');
2386
+ }
2387
+ else
2388
+ {
2389
+ $(parent).attr('href', link);
2390
+ }
2391
+ }
2392
+
2393
+ this.modalClose();
2394
+ this.observeImages();
2395
+ this.syncCode();
2396
+
2397
+ },
2398
+ showImage: function()
2399
+ {
2400
+ if ($.browser.msie)
2401
+ {
2402
+ this.markerIE();
2403
+ }
2404
+
2405
+ var handler = $.proxy(function()
2406
+ {
2407
+ // json
2408
+ if (this.opts.imageGetJson !== false)
2409
+ {
2410
+ $.getJSON(this.opts.imageGetJson, $.proxy(function(data) {
2411
+
2412
+ $.each(data, $.proxy(function(key, val)
2413
+ {
2414
+ var img = $('<img src="' + val.thumb + '" rel="' + val.image + '" />');
2415
+ $('#redactor_image_box').append(img);
2416
+ $(img).click($.proxy(this.imageSetThumb, this));
2417
+
2418
+ }, this));
2419
+
2420
+ }, this));
2421
+ }
2422
+ else
2423
+ {
2424
+ $('#redactor_tabs a').eq(1).remove();
2425
+ }
2426
+
2427
+ if (this.opts.imageUpload !== false)
2428
+ {
2429
+ // dragupload
2430
+ if ($('#redactor_file').size() !== 0)
2431
+ {
2432
+ $('#redactor_file').dragupload(
2433
+ {
2434
+ url: this.opts.imageUpload,
2435
+ success: $.proxy(this.imageUploadCallback, this)
2436
+ });
2437
+ }
2438
+
2439
+ // ajax upload
2440
+ this.uploadInit('redactor_file', { auto: true, url: this.opts.imageUpload, success: $.proxy(this.imageUploadCallback, this) });
2441
+ }
2442
+ else
2443
+ {
2444
+ $('.redactor_tab').hide();
2445
+ if (this.opts.imageGetJson === false)
2446
+ {
2447
+ $('#redactor_tabs').remove();
2448
+ $('#redactor_tab3').show();
2449
+ }
2450
+ else
2451
+ {
2452
+ var tabs = $('#redactor_tabs a');
2453
+ tabs.eq(0).remove();
2454
+ tabs.eq(1).addClass('redactor_tabs_act');
2455
+ $('#redactor_tab2').show();
2456
+ }
2457
+ }
2458
+
2459
+ $('#redactor_upload_btn').click($.proxy(this.imageUploadCallbackLink, this));
2460
+
2461
+ }, this);
2462
+
2463
+ var endCallback = $.proxy(function()
2464
+ {
2465
+ if (this.opts.imageUpload === false && this.opts.imageGetJson === false)
2466
+ {
2467
+ $('#redactor_file_link').focus();
2468
+ }
2469
+ }, this);
2470
+
2471
+ this.modalInit(RLANG.image, 'image', 570, handler, endCallback, true);
2472
+
2473
+ },
2474
+ imageSetThumb: function(e)
2475
+ {
2476
+ this._imageSet('<img alt="" src="' + $(e.target).attr('rel') + '" />', true);
2477
+ },
2478
+ imageUploadCallbackLink: function()
2479
+ {
2480
+ if ($('#redactor_file_link').val() !== '')
2481
+ {
2482
+ var data = '<img src="' + $('#redactor_file_link').val() + '" />';
2483
+ this._imageSet(data, true);
2484
+ }
2485
+ else
2486
+ {
2487
+ this.modalClose();
2488
+ }
2489
+ },
2490
+ imageUploadCallback: function(data)
2491
+ {
2492
+ this._imageSet(data);
2493
+ },
2494
+ _imageSet: function(json, link)
2495
+ {
2496
+ var html = '', data = '';
2497
+ if (link !== true)
2498
+ {
2499
+ data = $.parseJSON(json);
2500
+ html = '<p><img src="' + data.filelink + '" /></p>';
2501
+ }
2502
+ else
2503
+ {
2504
+ html = json;
2505
+ }
2506
+
2507
+ this.focus();
2508
+
2509
+ if ($.browser.msie)
2510
+ {
2511
+ $(this.doc.getElementById('span' + this.spanid)).after(html).remove();
2512
+ this.syncCode();
2513
+ }
2514
+ else
2515
+ {
2516
+ this.execCommand('inserthtml', html);
2517
+ }
2518
+
2519
+ // upload image callback
2520
+ if (link !== true && typeof this.opts.imageUploadCallback === 'function')
2521
+ {
2522
+ this.opts.imageUploadCallback(this, data);
2523
+ }
2524
+
2525
+ this.modalClose();
2526
+
2527
+ if (this.opts.autoresize === true) this.setAutoSize(false);
2528
+
2529
+ this.observeImages();
2530
+ },
2531
+
2532
+ // INSERT LINK
2533
+ showLink: function()
2534
+ {
2535
+ var handler = $.proxy(function()
2536
+ {
2537
+ var sel = this.getSelection();
2538
+ var url = '', text = '';
2539
+
2540
+ if ($.browser.msie)
2541
+ {
2542
+ var parent = this.getParentNode();
2543
+ if (parent.nodeName === 'A')
2544
+ {
2545
+ this.insert_link_node = $(parent);
2546
+ text = this.insert_link_node.text();
2547
+ url = this.insert_link_node.attr('href');
2548
+ }
2549
+ else
2550
+ {
2551
+ if (this.oldIE())
2552
+ {
2553
+ text = sel.text;
2554
+ }
2555
+ else
2556
+ {
2557
+ text = sel.toString();
2558
+ }
2559
+
2560
+ this.spanid = Math.floor(Math.random() * 99999);
2561
+
2562
+ var html = '<span id="span' + this.spanid + '">' + text + '</span>';
2563
+
2564
+ if (text !== '')
2565
+ {
2566
+ html = '<span id="span' + this.spanid + '">' + text + '</span>';
2567
+ }
2568
+
2569
+ this.execCommand('inserthtml', html);
2570
+ }
2571
+ }
2572
+ else
2573
+ {
2574
+ if (sel && sel.anchorNode && sel.anchorNode.parentNode.tagName === 'A')
2575
+ {
2576
+ url = sel.anchorNode.parentNode.href;
2577
+ text = sel.anchorNode.parentNode.text;
2578
+ if (sel.toString() === '')
2579
+ {
2580
+ this.insert_link_node = sel.anchorNode.parentNode;
2581
+ }
2582
+ }
2583
+ else
2584
+ {
2585
+ text = sel.toString();
2586
+ url = '';
2587
+ }
2588
+ }
2589
+
2590
+ $('.redactor_link_text').val(text);
2591
+
2592
+ var turl = url.replace(top.location.href, '');
2593
+
2594
+ if (url.search('mailto:') === 0)
2595
+ {
2596
+ this.setModalTab(2);
2597
+
2598
+ $('#redactor_tab_selected').val(2);
2599
+ $('#redactor_link_mailto').val(url.replace('mailto:', ''));
2600
+ }
2601
+ else if (turl.search(/^#/gi) === 0)
2602
+ {
2603
+ this.setModalTab(3);
2604
+
2605
+ $('#redactor_tab_selected').val(3);
2606
+ $('#redactor_link_anchor').val(turl.replace(/^#/gi, ''));
2607
+ }
2608
+ else
2609
+ {
2610
+ $('#redactor_link_url').val(url);
2611
+ }
2612
+
2613
+ $('#redactor_insert_link_btn').click($.proxy(this.insertLink, this));
2614
+
2615
+
2616
+ }, this);
2617
+
2618
+ var endCallback = function(url)
2619
+ {
2620
+ $('#redactor_link_url').focus();
2621
+ };
2622
+
2623
+ this.modalInit(RLANG.link, 'link', 460, handler, endCallback);
2624
+
2625
+ },
2626
+ insertLink: function()
2627
+ {
2628
+ var tab_selected = $('#redactor_tab_selected').val();
2629
+ var link = '', text = '';
2630
+
2631
+ if (tab_selected === '1') // url
2632
+ {
2633
+ link = $('#redactor_link_url').val();
2634
+ text = $('#redactor_link_url_text').val();
2635
+ }
2636
+ else if (tab_selected === '2') // mailto
2637
+ {
2638
+ link = 'mailto:' + $('#redactor_link_mailto').val();
2639
+ text = $('#redactor_link_mailto_text').val();
2640
+ }
2641
+ else if (tab_selected === '3') // anchor
2642
+ {
2643
+ link = '#' + $('#redactor_link_anchor').val();
2644
+ text = $('#redactor_link_anchor_text').val();
2645
+ }
2646
+
2647
+ this._insertLink('<a href="' + link + '">' + text + '</a> ', $.trim(text), link);
2648
+
2649
+ },
2650
+ _insertLink: function(a, text, link)
2651
+ {
2652
+ if (text != '')
2653
+ {
2654
+ if (this.insert_link_node)
2655
+ {
2656
+ $(this.insert_link_node).text(text);
2657
+ $(this.insert_link_node).attr('href', link);
2658
+ this.syncCode();
2659
+ }
2660
+ else
2661
+ {
2662
+ if ($.browser.msie)
2663
+ {
2664
+ $(this.doc.getElementById('span' + this.spanid)).replaceWith(a);
2665
+ this.syncCode();
2666
+ }
2667
+ else
2668
+ {
2669
+ this.execCommand('inserthtml', a);
2670
+ }
2671
+ }
2672
+ }
2673
+
2674
+ this.modalClose();
2675
+ },
2676
+
2677
+ // INSERT FILE
2678
+ showFile: function()
2679
+ {
2680
+ if ($.browser.msie)
2681
+ {
2682
+ this.markerIE();
2683
+ }
2684
+
2685
+ var handler = $.proxy(function()
2686
+ {
2687
+ var sel = this.getSelection();
2688
+
2689
+ var text = '';
2690
+
2691
+ if (this.oldIE())
2692
+ {
2693
+ text = sel.text;
2694
+ }
2695
+ else
2696
+ {
2697
+ text = sel.toString();
2698
+ }
2699
+
2700
+ $('#redactor_filename').val(text);
2701
+
2702
+ $('#redactor_file').dragupload(
2703
+ {
2704
+ url: this.opts.fileUpload,
2705
+ success: $.proxy(function(data)
2706
+ {
2707
+ this.fileUploadCallback(data);
2708
+ }, this)
2709
+ });
2710
+
2711
+ this.uploadInit('redactor_file', { auto: true, url: this.opts.fileUpload, success: $.proxy(function(data) {
2712
+
2713
+ this.fileUploadCallback(data);
2714
+
2715
+ }, this)});
2716
+ }, this);
2717
+
2718
+ this.modalInit(RLANG.file, 'file', 500, handler);
2719
+ },
2720
+ fileUploadCallback: function(json)
2721
+ {
2722
+ var data = $.parseJSON(json);
2723
+ var text = $('#redactor_filename').val();
2724
+
2725
+ if (text === '')
2726
+ {
2727
+ text = data.filename;
2728
+ }
2729
+
2730
+ var link = '<a href="' + data.filelink + '">' + text + '</a>';
2731
+
2732
+ // chrome fix
2733
+ if ($.browser.webkit && !!window.chrome)
2734
+ {
2735
+ link = link + '&nbsp;';
2736
+ }
2737
+
2738
+ if ($.browser.msie)
2739
+ {
2740
+ if (text !== '')
2741
+ {
2742
+ $(this.doc.getElementById('span' + this.spanid)).replaceWith(link);
2743
+ }
2744
+ else
2745
+ {
2746
+ $(this.doc.getElementById('span' + this.spanid)).after(link).remove();
2747
+ }
2748
+
2749
+ this.syncCode();
2750
+ }
2751
+ else
2752
+ {
2753
+ this.execCommand('inserthtml', link);
2754
+ }
2755
+
2756
+ // file upload callback
2757
+ if (typeof this.opts.fileUploadCallback === 'function')
2758
+ {
2759
+ this.opts.fileUploadCallback(this, data);
2760
+ }
2761
+
2762
+ this.modalClose();
2763
+ },
2764
+
2765
+
2766
+
2767
+ // MODAL
2768
+ modalInit: function(title, url, width, handler, endCallback, scroll)
2769
+ {
2770
+ // modal overlay
2771
+ if ($('#redactor_modal_overlay').size() === 0)
2772
+ {
2773
+ this.overlay = $('<div id="redactor_modal_overlay" style="display: none;"></div>');
2774
+ $('body').prepend(this.overlay);
2775
+ }
2776
+
2777
+ if (this.opts.overlay)
2778
+ {
2779
+ $('#redactor_modal_overlay').show();
2780
+ $('#redactor_modal_overlay').click($.proxy(this.modalClose, this));
2781
+ }
2782
+
2783
+ if ($('#redactor_modal').size() === 0)
2784
+ {
2785
+ this.modal = $('<div id="redactor_modal" style="display: none;"><div id="redactor_modal_close">&times;</div><div id="redactor_modal_header"></div><div id="redactor_modal_inner"></div></div>');
2786
+ $('body').append(this.modal);
2787
+ }
2788
+
2789
+ $('#redactor_modal_close').click($.proxy(this.modalClose, this));
2790
+
2791
+ this.hdlModalClose = $.proxy(function(e) { if ( e.keyCode === 27) { this.modalClose(); } }, this);
2792
+
2793
+ $(document).keyup(this.hdlModalClose);
2794
+ $(this.doc).keyup(this.hdlModalClose);
2795
+
2796
+ $('#redactor_modal_inner').html(this.opts['modal_' + url]);
2797
+ $('#redactor_modal_header').html(title);
2798
+
2799
+ // tabs
2800
+ if ($('#redactor_tabs').size() !== 0)
2801
+ {
2802
+ $('#redactor_tabs a').each(function(i,s)
2803
+ {
2804
+ i++;
2805
+ $(s).click(function()
2806
+ {
2807
+ $('#redactor_tabs a').removeClass('redactor_tabs_act');
2808
+ $(this).addClass('redactor_tabs_act');
2809
+ $('.redactor_tab').hide();
2810
+ $('#redactor_tab' + i).show();
2811
+ $('#redactor_tab_selected').val(i);
2812
+
2813
+ var height = $('#redactor_modal').outerHeight();
2814
+ $('#redactor_modal').css('margin-top', '-' + (height+10)/2 + 'px');
2815
+ });
2816
+ });
2817
+ }
2818
+
2819
+ $('#redactor_btn_modal_close').click($.proxy(this.modalClose, this));
2820
+
2821
+ // callback
2822
+ if (typeof(handler) === 'function')
2823
+ {
2824
+ handler();
2825
+ }
2826
+
2827
+ // setup
2828
+ var height = $('#redactor_modal').outerHeight();
2829
+
2830
+ $('#redactor_modal').css({ width: width + 'px', height: 'auto', marginTop: '-' + (height+10)/2 + 'px', marginLeft: '-' + (width+60)/2 + 'px' }).fadeIn('fast');
2831
+
2832
+ // end callback
2833
+ if (typeof(endCallback) === 'function')
2834
+ {
2835
+ endCallback();
2836
+ }
2837
+
2838
+ if (scroll === true)
2839
+ {
2840
+ $('#redactor_image_box').height(300).css('overflow', 'auto');
2841
+ }
2842
+
2843
+ },
2844
+ modalClose: function()
2845
+ {
2846
+
2847
+ $('#redactor_modal_close').unbind('click', this.modalClose);
2848
+ $('#redactor_modal').fadeOut('fast', $.proxy(function()
2849
+ {
2850
+ $('#redactor_modal_inner').html('');
2851
+
2852
+ if (this.opts.overlay)
2853
+ {
2854
+ $('#redactor_modal_overlay').hide();
2855
+ $('#redactor_modal_overlay').unbind('click', this.modalClose);
2856
+ }
2857
+
2858
+ $(document).unbind('keyup', this.hdlModalClose);
2859
+ $(this.doc).unbind('keyup', this.hdlModalClose);
2860
+
2861
+ }, this));
2862
+
2863
+ },
2864
+ setModalTab: function(num)
2865
+ {
2866
+ $('.redactor_tab').hide();
2867
+ var tabs = $('#redactor_tabs a');
2868
+ tabs.removeClass('redactor_tabs_act');
2869
+ tabs.eq(num-1).addClass('redactor_tabs_act');
2870
+ $('#redactor_tab' + num).show();
2871
+ },
2872
+
2873
+ // UPLOAD
2874
+ uploadInit: function(element, options)
2875
+ {
2876
+ // Upload Options
2877
+ this.uploadOptions = {
2878
+ url: false,
2879
+ success: false,
2880
+ start: false,
2881
+ trigger: false,
2882
+ auto: false,
2883
+ input: false
2884
+ };
2885
+
2886
+ $.extend(this.uploadOptions, options);
2887
+
2888
+ // Test input or form
2889
+ if ($('#' + element).size() !== 0 && $('#' + element).get(0).tagName === 'INPUT')
2890
+ {
2891
+ this.uploadOptions.input = $('#' + element);
2892
+ this.element = $($('#' + element).get(0).form);
2893
+ }
2894
+ else
2895
+ {
2896
+ this.element = $('#' + element);
2897
+ }
2898
+
2899
+ this.element_action = this.element.attr('action');
2900
+
2901
+ // Auto or trigger
2902
+ if (this.uploadOptions.auto)
2903
+ {
2904
+ $(this.uploadOptions.input).change($.proxy(function()
2905
+ {
2906
+ this.element.submit(function(e) { return false; });
2907
+ this.uploadSubmit();
2908
+ }, this));
2909
+
2910
+ }
2911
+ else if (this.uploadOptions.trigger)
2912
+ {
2913
+ $('#' + this.uploadOptions.trigger).click($.proxy(this.uploadSubmit, this));
2914
+ }
2915
+ },
2916
+ uploadSubmit : function()
2917
+ {
2918
+ this.uploadForm(this.element, this.uploadFrame());
2919
+ },
2920
+ uploadFrame : function()
2921
+ {
2922
+ this.id = 'f' + Math.floor(Math.random() * 99999);
2923
+
2924
+ var d = document.createElement('div');
2925
+ var iframe = '<iframe style="display:none" src="about:blank" id="'+this.id+'" name="'+this.id+'"></iframe>';
2926
+ d.innerHTML = iframe;
2927
+ document.body.appendChild(d);
2928
+
2929
+ // Start
2930
+ if (this.uploadOptions.start)
2931
+ {
2932
+ this.uploadOptions.start();
2933
+ }
2934
+
2935
+ $('#' + this.id).load($.proxy(this.uploadLoaded, this));
2936
+
2937
+ return this.id;
2938
+ },
2939
+ uploadForm : function(f, name)
2940
+ {
2941
+ if (this.uploadOptions.input)
2942
+ {
2943
+ var formId = 'redactorUploadForm' + this.id;
2944
+ var fileId = 'redactorUploadFile' + this.id;
2945
+ this.form = $('<form action="' + this.uploadOptions.url + '" method="POST" target="' + name + '" name="' + formId + '" id="' + formId + '" enctype="multipart/form-data"><div style="margin:0;padding:0;display:inline">' +
2946
+ '<input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="'+$('meta[name="csrf-token"]').attr('content')+'"></div></form>');
2947
+
2948
+ var oldElement = this.uploadOptions.input;
2949
+ var newElement = $(oldElement).clone();
2950
+ $(oldElement).attr('id', fileId);
2951
+ $(oldElement).before(newElement);
2952
+ $(oldElement).appendTo(this.form);
2953
+ $(this.form).css('position', 'absolute');
2954
+ $(this.form).css('top', '-2000px');
2955
+ $(this.form).css('left', '-2000px');
2956
+ $(this.form).appendTo('body');
2957
+
2958
+ this.form.submit();
2959
+ }
2960
+ else
2961
+ {
2962
+ f.attr('target', name);
2963
+ f.attr('method', 'POST');
2964
+ f.attr('enctype', 'multipart/form-data');
2965
+ f.attr('action', this.uploadOptions.url);
2966
+
2967
+ this.element.submit();
2968
+ }
2969
+
2970
+ },
2971
+ uploadLoaded : function()
2972
+ {
2973
+ var i = $('#' + this.id);
2974
+ var d;
2975
+
2976
+ if (i.contentDocument)
2977
+ {
2978
+ d = i.contentDocument;
2979
+ }
2980
+ else if (i.contentWindow)
2981
+ {
2982
+ d = i.contentWindow.document;
2983
+ }
2984
+ else
2985
+ {
2986
+ d = window.frames[this.id].document;
2987
+ }
2988
+
2989
+ if (d.location.href === "about:blank")
2990
+ {
2991
+ return true;
2992
+ }
2993
+
2994
+ // Success
2995
+ if (this.uploadOptions.success)
2996
+ {
2997
+ this.uploadOptions.success(d.body.innerHTML);
2998
+ }
2999
+
3000
+ this.element.attr('action', this.element_action);
3001
+ this.element.attr('target', '');
3002
+
3003
+ },
3004
+
3005
+ // UTILITY
3006
+ markerIE: function()
3007
+ {
3008
+ this.spanid = Math.floor(Math.random() * 99999);
3009
+ this.execCommand('inserthtml', '<span id="span' + this.spanid + '"></span>');
3010
+ },
3011
+ oldIE: function()
3012
+ {
3013
+ if ($.browser.msie && parseInt($.browser.version, 10) < 9)
3014
+ {
3015
+ return true;
3016
+ }
3017
+
3018
+ return false;
3019
+ },
3020
+ outerHTML: function(s)
3021
+ {
3022
+ return $("<p>").append($(s).eq(0).clone()).html();
3023
+ },
3024
+ normalize: function(str)
3025
+ {
3026
+ return parseInt(str.replace('px',''), 10);
3027
+ }
3028
+
3029
+ };
3030
+
3031
+
3032
+ // API
3033
+ $.fn.getDoc = function()
3034
+ {
3035
+ return $(this.data('redactor').doc);
3036
+ };
3037
+
3038
+ $.fn.getFrame = function()
3039
+ {
3040
+ return this.data('redactor').$frame;
3041
+ };
3042
+
3043
+ $.fn.getEditor = function()
3044
+ {
3045
+ return this.data('redactor').$editor;
3046
+ };
3047
+
3048
+ $.fn.getCode = function()
3049
+ {
3050
+ return this.data('redactor').getCode();
3051
+ };
3052
+
3053
+ $.fn.getText = function()
3054
+ {
3055
+ return this.data('redactor').$editor.text();
3056
+ };
3057
+
3058
+ $.fn.setCode = function(html)
3059
+ {
3060
+ this.data('redactor').setCode(html);
3061
+ };
3062
+
3063
+ $.fn.insertHtml = function(html)
3064
+ {
3065
+ this.data('redactor').insertHtml(html);
3066
+ };
3067
+
3068
+ $.fn.destroyEditor = function()
3069
+ {
3070
+ this.data('redactor').destroy();
3071
+ this.removeData('redactor');
3072
+ };
3073
+
3074
+ $.fn.setFocus = function()
3075
+ {
3076
+ this.data('redactor').focus();
3077
+ };
3078
+
3079
+ $.fn.execCommand = function(cmd, param)
3080
+ {
3081
+ this.data('redactor').execCommand(cmd, param);
3082
+ };
3083
+
3084
+ })(jQuery);
3085
+
3086
+ /*
3087
+ Plugin Drag and drop Upload v1.0.1
3088
+ http://imperavi.com/
3089
+ Copyright 2012, Imperavi Ltd.
3090
+ */
3091
+ (function($){
3092
+
3093
+ "use strict";
3094
+
3095
+ // Initialization
3096
+ $.fn.dragupload = function(options)
3097
+ {
3098
+ return this.each(function() {
3099
+ var obj = new Construct(this, options);
3100
+ obj.init();
3101
+ });
3102
+ };
3103
+
3104
+ // Options and variables
3105
+ function Construct(el, options) {
3106
+
3107
+ this.opts = $.extend({
3108
+
3109
+ url: false,
3110
+ success: false,
3111
+ preview: false,
3112
+
3113
+ text: RLANG.drop_file_here,
3114
+ atext: RLANG.or_choose
3115
+
3116
+ }, options);
3117
+
3118
+ this.$el = $(el);
3119
+ }
3120
+
3121
+ // Functionality
3122
+ Construct.prototype = {
3123
+ init: function()
3124
+ {
3125
+ if (!$.browser.opera && !$.browser.msie)
3126
+ {
3127
+
3128
+ this.droparea = $('<div class="redactor_droparea"></div>');
3129
+ this.dropareabox = $('<div class="redactor_dropareabox">' + this.opts.text + '</div>');
3130
+ this.dropalternative = $('<div class="redactor_dropalternative">' + this.opts.atext + '</div>');
3131
+
3132
+ this.droparea.append(this.dropareabox);
3133
+
3134
+ this.$el.before(this.droparea);
3135
+ this.$el.before(this.dropalternative);
3136
+
3137
+ // drag over
3138
+ this.dropareabox.bind('dragover', $.proxy(function() { return this.ondrag(); }, this));
3139
+
3140
+ // drag leave
3141
+ this.dropareabox.bind('dragleave', $.proxy(function() { return this.ondragleave(); }, this));
3142
+
3143
+ var uploadProgress = $.proxy(function(e)
3144
+ {
3145
+ var percent = parseInt(e.loaded / e.total * 100, 10);
3146
+ this.dropareabox.text('Loading ' + percent + '%');
3147
+
3148
+ }, this);
3149
+
3150
+ var xhr = jQuery.ajaxSettings.xhr();
3151
+
3152
+ if (xhr.upload)
3153
+ {
3154
+ xhr.upload.addEventListener('progress', uploadProgress, false);
3155
+ }
3156
+
3157
+ var provider = function () { return xhr; };
3158
+
3159
+ // drop
3160
+ this.dropareabox.get(0).ondrop = $.proxy(function(event)
3161
+ {
3162
+ event.preventDefault();
3163
+
3164
+ this.dropareabox.removeClass('hover').addClass('drop');
3165
+
3166
+ var file = event.dataTransfer.files[0];
3167
+
3168
+ var fd = new FormData();
3169
+ fd.append('file', file);
3170
+
3171
+ $.ajax({
3172
+ dataType: 'html',
3173
+ url: this.opts.url,
3174
+ data: fd,
3175
+ xhr: provider,
3176
+ cache: false,
3177
+ contentType: false,
3178
+ processData: false,
3179
+ type: 'POST',
3180
+ success: $.proxy(function(data)
3181
+ {
3182
+ if (this.opts.success !== false)
3183
+ {
3184
+ this.opts.success(data);
3185
+ }
3186
+
3187
+ if (this.opts.preview === true)
3188
+ {
3189
+ this.dropareabox.html(data);
3190
+ }
3191
+
3192
+ }, this)
3193
+ });
3194
+
3195
+ }, this);
3196
+ }
3197
+ },
3198
+ ondrag: function()
3199
+ {
3200
+ this.dropareabox.addClass('hover');
3201
+ return false;
3202
+ },
3203
+ ondragleave: function()
3204
+ {
3205
+ this.dropareabox.removeClass('hover');
3206
+ return false;
3207
+ }
3208
+ };
3209
+
3210
+ })(jQuery);
3211
+
3212
+
3213
+ // Define: Linkify plugin from stackoverflow
3214
+ (function($){
3215
+
3216
+ "use strict";
3217
+
3218
+ var url1 = /(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g,
3219
+ url2 = /(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g,
3220
+
3221
+ linkifyThis = function ()
3222
+ {
3223
+ var childNodes = this.childNodes,
3224
+ i = childNodes.length;
3225
+ while(i--)
3226
+ {
3227
+ var n = childNodes[i];
3228
+ if (n.nodeType === 3)
3229
+ {
3230
+ var html = n.nodeValue;
3231
+ if (html)
3232
+ {
3233
+ html = html.replace(/&/g, '&amp;')
3234
+ .replace(/</g, '&lt;')
3235
+ .replace(/>/g, '&gt;')
3236
+ .replace(url1, '$1<a href="http://$2">$2</a>$3')
3237
+ .replace(url2, '$1<a href="$2">$2</a>$5');
3238
+
3239
+ $(n).after(html).remove();
3240
+ }
3241
+ }
3242
+ else if (n.nodeType === 1 && !/^(a|button|textarea)$/i.test(n.tagName))
3243
+ {
3244
+ linkifyThis.call(n);
3245
+ }
3246
+ }
3247
+ };
3248
+
3249
+ $.fn.linkify = function ()
3250
+ {
3251
+ this.each(linkifyThis);
3252
+ };
3253
+
3254
+ })(jQuery);