ckeditor 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/README.md +36 -26
  4. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +6 -2
  5. data/app/controllers/ckeditor/application_controller.rb +11 -10
  6. data/app/controllers/ckeditor/attachment_files_controller.rb +8 -2
  7. data/app/controllers/ckeditor/pictures_controller.rb +8 -2
  8. data/config/locales/ja.ckeditor.yml +9 -0
  9. data/lib/ckeditor.rb +8 -0
  10. data/lib/ckeditor/backend/dragonfly.rb +8 -6
  11. data/lib/ckeditor/hooks/cancan.rb +4 -1
  12. data/lib/ckeditor/utils.rb +2 -2
  13. data/lib/ckeditor/version.rb +2 -2
  14. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
  15. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
  16. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
  17. data/lib/tasks/ckeditor.rake +21 -8
  18. data/test/ckeditor_test.rb +6 -0
  19. data/test/dummy/log/test.log +619 -0
  20. data/test/dummy/public/ckeditor_assets/attachments/1/rails_tar.gz +0 -0
  21. data/test/dummy/public/ckeditor_assets/pictures/1/content_rails.png +0 -0
  22. data/test/dummy/public/ckeditor_assets/pictures/1/original_rails.png +0 -0
  23. data/test/dummy/public/ckeditor_assets/pictures/1/thumb_rails.png +0 -0
  24. data/test/dummy/public/uploads/ckeditor/attachments/1/rails.tar.gz +0 -0
  25. data/test/dummy/public/uploads/ckeditor/pictures/1/content_rails.png +0 -0
  26. data/test/dummy/public/uploads/ckeditor/pictures/1/rails.png +0 -0
  27. data/test/dummy/public/uploads/ckeditor/pictures/1/thumb_rails.png +0 -0
  28. data/test/models/picture_test.rb +6 -1
  29. data/test/tmp/app/models/ckeditor/asset.rb +5 -0
  30. data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
  31. data/test/tmp/app/models/ckeditor/picture.rb +13 -0
  32. data/test/tmp/config/initializers/ckeditor.rb +39 -0
  33. data/test/tmp/config/routes.rb +6 -0
  34. data/vendor/assets/javascripts/ckeditor/CHANGES.md +16 -1
  35. data/vendor/assets/javascripts/ckeditor/LICENSE.md +1 -1
  36. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
  37. data/vendor/assets/javascripts/ckeditor/ckeditor.js +480 -478
  38. data/vendor/assets/javascripts/ckeditor/config.js +10 -0
  39. data/{app/assets/stylesheets → vendor/assets/javascripts}/ckeditor/contents.css +2 -2
  40. data/vendor/assets/javascripts/ckeditor/lang/af.js +1 -1
  41. data/vendor/assets/javascripts/ckeditor/lang/ar.js +1 -1
  42. data/vendor/assets/javascripts/ckeditor/lang/bg.js +1 -1
  43. data/vendor/assets/javascripts/ckeditor/lang/bn.js +1 -1
  44. data/vendor/assets/javascripts/ckeditor/lang/bs.js +1 -1
  45. data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
  46. data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
  47. data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
  48. data/vendor/assets/javascripts/ckeditor/lang/da.js +1 -1
  49. data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
  50. data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
  51. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
  52. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
  53. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
  54. data/vendor/assets/javascripts/ckeditor/lang/en.js +1 -1
  55. data/vendor/assets/javascripts/ckeditor/lang/eo.js +1 -1
  56. data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
  57. data/vendor/assets/javascripts/ckeditor/lang/et.js +1 -1
  58. data/vendor/assets/javascripts/ckeditor/lang/eu.js +1 -1
  59. data/vendor/assets/javascripts/ckeditor/lang/fa.js +1 -1
  60. data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
  61. data/vendor/assets/javascripts/ckeditor/lang/fo.js +1 -1
  62. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +1 -1
  63. data/vendor/assets/javascripts/ckeditor/lang/fr.js +1 -1
  64. data/vendor/assets/javascripts/ckeditor/lang/gl.js +1 -1
  65. data/vendor/assets/javascripts/ckeditor/lang/gu.js +1 -1
  66. data/vendor/assets/javascripts/ckeditor/lang/he.js +1 -1
  67. data/vendor/assets/javascripts/ckeditor/lang/hi.js +2 -2
  68. data/vendor/assets/javascripts/ckeditor/lang/hr.js +1 -1
  69. data/vendor/assets/javascripts/ckeditor/lang/hu.js +1 -1
  70. data/vendor/assets/javascripts/ckeditor/lang/id.js +1 -1
  71. data/vendor/assets/javascripts/ckeditor/lang/is.js +1 -1
  72. data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
  73. data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
  74. data/vendor/assets/javascripts/ckeditor/lang/ka.js +1 -1
  75. data/vendor/assets/javascripts/ckeditor/lang/km.js +2 -2
  76. data/vendor/assets/javascripts/ckeditor/lang/ko.js +1 -1
  77. data/vendor/assets/javascripts/ckeditor/lang/ku.js +2 -2
  78. data/vendor/assets/javascripts/ckeditor/lang/lt.js +1 -1
  79. data/vendor/assets/javascripts/ckeditor/lang/lv.js +1 -1
  80. data/vendor/assets/javascripts/ckeditor/lang/mk.js +1 -1
  81. data/vendor/assets/javascripts/ckeditor/lang/mn.js +1 -1
  82. data/vendor/assets/javascripts/ckeditor/lang/ms.js +1 -1
  83. data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
  84. data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
  85. data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
  86. data/vendor/assets/javascripts/ckeditor/lang/pl.js +1 -1
  87. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
  88. data/vendor/assets/javascripts/ckeditor/lang/pt.js +2 -2
  89. data/vendor/assets/javascripts/ckeditor/lang/ro.js +1 -1
  90. data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
  91. data/vendor/assets/javascripts/ckeditor/lang/si.js +2 -2
  92. data/vendor/assets/javascripts/ckeditor/lang/sk.js +1 -1
  93. data/vendor/assets/javascripts/ckeditor/lang/sl.js +1 -1
  94. data/vendor/assets/javascripts/ckeditor/lang/sq.js +2 -2
  95. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +1 -1
  96. data/vendor/assets/javascripts/ckeditor/lang/sr.js +1 -1
  97. data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
  98. data/vendor/assets/javascripts/ckeditor/lang/th.js +1 -1
  99. data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
  100. data/vendor/assets/javascripts/ckeditor/lang/tt.js +2 -2
  101. data/vendor/assets/javascripts/ckeditor/lang/ug.js +1 -1
  102. data/vendor/assets/javascripts/ckeditor/lang/uk.js +1 -1
  103. data/vendor/assets/javascripts/ckeditor/lang/vi.js +1 -1
  104. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +2 -2
  105. data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
  106. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
  107. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +1 -1
  108. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +1 -1
  109. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +1 -1
  110. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +1 -1
  111. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +1 -1
  112. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +1 -1
  113. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +1 -1
  114. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +1 -1
  115. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +1 -1
  116. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +1 -1
  117. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +1 -1
  118. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +1 -1
  119. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +1 -1
  120. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +1 -1
  121. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +1 -1
  122. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +2 -2
  123. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +1 -1
  124. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +1 -1
  125. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +1 -1
  126. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +1 -1
  127. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +1 -1
  128. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +1 -1
  129. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +1 -1
  130. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +1 -1
  131. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +1 -1
  132. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +1 -1
  133. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +1 -1
  134. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +1 -1
  135. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +1 -1
  136. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +8 -7
  137. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +1 -1
  138. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +1 -1
  139. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +1 -1
  140. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +1 -1
  141. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +1 -1
  142. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +1 -1
  143. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +1 -1
  144. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +1 -1
  145. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +1 -1
  146. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +1 -1
  147. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +7 -7
  148. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +1 -1
  149. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +1 -1
  150. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +1 -1
  151. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +1 -1
  152. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +1 -1
  153. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +4 -4
  154. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +1 -1
  155. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +1 -1
  156. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +1 -1
  157. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +1 -1
  158. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +1 -1
  159. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +2 -2
  160. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +1 -1
  161. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +1 -1
  162. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +1 -1
  163. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
  164. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +1 -1
  165. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
  166. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
  167. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -3
  168. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  169. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +1 -1
  170. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +21 -21
  171. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
  172. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
  173. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
  174. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
  175. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -5
  176. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
  177. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +3 -3
  178. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  179. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
  180. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
  181. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +3 -3
  182. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
  183. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +1 -1
  184. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
  185. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
  186. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
  187. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +1 -1
  188. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +1 -1
  189. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +1 -1
  190. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +1 -1
  191. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +1 -1
  192. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
  193. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +1 -1
  194. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +1 -1
  195. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
  196. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +1 -1
  197. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +1 -1
  198. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
  199. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +1 -1
  200. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +1 -1
  201. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +1 -1
  202. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +1 -1
  203. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +1 -1
  204. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +1 -1
  205. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
  206. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +1 -1
  207. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +1 -1
  209. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +1 -1
  210. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +1 -1
  211. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
  212. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
  213. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +1 -1
  216. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +1 -1
  218. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
  219. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +6 -6
  223. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  224. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +1 -1
  225. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
  226. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
  227. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +1 -1
  228. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +1 -1
  229. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +1 -1
  230. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +1 -1
  231. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +5 -5
  232. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +1 -1
  233. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +1 -1
  234. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +1 -1
  235. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +1 -1
  236. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +1 -1
  237. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  238. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
  239. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
  240. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
  241. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
  242. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
  243. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
  244. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
  245. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
  246. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
  247. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
  248. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
  249. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
  250. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
  251. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
  252. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
  253. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
  254. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
  255. data/{app → vendor}/assets/javascripts/ckeditor/styles.js +3 -2
  256. metadata +34 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b293a89d93a9fec21bf515407aa6653525390cea
4
- data.tar.gz: 54bdec36f7488d7d342f786f27ea05b211c649a6
3
+ metadata.gz: 1a521b18f6252ed84f4b0f733a3be5c82d14a36d
4
+ data.tar.gz: 08dd944031cf738410b264fc4f26d058a4ffdca0
5
5
  SHA512:
6
- metadata.gz: cfa69f8249288901d774ceef2dba001c9366c87050fc1fc5bb18cb81e1e6034b9484018bf22c84ed228c636fdfcd559c01b58c982398629cc82c12e05531e918
7
- data.tar.gz: 3bd0a775d343d5a5c5699791040ec89e5342b88a8278e1957436e58eafcb0d23b766b9ffc08951010792d3a4d65be7ab600e6adc9aef6039327a40a7ddaf060a
6
+ metadata.gz: 48415dfdc911779debeb1f03ee1697f5a6a1cb48c2da5803d53c6f8494804b6bacb85ddb238aca5a01c407079ad867a64695d315c17c641268adde88d6983927
7
+ data.tar.gz: 0fd956940b958d39fe96bfb9e7a66fac05669eccc191d387966a35dea2a7706e1619dcde47bfcf0d8fdf4e492202b559271ebe141fdde6941a44525bca4d78c9
data/Gemfile CHANGED
@@ -24,7 +24,6 @@ platforms :ruby do
24
24
  end
25
25
 
26
26
  group :active_record do
27
- # gem "paperclip", "~> 3.0.3"
28
27
  gem 'paperclip', '~> 4.1.1'
29
28
  gem "carrierwave"
30
29
  gem "dragonfly"
data/README.md CHANGED
@@ -1,26 +1,26 @@
1
1
  # Ckeditor
2
2
 
3
- CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It's a WYSIWYG editor that brings common word processor features directly to your web pages. Enhance your website experience with our community maintained editor.
3
+ CKEditor is a WYSIWYG text editor designed to simplify web content creation. It brings common word processing features directly to your web pages. Enhance your website experience with our community maintained editor.
4
4
  [ckeditor.com](http://ckeditor.com/)
5
5
 
6
6
  ## Features
7
7
 
8
- * Ckeditor version 4.4.6 (full)
8
+ * Ckeditor version 4.4.7 (full 27 Jan 2015)
9
9
  * Rails 4 integration
10
10
  * Files browser
11
- * HTML5 files uploader
11
+ * HTML5 file uploader
12
12
  * Hooks for formtastic and simple_form forms generators
13
13
  * Integrated with authorization framework CanCan and Pundit
14
14
 
15
15
  ## Installation
16
16
 
17
- For basic usage just include ckeditor gem:
17
+ For basic usage just include the ckeditor gem:
18
18
 
19
19
  ```
20
20
  gem 'ckeditor'
21
21
  ```
22
22
 
23
- or if you want to use the latest version from github:
23
+ or if you'd like to use the latest version from Github:
24
24
 
25
25
  ```
26
26
  gem 'ckeditor', github: 'galetahub/ckeditor'
@@ -28,23 +28,23 @@ gem 'ckeditor', github: 'galetahub/ckeditor'
28
28
 
29
29
  #### Using with ruby 1.8.7
30
30
 
31
- For usage with ruby 1.8.7 you need to specify gem version:
31
+ For usage with ruby 1.8.7 you need to specify the gem version:
32
32
 
33
33
  ```
34
34
  gem 'ckeditor', '4.0.4'
35
35
  ```
36
36
 
37
- For files uploading support you need generate models for file storage.
38
- Currently supported next backends:
37
+ For file upload support, you must generate the necessary file storage models.
38
+ The currently supported backends are:
39
39
 
40
40
  * ActiveRecord (paperclip, carrierwave, dragonfly)
41
41
  * Mongoid (paperclip, carrierwave, dragonfly)
42
42
 
43
- ### How generate models for store uploading files
43
+ ### How to generate models to store uploaded files
44
44
 
45
45
  #### ActiveRecord + paperclip
46
46
 
47
- For active_record orm is used paperclip gem (it's by default).
47
+ To use the active_record orm with paperclip (i.e. the default settings):
48
48
 
49
49
  ```
50
50
  gem 'paperclip'
@@ -61,6 +61,16 @@ gem 'mini_magick'
61
61
  rails generate ckeditor:install --orm=active_record --backend=carrierwave
62
62
  ```
63
63
 
64
+ #### ActiveRecord + dragonfly
65
+
66
+ Requires Dragonfly 1.0 or greater.
67
+
68
+ ```
69
+ gem 'dragonfly'
70
+
71
+ rails generate ckeditor:install --orm=active_record --backend=dragonfly
72
+ ```
73
+
64
74
  #### Mongoid + paperclip
65
75
 
66
76
  ```
@@ -80,14 +90,14 @@ rails generate ckeditor:install --orm=mongoid --backend=carrierwave
80
90
 
81
91
  #### Load generated models
82
92
 
83
- All ckeditor models will be generated into app/models/ckeditor folder.
84
- Models are autoloaded in Rails 4. For earlier Rails versions you need to add them to autoload path (in application.rb):
93
+ All ckeditor models will be generated in the app/models/ckeditor directory.
94
+ Models are autoloaded in Rails 4. For earlier Rails versions, you need to add them to the autoload path (in application.rb):
85
95
 
86
96
  ```ruby
87
97
  config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
88
98
  ```
89
99
 
90
- Mount engine in your routes (config/routes.rb):
100
+ Mount the Ckeditor::Engine in your routes (config/routes.rb):
91
101
 
92
102
  ```ruby
93
103
  mount Ckeditor::Engine => '/ckeditor'
@@ -117,9 +127,9 @@ Form helpers:
117
127
 
118
128
  ### Customize ckeditor
119
129
 
120
- All ckeditor options [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
130
+ All ckeditor options can be found [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
121
131
 
122
- In order to configure the ckeditor default options, create files:
132
+ In order to configure the ckeditor default options, create the following files:
123
133
 
124
134
  ```
125
135
  app/assets/javascripts/ckeditor/config.js
@@ -129,7 +139,7 @@ app/assets/javascripts/ckeditor/contents.css
129
139
 
130
140
  #### Custom toolbars example
131
141
 
132
- Adding custom toolbar:
142
+ Adding a custom toolbar:
133
143
 
134
144
  ```javascript
135
145
  # in app/assets/javascripts/ckeditor/config.js
@@ -146,7 +156,7 @@ CKEDITOR.editorConfig = function (config) {
146
156
  }
147
157
  ```
148
158
 
149
- When overriding default `config.js` you have to set all configuration yourself since bundled `config.js` will not be loaded. To see the default configuration run `bundle open ckeditor` and copy `app/assets/javascripts/ckeditor/config.js` to your project and customize it to your needs.
159
+ When overriding the default `config.js` file, you must set all configuration options yourself as the bundled `config.js` will not be loaded. To see the default configuration, run `bundle open ckeditor`, copy `app/assets/javascripts/ckeditor/config.js` into your project and customize it to your needs.
150
160
 
151
161
  ### Deployment
152
162
 
@@ -156,7 +166,7 @@ For Rails 4, add the following to `config/initializers/assets.rb`:
156
166
  Rails.application.config.assets.precompile += %w( ckeditor/* )
157
167
  ```
158
168
 
159
- Since version 4.1.0, non-digested assets of ckeditor will simply be copied after digested assets were compiled.
169
+ As of version 4.1.0, non-digested assets of Ckeditor will simply be copied after digested assets were compiled.
160
170
  For older versions, use gem [non-stupid-digest-assets](https://rubygems.org/gems/non-stupid-digest-assets), to copy non digest assets.
161
171
 
162
172
  To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
@@ -170,7 +180,7 @@ Ckeditor.setup do |config|
170
180
  end
171
181
  ```
172
182
 
173
- Note that you have to list your plugins including all their dependencies.
183
+ Note that you have to list your plugins, including all their dependencies.
174
184
 
175
185
  ### Include customized CKEDITOR_BASEPATH setting
176
186
 
@@ -219,7 +229,7 @@ jQuery sample:
219
229
 
220
230
  ### CanCan integration
221
231
 
222
- To use cancan with Ckeditor, add this to an initializer.
232
+ To use cancan with Ckeditor, add this to an initializer:
223
233
 
224
234
  ```ruby
225
235
  # in config/initializers/ckeditor.rb
@@ -230,7 +240,7 @@ end
230
240
  ```
231
241
 
232
242
  At this point, all authorization will fail and no one will be able to access the filebrowser pages.
233
- To grant access, add this to Ability#initialize
243
+ To grant access, add this to Ability#initialize:
234
244
 
235
245
  ```ruby
236
246
  # Always performed
@@ -243,7 +253,7 @@ can [:read, :create, :destroy], Ckeditor::AttachmentFile
243
253
 
244
254
  ### Pundit integration
245
255
 
246
- Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file
256
+ Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file:
247
257
 
248
258
  ```ruby
249
259
  Ckeditor.setup do |config|
@@ -251,7 +261,7 @@ Ckeditor.setup do |config|
251
261
  end
252
262
  ```
253
263
 
254
- And then, generate the policy files for model **Picture** and **AttachmentFile**
264
+ Then, generate the policy files for model **Picture** and **AttachmentFile**
255
265
 
256
266
  ```
257
267
  $ rails g ckeditor:pundit_policy
@@ -260,9 +270,9 @@ By this command, you will got two files:
260
270
  > app/policies/ckeditor/picture_policy.rb
261
271
  app/policies/ckeditor/attachment_file_policy.rb
262
272
 
263
- By default, only the user that logged in can access the models(with action *index* and *create*), and only the owner of the asset can **destroy** the resource.
273
+ By default, only the user that logged in can access the models (with actions *index* and *create*) and only the owner of the asset can **destroy** the resource.
264
274
 
265
- You can simply customize these two policy files as you like.
275
+ You can customize these two policy files as you like.
266
276
 
267
277
  ## I18n
268
278
 
@@ -291,4 +301,4 @@ $> rake test:integration
291
301
  $> rake test:models
292
302
  ```
293
303
 
294
- This project rocks and uses MIT-LICENSE.
304
+ This project rocks and uses the MIT-LICENSE.
@@ -26,7 +26,7 @@ img {
26
26
  top: 0;
27
27
  }
28
28
  .gal-holder .gal-item .gal-del:hover {
29
- -moz-opacity: 0.7;
29
+ -moz-opacity: 0.7;
30
30
  -khtml-opacity: 0.7;
31
31
  opacity: 0.7;
32
32
  }
@@ -85,6 +85,10 @@ img {
85
85
  overflow: hidden;
86
86
  width: 500px;
87
87
  }
88
+ .img-name {
89
+ word-wrap: break-word;
90
+ width: auto !important;
91
+ }
88
92
  .gal-holder .gal-item .gal-inner-holder .img-data .time-size {
89
93
  display: block;
90
94
  overflow: hidden;
@@ -119,4 +123,4 @@ img {
119
123
 
120
124
  .pagination, .pagination a {
121
125
  text-decoration: none;
122
- }
126
+ }
@@ -1,5 +1,4 @@
1
1
  class Ckeditor::ApplicationController < ApplicationController
2
- respond_to :html, :json
3
2
  layout 'ckeditor/application'
4
3
 
5
4
  before_filter :find_asset, :only => [:destroy]
@@ -15,18 +14,20 @@ class Ckeditor::ApplicationController < ApplicationController
15
14
  callback = ckeditor_before_create_asset(asset)
16
15
 
17
16
  if callback && asset.save
18
- body = params[:CKEditor].blank? ? asset.to_json(:only=>[:id, :type]) : %Q"<script type='text/javascript'>
19
- window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, '#{config.relative_url_root}#{Ckeditor::Utils.escape_single_quotes(asset.url_content)}');
20
- </script>"
21
-
22
- render :text => body
23
- else
24
- if params[:CKEditor]
17
+ if params[:CKEditor].blank?
18
+ render :json => asset.to_json(:only=>[:id, :type])
19
+ else
25
20
  render :text => %Q"<script type='text/javascript'>
26
- window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, null, '#{asset.errors.full_messages.first}');
21
+ window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, '#{config.relative_url_root}#{Ckeditor::Utils.escape_single_quotes(asset.url_content)}');
27
22
  </script>"
23
+ end
24
+ else
25
+ if params[:CKEditor].blank?
26
+ render :nothing => true, :format => :json
28
27
  else
29
- render :nothing => true
28
+ render :text => %Q"<script type='text/javascript'>
29
+ window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, null, '#{Ckeditor::Utils.escape_single_quotes(asset.errors.full_messages.first)}');
30
+ </script>"
30
31
  end
31
32
  end
32
33
  end
@@ -4,7 +4,9 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
4
4
  @attachments = Ckeditor.attachment_file_adapter.find_all(ckeditor_attachment_files_scope)
5
5
  @attachments = Ckeditor::Paginatable.new(@attachments).page(params[:page])
6
6
 
7
- respond_with(@attachments, :layout => @attachments.first_page?)
7
+ respond_to do |format|
8
+ format.html { render :layout => @attachments.first_page? }
9
+ end
8
10
  end
9
11
 
10
12
  def create
@@ -14,7 +16,11 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
14
16
 
15
17
  def destroy
16
18
  @attachment.destroy
17
- respond_with(@attachment, :location => attachment_files_path)
19
+
20
+ respond_to do |format|
21
+ format.html { redirect_to attachment_files_path }
22
+ format.json { render :nothing => true, :status => 204 }
23
+ end
18
24
  end
19
25
 
20
26
  protected
@@ -4,7 +4,9 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController
4
4
  @pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope)
5
5
  @pictures = Ckeditor::Paginatable.new(@pictures).page(params[:page])
6
6
 
7
- respond_with(@pictures, :layout => @pictures.first_page?)
7
+ respond_to do |format|
8
+ format.html { render :layout => @pictures.first_page? }
9
+ end
8
10
  end
9
11
 
10
12
  def create
@@ -14,7 +16,11 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController
14
16
 
15
17
  def destroy
16
18
  @picture.destroy
17
- respond_with(@picture, :location => pictures_path)
19
+
20
+ respond_to do |format|
21
+ format.html { redirect_to pictures_path }
22
+ format.json { render :nothing => true, :status => 204 }
23
+ end
18
24
  end
19
25
 
20
26
  protected
@@ -0,0 +1,9 @@
1
+ ja:
2
+ ckeditor:
3
+ page_title: "CKEditor ファイル・マネージャー"
4
+ confirm_delete: "ファイルを削除しますか?"
5
+ buttons:
6
+ cancel: "キャンセル"
7
+ upload: "アップロード"
8
+ delete: "削除"
9
+ next: "次へ"
data/lib/ckeditor.rb CHANGED
@@ -58,6 +58,10 @@ module Ckeditor
58
58
  mattr_accessor :assets
59
59
  @@assets = nil
60
60
 
61
+ # Remove digest from ckeditor asset files while running assets:precompile task?
62
+ mattr_accessor :run_on_precompile
63
+ @@run_on_precompile = true
64
+
61
65
  # Turn on/off filename parameterize
62
66
  mattr_accessor :parameterize_filenames
63
67
  @@parameterize_filenames = true
@@ -102,6 +106,10 @@ module Ckeditor
102
106
  @@assets ||= Utils.select_assets("ckeditor", "vendor/assets/javascripts") << "ckeditor/init.js"
103
107
  end
104
108
 
109
+ def self.run_on_precompile?
110
+ @@run_on_precompile
111
+ end
112
+
105
113
  def self.picture_model(&block)
106
114
  if block_given?
107
115
  self.picture_model = block
@@ -2,24 +2,26 @@ module Ckeditor
2
2
  module Backend
3
3
  module Dragonfly
4
4
  def self.included(base)
5
- base.send(:include, InstanceMethods)
5
+ base.send(:extend, ::Dragonfly::Model)
6
+ base.send(:extend, ::Dragonfly::Model::Validations)
6
7
  base.send(:extend, ClassMethods)
8
+ base.send(:include, InstanceMethods)
7
9
  end
8
10
 
9
11
  module ClassMethods
10
12
  def attachment_file_types
11
- @attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_sym).tap do |formats|
13
+ @attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_s).tap do |formats|
12
14
  # This is not ideal but Dragonfly doesn't return double
13
15
  # extensions. Having said that, the other backends
14
16
  # currently don't use attachment_file_types at all.
15
- [ :bz2, :gz, :lzma, :xz ].each do |f|
16
- formats << f if formats.include?("tar.#{f}".to_sym)
17
+ [ 'bz2', 'gz', 'lzma', 'xz' ].each do |f|
18
+ formats << f if formats.include?("tar.#{f}")
17
19
  end
18
20
  end
19
21
  end
20
22
 
21
23
  def image_file_types
22
- @image_file_types ||= Ckeditor.image_file_types.map(&:to_sym)
24
+ @image_file_types ||= Ckeditor.image_file_types.map(&:to_s)
23
25
  end
24
26
  end
25
27
 
@@ -27,7 +29,7 @@ module Ckeditor
27
29
  delegate :url, :path, :size, :image?, :width, :height, :to => :data
28
30
 
29
31
  alias_attribute :data_file_name, :data_name
30
- alias_attribute :data_content_type, :data_mime_type
32
+ alias_attribute :data_content_type, :"data.mime_type"
31
33
  alias_attribute :data_file_size, :data_size
32
34
 
33
35
  private
@@ -19,7 +19,10 @@ module Ckeditor
19
19
  # action as a symbol (:create, :destroy, etc.). The second argument is the actual model
20
20
  # instance if it is available.
21
21
  def authorize(action, model_object = nil)
22
- @controller.current_ability.authorize!(action.to_sym, model_object) if action
22
+ if action
23
+ @controller.instance_variable_set(:@_authorized, true)
24
+ @controller.current_ability.authorize!(action.to_sym, model_object)
25
+ end
23
26
  end
24
27
 
25
28
  # This method is called primarily from the view to determine whether the given user
@@ -25,9 +25,9 @@ module Ckeditor
25
25
 
26
26
  if options && !options.keys.empty?
27
27
  js_options = ActiveSupport::JSON.encode(options)
28
- js << "CKEDITOR.replace('#{dom_id}', #{js_options});"
28
+ js << "if (CKEDITOR.instances['#{dom_id}'] == undefined) { CKEDITOR.replace('#{dom_id}', #{js_options}); }"
29
29
  else
30
- js << "CKEDITOR.replace('#{dom_id}');"
30
+ js << "if (CKEDITOR.instances['#{dom_id}'] == undefined) { CKEDITOR.replace('#{dom_id}'); }"
31
31
  end
32
32
 
33
33
  js << "} else { setTimeout(arguments.callee, 50); } })();"
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = "4.1.1".freeze
4
- EDITOR = "4.4.6".freeze
3
+ GEM = "4.1.2".freeze
4
+ EDITOR = "4.4.7".freeze
5
5
  end
6
6
  end
@@ -2,6 +2,6 @@ class Ckeditor::Asset < ActiveRecord::Base
2
2
  include Ckeditor::Orm::ActiveRecord::AssetBase
3
3
  include Ckeditor::Backend::Dragonfly
4
4
 
5
- ckeditor_file_accessor :data
5
+ dragonfly_accessor :data, app: :ckeditor
6
6
  validates_presence_of :data
7
7
  end
@@ -1,5 +1,5 @@
1
1
  class Ckeditor::AttachmentFile < Ckeditor::Asset
2
- validates_property :format, :of => :data, :in => attachment_file_types unless attachment_file_types.empty?
2
+ validates_property :ext, :of => :data, :in => attachment_file_types unless attachment_file_types.empty?
3
3
 
4
4
  def url_thumb
5
5
  Ckeditor::Utils.filethumb(filename)