glebtv-ckeditor 4.7.3.1 → 4.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +0 -9
  3. data/app/assets/javascripts/ckeditor/config.js.erb +3 -3
  4. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +317 -313
  5. data/config/locales/bg.ckeditor.yml +9 -0
  6. data/config/locales/cs.ckeditor.yml +9 -0
  7. data/config/locales/de.ckeditor.yml +9 -0
  8. data/config/locales/el-GR.cdkeditor.yml +9 -0
  9. data/config/locales/es.ckeditor.yml +9 -0
  10. data/config/locales/fr.ckeditor.yml +9 -0
  11. data/config/locales/hu.ckeditor.yml +9 -0
  12. data/config/locales/it.ckeditor.yml +9 -0
  13. data/config/locales/ja.ckeditor.yml +9 -0
  14. data/config/locales/nb.ckeditor.yml +9 -0
  15. data/config/locales/nl.ckeditor.yml +9 -0
  16. data/config/locales/pl.ckeditor.yml +9 -0
  17. data/config/locales/pt-BR.ckeditor.yml +9 -0
  18. data/config/locales/pt-PT.ckeditor.yml +9 -0
  19. data/config/locales/pt.ckeditor.yml +9 -0
  20. data/config/locales/sq.ckeditor.yml +9 -0
  21. data/config/locales/sv-SE.ckeditor.yml +9 -0
  22. data/config/locales/tr.ckeditor.yml +9 -0
  23. data/config/locales/uk.ckeditor.yml +9 -0
  24. data/config/locales/zh-CN.ckeditor.yml +9 -0
  25. data/config/locales/zh-TW.ckeditor.yml +9 -0
  26. data/lib/ckeditor/asset_response.rb +6 -2
  27. data/lib/ckeditor/http.rb +5 -7
  28. data/lib/ckeditor/utils/content_type_detector.rb +3 -3
  29. data/lib/ckeditor/version.rb +2 -2
  30. data/vendor/assets/javascripts/ckeditor/CHANGES.md +1128 -849
  31. data/vendor/assets/javascripts/ckeditor/LICENSE.md +3 -3
  32. data/vendor/assets/javascripts/ckeditor/README.md +6 -6
  33. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +2 -2
  34. data/vendor/assets/javascripts/ckeditor/build-config.js +11 -6
  35. data/vendor/assets/javascripts/ckeditor/ckeditor.js +825 -688
  36. data/vendor/assets/javascripts/ckeditor/config.js +2 -2
  37. data/vendor/assets/javascripts/ckeditor/contents.css +7 -7
  38. data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
  39. data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
  40. data/vendor/assets/javascripts/ckeditor/lang/az.js +5 -0
  41. data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
  42. data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
  43. data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
  44. data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
  45. data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
  46. data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
  47. data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
  48. data/vendor/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
  49. data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
  50. data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
  51. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  52. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  53. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  54. data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
  55. data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
  56. data/vendor/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
  57. data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
  58. data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
  59. data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
  60. data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
  61. data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
  62. data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
  63. data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  64. data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
  65. data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
  66. data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
  67. data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
  68. data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
  69. data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
  70. data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
  71. data/vendor/assets/javascripts/ckeditor/lang/id.js +5 -0
  72. data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
  73. data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
  74. data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
  75. data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
  76. data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
  77. data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
  78. data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
  79. data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
  80. data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
  81. data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
  82. data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
  83. data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
  84. data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
  85. data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
  86. data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
  87. data/vendor/assets/javascripts/ckeditor/lang/oc.js +5 -0
  88. data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
  89. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  90. data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
  91. data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
  92. data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
  93. data/vendor/assets/javascripts/ckeditor/lang/si.js +5 -0
  94. data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
  95. data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
  96. data/vendor/assets/javascripts/ckeditor/lang/sq.js +5 -0
  97. data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  98. data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
  99. data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
  100. data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
  101. data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
  102. data/vendor/assets/javascripts/ckeditor/lang/tt.js +5 -0
  103. data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
  104. data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
  105. data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
  106. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  107. data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
  108. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -7
  109. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +2 -2
  110. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  111. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +5 -5
  112. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  113. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  114. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  115. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  116. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  117. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  118. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  119. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  120. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  121. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  122. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  123. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  124. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  125. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  126. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  127. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  128. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  129. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  130. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  131. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  132. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  133. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  134. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
  135. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
  136. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
  137. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  138. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  139. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  140. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  141. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  142. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  143. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +0 -1
  144. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  145. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +2 -2
  146. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +11 -11
  147. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +2 -2
  148. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +23 -23
  149. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +5 -5
  150. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +2 -2
  151. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +3 -3
  152. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +2 -2
  153. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +2 -2
  154. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +7 -7
  155. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +4 -3
  156. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +3 -3
  157. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +3 -3
  158. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  159. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  160. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +3 -3
  161. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +1259 -44
  162. data/vendor/assets/javascripts/ckeditor/plugins/image/icons/hidpi/image.png +0 -0
  163. data/vendor/assets/javascripts/ckeditor/plugins/image/icons/image.png +0 -0
  164. data/vendor/assets/javascripts/ckeditor/plugins/image/lang/en.js +25 -0
  165. data/vendor/assets/javascripts/ckeditor/plugins/image/lang/ru.js +25 -0
  166. data/vendor/assets/javascripts/ckeditor/plugins/image/plugin.js +184 -0
  167. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  168. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  169. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  170. data/vendor/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  171. data/vendor/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  172. data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  173. data/vendor/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  174. data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  175. data/vendor/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  176. data/vendor/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
  177. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  178. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  179. data/vendor/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
  180. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +1 -1
  181. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  182. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +28 -26
  183. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
  184. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
  185. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +53 -51
  186. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +31 -32
  187. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +2 -2
  188. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
  189. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +2 -2
  190. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +2 -2
  191. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -6
  192. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +6 -6
  193. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +4 -4
  194. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -15
  195. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +2 -2
  196. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +2 -2
  197. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
  198. data/vendor/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
  199. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -0
  200. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  201. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +468 -377
  202. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  203. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +82 -82
  204. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +449 -448
  205. data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +28 -23
  206. data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
  207. data/vendor/assets/javascripts/ckeditor/samples/img/logo.svg +13 -0
  208. data/vendor/assets/javascripts/ckeditor/samples/index.html +16 -16
  209. data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +4 -4
  210. data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +2 -2
  211. data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +5 -5
  212. data/vendor/assets/javascripts/ckeditor/samples/old/api.html +14 -14
  213. data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +7 -7
  214. data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +2 -2
  215. data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +4 -4
  216. data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +2 -2
  217. data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +14 -14
  218. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +2 -2
  219. data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +8 -8
  220. data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +5 -5
  221. data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +8 -8
  222. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +6 -6
  223. data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +7 -7
  224. data/vendor/assets/javascripts/ckeditor/samples/old/index.html +8 -5
  225. data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +10 -10
  226. data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +6 -6
  227. data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +6 -6
  228. data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +6 -6
  229. data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +5 -5
  230. data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +8 -8
  231. data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +5 -5
  232. data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +5 -5
  233. data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +2 -2
  234. data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +2 -2
  235. data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +2 -2
  236. data/vendor/assets/javascripts/ckeditor/samples/old/stylesheetparser/assets/sample.css +70 -0
  237. data/vendor/assets/javascripts/ckeditor/samples/old/stylesheetparser/stylesheetparser.html +85 -0
  238. data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +5 -5
  239. data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +8 -8
  240. data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +6 -6
  241. data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +8 -8
  242. data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +5 -5
  243. data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +6 -6
  244. data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +12 -12
  245. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +123 -1
  246. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +1 -1
  247. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +1 -1
  248. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +1 -1
  249. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +1 -1
  250. data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +1 -1
  251. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
  252. data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
  253. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +3 -3
  254. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +3 -3
  255. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +3 -3
  256. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +3 -3
  257. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +3 -3
  258. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +3 -3
  259. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +3 -3
  260. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +3 -3
  261. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +3 -3
  262. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/icons.png +0 -0
  263. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  264. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +3 -3
  265. data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +2 -2
  266. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +3 -3
  267. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +3 -3
  268. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +3 -3
  269. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +3 -3
  270. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +3 -3
  271. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +3 -3
  272. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +3 -3
  273. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +3 -3
  274. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +3 -3
  275. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +3 -3
  276. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +3 -3
  277. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +4 -4
  278. data/vendor/assets/javascripts/ckeditor/skins/moono/skin.js +2 -2
  279. data/vendor/assets/javascripts/ckeditor/styles.js +4 -4
  280. metadata +179 -56
  281. data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -169
  282. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +0 -7
  283. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +0 -7
  284. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +0 -929
@@ -0,0 +1,553 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @fileOverview Image plugin based on Widgets API
8
+ */
9
+
10
+ 'use strict';
11
+
12
+ CKEDITOR.dialog.add( 'image2', function( editor ) {
13
+
14
+ // RegExp: 123, 123px, empty string ""
15
+ var regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i,
16
+
17
+ lockButtonId = CKEDITOR.tools.getNextId(),
18
+ resetButtonId = CKEDITOR.tools.getNextId(),
19
+
20
+ lang = editor.lang.image2,
21
+ commonLang = editor.lang.common,
22
+
23
+ lockResetStyle = 'margin-top:18px;width:40px;height:20px;',
24
+ lockResetHtml = new CKEDITOR.template(
25
+ '<div>' +
26
+ '<a href="javascript:void(0)" tabindex="-1" title="' + lang.lockRatio + '" class="cke_btn_locked" id="{lockButtonId}" role="checkbox">' +
27
+ '<span class="cke_icon"></span>' +
28
+ '<span class="cke_label">' + lang.lockRatio + '</span>' +
29
+ '</a>' +
30
+
31
+ '<a href="javascript:void(0)" tabindex="-1" title="' + lang.resetSize + '" class="cke_btn_reset" id="{resetButtonId}" role="button">' +
32
+ '<span class="cke_label">' + lang.resetSize + '</span>' +
33
+ '</a>' +
34
+ '</div>' ).output( {
35
+ lockButtonId: lockButtonId,
36
+ resetButtonId: resetButtonId
37
+ } ),
38
+
39
+ helpers = CKEDITOR.plugins.image2,
40
+
41
+ // Editor instance configuration.
42
+ config = editor.config,
43
+
44
+ hasFileBrowser = !!( config.filebrowserImageBrowseUrl || config.filebrowserBrowseUrl ),
45
+
46
+ // Content restrictions defined by the widget which
47
+ // impact on dialog structure and presence of fields.
48
+ features = editor.widgets.registered.image.features,
49
+
50
+ // Functions inherited from image2 plugin.
51
+ getNatural = helpers.getNatural,
52
+
53
+ // Global variables referring to the dialog's context.
54
+ doc, widget, image,
55
+
56
+ // Global variable referring to this dialog's image pre-loader.
57
+ preLoader,
58
+
59
+ // Global variables holding the original size of the image.
60
+ domWidth, domHeight,
61
+
62
+ // Global variables related to image pre-loading.
63
+ preLoadedWidth, preLoadedHeight, srcChanged,
64
+
65
+ // Global variables related to size locking.
66
+ lockRatio, userDefinedLock,
67
+
68
+ // Global variables referring to dialog fields and elements.
69
+ lockButton, resetButton, widthField, heightField,
70
+
71
+ natural;
72
+
73
+ // Validates dimension. Allowed values are:
74
+ // "123px", "123", "" (empty string)
75
+ function validateDimension() {
76
+ var match = this.getValue().match( regexGetSizeOrEmpty ),
77
+ isValid = !!( match && parseInt( match[ 1 ], 10 ) !== 0 );
78
+
79
+ if ( !isValid )
80
+ alert( commonLang[ 'invalidLength' ].replace( '%1', commonLang[ this.id ] ).replace( '%2', 'px' ) ); // jshint ignore:line
81
+
82
+ return isValid;
83
+ }
84
+
85
+ // Creates a function that pre-loads images. The callback function passes
86
+ // [image, width, height] or null if loading failed.
87
+ //
88
+ // @returns {Function}
89
+ function createPreLoader() {
90
+ var image = doc.createElement( 'img' ),
91
+ listeners = [];
92
+
93
+ function addListener( event, callback ) {
94
+ listeners.push( image.once( event, function( evt ) {
95
+ removeListeners();
96
+ callback( evt );
97
+ } ) );
98
+ }
99
+
100
+ function removeListeners() {
101
+ var l;
102
+
103
+ while ( ( l = listeners.pop() ) )
104
+ l.removeListener();
105
+ }
106
+
107
+ // @param {String} src.
108
+ // @param {Function} callback.
109
+ return function( src, callback, scope ) {
110
+ addListener( 'load', function() {
111
+ // Don't use image.$.(width|height) since it's buggy in IE9-10 (https://dev.ckeditor.com/ticket/11159)
112
+ var dimensions = getNatural( image );
113
+
114
+ callback.call( scope, image, dimensions.width, dimensions.height );
115
+ } );
116
+
117
+ addListener( 'error', function() {
118
+ callback( null );
119
+ } );
120
+
121
+ addListener( 'abort', function() {
122
+ callback( null );
123
+ } );
124
+
125
+ image.setAttribute( 'src',
126
+ ( config.baseHref || '' ) + src + '?' + Math.random().toString( 16 ).substring( 2 ) );
127
+ };
128
+ }
129
+
130
+ // This function updates width and height fields once the
131
+ // "src" field is altered. Along with dimensions, also the
132
+ // dimensions lock is adjusted.
133
+ function onChangeSrc() {
134
+ var value = this.getValue();
135
+
136
+ toggleDimensions( false );
137
+
138
+ // Remember that src is different than default.
139
+ if ( value !== widget.data.src ) {
140
+ // Update dimensions of the image once it's preloaded.
141
+ preLoader( value, function( image, width, height ) {
142
+ // Re-enable width and height fields.
143
+ toggleDimensions( true );
144
+
145
+ // There was problem loading the image. Unlock ratio.
146
+ if ( !image )
147
+ return toggleLockRatio( false );
148
+
149
+ // Fill width field with the width of the new image.
150
+ widthField.setValue( editor.config.image2_prefillDimensions === false ? 0 : width );
151
+
152
+ // Fill height field with the height of the new image.
153
+ heightField.setValue( editor.config.image2_prefillDimensions === false ? 0 : height );
154
+
155
+ // Cache the new width and update initial cache (#1348).
156
+ preLoadedWidth = domWidth = width;
157
+
158
+ // Cache the new height and update initial cache (#1348).
159
+ preLoadedHeight = domHeight = height;
160
+
161
+ // Check for new lock value if image exist.
162
+ toggleLockRatio( helpers.checkHasNaturalRatio( image ) );
163
+ } );
164
+
165
+ srcChanged = true;
166
+ }
167
+
168
+ // Value is the same as in widget data but is was
169
+ // modified back in time. Roll back dimensions when restoring
170
+ // default src.
171
+ else if ( srcChanged ) {
172
+ // Re-enable width and height fields.
173
+ toggleDimensions( true );
174
+
175
+ // Restore width field with cached width.
176
+ widthField.setValue( domWidth );
177
+
178
+ // Restore height field with cached height.
179
+ heightField.setValue( domHeight );
180
+
181
+ // Src equals default one back again.
182
+ srcChanged = false;
183
+ }
184
+
185
+ // Value is the same as in widget data and it hadn't
186
+ // been modified.
187
+ else {
188
+ // Re-enable width and height fields.
189
+ toggleDimensions( true );
190
+ }
191
+ }
192
+
193
+ function onChangeDimension() {
194
+ // If ratio is un-locked, then we don't care what's next.
195
+ if ( !lockRatio )
196
+ return;
197
+
198
+ var value = this.getValue();
199
+
200
+ // No reason to auto-scale or unlock if the field is empty.
201
+ if ( !value )
202
+ return;
203
+
204
+ // If the value of the field is invalid (e.g. with %), unlock ratio.
205
+ if ( !value.match( regexGetSizeOrEmpty ) )
206
+ toggleLockRatio( false );
207
+
208
+ // No automatic re-scale when dimension is '0'.
209
+ if ( value === '0' )
210
+ return;
211
+
212
+ var isWidth = this.id == 'width',
213
+ // If dialog opened for the new image, domWidth and domHeight
214
+ // will be empty. Use dimensions from pre-loader in such case instead.
215
+ width = domWidth || preLoadedWidth,
216
+ height = domHeight || preLoadedHeight;
217
+
218
+ // If changing width, then auto-scale height.
219
+ if ( isWidth )
220
+ value = Math.round( height * ( value / width ) );
221
+
222
+ // If changing height, then auto-scale width.
223
+ else
224
+ value = Math.round( width * ( value / height ) );
225
+
226
+ // If the value is a number, apply it to the other field.
227
+ if ( !isNaN( value ) )
228
+ ( isWidth ? heightField : widthField ).setValue( value );
229
+ }
230
+
231
+ // Set-up function for lock and reset buttons:
232
+ // * Adds lock and reset buttons to focusables. Check if button exist first
233
+ // because it may be disabled e.g. due to ACF restrictions.
234
+ // * Register mouseover and mouseout event listeners for UI manipulations.
235
+ // * Register click event listeners for buttons.
236
+ function onLoadLockReset() {
237
+ var dialog = this.getDialog();
238
+
239
+ function setupMouseClasses( el ) {
240
+ el.on( 'mouseover', function() {
241
+ this.addClass( 'cke_btn_over' );
242
+ }, el );
243
+
244
+ el.on( 'mouseout', function() {
245
+ this.removeClass( 'cke_btn_over' );
246
+ }, el );
247
+ }
248
+
249
+ // Create references to lock and reset buttons for this dialog instance.
250
+ lockButton = doc.getById( lockButtonId );
251
+ resetButton = doc.getById( resetButtonId );
252
+
253
+ // Activate (Un)LockRatio button
254
+ if ( lockButton ) {
255
+ // Consider that there's an additional focusable field
256
+ // in the dialog when the "browse" button is visible.
257
+ dialog.addFocusable( lockButton, 4 + hasFileBrowser );
258
+
259
+ lockButton.on( 'click', function( evt ) {
260
+ toggleLockRatio();
261
+ evt.data && evt.data.preventDefault();
262
+ }, this.getDialog() );
263
+
264
+ setupMouseClasses( lockButton );
265
+ }
266
+
267
+ // Activate the reset size button.
268
+ if ( resetButton ) {
269
+ // Consider that there's an additional focusable field
270
+ // in the dialog when the "browse" button is visible.
271
+ dialog.addFocusable( resetButton, 5 + hasFileBrowser );
272
+
273
+ // Fills width and height fields with the original dimensions of the
274
+ // image (stored in widget#data since widget#init).
275
+ resetButton.on( 'click', function( evt ) {
276
+ // If there's a new image loaded, reset button should revert
277
+ // cached dimensions of pre-loaded DOM element.
278
+ if ( srcChanged ) {
279
+ widthField.setValue( preLoadedWidth );
280
+ heightField.setValue( preLoadedHeight );
281
+ }
282
+
283
+ // If the old image remains, reset button should revert
284
+ // dimensions as loaded when the dialog was first shown.
285
+ else {
286
+ widthField.setValue( domWidth );
287
+ heightField.setValue( domHeight );
288
+ }
289
+
290
+ evt.data && evt.data.preventDefault();
291
+ }, this );
292
+
293
+ setupMouseClasses( resetButton );
294
+ }
295
+ }
296
+
297
+ function toggleLockRatio( enable ) {
298
+ // No locking if there's no radio (i.e. due to ACF).
299
+ if ( !lockButton )
300
+ return;
301
+
302
+ if ( typeof enable == 'boolean' ) {
303
+ // If user explicitly wants to decide whether
304
+ // to lock or not, don't do anything.
305
+ if ( userDefinedLock )
306
+ return;
307
+
308
+ lockRatio = enable;
309
+ }
310
+
311
+ // Undefined. User changed lock value.
312
+ else {
313
+ var width = widthField.getValue(),
314
+ height;
315
+
316
+ userDefinedLock = true;
317
+ lockRatio = !lockRatio;
318
+
319
+ // Automatically adjust height to width to match
320
+ // the original ratio (based on dom- dimensions).
321
+ if ( lockRatio && width ) {
322
+ height = domHeight / domWidth * width;
323
+
324
+ if ( !isNaN( height ) )
325
+ heightField.setValue( Math.round( height ) );
326
+ }
327
+ }
328
+
329
+ lockButton[ lockRatio ? 'removeClass' : 'addClass' ]( 'cke_btn_unlocked' );
330
+ lockButton.setAttribute( 'aria-checked', lockRatio );
331
+
332
+ // Ratio button hc presentation - WHITE SQUARE / BLACK SQUARE
333
+ if ( CKEDITOR.env.hc ) {
334
+ var icon = lockButton.getChild( 0 );
335
+ icon.setHtml( lockRatio ? CKEDITOR.env.ie ? '\u25A0' : '\u25A3' : CKEDITOR.env.ie ? '\u25A1' : '\u25A2' );
336
+ }
337
+ }
338
+
339
+ function toggleDimensions( enable ) {
340
+ var method = enable ? 'enable' : 'disable';
341
+
342
+ widthField[ method ]();
343
+ heightField[ method ]();
344
+ }
345
+
346
+ var srcBoxChildren = [
347
+ {
348
+ id: 'src',
349
+ type: 'text',
350
+ label: commonLang.url,
351
+ onKeyup: onChangeSrc,
352
+ onChange: onChangeSrc,
353
+ setup: function( widget ) {
354
+ this.setValue( widget.data.src );
355
+ },
356
+ commit: function( widget ) {
357
+ widget.setData( 'src', this.getValue() );
358
+ },
359
+ validate: CKEDITOR.dialog.validate.notEmpty( lang.urlMissing )
360
+ }
361
+ ];
362
+
363
+ // Render the "Browse" button on demand to avoid an "empty" (hidden child)
364
+ // space in dialog layout that distorts the UI.
365
+ if ( hasFileBrowser ) {
366
+ srcBoxChildren.push( {
367
+ type: 'button',
368
+ id: 'browse',
369
+ // v-align with the 'txtUrl' field.
370
+ // TODO: We need something better than a fixed size here.
371
+ style: 'display:inline-block;margin-top:14px;',
372
+ align: 'center',
373
+ label: editor.lang.common.browseServer,
374
+ hidden: true,
375
+ filebrowser: 'info:src'
376
+ } );
377
+ }
378
+
379
+ return {
380
+ title: lang.title,
381
+ minWidth: 250,
382
+ minHeight: 100,
383
+ onLoad: function() {
384
+ // Create a "global" reference to the document for this dialog instance.
385
+ doc = this._.element.getDocument();
386
+
387
+ // Create a pre-loader used for determining dimensions of new images.
388
+ preLoader = createPreLoader();
389
+ },
390
+ onShow: function() {
391
+ // Create a "global" reference to edited widget.
392
+ widget = this.widget;
393
+
394
+ // Create a "global" reference to widget's image.
395
+ image = widget.parts.image;
396
+
397
+ // Reset global variables.
398
+ srcChanged = userDefinedLock = lockRatio = false;
399
+
400
+ // Natural dimensions of the image.
401
+ natural = getNatural( image );
402
+
403
+ // Get the natural width of the image.
404
+ preLoadedWidth = domWidth = natural.width;
405
+
406
+ // Get the natural height of the image.
407
+ preLoadedHeight = domHeight = natural.height;
408
+ },
409
+ contents: [
410
+ {
411
+ id: 'info',
412
+ label: lang.infoTab,
413
+ elements: [
414
+ {
415
+ type: 'vbox',
416
+ padding: 0,
417
+ children: [
418
+ {
419
+ type: 'hbox',
420
+ widths: [ '100%' ],
421
+ className: 'cke_dialog_image_url',
422
+ children: srcBoxChildren
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ id: 'alt',
428
+ type: 'text',
429
+ label: lang.alt,
430
+ setup: function( widget ) {
431
+ this.setValue( widget.data.alt );
432
+ },
433
+ commit: function( widget ) {
434
+ widget.setData( 'alt', this.getValue() );
435
+ },
436
+ validate: editor.config.image2_altRequired === true ? CKEDITOR.dialog.validate.notEmpty( lang.altMissing ) : null
437
+ },
438
+ {
439
+ type: 'hbox',
440
+ widths: [ '25%', '25%', '50%' ],
441
+ requiredContent: features.dimension.requiredContent,
442
+ children: [
443
+ {
444
+ type: 'text',
445
+ width: '45px',
446
+ id: 'width',
447
+ label: commonLang.width,
448
+ validate: validateDimension,
449
+ onKeyUp: onChangeDimension,
450
+ onLoad: function() {
451
+ widthField = this;
452
+ },
453
+ setup: function( widget ) {
454
+ this.setValue( widget.data.width );
455
+ },
456
+ commit: function( widget ) {
457
+ widget.setData( 'width', this.getValue() );
458
+ }
459
+ },
460
+ {
461
+ type: 'text',
462
+ id: 'height',
463
+ width: '45px',
464
+ label: commonLang.height,
465
+ validate: validateDimension,
466
+ onKeyUp: onChangeDimension,
467
+ onLoad: function() {
468
+ heightField = this;
469
+ },
470
+ setup: function( widget ) {
471
+ this.setValue( widget.data.height );
472
+ },
473
+ commit: function( widget ) {
474
+ widget.setData( 'height', this.getValue() );
475
+ }
476
+ },
477
+ {
478
+ id: 'lock',
479
+ type: 'html',
480
+ style: lockResetStyle,
481
+ onLoad: onLoadLockReset,
482
+ setup: function( widget ) {
483
+ toggleLockRatio( widget.data.lock );
484
+ },
485
+ commit: function( widget ) {
486
+ widget.setData( 'lock', lockRatio );
487
+ },
488
+ html: lockResetHtml
489
+ }
490
+ ]
491
+ },
492
+ {
493
+ type: 'hbox',
494
+ id: 'alignment',
495
+ requiredContent: features.align.requiredContent,
496
+ children: [
497
+ {
498
+ id: 'align',
499
+ type: 'radio',
500
+ items: [
501
+ [ commonLang.alignNone, 'none' ],
502
+ [ commonLang.left, 'left' ],
503
+ [ commonLang.center, 'center' ],
504
+ [ commonLang.right, 'right' ]
505
+ ],
506
+ label: commonLang.align,
507
+ setup: function( widget ) {
508
+ this.setValue( widget.data.align );
509
+ },
510
+ commit: function( widget ) {
511
+ widget.setData( 'align', this.getValue() );
512
+ }
513
+ }
514
+ ]
515
+ },
516
+ {
517
+ id: 'hasCaption',
518
+ type: 'checkbox',
519
+ label: lang.captioned,
520
+ requiredContent: features.caption.requiredContent,
521
+ setup: function( widget ) {
522
+ this.setValue( widget.data.hasCaption );
523
+ },
524
+ commit: function( widget ) {
525
+ widget.setData( 'hasCaption', this.getValue() );
526
+ }
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ id: 'Upload',
532
+ hidden: true,
533
+ filebrowser: 'uploadButton',
534
+ label: lang.uploadTab,
535
+ elements: [
536
+ {
537
+ type: 'file',
538
+ id: 'upload',
539
+ label: lang.btnUpload,
540
+ style: 'height:40px'
541
+ },
542
+ {
543
+ type: 'fileButton',
544
+ id: 'uploadButton',
545
+ filebrowser: 'info:src',
546
+ label: lang.btnUpload,
547
+ 'for': [ 'Upload', 'upload' ]
548
+ }
549
+ ]
550
+ }
551
+ ]
552
+ };
553
+ } );