drg_default_html_editor 0.5.50.3 → 0.7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (543) hide show
  1. checksums.yaml +5 -5
  2. data/app/assets/images/arrow.png +0 -0
  3. data/app/assets/images/close.png +0 -0
  4. data/app/assets/images/lock-open.png +0 -0
  5. data/app/assets/images/lock.png +0 -0
  6. data/app/assets/images/refresh.png +0 -0
  7. data/app/assets/images/spinner.gif +0 -0
  8. data/app/assets/javascripts/ckeditor/CHANGES.md +2040 -415
  9. data/app/assets/javascripts/ckeditor/LICENSE.md +180 -8
  10. data/app/assets/javascripts/ckeditor/README.md +5 -5
  11. data/app/assets/javascripts/ckeditor/SECURITY.md +10 -0
  12. data/app/assets/javascripts/ckeditor/adapters/jquery.js +8 -8
  13. data/app/assets/javascripts/ckeditor/bender-runner.config.json +16 -0
  14. data/app/assets/javascripts/ckeditor/build-config.js +68 -47
  15. data/app/assets/javascripts/ckeditor/ckeditor.js +1420 -974
  16. data/app/assets/javascripts/ckeditor/config.js +7 -2
  17. data/app/assets/javascripts/ckeditor/contents.css +83 -9
  18. data/app/assets/javascripts/ckeditor/lang/af.js +4 -4
  19. data/app/assets/javascripts/ckeditor/lang/ar.js +4 -4
  20. data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
  21. data/app/assets/javascripts/ckeditor/lang/bg.js +4 -4
  22. data/app/assets/javascripts/ckeditor/lang/bn.js +4 -4
  23. data/app/assets/javascripts/ckeditor/lang/bs.js +4 -4
  24. data/app/assets/javascripts/ckeditor/lang/ca.js +4 -4
  25. data/app/assets/javascripts/ckeditor/lang/cs.js +4 -4
  26. data/app/assets/javascripts/ckeditor/lang/cy.js +4 -4
  27. data/app/assets/javascripts/ckeditor/lang/da.js +4 -4
  28. data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
  29. data/app/assets/javascripts/ckeditor/lang/de.js +4 -4
  30. data/app/assets/javascripts/ckeditor/lang/el.js +4 -4
  31. data/app/assets/javascripts/ckeditor/lang/en-au.js +4 -4
  32. data/app/assets/javascripts/ckeditor/lang/en-ca.js +4 -4
  33. data/app/assets/javascripts/ckeditor/lang/en-gb.js +4 -4
  34. data/app/assets/javascripts/ckeditor/lang/en.js +4 -4
  35. data/app/assets/javascripts/ckeditor/lang/eo.js +4 -4
  36. data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
  37. data/app/assets/javascripts/ckeditor/lang/es.js +4 -4
  38. data/app/assets/javascripts/ckeditor/lang/et.js +4 -4
  39. data/app/assets/javascripts/ckeditor/lang/eu.js +4 -4
  40. data/app/assets/javascripts/ckeditor/lang/fa.js +4 -4
  41. data/app/assets/javascripts/ckeditor/lang/fi.js +4 -4
  42. data/app/assets/javascripts/ckeditor/lang/fo.js +4 -4
  43. data/app/assets/javascripts/ckeditor/lang/fr-ca.js +4 -4
  44. data/app/assets/javascripts/ckeditor/lang/fr.js +4 -4
  45. data/app/assets/javascripts/ckeditor/lang/gl.js +4 -4
  46. data/app/assets/javascripts/ckeditor/lang/gu.js +4 -4
  47. data/app/assets/javascripts/ckeditor/lang/he.js +4 -4
  48. data/app/assets/javascripts/ckeditor/lang/hi.js +4 -4
  49. data/app/assets/javascripts/ckeditor/lang/hr.js +4 -4
  50. data/app/assets/javascripts/ckeditor/lang/hu.js +4 -4
  51. data/app/assets/javascripts/ckeditor/lang/id.js +4 -4
  52. data/app/assets/javascripts/ckeditor/lang/is.js +4 -4
  53. data/app/assets/javascripts/ckeditor/lang/it.js +4 -4
  54. data/app/assets/javascripts/ckeditor/lang/ja.js +4 -4
  55. data/app/assets/javascripts/ckeditor/lang/ka.js +4 -4
  56. data/app/assets/javascripts/ckeditor/lang/km.js +4 -4
  57. data/app/assets/javascripts/ckeditor/lang/ko.js +4 -4
  58. data/app/assets/javascripts/ckeditor/lang/ku.js +4 -4
  59. data/app/assets/javascripts/ckeditor/lang/lt.js +4 -4
  60. data/app/assets/javascripts/ckeditor/lang/lv.js +4 -4
  61. data/app/assets/javascripts/ckeditor/lang/mk.js +4 -4
  62. data/app/assets/javascripts/ckeditor/lang/mn.js +4 -4
  63. data/app/assets/javascripts/ckeditor/lang/ms.js +4 -4
  64. data/app/assets/javascripts/ckeditor/lang/nb.js +4 -4
  65. data/app/assets/javascripts/ckeditor/lang/nl.js +4 -4
  66. data/app/assets/javascripts/ckeditor/lang/no.js +4 -4
  67. data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
  68. data/app/assets/javascripts/ckeditor/lang/pl.js +4 -4
  69. data/app/assets/javascripts/ckeditor/lang/pt-br.js +4 -4
  70. data/app/assets/javascripts/ckeditor/lang/pt.js +4 -4
  71. data/app/assets/javascripts/ckeditor/lang/ro.js +4 -4
  72. data/app/assets/javascripts/ckeditor/lang/ru.js +4 -4
  73. data/app/assets/javascripts/ckeditor/lang/si.js +4 -4
  74. data/app/assets/javascripts/ckeditor/lang/sk.js +4 -4
  75. data/app/assets/javascripts/ckeditor/lang/sl.js +4 -4
  76. data/app/assets/javascripts/ckeditor/lang/sq.js +4 -4
  77. data/app/assets/javascripts/ckeditor/lang/sr-latn.js +4 -4
  78. data/app/assets/javascripts/ckeditor/lang/sr.js +4 -4
  79. data/app/assets/javascripts/ckeditor/lang/sv.js +4 -4
  80. data/app/assets/javascripts/ckeditor/lang/th.js +4 -4
  81. data/app/assets/javascripts/ckeditor/lang/tr.js +4 -4
  82. data/app/assets/javascripts/ckeditor/lang/tt.js +4 -4
  83. data/app/assets/javascripts/ckeditor/lang/ug.js +4 -4
  84. data/app/assets/javascripts/ckeditor/lang/uk.js +4 -4
  85. data/app/assets/javascripts/ckeditor/lang/vi.js +4 -4
  86. data/app/assets/javascripts/ckeditor/lang/zh-cn.js +4 -4
  87. data/app/assets/javascripts/ckeditor/lang/zh.js +4 -4
  88. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -7
  89. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +2 -2
  90. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  91. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +10 -9
  92. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  93. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +8 -7
  94. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +10 -10
  95. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -11
  96. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +7 -7
  97. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -9
  98. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
  99. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +11 -10
  100. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +7 -7
  101. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  102. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +7 -6
  103. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +7 -6
  104. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +7 -7
  105. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  106. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +9 -8
  107. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -9
  108. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  109. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +7 -7
  110. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +8 -8
  111. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +12 -0
  112. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +8 -8
  113. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +11 -11
  114. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +8 -8
  115. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +7 -6
  116. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +7 -7
  117. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +7 -6
  118. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -9
  119. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +6 -7
  120. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +9 -9
  121. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +7 -7
  122. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +5 -5
  123. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +7 -6
  124. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +8 -8
  125. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +8 -9
  126. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +7 -6
  127. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +7 -7
  128. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +10 -9
  129. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +7 -6
  130. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -9
  131. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +6 -6
  132. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +10 -9
  133. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  134. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -10
  135. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -8
  136. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +10 -10
  137. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +10 -10
  138. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +7 -7
  139. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +8 -8
  140. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +8 -9
  141. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +9 -9
  142. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +10 -9
  143. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +10 -9
  144. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +10 -9
  145. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +9 -10
  146. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +7 -6
  147. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +8 -8
  148. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +10 -9
  149. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +8 -7
  150. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +8 -8
  151. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +7 -7
  152. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -7
  153. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +7 -8
  154. data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -5
  155. data/app/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  156. data/app/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  157. data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +9 -9
  158. data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
  159. data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +12 -11
  160. data/app/assets/javascripts/ckeditor/plugins/copyformatting/cursors/cursor-disabled.svg +25 -0
  161. data/app/assets/javascripts/ckeditor/plugins/copyformatting/cursors/cursor.svg +14 -0
  162. data/app/assets/javascripts/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
  163. data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +2 -2
  164. data/app/assets/javascripts/ckeditor/plugins/dialog/styles/dialog.css +18 -0
  165. data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -8
  166. data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +24 -22
  167. data/app/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  168. data/app/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  169. data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image-org.js +44 -0
  170. data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +1286 -43
  171. data/app/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  172. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +6 -5
  173. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +28 -24
  174. data/app/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  175. data/app/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  176. data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +8 -8
  177. data/app/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  178. data/app/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  179. data/app/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  180. data/app/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  181. data/app/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  182. data/app/assets/javascripts/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
  183. data/app/assets/javascripts/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
  184. data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +40 -29
  185. data/app/assets/javascripts/ckeditor/plugins/pastetools/filter/common.js +24 -0
  186. data/app/assets/javascripts/ckeditor/plugins/pastetools/filter/image.js +12 -0
  187. data/app/assets/javascripts/ckeditor/plugins/preview/images/pagebreak.gif +0 -0
  188. data/app/assets/javascripts/ckeditor/plugins/preview/styles/screen.css +10 -0
  189. data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
  190. data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +63 -7
  191. data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  192. data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -17
  193. data/app/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  194. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  195. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  196. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  197. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  198. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  199. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  200. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  201. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  202. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  203. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  204. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  205. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +2 -2
  206. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  207. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +3 -3
  208. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  209. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +4 -4
  210. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +2 -2
  211. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +3 -3
  212. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +2 -2
  213. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  214. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  215. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +11 -11
  216. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +5 -5
  217. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  218. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  219. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +3 -3
  220. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +3 -3
  221. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +2 -2
  222. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  223. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +2 -2
  224. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +9 -11
  225. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  226. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +2 -2
  227. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +3 -3
  228. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +2 -2
  229. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +10 -9
  230. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +2 -2
  231. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +2 -2
  232. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +11 -11
  233. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +2 -2
  234. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +11 -11
  235. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +3 -3
  236. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +2 -2
  237. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +3 -3
  238. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  239. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +2 -2
  240. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  241. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +2 -2
  242. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +2 -2
  243. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +2 -2
  244. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +2 -2
  245. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  246. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +3 -3
  247. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +2 -2
  248. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +11 -11
  249. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  250. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +2 -2
  251. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +3 -3
  252. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +2 -2
  253. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +10 -10
  254. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +5 -5
  255. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
  256. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
  257. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +2 -2
  258. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +3 -3
  259. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +2 -2
  260. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +6 -6
  261. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +3 -3
  262. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +2 -2
  263. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +2 -2
  264. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +3 -3
  265. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +7 -10
  266. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +12 -12
  267. data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +20 -19
  268. data/app/assets/javascripts/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  269. data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -15
  270. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +2 -2
  271. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +9 -8
  272. data/app/assets/javascripts/ckeditor/plugins/templates/templatedefinition.js +4 -0
  273. data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +5 -4
  274. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  275. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  276. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  277. data/app/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
  278. data/app/assets/javascripts/ckeditor/samples/css/samples.css +1637 -0
  279. data/app/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
  280. data/app/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
  281. data/app/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
  282. data/app/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
  283. data/app/assets/javascripts/ckeditor/samples/img/logo.svg +13 -0
  284. data/app/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
  285. data/app/assets/javascripts/ckeditor/samples/index.html +115 -113
  286. data/app/assets/javascripts/ckeditor/samples/js/sample.js +53 -0
  287. data/app/assets/javascripts/ckeditor/samples/js/sf.js +17 -0
  288. data/app/assets/javascripts/ckeditor/samples/{ajax.html → old/ajax.html} +10 -7
  289. data/app/assets/javascripts/ckeditor/samples/{api.html → old/api.html} +19 -16
  290. data/app/assets/javascripts/ckeditor/samples/{appendto.html → old/appendto.html} +12 -9
  291. data/app/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
  292. data/app/assets/javascripts/ckeditor/samples/{assets → old/assets}/outputxhtml/outputxhtml.css +2 -2
  293. data/app/assets/javascripts/ckeditor/samples/{assets → old/assets}/posteddata.php +6 -5
  294. data/app/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
  295. data/app/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
  296. data/app/assets/javascripts/ckeditor/samples/{datafiltering.html → old/datafiltering.html} +125 -18
  297. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/dialog/assets/my_dialog.js +3 -3
  298. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/dialog/dialog.html +14 -11
  299. data/app/assets/javascripts/ckeditor/samples/{divreplace.html → old/divreplace.html} +10 -7
  300. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/enterkey/enterkey.html +14 -11
  301. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/htmlwriter/outputhtml.html +14 -11
  302. data/app/assets/javascripts/ckeditor/samples/old/index.html +129 -0
  303. data/app/assets/javascripts/ckeditor/samples/{inlineall.html → old/inlineall.html} +16 -13
  304. data/app/assets/javascripts/ckeditor/samples/{inlinebycode.html → old/inlinebycode.html} +11 -8
  305. data/app/assets/javascripts/ckeditor/samples/{inlinetextarea.html → old/inlinetextarea.html} +12 -9
  306. data/app/assets/javascripts/ckeditor/samples/{jquery.html → old/jquery.html} +13 -10
  307. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/magicline/magicline.html +11 -8
  308. data/app/assets/javascripts/ckeditor/samples/{readonly.html → old/readonly.html} +13 -10
  309. data/app/assets/javascripts/ckeditor/samples/{replacebyclass.html → old/replacebyclass.html} +10 -7
  310. data/app/assets/javascripts/ckeditor/samples/{replacebycode.html → old/replacebycode.html} +10 -7
  311. data/app/assets/javascripts/ckeditor/samples/{sample.css → old/sample.css} +6 -14
  312. data/app/assets/javascripts/ckeditor/samples/{sample.js → old/sample.js} +2 -2
  313. data/app/assets/javascripts/ckeditor/samples/{sample_posteddata.php → old/sample_posteddata.php} +2 -2
  314. data/app/assets/javascripts/ckeditor/samples/{tabindex.html → old/tabindex.html} +10 -7
  315. data/app/assets/javascripts/ckeditor/samples/{plugins → old}/toolbar/toolbar.html +15 -12
  316. data/app/assets/javascripts/ckeditor/samples/{uicolor.html → old/uicolor.html} +11 -8
  317. data/app/assets/javascripts/ckeditor/samples/{uilanguages.html → old/uilanguages.html} +13 -10
  318. data/app/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
  319. data/app/assets/javascripts/ckeditor/samples/{xhtmlstyle.html → old/xhtmlstyle.html} +12 -9
  320. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
  321. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
  322. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
  323. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
  324. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
  325. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
  326. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
  327. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +447 -0
  328. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
  329. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
  330. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
  331. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
  332. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE +19 -0
  333. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +325 -0
  334. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
  335. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
  336. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
  337. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +38 -0
  338. data/app/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
  339. data/app/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +5 -0
  340. data/app/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  341. data/app/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  342. data/app/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  343. data/app/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +5 -0
  344. data/app/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  345. data/app/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  346. data/app/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  347. data/app/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  348. data/app/assets/javascripts/ckeditor/skins/moono-lisa/icons.png +0 -0
  349. data/app/assets/javascripts/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  350. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  351. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/close.png +0 -0
  352. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  353. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  354. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  355. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  356. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  357. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  358. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  359. data/app/assets/javascripts/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  360. data/app/assets/javascripts/ckeditor/skins/{moono → moono-lisa}/readme.md +11 -16
  361. data/app/assets/javascripts/ckeditor/styles.js +43 -17
  362. data/app/assets/javascripts/ckeditor/vendor/promise.js +13 -0
  363. data/app/assets/javascripts/drg_default_html_editor_cms.js +1 -4
  364. data/app/assets/stylesheets/drg_default_html_editor_cms.css +3 -3
  365. data/app/{controllers/dc_elfinder_controller.rb → models/drgcms_form_fields/ckeditor.rb} +33 -32
  366. data/lib/drg_default_html_editor/version.rb +1 -1
  367. data/lib/drg_default_html_editor.rb +2 -3
  368. data/lib/tasks/drg_default_html_editor_tasks.rake +16 -4
  369. metadata +169 -249
  370. data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -24
  371. data/app/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  372. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -8
  373. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -8
  374. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -8
  375. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -8
  376. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -8
  377. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -20
  378. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -8
  379. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -10
  380. data/app/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  381. data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +0 -10
  382. data/app/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  383. data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +0 -10
  384. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  385. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  386. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  387. data/app/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  388. data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  389. data/app/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  390. data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  391. data/app/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  392. data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  393. data/app/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  394. data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  395. data/app/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  396. data/app/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  397. data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  398. data/app/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  399. data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  400. data/app/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
  401. data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  402. data/app/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
  403. data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  404. data/app/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
  405. data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  406. data/app/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  407. data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  408. data/app/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  409. data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  410. data/app/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  411. data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  412. data/app/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  413. data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  414. data/app/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  415. data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  416. data/app/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  417. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  418. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  419. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  420. data/app/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  421. data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  422. data/app/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  423. data/app/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  424. data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  425. data/app/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  426. data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  427. data/app/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  428. data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -28
  429. data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -25
  430. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -66
  431. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  432. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -82
  433. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -74
  434. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -11
  435. data/app/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  436. data/app/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  437. data/app/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +0 -7
  438. data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  439. data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  440. data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +0 -18
  441. data/app/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +0 -280
  442. data/app/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +0 -77
  443. data/app/assets/javascripts/ckeditor/skins/moono/dialog.css +0 -5
  444. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +0 -5
  445. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +0 -5
  446. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +0 -5
  447. data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +0 -5
  448. data/app/assets/javascripts/ckeditor/skins/moono/editor.css +0 -5
  449. data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +0 -5
  450. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css +0 -5
  451. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +0 -5
  452. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +0 -5
  453. data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +0 -5
  454. data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  455. data/app/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  456. data/app/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  457. data/app/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  458. data/app/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  459. data/app/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  460. data/app/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  461. data/app/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  462. data/app/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  463. data/app/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  464. data/app/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  465. data/app/assets/javascripts/elfinder/Changelog +0 -494
  466. data/app/assets/javascripts/elfinder/LICENSE.md +0 -15
  467. data/app/assets/javascripts/elfinder/README.md +0 -209
  468. data/app/assets/javascripts/elfinder/bower.json +0 -28
  469. data/app/assets/javascripts/elfinder/composer.json +0 -39
  470. data/app/assets/javascripts/elfinder/css/elfinder.full.css +0 -3034
  471. data/app/assets/javascripts/elfinder/css/elfinder.min.css +0 -9
  472. data/app/assets/javascripts/elfinder/css/theme.css +0 -68
  473. data/app/assets/javascripts/elfinder/elfinder.html +0 -61
  474. data/app/assets/javascripts/elfinder/img/arrows-active.png +0 -0
  475. data/app/assets/javascripts/elfinder/img/arrows-normal.png +0 -0
  476. data/app/assets/javascripts/elfinder/img/crop.gif +0 -0
  477. data/app/assets/javascripts/elfinder/img/dialogs.png +0 -0
  478. data/app/assets/javascripts/elfinder/img/icons-big.png +0 -0
  479. data/app/assets/javascripts/elfinder/img/icons-small.png +0 -0
  480. data/app/assets/javascripts/elfinder/img/logo.png +0 -0
  481. data/app/assets/javascripts/elfinder/img/progress.gif +0 -0
  482. data/app/assets/javascripts/elfinder/img/quicklook-bg.png +0 -0
  483. data/app/assets/javascripts/elfinder/img/quicklook-icons.png +0 -0
  484. data/app/assets/javascripts/elfinder/img/resize.png +0 -0
  485. data/app/assets/javascripts/elfinder/img/spinner-mini.gif +0 -0
  486. data/app/assets/javascripts/elfinder/img/toolbar.png +0 -0
  487. data/app/assets/javascripts/elfinder/img/volume_icon_box.png +0 -0
  488. data/app/assets/javascripts/elfinder/img/volume_icon_dropbox.png +0 -0
  489. data/app/assets/javascripts/elfinder/img/volume_icon_ftp.png +0 -0
  490. data/app/assets/javascripts/elfinder/img/volume_icon_googledrive.png +0 -0
  491. data/app/assets/javascripts/elfinder/img/volume_icon_local.png +0 -0
  492. data/app/assets/javascripts/elfinder/img/volume_icon_onedrive.png +0 -0
  493. data/app/assets/javascripts/elfinder/img/volume_icon_sql.png +0 -0
  494. data/app/assets/javascripts/elfinder/js/elfinder.full.js +0 -23025
  495. data/app/assets/javascripts/elfinder/js/elfinder.min.js +0 -20
  496. data/app/assets/javascripts/elfinder/js/extras/encoding-japanese.min.js +0 -35
  497. data/app/assets/javascripts/elfinder/js/extras/quicklook.googledocs.js +0 -69
  498. data/app/assets/javascripts/elfinder/js/i18n/elfinder.LANG.js +0 -479
  499. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ar.js +0 -375
  500. data/app/assets/javascripts/elfinder/js/i18n/elfinder.bg.js +0 -412
  501. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ca.js +0 -375
  502. data/app/assets/javascripts/elfinder/js/i18n/elfinder.cs.js +0 -469
  503. data/app/assets/javascripts/elfinder/js/i18n/elfinder.da.js +0 -374
  504. data/app/assets/javascripts/elfinder/js/i18n/elfinder.de.js +0 -457
  505. data/app/assets/javascripts/elfinder/js/i18n/elfinder.el.js +0 -374
  506. data/app/assets/javascripts/elfinder/js/i18n/elfinder.es.js +0 -433
  507. data/app/assets/javascripts/elfinder/js/i18n/elfinder.fa.js +0 -374
  508. data/app/assets/javascripts/elfinder/js/i18n/elfinder.fallback.js +0 -11
  509. data/app/assets/javascripts/elfinder/js/i18n/elfinder.fo.js +0 -419
  510. data/app/assets/javascripts/elfinder/js/i18n/elfinder.fr.js +0 -419
  511. data/app/assets/javascripts/elfinder/js/i18n/elfinder.he.js +0 -375
  512. data/app/assets/javascripts/elfinder/js/i18n/elfinder.hr.js +0 -434
  513. data/app/assets/javascripts/elfinder/js/i18n/elfinder.hu.js +0 -447
  514. data/app/assets/javascripts/elfinder/js/i18n/elfinder.id.js +0 -373
  515. data/app/assets/javascripts/elfinder/js/i18n/elfinder.it.js +0 -448
  516. data/app/assets/javascripts/elfinder/js/i18n/elfinder.jp.js +0 -474
  517. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ko.js +0 -374
  518. data/app/assets/javascripts/elfinder/js/i18n/elfinder.nl.js +0 -419
  519. data/app/assets/javascripts/elfinder/js/i18n/elfinder.no.js +0 -374
  520. data/app/assets/javascripts/elfinder/js/i18n/elfinder.pl.js +0 -455
  521. data/app/assets/javascripts/elfinder/js/i18n/elfinder.pt_BR.js +0 -438
  522. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ro.js +0 -417
  523. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ru.js +0 -440
  524. data/app/assets/javascripts/elfinder/js/i18n/elfinder.sk.js +0 -469
  525. data/app/assets/javascripts/elfinder/js/i18n/elfinder.sl.js +0 -374
  526. data/app/assets/javascripts/elfinder/js/i18n/elfinder.sr.js +0 -374
  527. data/app/assets/javascripts/elfinder/js/i18n/elfinder.sv.js +0 -375
  528. data/app/assets/javascripts/elfinder/js/i18n/elfinder.tr.js +0 -468
  529. data/app/assets/javascripts/elfinder/js/i18n/elfinder.ug_CN.js +0 -374
  530. data/app/assets/javascripts/elfinder/js/i18n/elfinder.uk.js +0 -391
  531. data/app/assets/javascripts/elfinder/js/i18n/elfinder.vi.js +0 -374
  532. data/app/assets/javascripts/elfinder/js/i18n/elfinder.zh_CN.js +0 -467
  533. data/app/assets/javascripts/elfinder/js/i18n/elfinder.zh_TW.js +0 -472
  534. data/app/assets/javascripts/elfinder/js/proxy/elFinderSupportVer1.js +0 -420
  535. data/app/assets/javascripts/elfinder/main.default.js +0 -94
  536. data/app/assets/javascripts/elfinder/package.json +0 -13
  537. data/app/assets/javascripts/elfinder/sounds/rm.wav +0 -0
  538. data/config/initializers/load_patches.rb +0 -30
  539. data/config/routes.rb +0 -2
  540. data/lib/drg_default_html_editor.rb~ +0 -6
  541. data/lib/patches/drgcms_form_field.rb +0 -121
  542. data/lib/patches/patch_for_elfinder.rb +0 -115
  543. data/lib/tasks/drg_default_html_editor_copy_assets.rake +0 -18
@@ -1,43 +1,1286 @@
1
- /*
2
- Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.md or http://ckeditor.com/license
4
- */
5
- (function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(e,d);for(var a=[].concat(a),f=a.length,c,g=0;g<f;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(e,d)}s=0}}var e=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
6
- w=function(){var a=this.getValue(),b=this.getDialog(),d=a.match(k);d&&("%"==d[2]&&l(b,!1),a=d[1]);b.lockRatio&&(d=b.originalElement,"true"==d.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(d.$.width*(a/d.$.height))),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(d.$.height*(a/d.$.width))),isNaN(a)||b.setValueOf("info","txtHeight",a))));g(b)},g=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},s,l=function(a,
7
- b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var f=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,e=1E3*f/c;a.lockRatio=!1;!f&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(e)&&Math.round(d)==Math.round(e)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);f=CKEDITOR.document.getById(p);a.lockRatio?
8
- f.removeClass("cke_btn_unlocked"):f.addClass("cke_btn_unlocked");f.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&f.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),c=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);c&&c.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
9
- ("%"==d[2]&&(d[1]+="%",l(c,!1)),d[1]):b}if(a==e){var c=this.getDialog(),g="",h="txtWidth"==this.id?"width":"height",i=b.getAttribute(h);i&&(g=d(i,g));g=d(b.getStyle(h),g);this.setValue(g)}},t,q=function(){var a=this.originalElement;a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);CKEDITOR.document.getById(m).setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
10
- 0,this);this.dontResetSize=this.firstLoad=!1},h=function(){var a=this.originalElement;a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);CKEDITOR.document.getById(m).setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
11
- z=n("previewImage");return{title:c.lang.image["image"==j?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),d=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1);CKEDITOR.document.getById(m).setStyle("display","none");t=new CKEDITOR.dom.element("img",a.document);
12
- this.preview=CKEDITOR.document.getById(z);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(d){this.linkElement=d;this.linkEditMode=!0;var c=d.getChildren();if(1==c.count()){var g=c.getItem(0).getName();if("img"==g||"input"==g)this.imageElement=c.getItem(0),"img"==this.imageElement.getName()?this.imageEditMode="img":"input"==this.imageElement.getName()&&(this.imageEditMode="input")}"image"==j&&
13
- this.setupContent(2,d)}if(this.customImageElement)this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement;else if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(e,this.imageElement)):this.imageElement=a.document.createElement("img");
14
- l(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display","none"))},onOk:function(){if(this.imageEditMode){var a=this.imageEditMode;"image"==j&&"input"==a&&confirm(c.lang.image.button2Img)?(this.imageElement=c.document.createElement("img"),this.imageElement.setAttribute("alt",""),c.insertElement(this.imageElement)):"image"!=j&&"img"==a&&confirm(c.lang.image.img2Button)?(this.imageElement=c.document.createElement("input"),
15
- this.imageElement.setAttributes({type:"image",alt:""}),c.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==j?this.imageElement=c.document.createElement("img"):(this.imageElement=c.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=c.document.createElement("a"));this.commitContent(e,this.imageElement);this.commitContent(2,this.linkElement);
16
- this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(c.insertElement(this.linkElement),this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(c.getSelection().selectElement(this.linkElement),c.insertElement(this.imageElement)):this.addLink?this.linkEditMode?c.insertElement(this.imageElement):(c.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):c.insertElement(this.imageElement)},
17
- onLoad:function(){"image"!=j&&this.hidePage("Link");var a=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(a.getById(u),5),this.addFocusable(a.getById(p),5));this.commitContent=r},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",q),this.originalElement.removeListener("error",h),this.originalElement.removeListener("abort",h),this.originalElement.remove(),this.originalElement=
18
- !1);delete this.imageElement},contents:[{id:"info",label:c.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"txtUrl",type:"text",label:c.lang.common.url,required:!0,onChange:function(){var a=this.getDialog(),b=this.getValue();if(0<b.length){var a=this.getDialog(),d=a.originalElement;a.preview.removeStyle("display");d.setCustomData("isReady","false");var c=CKEDITOR.document.getById(m);c&&c.setStyle("display",
19
- "");d.on("load",q,a);d.on("error",h,a);d.on("abort",h,a);d.setAttribute("src",b);t.setAttribute("src",b);a.preview.setAttribute("src",t.$.src);g(a)}else a.preview&&(a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(a==e){var d=b.data("cke-saved-src")||b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(d);this.setInitValue()}},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",
20
- this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(c.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:14px;",align:"center",label:c.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:c.lang.image.alt,accessKey:"T","default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==e&&this.setValue(b.getAttribute("alt"))},commit:function(a,
21
- b){a==e?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:c.lang.common.width,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);
22
- (a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidWidth);return a},setup:y,commit:function(a,b,d){var f=this.getValue();a==e?(f&&c.activeFilter.check("img{width,height}")?b.setStyle("width",CKEDITOR.tools.cssLength(f)):b.removeStyle("width"),!d&&b.removeAttribute("width")):4==a?f.match(k)?b.setStyle("width",CKEDITOR.tools.cssLength(f)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("width",a.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},
23
- {type:"text",id:"txtHeight",width:"45px",label:c.lang.common.height,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidHeight);return a},setup:y,commit:function(a,b,d){var f=this.getValue();a==e?(f&&c.activeFilter.check("img{width,height}")?b.setStyle("height",CKEDITOR.tools.cssLength(f)):b.removeStyle("height"),!d&&b.removeAttribute("height")):4==a?f.match(k)?b.setStyle("height",
24
- CKEDITOR.tools.cssLength(f)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("height",a.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(u),b=CKEDITOR.document.getById(p);a&&(a.on("click",function(a){x(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},
25
- a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},a));b&&(b.on("click",function(a){l(this);var b=this.originalElement,c=this.getValueOf("info","txtWidth");if(b.getCustomData("isReady")=="true"&&c){b=b.$.height/b.$.width*c;if(!isNaN(b)){this.setValueOf("info","txtHeight",Math.round(b));g(this)}}a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+
26
- c.lang.image.lockRatio+'" class="cke_btn_locked" id="'+p+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+c.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.resetSize+'" class="cke_btn_reset" id="'+u+'" role="button"><span class="cke_label">'+c.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:c.lang.image.border,"default":"",
27
- onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateBorder),setup:function(a,b){if(a==e){var d;d=(d=(d=b.getStyle("border-width"))&&d.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(d[1],10);isNaN(parseInt(d,10))&&(d=b.getAttribute("border"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==e||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",
28
- CKEDITOR.tools.cssLength(c)),b.setStyle("border-style","solid")),!d&&a==e&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:c.lang.image.hSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateHSpace),
29
- setup:function(a,b){if(a==e){var d,c;d=b.getStyle("margin-left");c=b.getStyle("margin-right");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;isNaN(parseInt(d,10))&&(d=b.getAttribute("hspace"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==e||4==a?(isNaN(c)?!c&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(c)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(c))),
30
- !d&&a==e&&b.removeAttribute("hspace")):8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:c.lang.image.vSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateVSpace),setup:function(a,b){if(a==e){var d,c;d=b.getStyle("margin-top");c=
31
- b.getStyle("margin-bottom");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;isNaN(parseInt(d,10))&&(d=b.getAttribute("vspace"));this.setValue(d)}},commit:function(a,b,c){var f=parseInt(this.getValue(),10);a==e||4==a?(isNaN(f)?!f&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(f)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(f))),!c&&a==e&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),
32
- b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",label:c.lang.common.align,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.alignLeft,"left"],[c.lang.common.alignRight,"right"]],onChange:function(){g(this.getDialog());i.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(a==e){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||
33
- "").toLowerCase());this.setValue(c)}},commit:function(a,b,c){var f=this.getValue();if(a==e||4==a){if(f?b.setStyle("float",f):b.removeStyle("float"),!c&&a==e)switch(f=(b.getAttribute("align")||"").toLowerCase(),f){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(c.lang.common.preview)+'<br><div id="'+m+'" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+
34
- A+'"><img id="'+z+'" alt="" /></a>'+(c.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+
35
- "</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:c.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:c.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var d=this.getValue();b.data("cke-saved-href",d);b.setAttribute("href",d);if(this.getValue()||!c.config.image_removeLinkByEmptyURL)this.getDialog().addLink=
36
- !0}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:c.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:c.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:c.lang.common.target,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.targetNew,"_blank"],[c.lang.common.targetTop,"_top"],[c.lang.common.targetSelf,"_self"],[c.lang.common.targetParent,"_parent"]],setup:function(a,b){2==a&&this.setValue(b.getAttribute("target")||
37
- "")},commit:function(a,b){2==a&&(this.getValue()||this.isChanged())&&b.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:c.lang.image.upload,elements:[{type:"file",id:"upload",label:c.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:c.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:c.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],
38
- children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:c.lang.common.id,setup:function(a,b){a==e&&this.setValue(b.getAttribute("id"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:c.lang.common.langDir,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.langDirLtr,"ltr"],[c.lang.common.langDirRtl,"rtl"]],setup:function(a,b){a==e&&this.setValue(b.getAttribute("dir"))},
39
- commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:c.lang.common.langCode,"default":"",setup:function(a,b){a==e&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:c.lang.common.longDescr,setup:function(a,b){a==e&&this.setValue(b.getAttribute("longDesc"))},
40
- commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:c.lang.common.cssClass,"default":"",setup:function(a,b){a==e&&this.setValue(b.getAttribute("class"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:c.lang.common.advisoryTitle,
41
- "default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==e&&this.setValue(b.getAttribute("title"))},commit:function(a,b){a==e?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:c.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),"default":"",setup:function(a,
42
- b){if(a==e){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var f=b.$.style.height,c=b.$.style.width,f=(f?f:"").match(k),c=(c?c:"").match(k);this.attributesInStyle={height:!!f,width:!!c}}},onChange:function(){i.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));g(this)},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};
43
- CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
1
+ /**
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ ( function() {
7
+ var imageDialog = function( editor, dialogType ) {
8
+ // Load image preview.
9
+ var IMAGE = 1,
10
+ LINK = 2,
11
+ PREVIEW = 4,
12
+ CLEANUP = 8,
13
+ regexGetSize = /^\s*(\d+)((px)|\%)?\s*$/i,
14
+ regexGetSizeOrEmpty = /(^\s*(\d+)((px)|\%)?\s*$)|^$/i,
15
+ pxLengthRegex = /^\d+px$/;
16
+
17
+ var onSizeChange = function() {
18
+ var value = this.getValue(),
19
+ // This = input element.
20
+ dialog = this.getDialog(),
21
+ aMatch = value.match( regexGetSize ); // Check value
22
+ if ( aMatch ) {
23
+ if ( aMatch[ 2 ] == '%' ) // % is allowed - > unlock ratio.
24
+ switchLockRatio( dialog, false ); // Unlock.
25
+ value = aMatch[ 1 ];
26
+ }
27
+
28
+ // Only if ratio is locked
29
+ if ( dialog.lockRatio ) {
30
+ var oImageOriginal = dialog.originalElement;
31
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' ) {
32
+ if ( this.id == 'txtHeight' ) {
33
+ if ( value && value != '0' )
34
+ value = Math.round( oImageOriginal.$.width * ( value / oImageOriginal.$.height ) );
35
+ if ( !isNaN( value ) )
36
+ dialog.setValueOf( 'info', 'txtWidth', value );
37
+ }
38
+ // this.id = txtWidth.
39
+ else {
40
+ if ( value && value != '0' )
41
+ value = Math.round( oImageOriginal.$.height * ( value / oImageOriginal.$.width ) );
42
+ if ( !isNaN( value ) )
43
+ dialog.setValueOf( 'info', 'txtHeight', value );
44
+ }
45
+ }
46
+ }
47
+ updatePreview( dialog );
48
+ };
49
+
50
+ var updatePreview = function( dialog ) {
51
+ //Don't load before onShow.
52
+ if ( !dialog.originalElement || !dialog.preview )
53
+ return 1;
54
+
55
+ // Read attributes and update imagePreview;
56
+ dialog.commitContent( PREVIEW, dialog.preview );
57
+ return 0;
58
+ };
59
+
60
+ // Custom commit dialog logic, where we're intended to give inline style
61
+ // field (txtdlgGenStyle) higher priority to avoid overwriting styles contribute
62
+ // by other fields.
63
+ function commitContent() {
64
+ var args = arguments;
65
+ var inlineStyleField = this.getContentElement( 'advanced', 'txtdlgGenStyle' );
66
+ inlineStyleField && inlineStyleField.commit.apply( inlineStyleField, args );
67
+
68
+ this.foreach( function( widget ) {
69
+ if ( widget.commit && widget.id != 'txtdlgGenStyle' )
70
+ widget.commit.apply( widget, args );
71
+ } );
72
+ }
73
+
74
+ // Avoid recursions.
75
+ var incommit;
76
+
77
+ // Synchronous field values to other impacted fields is required, e.g. border
78
+ // size change should alter inline-style text as well.
79
+ function commitInternally( targetFields ) {
80
+ if ( incommit )
81
+ return;
82
+
83
+ incommit = 1;
84
+
85
+ var dialog = this.getDialog(),
86
+ element = dialog.imageElement;
87
+ if ( element ) {
88
+ // Commit this field and broadcast to target fields.
89
+ this.commit( IMAGE, element );
90
+
91
+ targetFields = [].concat( targetFields );
92
+ var length = targetFields.length,
93
+ field;
94
+ for ( var i = 0; i < length; i++ ) {
95
+ field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) );
96
+ // May cause recursion.
97
+ field && field.setup( IMAGE, element );
98
+ }
99
+ }
100
+
101
+ incommit = 0;
102
+ }
103
+
104
+ var switchLockRatio = function( dialog, value ) {
105
+ if ( !dialog.getContentElement( 'info', 'ratioLock' ) )
106
+ return null;
107
+
108
+ var oImageOriginal = dialog.originalElement;
109
+
110
+ // Dialog may already closed. (https://dev.ckeditor.com/ticket/5505)
111
+ if ( !oImageOriginal )
112
+ return null;
113
+
114
+ // Check image ratio and original image ratio, but respecting user's preference.
115
+ if ( value == 'check' ) {
116
+ if ( !dialog.userlockRatio && oImageOriginal.getCustomData( 'isReady' ) == 'true' ) {
117
+ var width = dialog.getValueOf( 'info', 'txtWidth' ),
118
+ height = dialog.getValueOf( 'info', 'txtHeight' ),
119
+ originalRatio = oImageOriginal.$.width / oImageOriginal.$.height,
120
+ thisRatio = width / height;
121
+
122
+ dialog.lockRatio = false; // Default: unlock ratio
123
+
124
+ if ( !width && !height ) {
125
+ dialog.lockRatio = true;
126
+ } else {
127
+ // Round ratio to two decimal places so ratio locking will be less precise (#2254).
128
+ var ratioComparison = Math.round( ( originalRatio / thisRatio ) * 100 ) / 100;
129
+
130
+ if ( ratioComparison == 1 ) {
131
+ dialog.lockRatio = true;
132
+ }
133
+ }
134
+ }
135
+ } else if ( value !== undefined ) {
136
+ dialog.lockRatio = value;
137
+ } else {
138
+ dialog.userlockRatio = 1;
139
+ dialog.lockRatio = !dialog.lockRatio;
140
+ }
141
+
142
+ var ratioButton = CKEDITOR.document.getById( btnLockSizesId );
143
+ if ( dialog.lockRatio )
144
+ ratioButton.removeClass( 'cke_btn_unlocked' );
145
+ else
146
+ ratioButton.addClass( 'cke_btn_unlocked' );
147
+
148
+ ratioButton.setAttribute( 'aria-checked', dialog.lockRatio );
149
+
150
+ // Ratio button hc presentation - WHITE SQUARE / BLACK SQUARE
151
+ if ( CKEDITOR.env.hc ) {
152
+ var icon = ratioButton.getChild( 0 );
153
+ icon.setHtml( dialog.lockRatio ? CKEDITOR.env.ie ? '\u25A0' : '\u25A3' : CKEDITOR.env.ie ? '\u25A1' : '\u25A2' );
154
+ }
155
+
156
+ return dialog.lockRatio;
157
+ };
158
+
159
+ var resetSize = function( dialog, emptyValues ) {
160
+ var oImageOriginal = dialog.originalElement,
161
+ ready = oImageOriginal.getCustomData( 'isReady' ) == 'true';
162
+
163
+ if ( ready ) {
164
+ var widthField = dialog.getContentElement( 'info', 'txtWidth' ),
165
+ heightField = dialog.getContentElement( 'info', 'txtHeight' ),
166
+ widthValue, heightValue;
167
+
168
+ if ( emptyValues ) {
169
+ widthValue = 0;
170
+ heightValue = 0;
171
+ } else {
172
+ widthValue = oImageOriginal.$.width;
173
+ heightValue = oImageOriginal.$.height;
174
+ }
175
+
176
+ widthField && widthField.setValue( widthValue );
177
+ heightField && heightField.setValue( heightValue );
178
+ }
179
+ updatePreview( dialog );
180
+ };
181
+
182
+ var setupDimension = function( type, element ) {
183
+ if ( type != IMAGE )
184
+ return;
185
+
186
+ function checkDimension( size, defaultValue ) {
187
+ var aMatch = size.match( regexGetSize );
188
+ if ( aMatch ) {
189
+ // % is allowed.
190
+ if ( aMatch[ 2 ] == '%' ) {
191
+ aMatch[ 1 ] += '%';
192
+ switchLockRatio( dialog, false ); // Unlock ratio
193
+ }
194
+ return aMatch[ 1 ];
195
+ }
196
+ return defaultValue;
197
+ }
198
+
199
+ var dialog = this.getDialog(),
200
+ value = '',
201
+ dimension = this.id == 'txtWidth' ? 'width' : 'height',
202
+ size = element.getAttribute( dimension );
203
+
204
+ if ( size )
205
+ value = checkDimension( size, value );
206
+ value = checkDimension( element.getStyle( dimension ), value );
207
+
208
+ this.setValue( value );
209
+ };
210
+
211
+ var previewPreloader;
212
+
213
+ var onImgLoadEvent = function() {
214
+ // Image is ready.
215
+ var original = this.originalElement,
216
+ loader = CKEDITOR.document.getById( imagePreviewLoaderId );
217
+
218
+ original.setCustomData( 'isReady', 'true' );
219
+ original.removeListener( 'load', onImgLoadEvent );
220
+ original.removeListener( 'error', onImgLoadErrorEvent );
221
+ original.removeListener( 'abort', onImgLoadErrorEvent );
222
+
223
+ // Hide loader.
224
+ if ( loader )
225
+ loader.setStyle( 'display', 'none' );
226
+
227
+ // New image -> new dimensions
228
+ if ( !this.dontResetSize ) {
229
+ resetSize( this, editor.config.image_prefillDimensions === false );
230
+ }
231
+
232
+ if ( this.firstLoad ) {
233
+ CKEDITOR.tools.setTimeout( function() {
234
+ switchLockRatio( this, 'check' );
235
+ }, 0, this );
236
+ }
237
+
238
+ this.firstLoad = false;
239
+ this.dontResetSize = false;
240
+
241
+ // Possible fix for https://dev.ckeditor.com/ticket/12818.
242
+ updatePreview( this );
243
+ };
244
+
245
+ var onImgLoadErrorEvent = function() {
246
+ // Error. Image is not loaded.
247
+ var original = this.originalElement,
248
+ loader = CKEDITOR.document.getById( imagePreviewLoaderId );
249
+
250
+ original.removeListener( 'load', onImgLoadEvent );
251
+ original.removeListener( 'error', onImgLoadErrorEvent );
252
+ original.removeListener( 'abort', onImgLoadErrorEvent );
253
+
254
+ // Set Error image.
255
+ var noimage = CKEDITOR.getUrl( CKEDITOR.plugins.get( 'image' ).path + 'images/noimage.png' );
256
+
257
+ if ( this.preview )
258
+ this.preview.setAttribute( 'src', noimage );
259
+
260
+ // Hide loader.
261
+ if ( loader )
262
+ loader.setStyle( 'display', 'none' );
263
+
264
+ switchLockRatio( this, false ); // Unlock.
265
+ };
266
+
267
+ var numbering = function( id ) {
268
+ return CKEDITOR.tools.getNextId() + '_' + id;
269
+ },
270
+ btnLockSizesId = numbering( 'btnLockSizes' ),
271
+ btnResetSizeId = numbering( 'btnResetSize' ),
272
+ imagePreviewLoaderId = numbering( 'ImagePreviewLoader' ),
273
+ previewLinkId = numbering( 'previewLink' ),
274
+ previewImageId = numbering( 'previewImage' );
275
+
276
+ return {
277
+ title: editor.lang.image[ dialogType == 'image' ? 'title' : 'titleButton' ],
278
+ minWidth: ( CKEDITOR.skinName || editor.config.skin ) == 'moono-lisa' ? 500 : 420,
279
+ minHeight: 360,
280
+ getModel: function( editor ) {
281
+ var element = editor.getSelection().getSelectedElement(),
282
+ isImage = element && element.getName() === 'img',
283
+ isImageInput = element && element.getName() === 'input' &&
284
+ element.getAttribute( 'type' ) === 'image';
285
+
286
+ if ( isImage ||isImageInput ) {
287
+ return element;
288
+ }
289
+
290
+ return null;
291
+ },
292
+ onShow: function() {
293
+ this.imageElement = false;
294
+ this.linkElement = false;
295
+
296
+ // Default: create a new element.
297
+ this.imageEditMode = false;
298
+ this.linkEditMode = false;
299
+
300
+ this.lockRatio = true;
301
+ this.userlockRatio = 0;
302
+ this.dontResetSize = false;
303
+ this.firstLoad = true;
304
+ this.addLink = false;
305
+
306
+ var editor = this.getParentEditor(),
307
+ sel = editor.getSelection(),
308
+ element = sel && sel.getSelectedElement(),
309
+ link = element && editor.elementPath( element ).contains( 'a', 1 ),
310
+ loader = CKEDITOR.document.getById( imagePreviewLoaderId );
311
+
312
+ // Hide loader.
313
+ if ( loader )
314
+ loader.setStyle( 'display', 'none' );
315
+
316
+ // Create the preview before setup the dialog contents.
317
+ previewPreloader = new CKEDITOR.dom.element( 'img', editor.document );
318
+ this.preview = CKEDITOR.document.getById( previewImageId );
319
+
320
+ // Copy of the image
321
+ this.originalElement = editor.document.createElement( 'img' );
322
+ this.originalElement.setAttribute( 'alt', '' );
323
+ this.originalElement.setCustomData( 'isReady', 'false' );
324
+
325
+ if ( link ) {
326
+ this.linkElement = link;
327
+ this.linkEditMode = true;
328
+
329
+ // If there is an existing link, by default keep it (true).
330
+ // It will be removed if certain conditions are met and Link tab is enabled. (https://dev.ckeditor.com/ticket/13351)
331
+ this.addLink = true;
332
+
333
+ // Look for Image element.
334
+ var linkChildren = link.getChildren();
335
+ if ( linkChildren.count() == 1 ) {
336
+ var childTag = linkChildren.getItem( 0 );
337
+
338
+ if ( childTag.type == CKEDITOR.NODE_ELEMENT ) {
339
+ if ( childTag.is( 'img' ) || childTag.is( 'input' ) ) {
340
+ this.imageElement = linkChildren.getItem( 0 );
341
+ if ( this.imageElement.is( 'img' ) )
342
+ this.imageEditMode = 'img';
343
+ else if ( this.imageElement.is( 'input' ) )
344
+ this.imageEditMode = 'input';
345
+ }
346
+ }
347
+ }
348
+ // Fill out all fields.
349
+ if ( dialogType == 'image' )
350
+ this.setupContent( LINK, link );
351
+ }
352
+
353
+ // Edit given image element instead the one from selection.
354
+ if ( this.customImageElement ) {
355
+ this.imageEditMode = 'img';
356
+ this.imageElement = this.customImageElement;
357
+ delete this.customImageElement;
358
+ }
359
+ else if ( element && element.getName() == 'img' && !element.data( 'cke-realelement' ) ||
360
+ element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'image' ) {
361
+ this.imageEditMode = element.getName();
362
+ this.imageElement = element;
363
+ }
364
+
365
+ if ( this.imageEditMode ) {
366
+ // Use the original element as a buffer from since we don't want
367
+ // temporary changes to be committed, e.g. if the dialog is canceled.
368
+ this.cleanImageElement = this.imageElement;
369
+ this.imageElement = this.cleanImageElement.clone( true, true );
370
+
371
+ // Fill out all fields.
372
+ this.setupContent( IMAGE, this.imageElement );
373
+ }
374
+
375
+ // Refresh LockRatio button
376
+ switchLockRatio( this, true );
377
+
378
+ // Dont show preview if no URL given.
379
+ if ( !CKEDITOR.tools.trim( this.getValueOf( 'info', 'txtUrl' ) ) ) {
380
+ this.preview.removeAttribute( 'src' );
381
+ this.preview.setStyle( 'display', 'none' );
382
+ }
383
+ },
384
+ onOk: function() {
385
+ // Edit existing Image.
386
+ if ( this.imageEditMode ) {
387
+ var imgTagName = this.imageEditMode;
388
+
389
+ // Image dialog and Input element.
390
+ if ( dialogType == 'image' && imgTagName == 'input' && confirm( editor.lang.image.button2Img ) ) { // jshint ignore:line
391
+ // Replace INPUT-> IMG
392
+ imgTagName = 'img';
393
+ this.imageElement = editor.document.createElement( 'img' );
394
+ this.imageElement.setAttribute( 'alt', '' );
395
+ editor.insertElement( this.imageElement );
396
+ }
397
+ // ImageButton dialog and Image element.
398
+ else if ( dialogType != 'image' && imgTagName == 'img' && confirm( editor.lang.image.img2Button ) ) { // jshint ignore:line
399
+ // Replace IMG -> INPUT
400
+ imgTagName = 'input';
401
+ this.imageElement = editor.document.createElement( 'input' );
402
+ this.imageElement.setAttributes( {
403
+ type: 'image',
404
+ alt: ''
405
+ } );
406
+ editor.insertElement( this.imageElement );
407
+ } else {
408
+ // Restore the original element before all commits.
409
+ this.imageElement = this.cleanImageElement;
410
+ delete this.cleanImageElement;
411
+ }
412
+ }
413
+ // Create a new image.
414
+ else {
415
+ // Image dialog -> create IMG element.
416
+ if ( dialogType == 'image' )
417
+ this.imageElement = editor.document.createElement( 'img' );
418
+ else {
419
+ this.imageElement = editor.document.createElement( 'input' );
420
+ this.imageElement.setAttribute( 'type', 'image' );
421
+ }
422
+ this.imageElement.setAttribute( 'alt', '' );
423
+ }
424
+
425
+ // Create a new link.
426
+ if ( !this.linkEditMode )
427
+ this.linkElement = editor.document.createElement( 'a' );
428
+
429
+ // Set attributes.
430
+ this.commitContent( IMAGE, this.imageElement );
431
+ this.commitContent( LINK, this.linkElement );
432
+
433
+ // Remove empty style attribute.
434
+ if ( !this.imageElement.getAttribute( 'style' ) )
435
+ this.imageElement.removeAttribute( 'style' );
436
+
437
+ // Insert a new Image.
438
+ if ( !this.imageEditMode ) {
439
+ if ( this.addLink ) {
440
+ if ( !this.linkEditMode ) {
441
+ // Insert a new link.
442
+ editor.insertElement( this.linkElement );
443
+ this.linkElement.append( this.imageElement, false );
444
+ } else {
445
+ // We already have a link in editor.
446
+ if ( this.linkElement.equals( editor.getSelection().getSelectedElement() ) ) {
447
+ // If the link is selected outside, replace it's content rather than the link itself. ([<a>foo</a>])
448
+ this.linkElement.setHtml( '' );
449
+ this.linkElement.append( this.imageElement, false );
450
+ } else {
451
+ // Only inside of the link is selected, so replace it with image. (<a>[foo]</a>, <a>[f]oo</a>)
452
+ editor.insertElement( this.imageElement );
453
+ }
454
+ }
455
+ } else {
456
+ editor.insertElement( this.imageElement );
457
+ }
458
+ }
459
+ // Image already exists.
460
+ else {
461
+ // Add a new link element.
462
+ if ( !this.linkEditMode && this.addLink ) {
463
+ editor.insertElement( this.linkElement );
464
+ this.imageElement.appendTo( this.linkElement );
465
+ }
466
+ // Remove Link, Image exists.
467
+ else if ( this.linkEditMode && !this.addLink ) {
468
+ editor.getSelection().selectElement( this.linkElement );
469
+ editor.insertElement( this.imageElement );
470
+ }
471
+ }
472
+ },
473
+ onLoad: function() {
474
+ if ( dialogType != 'image' )
475
+ this.hidePage( 'Link' ); //Hide Link tab.
476
+ var doc = this._.element.getDocument();
477
+
478
+ if ( this.getContentElement( 'info', 'ratioLock' ) ) {
479
+ this.addFocusable( doc.getById( btnResetSizeId ), 5 );
480
+ this.addFocusable( doc.getById( btnLockSizesId ), 5 );
481
+ }
482
+
483
+ this.commitContent = commitContent;
484
+ },
485
+ onHide: function() {
486
+ if ( this.preview )
487
+ this.commitContent( CLEANUP, this.preview );
488
+
489
+ if ( this.originalElement ) {
490
+ this.originalElement.removeListener( 'load', onImgLoadEvent );
491
+ this.originalElement.removeListener( 'error', onImgLoadErrorEvent );
492
+ this.originalElement.removeListener( 'abort', onImgLoadErrorEvent );
493
+ this.originalElement.remove();
494
+ this.originalElement = false; // Dialog is closed.
495
+ }
496
+
497
+ delete this.imageElement;
498
+ },
499
+ contents: [ {
500
+ id: 'info',
501
+ label: editor.lang.image.infoTab,
502
+ accessKey: 'I',
503
+ elements: [ {
504
+ type: 'vbox',
505
+ padding: 0,
506
+ children: [ {
507
+ type: 'hbox',
508
+ widths: [ '280px', '110px' ],
509
+ align: 'right',
510
+ className: 'cke_dialog_image_url',
511
+ children: [ {
512
+ id: 'txtUrl',
513
+ type: 'text',
514
+ label: editor.lang.common.url,
515
+ required: true,
516
+ onChange: function() {
517
+ var dialog = this.getDialog(),
518
+ newUrl = this.getValue();
519
+
520
+ // Update original image.
521
+ // Prevent from load before onShow.
522
+ if ( newUrl.length > 0 ) {
523
+ dialog = this.getDialog();
524
+ var original = dialog.originalElement;
525
+
526
+ if ( dialog.preview ) {
527
+ dialog.preview.removeStyle( 'display' );
528
+ }
529
+
530
+ original.setCustomData( 'isReady', 'false' );
531
+ // Show loader.
532
+ var loader = CKEDITOR.document.getById( imagePreviewLoaderId );
533
+ if ( loader )
534
+ loader.setStyle( 'display', '' );
535
+
536
+ original.on( 'load', onImgLoadEvent, dialog );
537
+ original.on( 'error', onImgLoadErrorEvent, dialog );
538
+ original.on( 'abort', onImgLoadErrorEvent, dialog );
539
+ original.setAttribute( 'src', newUrl );
540
+
541
+ if ( dialog.preview ) {
542
+ // Query the preloader to figure out the url impacted by based href.
543
+ previewPreloader.setAttribute( 'src', newUrl );
544
+ dialog.preview.setAttribute( 'src', previewPreloader.$.src );
545
+ updatePreview( dialog );
546
+ }
547
+ }
548
+ // Dont show preview if no URL given.
549
+ else if ( dialog.preview ) {
550
+ dialog.preview.removeAttribute( 'src' );
551
+ dialog.preview.setStyle( 'display', 'none' );
552
+ }
553
+ },
554
+ setup: function( type, element ) {
555
+ if ( type == IMAGE ) {
556
+ var url = element.data( 'cke-saved-src' ) || element.getAttribute( 'src' );
557
+ var field = this;
558
+
559
+ this.getDialog().dontResetSize = true;
560
+
561
+ field.setValue( url ); // And call this.onChange()
562
+ // Manually set the initial value.(https://dev.ckeditor.com/ticket/4191)
563
+ field.setInitValue();
564
+ }
565
+ },
566
+ commit: function( type, element ) {
567
+ if ( type == IMAGE && ( this.getValue() || this.isChanged() ) ) {
568
+ element.data( 'cke-saved-src', this.getValue() );
569
+ element.setAttribute( 'src', this.getValue() );
570
+ } else if ( type == CLEANUP ) {
571
+ element.setAttribute( 'src', '' ); // If removeAttribute doesn't work.
572
+ element.removeAttribute( 'src' );
573
+ }
574
+ },
575
+ validate: CKEDITOR.dialog.validate.notEmpty( editor.lang.image.urlMissing )
576
+ },
577
+ {
578
+ type: 'button',
579
+ id: 'browse',
580
+ // v-align with the 'txtUrl' field.
581
+ // TODO: We need something better than a fixed size here.
582
+ style: 'display:inline-block;margin-top:14px;',
583
+ align: 'center',
584
+ label: editor.lang.common.browseServer,
585
+ hidden: true,
586
+ filebrowser: 'info:txtUrl',
587
+ } ]
588
+ } ]
589
+ },
590
+ // By Rems
591
+ {
592
+ id: 'browse2',
593
+ type: 'button',
594
+ style: "background-color:#75cc9a;color:#fff;float:right;",
595
+ align: 'center',
596
+ label: editor.lang.common.browseServer + ' - ' + editor.lang.common.advancedTab,
597
+ hidden: true,
598
+ filebrowser: {
599
+ action: 'Browse',
600
+ target: 'info:txtUrl',
601
+ url: '/cmsedit?field_name=record_picture&form_name=dc_image_search&table=dc_image'
602
+ }
603
+ },
604
+
605
+ {
606
+ id: 'txtAlt',
607
+ type: 'text',
608
+ label: editor.lang.image.alt,
609
+ accessKey: 'T',
610
+ 'default': '',
611
+ onChange: function() {
612
+ updatePreview( this.getDialog() );
613
+ },
614
+ setup: function( type, element ) {
615
+ if ( type == IMAGE )
616
+ this.setValue( element.getAttribute( 'alt' ) );
617
+ },
618
+ commit: function( type, element ) {
619
+ if ( type == IMAGE ) {
620
+ if ( this.getValue() || this.isChanged() )
621
+ element.setAttribute( 'alt', this.getValue() );
622
+ } else if ( type == PREVIEW )
623
+ element.setAttribute( 'alt', this.getValue() );
624
+ else if ( type == CLEANUP ) {
625
+ element.removeAttribute( 'alt' );
626
+ }
627
+
628
+ }
629
+ },
630
+ {
631
+ type: 'hbox',
632
+ children: [ {
633
+ id: 'basic',
634
+ type: 'vbox',
635
+ children: [ {
636
+ type: 'hbox',
637
+ requiredContent: 'img{width,height}',
638
+ widths: [ '50%', '50%' ],
639
+ children: [ {
640
+ type: 'vbox',
641
+ padding: 1,
642
+ children: [ {
643
+ type: 'text',
644
+ width: '45px',
645
+ id: 'txtWidth',
646
+ label: editor.lang.common.width,
647
+ onKeyUp: onSizeChange,
648
+ onChange: function() {
649
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
650
+ },
651
+ validate: function() {
652
+ var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
653
+ isValid = !!( aMatch && parseInt( aMatch[ 1 ], 10 ) !== 0 );
654
+ if ( !isValid )
655
+ alert( editor.lang.common.invalidLength.replace( '%1', editor.lang.common.width ).replace( '%2', 'px, %' ) ); // jshint ignore:line
656
+ return isValid;
657
+ },
658
+ setup: setupDimension,
659
+ commit: function( type, element ) {
660
+ var value = this.getValue();
661
+ if ( type == IMAGE ) {
662
+ if ( value && editor.activeFilter.check( 'img{width,height}' ) )
663
+ element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
664
+ else
665
+ element.removeStyle( 'width' );
666
+
667
+ element.removeAttribute( 'width' );
668
+ } else if ( type == PREVIEW ) {
669
+ var aMatch = value.match( regexGetSize );
670
+ if ( !aMatch ) {
671
+ var oImageOriginal = this.getDialog().originalElement;
672
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
673
+ element.setStyle( 'width', oImageOriginal.$.width + 'px' );
674
+ } else {
675
+ element.setStyle( 'width', CKEDITOR.tools.cssLength( value ) );
676
+ }
677
+ } else if ( type == CLEANUP ) {
678
+ element.removeAttribute( 'width' );
679
+ element.removeStyle( 'width' );
680
+ }
681
+ }
682
+ },
683
+ {
684
+ type: 'text',
685
+ id: 'txtHeight',
686
+ width: '45px',
687
+ label: editor.lang.common.height,
688
+ onKeyUp: onSizeChange,
689
+ onChange: function() {
690
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
691
+ },
692
+ validate: function() {
693
+ var aMatch = this.getValue().match( regexGetSizeOrEmpty ),
694
+ isValid = !!( aMatch && parseInt( aMatch[ 1 ], 10 ) !== 0 );
695
+ if ( !isValid )
696
+ alert( editor.lang.common.invalidLength.replace( '%1', editor.lang.common.height ).replace( '%2', 'px, %' ) ); // jshint ignore:line
697
+ return isValid;
698
+ },
699
+ setup: setupDimension,
700
+ commit: function( type, element ) {
701
+ var value = this.getValue();
702
+ if ( type == IMAGE ) {
703
+ if ( value && editor.activeFilter.check( 'img{width,height}' ) )
704
+ element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
705
+ else
706
+ element.removeStyle( 'height' );
707
+
708
+ element.removeAttribute( 'height' );
709
+ } else if ( type == PREVIEW ) {
710
+ var aMatch = value.match( regexGetSize );
711
+ if ( !aMatch ) {
712
+ var oImageOriginal = this.getDialog().originalElement;
713
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
714
+ element.setStyle( 'height', oImageOriginal.$.height + 'px' );
715
+ } else {
716
+ element.setStyle( 'height', CKEDITOR.tools.cssLength( value ) );
717
+ }
718
+ } else if ( type == CLEANUP ) {
719
+ element.removeAttribute( 'height' );
720
+ element.removeStyle( 'height' );
721
+ }
722
+ }
723
+ } ]
724
+ },
725
+ {
726
+ id: 'ratioLock',
727
+ type: 'html',
728
+ className: 'cke_dialog_image_ratiolock',
729
+ style: 'margin-top:30px;width:40px;height:40px;',
730
+ onLoad: function() {
731
+ // Activate Reset button
732
+ var resetButton = CKEDITOR.document.getById( btnResetSizeId ),
733
+ ratioButton = CKEDITOR.document.getById( btnLockSizesId );
734
+ if ( resetButton ) {
735
+ resetButton.on( 'click', function( evt ) {
736
+ resetSize( this );
737
+ evt.data && evt.data.preventDefault();
738
+ }, this.getDialog() );
739
+ resetButton.on( 'mouseover', function() {
740
+ this.addClass( 'cke_btn_over' );
741
+ }, resetButton );
742
+ resetButton.on( 'mouseout', function() {
743
+ this.removeClass( 'cke_btn_over' );
744
+ }, resetButton );
745
+ }
746
+ // Activate (Un)LockRatio button
747
+ if ( ratioButton ) {
748
+ ratioButton.on( 'click', function( evt ) {
749
+ switchLockRatio( this );
750
+
751
+ var oImageOriginal = this.originalElement,
752
+ width = this.getValueOf( 'info', 'txtWidth' );
753
+
754
+ if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' && width ) {
755
+ var height = oImageOriginal.$.height / oImageOriginal.$.width * width;
756
+ if ( !isNaN( height ) ) {
757
+ this.setValueOf( 'info', 'txtHeight', Math.round( height ) );
758
+ updatePreview( this );
759
+ }
760
+ }
761
+ evt.data && evt.data.preventDefault();
762
+ }, this.getDialog() );
763
+ ratioButton.on( 'mouseover', function() {
764
+ this.addClass( 'cke_btn_over' );
765
+ }, ratioButton );
766
+ ratioButton.on( 'mouseout', function() {
767
+ this.removeClass( 'cke_btn_over' );
768
+ }, ratioButton );
769
+ }
770
+ },
771
+ html: '<div>' +
772
+ '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.lockRatio +
773
+ '" class="cke_btn_locked" id="' + btnLockSizesId + '" role="checkbox"><span class="cke_icon"></span><span class="cke_label">' + editor.lang.image.lockRatio + '</span></a>' +
774
+ '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.resetSize +
775
+ '" class="cke_btn_reset" id="' + btnResetSizeId + '" role="button"><span class="cke_label">' + editor.lang.image.resetSize + '</span></a>' +
776
+ '</div>'
777
+ } ]
778
+ },
779
+ {
780
+ type: 'vbox',
781
+ padding: 1,
782
+ children: [ {
783
+ type: 'text',
784
+ id: 'txtBorder',
785
+ requiredContent: 'img{border-width}',
786
+ width: '60px',
787
+ label: editor.lang.image.border,
788
+ 'default': '',
789
+ onKeyUp: function() {
790
+ updatePreview( this.getDialog() );
791
+ },
792
+ onChange: function() {
793
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
794
+ },
795
+ validate: CKEDITOR.dialog.validate.integer( editor.lang.image.validateBorder ),
796
+ setup: function( type, element ) {
797
+ if ( type == IMAGE ) {
798
+ var value,
799
+ borderStyle = element.getStyle( 'border-width' );
800
+ borderStyle = borderStyle && borderStyle.match( /^(\d+px)(?: \1 \1 \1)?$/ );
801
+ value = borderStyle && parseInt( borderStyle[ 1 ], 10 );
802
+ isNaN( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'border' ) );
803
+ this.setValue( value );
804
+ }
805
+ },
806
+ commit: function( type, element ) {
807
+ var value = parseInt( this.getValue(), 10 );
808
+ if ( type == IMAGE || type == PREVIEW ) {
809
+ if ( !isNaN( value ) ) {
810
+ element.setStyle( 'border-width', CKEDITOR.tools.cssLength( value ) );
811
+ element.setStyle( 'border-style', 'solid' );
812
+ } else if ( !value && this.isChanged() ) {
813
+ element.removeStyle( 'border' );
814
+ }
815
+
816
+ if ( type == IMAGE )
817
+ element.removeAttribute( 'border' );
818
+ } else if ( type == CLEANUP ) {
819
+ element.removeAttribute( 'border' );
820
+ element.removeStyle( 'border-width' );
821
+ element.removeStyle( 'border-style' );
822
+ element.removeStyle( 'border-color' );
823
+ }
824
+ }
825
+ },
826
+ {
827
+ type: 'text',
828
+ id: 'txtHSpace',
829
+ requiredContent: 'img{margin-left,margin-right}',
830
+ width: '60px',
831
+ label: editor.lang.image.hSpace,
832
+ 'default': '',
833
+ onKeyUp: function() {
834
+ updatePreview( this.getDialog() );
835
+ },
836
+ onChange: function() {
837
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
838
+ },
839
+ validate: CKEDITOR.dialog.validate.integer( editor.lang.image.validateHSpace ),
840
+ setup: function( type, element ) {
841
+ if ( type == IMAGE ) {
842
+ var value, marginLeftPx, marginRightPx,
843
+ marginLeftStyle = element.getStyle( 'margin-left' ),
844
+ marginRightStyle = element.getStyle( 'margin-right' );
845
+
846
+ marginLeftStyle = marginLeftStyle && marginLeftStyle.match( pxLengthRegex );
847
+ marginRightStyle = marginRightStyle && marginRightStyle.match( pxLengthRegex );
848
+ marginLeftPx = parseInt( marginLeftStyle, 10 );
849
+ marginRightPx = parseInt( marginRightStyle, 10 );
850
+
851
+ value = ( marginLeftPx == marginRightPx ) && marginLeftPx;
852
+ isNaN( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'hspace' ) );
853
+
854
+ this.setValue( value );
855
+ }
856
+ },
857
+ commit: function( type, element ) {
858
+ var value = parseInt( this.getValue(), 10 );
859
+ if ( type == IMAGE || type == PREVIEW ) {
860
+ if ( !isNaN( value ) ) {
861
+ element.setStyle( 'margin-left', CKEDITOR.tools.cssLength( value ) );
862
+ element.setStyle( 'margin-right', CKEDITOR.tools.cssLength( value ) );
863
+ } else if ( !value && this.isChanged() ) {
864
+ element.removeStyle( 'margin-left' );
865
+ element.removeStyle( 'margin-right' );
866
+ }
867
+
868
+ if ( type == IMAGE )
869
+ element.removeAttribute( 'hspace' );
870
+ } else if ( type == CLEANUP ) {
871
+ element.removeAttribute( 'hspace' );
872
+ element.removeStyle( 'margin-left' );
873
+ element.removeStyle( 'margin-right' );
874
+ }
875
+ }
876
+ },
877
+ {
878
+ type: 'text',
879
+ id: 'txtVSpace',
880
+ requiredContent: 'img{margin-top,margin-bottom}',
881
+ width: '60px',
882
+ label: editor.lang.image.vSpace,
883
+ 'default': '',
884
+ onKeyUp: function() {
885
+ updatePreview( this.getDialog() );
886
+ },
887
+ onChange: function() {
888
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
889
+ },
890
+ validate: CKEDITOR.dialog.validate.integer( editor.lang.image.validateVSpace ),
891
+ setup: function( type, element ) {
892
+ if ( type == IMAGE ) {
893
+ var value, marginTopPx, marginBottomPx,
894
+ marginTopStyle = element.getStyle( 'margin-top' ),
895
+ marginBottomStyle = element.getStyle( 'margin-bottom' );
896
+
897
+ marginTopStyle = marginTopStyle && marginTopStyle.match( pxLengthRegex );
898
+ marginBottomStyle = marginBottomStyle && marginBottomStyle.match( pxLengthRegex );
899
+ marginTopPx = parseInt( marginTopStyle, 10 );
900
+ marginBottomPx = parseInt( marginBottomStyle, 10 );
901
+
902
+ value = ( marginTopPx == marginBottomPx ) && marginTopPx;
903
+ isNaN( parseInt( value, 10 ) ) && ( value = element.getAttribute( 'vspace' ) );
904
+ this.setValue( value );
905
+ }
906
+ },
907
+ commit: function( type, element ) {
908
+ var value = parseInt( this.getValue(), 10 );
909
+ if ( type == IMAGE || type == PREVIEW ) {
910
+ if ( !isNaN( value ) ) {
911
+ element.setStyle( 'margin-top', CKEDITOR.tools.cssLength( value ) );
912
+ element.setStyle( 'margin-bottom', CKEDITOR.tools.cssLength( value ) );
913
+ } else if ( !value && this.isChanged() ) {
914
+ element.removeStyle( 'margin-top' );
915
+ element.removeStyle( 'margin-bottom' );
916
+ }
917
+
918
+ if ( type == IMAGE )
919
+ element.removeAttribute( 'vspace' );
920
+ } else if ( type == CLEANUP ) {
921
+ element.removeAttribute( 'vspace' );
922
+ element.removeStyle( 'margin-top' );
923
+ element.removeStyle( 'margin-bottom' );
924
+ }
925
+ }
926
+ },
927
+ {
928
+ id: 'cmbAlign',
929
+ requiredContent: 'img{float}',
930
+ type: 'select',
931
+ widths: [ '35%', '65%' ],
932
+ style: 'width:90px',
933
+ label: editor.lang.common.align,
934
+ 'default': '',
935
+ items: [
936
+ [ editor.lang.common.notSet, '' ],
937
+ [ editor.lang.common.left, 'left' ],
938
+ [ editor.lang.common.right, 'right' ]
939
+ // Backward compatible with v2 on setup when specified as attribute value,
940
+ // while these values are no more available as select options.
941
+ // [ editor.lang.image.alignAbsBottom , 'absBottom'],
942
+ // [ editor.lang.image.alignAbsMiddle , 'absMiddle'],
943
+ // [ editor.lang.image.alignBaseline , 'baseline'],
944
+ // [ editor.lang.image.alignTextTop , 'text-top'],
945
+ // [ editor.lang.image.alignBottom , 'bottom'],
946
+ // [ editor.lang.image.alignMiddle , 'middle'],
947
+ // [ editor.lang.image.alignTop , 'top']
948
+ ],
949
+ onChange: function() {
950
+ updatePreview( this.getDialog() );
951
+ commitInternally.call( this, 'advanced:txtdlgGenStyle' );
952
+ },
953
+ setup: function( type, element ) {
954
+ if ( type == IMAGE ) {
955
+ var value = element.getStyle( 'float' );
956
+ switch ( value ) {
957
+ // Ignore those unrelated values.
958
+ case 'inherit':
959
+ case 'none':
960
+ value = '';
961
+ }
962
+
963
+ !value && ( value = ( element.getAttribute( 'align' ) || '' ).toLowerCase() );
964
+ this.setValue( value );
965
+ }
966
+ },
967
+ commit: function( type, element ) {
968
+ var value = this.getValue();
969
+ if ( type == IMAGE || type == PREVIEW ) {
970
+ if ( value )
971
+ element.setStyle( 'float', value );
972
+ else
973
+ element.removeStyle( 'float' );
974
+
975
+ if ( type == IMAGE ) {
976
+ value = ( element.getAttribute( 'align' ) || '' ).toLowerCase();
977
+ switch ( value ) {
978
+ // we should remove it only if it matches "left" or "right",
979
+ // otherwise leave it intact.
980
+ case 'left':
981
+ case 'right':
982
+ element.removeAttribute( 'align' );
983
+ }
984
+ }
985
+ } else if ( type == CLEANUP ) {
986
+ element.removeStyle( 'float' );
987
+ }
988
+ }
989
+ } ]
990
+ } ]
991
+ },
992
+ {
993
+ type: 'vbox',
994
+ height: '250px',
995
+ children: [ {
996
+ type: 'html',
997
+ id: 'htmlPreview',
998
+ style: 'width:95%;',
999
+ html: '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) + '<br>' +
1000
+ '<div id="' + imagePreviewLoaderId + '" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>' +
1001
+ '<div class="ImagePreviewBox"><table><tr><td>' +
1002
+ '<a href="javascript:void(0)" target="_blank" onclick="return false;" id="' + previewLinkId + '">' +
1003
+ '<img id="' + previewImageId + '" alt="" /></a>' +
1004
+ // jscs:disable maximumLineLength
1005
+ ( editor.config.image_previewText || 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ' +
1006
+ 'Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, ' +
1007
+ 'nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.' ) +
1008
+ // jscs:enable maximumLineLength
1009
+ '</td></tr></table></div></div>'
1010
+ } ]
1011
+ } ]
1012
+ } ]
1013
+ },
1014
+ {
1015
+ id: 'Link',
1016
+ requiredContent: 'a[href]',
1017
+ label: editor.lang.image.linkTab,
1018
+ padding: 0,
1019
+ elements: [ {
1020
+ id: 'txtUrl',
1021
+ type: 'text',
1022
+ label: editor.lang.common.url,
1023
+ style: 'width: 100%',
1024
+ 'default': '',
1025
+ setup: function( type, element ) {
1026
+ if ( type == LINK ) {
1027
+ var href = element.data( 'cke-saved-href' );
1028
+ if ( !href )
1029
+ href = element.getAttribute( 'href' );
1030
+ this.setValue( href );
1031
+ }
1032
+ },
1033
+ commit: function( type, element ) {
1034
+ if ( type == LINK ) {
1035
+ if ( this.getValue() || this.isChanged() ) {
1036
+ var url = this.getValue();
1037
+ element.data( 'cke-saved-href', url );
1038
+ element.setAttribute( 'href', url );
1039
+
1040
+ if ( this.getValue() || !editor.config.image_removeLinkByEmptyURL )
1041
+ this.getDialog().addLink = true;
1042
+ else
1043
+ this.getDialog().addLink = false;
1044
+ }
1045
+ }
1046
+ }
1047
+ },
1048
+ {
1049
+ type: 'button',
1050
+ id: 'browse',
1051
+ className: 'cke_dialog_image_browse',
1052
+ filebrowser: {
1053
+ action: 'Browse',
1054
+ target: 'Link:txtUrl',
1055
+ url: editor.config.filebrowserImageBrowseLinkUrl
1056
+ },
1057
+ style: 'float:right',
1058
+ hidden: true,
1059
+ label: editor.lang.common.browseServer
1060
+ },
1061
+ {
1062
+ id: 'cmbTarget',
1063
+ type: 'select',
1064
+ requiredContent: 'a[target]',
1065
+ label: editor.lang.common.target,
1066
+ 'default': '',
1067
+ items: [
1068
+ [ editor.lang.common.notSet, '' ],
1069
+ [ editor.lang.common.targetNew, '_blank' ],
1070
+ [ editor.lang.common.targetTop, '_top' ],
1071
+ [ editor.lang.common.targetSelf, '_self' ],
1072
+ [ editor.lang.common.targetParent, '_parent' ]
1073
+ ],
1074
+ setup: function( type, element ) {
1075
+ if ( type == LINK )
1076
+ this.setValue( element.getAttribute( 'target' ) || '' );
1077
+ },
1078
+ commit: function( type, element ) {
1079
+ if ( type == LINK ) {
1080
+ if ( this.getValue() || this.isChanged() )
1081
+ element.setAttribute( 'target', this.getValue() );
1082
+ }
1083
+ }
1084
+ } ]
1085
+ },
1086
+ {
1087
+ id: 'Upload',
1088
+ hidden: true,
1089
+ filebrowser: 'uploadButton',
1090
+ label: editor.lang.image.upload,
1091
+ elements: [ {
1092
+ type: 'file',
1093
+ id: 'upload',
1094
+ label: editor.lang.image.btnUpload,
1095
+ style: 'height:40px',
1096
+ size: 38
1097
+ },
1098
+ {
1099
+ type: 'fileButton',
1100
+ id: 'uploadButton',
1101
+ filebrowser: 'info:txtUrl',
1102
+ label: editor.lang.image.btnUpload,
1103
+ 'for': [ 'Upload', 'upload' ]
1104
+ } ]
1105
+ },
1106
+ {
1107
+ id: 'advanced',
1108
+ label: editor.lang.common.advancedTab,
1109
+ elements: [ {
1110
+ type: 'hbox',
1111
+ widths: [ '50%', '25%', '25%' ],
1112
+ children: [ {
1113
+ type: 'text',
1114
+ id: 'linkId',
1115
+ requiredContent: 'img[id]',
1116
+ label: editor.lang.common.id,
1117
+ setup: function( type, element ) {
1118
+ if ( type == IMAGE )
1119
+ this.setValue( element.getAttribute( 'id' ) );
1120
+ },
1121
+ commit: function( type, element ) {
1122
+ if ( type == IMAGE ) {
1123
+ if ( this.getValue() || this.isChanged() )
1124
+ element.setAttribute( 'id', this.getValue() );
1125
+ }
1126
+ }
1127
+ },
1128
+ {
1129
+ id: 'cmbLangDir',
1130
+ type: 'select',
1131
+ requiredContent: 'img[dir]',
1132
+ style: 'width : 100px;',
1133
+ label: editor.lang.common.langDir,
1134
+ 'default': '',
1135
+ items: [
1136
+ [ editor.lang.common.notSet, '' ],
1137
+ [ editor.lang.common.langDirLtr, 'ltr' ],
1138
+ [ editor.lang.common.langDirRtl, 'rtl' ]
1139
+ ],
1140
+ setup: function( type, element ) {
1141
+ if ( type == IMAGE )
1142
+ this.setValue( element.getAttribute( 'dir' ) );
1143
+ },
1144
+ commit: function( type, element ) {
1145
+ if ( type == IMAGE ) {
1146
+ if ( this.getValue() || this.isChanged() )
1147
+ element.setAttribute( 'dir', this.getValue() );
1148
+ }
1149
+ }
1150
+ },
1151
+ {
1152
+ type: 'text',
1153
+ id: 'txtLangCode',
1154
+ requiredContent: 'img[lang]',
1155
+ label: editor.lang.common.langCode,
1156
+ 'default': '',
1157
+ setup: function( type, element ) {
1158
+ if ( type == IMAGE )
1159
+ this.setValue( element.getAttribute( 'lang' ) );
1160
+ },
1161
+ commit: function( type, element ) {
1162
+ if ( type == IMAGE ) {
1163
+ if ( this.getValue() || this.isChanged() )
1164
+ element.setAttribute( 'lang', this.getValue() );
1165
+ }
1166
+ }
1167
+ } ]
1168
+ },
1169
+ {
1170
+ type: 'text',
1171
+ id: 'txtGenLongDescr',
1172
+ requiredContent: 'img[longdesc]',
1173
+ label: editor.lang.common.longDescr,
1174
+ setup: function( type, element ) {
1175
+ if ( type == IMAGE )
1176
+ this.setValue( element.getAttribute( 'longDesc' ) );
1177
+ },
1178
+ commit: function( type, element ) {
1179
+ if ( type == IMAGE ) {
1180
+ if ( this.getValue() || this.isChanged() )
1181
+ element.setAttribute( 'longDesc', this.getValue() );
1182
+ }
1183
+ }
1184
+ },
1185
+ {
1186
+ type: 'hbox',
1187
+ widths: [ '50%', '50%' ],
1188
+ children: [ {
1189
+ type: 'text',
1190
+ id: 'txtGenClass',
1191
+ requiredContent: 'img(cke-xyz)', // Random text like 'xyz' will check if all are allowed.
1192
+ label: editor.lang.common.cssClass,
1193
+ 'default': '',
1194
+ setup: function( type, element ) {
1195
+ if ( type == IMAGE )
1196
+ this.setValue( element.getAttribute( 'class' ) );
1197
+ },
1198
+ commit: function( type, element ) {
1199
+ if ( type == IMAGE ) {
1200
+ if ( this.getValue() || this.isChanged() )
1201
+ element.setAttribute( 'class', this.getValue() );
1202
+ }
1203
+ }
1204
+ },
1205
+ {
1206
+ type: 'text',
1207
+ id: 'txtGenTitle',
1208
+ requiredContent: 'img[title]',
1209
+ label: editor.lang.common.advisoryTitle,
1210
+ 'default': '',
1211
+ onChange: function() {
1212
+ updatePreview( this.getDialog() );
1213
+ },
1214
+ setup: function( type, element ) {
1215
+ if ( type == IMAGE )
1216
+ this.setValue( element.getAttribute( 'title' ) );
1217
+ },
1218
+ commit: function( type, element ) {
1219
+ if ( type == IMAGE ) {
1220
+ if ( this.getValue() || this.isChanged() )
1221
+ element.setAttribute( 'title', this.getValue() );
1222
+ } else if ( type == PREVIEW )
1223
+ element.setAttribute( 'title', this.getValue() );
1224
+ else if ( type == CLEANUP ) {
1225
+ element.removeAttribute( 'title' );
1226
+ }
1227
+ }
1228
+ } ]
1229
+ },
1230
+ {
1231
+ type: 'text',
1232
+ id: 'txtdlgGenStyle',
1233
+ requiredContent: 'img{cke-xyz}', // Random text like 'xyz' will check if all are allowed.
1234
+ label: editor.lang.common.cssStyle,
1235
+ validate: CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
1236
+ 'default': '',
1237
+ setup: function( type, element ) {
1238
+ if ( type == IMAGE ) {
1239
+ var genStyle = element.getAttribute( 'style' );
1240
+ if ( !genStyle && element.$.style.cssText )
1241
+ genStyle = element.$.style.cssText;
1242
+ this.setValue( genStyle );
1243
+
1244
+ var height = element.$.style.height,
1245
+ width = element.$.style.width,
1246
+ aMatchH = ( height ? height : '' ).match( regexGetSize ),
1247
+ aMatchW = ( width ? width : '' ).match( regexGetSize );
1248
+
1249
+ this.attributesInStyle = {
1250
+ height: !!aMatchH,
1251
+ width: !!aMatchW
1252
+ };
1253
+ }
1254
+ },
1255
+ onChange: function() {
1256
+ commitInternally.call(
1257
+ this, [
1258
+ 'info:cmbFloat',
1259
+ 'info:cmbAlign',
1260
+ 'info:txtVSpace',
1261
+ 'info:txtHSpace',
1262
+ 'info:txtBorder',
1263
+ 'info:txtWidth',
1264
+ 'info:txtHeight'
1265
+ ]
1266
+ );
1267
+ updatePreview( this );
1268
+ },
1269
+ commit: function( type, element ) {
1270
+ if ( type == IMAGE && ( this.getValue() || this.isChanged() ) )
1271
+ element.setAttribute( 'style', this.getValue() );
1272
+
1273
+ }
1274
+ } ]
1275
+ } ]
1276
+ };
1277
+ };
1278
+
1279
+ CKEDITOR.dialog.add( 'image', function( editor ) {
1280
+ return imageDialog( editor, 'image' );
1281
+ } );
1282
+
1283
+ CKEDITOR.dialog.add( 'imagebutton', function( editor ) {
1284
+ return imageDialog( editor, 'imagebutton' );
1285
+ } );
1286
+ } )();