integral 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/logo.png +0 -0
  3. data/app/assets/javascripts/ckeditor/my_config.js.erb +26 -18
  4. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/lv.js +8 -0
  5. data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +1 -1
  6. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +14 -14
  7. data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +8 -8
  8. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  9. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  10. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  11. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  12. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  13. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  14. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  15. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  16. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  17. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  18. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  19. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  20. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  21. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  22. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  23. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  24. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  25. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  26. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  27. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -7
  28. data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
  29. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
  30. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
  31. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  32. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  33. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  34. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  35. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  36. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  37. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  38. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ar.js +15 -0
  39. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/lv.js +15 -0
  40. data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +1 -1
  41. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/copywidget.png +0 -0
  42. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/editwidget.png +0 -0
  43. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/copywidget.png +0 -0
  44. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/editwidget.png +0 -0
  45. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/removewidget.png +0 -0
  46. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/widget.png +0 -0
  47. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/removewidget.png +0 -0
  48. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/widget.png +0 -0
  49. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/plugin.js +86 -0
  50. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  51. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  52. data/app/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  53. data/app/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  54. data/app/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  55. data/app/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  56. data/app/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  57. data/app/assets/javascripts/ckeditor/plugins/image2/lang/af.js +21 -0
  58. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ar.js +21 -0
  59. data/app/assets/javascripts/ckeditor/plugins/image2/lang/az.js +21 -0
  60. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bg.js +21 -0
  61. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bn.js +21 -0
  62. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bs.js +21 -0
  63. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ca.js +21 -0
  64. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cs.js +21 -0
  65. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cy.js +21 -0
  66. data/app/assets/javascripts/ckeditor/plugins/image2/lang/da.js +21 -0
  67. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de-ch.js +21 -0
  68. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de.js +21 -0
  69. data/app/assets/javascripts/ckeditor/plugins/image2/lang/el.js +21 -0
  70. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-au.js +21 -0
  71. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-ca.js +21 -0
  72. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-gb.js +21 -0
  73. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  74. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eo.js +21 -0
  75. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es-mx.js +21 -0
  76. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es.js +21 -0
  77. data/app/assets/javascripts/ckeditor/plugins/image2/lang/et.js +21 -0
  78. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eu.js +21 -0
  79. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fa.js +21 -0
  80. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fi.js +21 -0
  81. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fo.js +21 -0
  82. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
  83. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr.js +21 -0
  84. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gl.js +21 -0
  85. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gu.js +21 -0
  86. data/app/assets/javascripts/ckeditor/plugins/image2/lang/he.js +21 -0
  87. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hi.js +21 -0
  88. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hr.js +21 -0
  89. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hu.js +21 -0
  90. data/app/assets/javascripts/ckeditor/plugins/image2/lang/id.js +21 -0
  91. data/app/assets/javascripts/ckeditor/plugins/image2/lang/is.js +21 -0
  92. data/app/assets/javascripts/ckeditor/plugins/image2/lang/it.js +21 -0
  93. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ja.js +21 -0
  94. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ka.js +21 -0
  95. data/app/assets/javascripts/ckeditor/plugins/image2/lang/km.js +21 -0
  96. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ko.js +21 -0
  97. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ku.js +21 -0
  98. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lt.js +21 -0
  99. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lv.js +21 -0
  100. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mk.js +21 -0
  101. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mn.js +21 -0
  102. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ms.js +21 -0
  103. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nb.js +21 -0
  104. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nl.js +21 -0
  105. data/app/assets/javascripts/ckeditor/plugins/image2/lang/no.js +21 -0
  106. data/app/assets/javascripts/ckeditor/plugins/image2/lang/oc.js +21 -0
  107. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pl.js +21 -0
  108. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt-br.js +21 -0
  109. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt.js +21 -0
  110. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ro.js +21 -0
  111. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  112. data/app/assets/javascripts/ckeditor/plugins/image2/lang/si.js +21 -0
  113. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sk.js +21 -0
  114. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sl.js +21 -0
  115. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sq.js +21 -0
  116. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
  117. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr.js +21 -0
  118. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sv.js +21 -0
  119. data/app/assets/javascripts/ckeditor/plugins/image2/lang/th.js +21 -0
  120. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tr.js +21 -0
  121. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tt.js +21 -0
  122. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ug.js +21 -0
  123. data/app/assets/javascripts/ckeditor/plugins/image2/lang/uk.js +21 -0
  124. data/app/assets/javascripts/ckeditor/plugins/image2/lang/vi.js +21 -0
  125. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
  126. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh.js +21 -0
  127. data/app/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
  128. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  129. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  130. data/app/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
  131. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/copywidget.png +0 -0
  132. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/editwidget.png +0 -0
  133. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/copywidget.png +0 -0
  134. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/editwidget.png +0 -0
  135. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/removewidget.png +0 -0
  136. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/widget.png +0 -0
  137. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/removewidget.png +0 -0
  138. data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/widget.png +0 -0
  139. data/app/assets/javascripts/ckeditor/plugins/integral-card/plugin.js +86 -0
  140. data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/dialogs/integralrecentposts.js +40 -0
  141. data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/plugin.js +32 -0
  142. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +4 -4
  143. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +4 -4
  144. data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +7 -7
  145. data/app/assets/javascripts/ckeditor/plugins/linkballoon/README.md +5 -0
  146. data/app/assets/javascripts/ckeditor/plugins/linkballoon/assets/demo.png +0 -0
  147. data/app/assets/javascripts/ckeditor/plugins/linkballoon/plugin.js +25 -0
  148. data/app/assets/javascripts/ckeditor/plugins/notification/lang/az.js +7 -0
  149. data/app/assets/javascripts/ckeditor/plugins/notification/lang/bg.js +7 -0
  150. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ca.js +7 -0
  151. data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +2 -2
  152. data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +2 -2
  153. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +2 -2
  154. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +2 -2
  155. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en-au.js +7 -0
  156. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +2 -2
  157. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +2 -2
  158. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es-mx.js +7 -0
  159. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es.js +7 -0
  160. data/app/assets/javascripts/ckeditor/plugins/notification/lang/et.js +7 -0
  161. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +2 -2
  162. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fa.js +7 -0
  163. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +3 -3
  164. data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +2 -2
  165. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hr.js +7 -0
  166. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hu.js +7 -0
  167. data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +2 -2
  168. data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +2 -2
  169. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ja.js +7 -0
  170. data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +2 -2
  171. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +2 -2
  172. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +2 -2
  173. data/app/assets/javascripts/ckeditor/plugins/notification/lang/lv.js +7 -0
  174. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +2 -2
  175. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +2 -2
  176. data/app/assets/javascripts/ckeditor/plugins/notification/lang/oc.js +7 -0
  177. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +2 -2
  178. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +2 -2
  179. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +2 -2
  180. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ro.js +7 -0
  181. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +2 -2
  182. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sk.js +7 -0
  183. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sq.js +7 -0
  184. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +2 -2
  185. data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +2 -2
  186. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +2 -2
  187. data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +2 -2
  188. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +3 -3
  189. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +2 -2
  190. data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +794 -784
  191. data/app/assets/javascripts/ckeditor/plugins/numericinput/LICENSE.md +363 -0
  192. data/app/assets/javascripts/ckeditor/plugins/numericinput/README.md +16 -0
  193. data/app/assets/javascripts/ckeditor/plugins/numericinput/plugin.js +354 -0
  194. data/app/assets/javascripts/ckeditor/plugins/openlink/README.md +50 -0
  195. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/hidpi/openLink.png +0 -0
  196. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/openLink.png +0 -0
  197. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/bg.js +7 -0
  198. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/de.js +7 -0
  199. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/en.js +7 -0
  200. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/pl.js +7 -0
  201. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/ru.js +7 -0
  202. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/uk.js +7 -0
  203. data/app/assets/javascripts/ckeditor/plugins/openlink/plugin.js +178 -0
  204. data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +5 -5
  205. data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +2 -2
  206. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +2 -2
  207. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +2 -2
  208. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +2 -2
  209. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +5 -5
  210. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +2 -2
  211. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +2 -2
  212. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +2 -2
  213. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +2 -2
  214. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +2 -2
  215. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +2 -2
  216. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +2 -2
  217. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-au.js +12 -0
  218. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +2 -2
  219. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +2 -2
  220. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +2 -2
  221. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +2 -2
  222. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +2 -2
  223. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +2 -2
  224. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +2 -2
  225. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +2 -2
  226. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +2 -2
  227. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +2 -2
  228. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +2 -2
  229. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +2 -2
  230. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +2 -2
  231. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +2 -2
  232. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +2 -2
  233. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +2 -2
  234. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +2 -2
  235. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +2 -2
  236. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +2 -2
  237. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +2 -2
  238. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +2 -2
  239. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +5 -5
  240. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +2 -2
  241. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +2 -2
  242. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +2 -2
  243. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +2 -2
  244. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +2 -2
  245. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +2 -2
  246. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +2 -2
  247. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ro.js +12 -0
  248. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +2 -2
  249. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +2 -2
  250. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +2 -2
  251. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +2 -2
  252. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +2 -2
  253. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +2 -2
  254. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +2 -2
  255. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +2 -2
  256. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +2 -2
  257. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +2 -2
  258. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +2 -2
  259. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +2 -2
  260. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +2 -2
  261. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +2 -2
  262. data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +3 -3
  263. data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +6 -6
  264. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +4 -4
  265. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +3 -3
  266. data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +2 -2
  267. data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +2 -2
  268. data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +2 -2
  269. data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +2 -2
  270. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +2 -2
  271. data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +2 -2
  272. data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +3 -3
  273. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +2 -2
  274. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +2 -2
  275. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +2 -2
  276. data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +2 -2
  277. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +2 -2
  278. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +2 -2
  279. data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +2 -2
  280. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-au.js +8 -0
  281. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +2 -2
  282. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +2 -2
  283. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +2 -2
  284. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +2 -2
  285. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +2 -2
  286. data/app/assets/javascripts/ckeditor/plugins/widget/lang/et.js +8 -0
  287. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +2 -2
  288. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +3 -3
  289. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +2 -2
  290. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +2 -2
  291. data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +2 -2
  292. data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +2 -2
  293. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +2 -2
  294. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +2 -2
  295. data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +2 -2
  296. data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +2 -2
  297. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +2 -2
  298. data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +2 -2
  299. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +2 -2
  300. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +2 -2
  301. data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +3 -3
  302. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +2 -2
  303. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +2 -2
  304. data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +2 -2
  305. data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +2 -2
  306. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +2 -2
  307. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +2 -2
  308. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +2 -2
  309. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ro.js +8 -0
  310. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +2 -2
  311. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +2 -2
  312. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +2 -2
  313. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +3 -3
  314. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +2 -2
  315. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +2 -2
  316. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +2 -2
  317. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +2 -2
  318. data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +2 -2
  319. data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +2 -2
  320. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +2 -2
  321. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +2 -2
  322. data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +235 -64
  323. data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +6 -11
  324. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +1 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/bg.js +17 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +1 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/cs.js +15 -0
  328. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +1 -0
  329. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +1 -0
  330. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +1 -0
  331. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +5 -1
  332. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +1 -0
  333. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/eu.js +17 -0
  334. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fa.js +13 -0
  335. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +1 -0
  336. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +1 -0
  337. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +1 -0
  338. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +1 -0
  339. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hu.js +14 -0
  340. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +4 -3
  341. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +5 -5
  342. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ko.js +16 -0
  343. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +3 -2
  344. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +1 -0
  345. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +4 -3
  346. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +1 -0
  347. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +1 -0
  348. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ro.js +15 -0
  349. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  350. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sk.js +15 -0
  351. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +5 -3
  352. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +1 -0
  353. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/uk.js +17 -0
  354. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -0
  355. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh.js +14 -0
  356. data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +485 -302
  357. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  358. data/app/assets/javascripts/integral/backend.js +10 -14
  359. data/app/assets/javascripts/integral/frontend.js +0 -2
  360. data/app/assets/javascripts/integral/support/date_picker.coffee +54 -59
  361. data/app/assets/javascripts/integral/support/grid.coffee +11 -4
  362. data/app/assets/javascripts/integral/support/remote_form.coffee +13 -9
  363. data/app/assets/stylesheets/integral/frontend.sass +0 -1
  364. data/app/controllers/integral/application_controller.rb +3 -2
  365. data/app/controllers/integral/backend/activities_controller.rb +1 -1
  366. data/app/controllers/integral/backend/base_controller.rb +160 -24
  367. data/app/controllers/integral/backend/images_controller.rb +16 -49
  368. data/app/controllers/integral/backend/lists_controller.rb +15 -85
  369. data/app/controllers/integral/backend/pages_controller.rb +13 -116
  370. data/app/controllers/integral/backend/posts_controller.rb +21 -108
  371. data/app/controllers/integral/backend/settings_controller.rb +5 -10
  372. data/app/controllers/integral/backend/static_pages_controller.rb +4 -0
  373. data/app/controllers/integral/backend/users_controller.rb +23 -66
  374. data/app/controllers/integral/pages_controller.rb +2 -2
  375. data/app/controllers/integral/posts_controller.rb +2 -6
  376. data/app/decorators/integral/image_decorator.rb +1 -1
  377. data/app/decorators/integral/list_decorator.rb +1 -1
  378. data/app/decorators/integral/page_decorator.rb +1 -1
  379. data/app/decorators/integral/paginating_decorator.rb +6 -0
  380. data/app/decorators/integral/post_decorator.rb +34 -1
  381. data/app/decorators/integral/user_decorator.rb +1 -1
  382. data/app/decorators/integral/version_decorator.rb +1 -1
  383. data/app/helpers/integral/application_helper.rb +7 -0
  384. data/app/helpers/integral/blog_helper.rb +29 -0
  385. data/app/helpers/integral/social_helper.rb +0 -23
  386. data/app/models/integral/list.rb +1 -2
  387. data/app/models/integral/page.rb +1 -1
  388. data/app/models/integral/post.rb +1 -1
  389. data/app/models/integral/user.rb +6 -0
  390. data/app/policies/integral/base_policy.rb +1 -1
  391. data/app/views/devise/sessions/new.haml +2 -2
  392. data/app/views/integral/backend/images/_form.haml +8 -8
  393. data/app/views/integral/backend/images/edit.haml +10 -2
  394. data/app/views/integral/backend/lists/_child_fields.haml +1 -1
  395. data/app/views/integral/backend/lists/_form.haml +1 -1
  396. data/app/views/integral/backend/lists/_item_container.haml +2 -2
  397. data/app/views/integral/backend/lists/_item_modal.haml +1 -1
  398. data/app/views/integral/backend/lists/_list_item_fields.haml +4 -3
  399. data/app/views/integral/backend/lists/edit.haml +15 -1
  400. data/app/views/integral/backend/pages/_form.haml +3 -3
  401. data/app/views/integral/backend/pages/activities.haml +2 -2
  402. data/app/views/integral/backend/pages/activity.haml +1 -1
  403. data/app/views/integral/backend/pages/edit.haml +20 -0
  404. data/app/views/integral/backend/posts/_form.haml +9 -5
  405. data/app/views/integral/backend/posts/activities.haml +2 -2
  406. data/app/views/integral/backend/posts/activity.haml +1 -1
  407. data/app/views/integral/backend/posts/edit.haml +8 -3
  408. data/app/views/integral/backend/settings/sections/_social.haml +1 -3
  409. data/app/views/integral/backend/users/_form.haml +4 -4
  410. data/app/views/integral/backend/users/edit.haml +1 -1
  411. data/app/views/integral/backend/users/show.haml +7 -7
  412. data/app/views/integral/posts/index.haml +2 -1
  413. data/app/views/integral/posts/templates/default.haml +1 -2
  414. data/app/views/integral/shared/_share_modal.haml +0 -3
  415. data/app/views/integral/shared/_social_list_items.haml +6 -12
  416. data/config/locales/en.yml +23 -12
  417. data/lib/generators/templates/app.yml +0 -1
  418. data/lib/integral/engine.rb +1 -0
  419. data/lib/integral/router.rb +3 -1
  420. data/lib/integral/version.rb +1 -1
  421. data/public/integral/ckeditor_demo_content.html +0 -13
  422. metadata +186 -12
  423. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +0 -13
  424. data/app/assets/javascripts/integral/support/date_picker/picker.date.js +0 -1435
  425. data/app/assets/javascripts/integral/support/date_picker/picker.js +0 -1132
  426. data/app/assets/stylesheets/integral/support/date-picker.scss +0 -16
  427. data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +0 -452
  428. data/app/assets/stylesheets/integral/support/date_picker/_default.scss +0 -201
  429. data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +0 -220
  430. data/app/views/integral/backend/pages/edit.html.haml +0 -15
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'lv', {
6
6
  'move': 'Klikšķina un velc, lai pārvietotu',
7
- 'label': '%1 widget' // MISSING
7
+ 'label': 'logrīks %1'
8
8
  } );
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'nb', {
6
6
  'move': 'Klikk og dra for å flytte',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'nl', {
6
6
  'move': 'Klik en sleep om te verplaatsen',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'no', {
6
6
  'move': 'Klikk og dra for å flytte',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'oc', {
6
6
  'move': 'Clicar e lisar per desplaçar',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'pl', {
6
6
  'move': 'Kliknij i przeciągnij, by przenieść.',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'pt-br', {
6
6
  'move': 'Click e arraste para mover',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'pt', {
6
6
  'move': 'Clique e arraste para mover',
@@ -0,0 +1,8 @@
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
+ CKEDITOR.plugins.setLang( 'widget', 'ro', {
6
+ 'move': 'Apasă și trage pentru a muta',
7
+ 'label': '%1 widget'
8
+ } );
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'ru', {
6
6
  'move': 'Нажмите и перетащите, чтобы переместить',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'sk', {
6
6
  'move': 'Kliknite a potiahnite pre presunutie',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'sl', {
6
6
  'move': 'Kliknite in povlecite, da premaknete',
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'sq', {
6
6
  'move': 'Kliko dhe tërhiqe për ta lëvizur',
7
- 'label': '%1 widget' // MISSING
7
+ 'label': '%1 vegël'
8
8
  } );
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'sv', {
6
6
  'move': 'Klicka och drag för att flytta',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'tr', {
6
6
  'move': 'Taşımak için, tıklayın ve sürükleyin',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'tt', {
6
6
  'move': 'Күчереп куер өчен басып шудырыгыз',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'ug', {
6
6
  'move': 'يۆتكەشتە چېكىپ سۆرەڭ',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'uk', {
6
6
  'move': 'Клікніть і потягніть для переміщення',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'vi', {
6
6
  'move': 'Nhấp chuột và kéo để di chuyển',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'zh-cn', {
6
6
  'move': '点击并拖拽以移动',
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
  CKEDITOR.plugins.setLang( 'widget', 'zh', {
6
6
  'move': '拖曳以移動',
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or http://ckeditor.com/license
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
4
  */
5
5
 
6
6
  /**
7
- * @fileOverview [Widget](http://ckeditor.com/addon/widget) plugin.
7
+ * @fileOverview [Widget](https://ckeditor.com/cke4/addon/widget) plugin.
8
8
  */
9
9
 
10
10
  'use strict';
@@ -14,10 +14,14 @@
14
14
 
15
15
  CKEDITOR.plugins.add( 'widget', {
16
16
  // jscs:disable maximumLineLength
17
- lang: 'af,ar,az,bg,ca,cs,cy,da,de,de-ch,el,en,en-gb,eo,es,es-mx,eu,fa,fi,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,lv,nb,nl,no,oc,pl,pt,pt-br,ru,sk,sl,sq,sv,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
17
+ lang: 'af,ar,az,bg,ca,cs,cy,da,de,de-ch,el,en,en-au,en-gb,eo,es,es-mx,et,eu,fa,fi,fr,gl,he,hr,hu,id,it,ja,km,ko,ku,lv,nb,nl,no,oc,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
18
18
  // jscs:enable maximumLineLength
19
19
  requires: 'lineutils,clipboard,widgetselection',
20
20
  onLoad: function() {
21
+ // Widgets require querySelectorAll for proper work (#1319).
22
+ if ( CKEDITOR.document.$.querySelectorAll === undefined ) {
23
+ return;
24
+ }
21
25
  CKEDITOR.addCss(
22
26
  '.cke_widget_wrapper{' +
23
27
  'position:relative;' +
@@ -27,16 +31,16 @@
27
31
  'display:inline-block' +
28
32
  '}' +
29
33
  '.cke_widget_wrapper:hover>.cke_widget_element{' +
30
- 'outline:2px solid yellow;' +
34
+ 'outline:2px solid #ffd25c;' +
31
35
  'cursor:default' +
32
36
  '}' +
33
37
  '.cke_widget_wrapper:hover .cke_widget_editable{' +
34
- 'outline:2px solid yellow' +
38
+ 'outline:2px solid #ffd25c' +
35
39
  '}' +
36
40
  '.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,' +
37
41
  // We need higher specificity than hover style.
38
42
  '.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{' +
39
- 'outline:2px solid #ace' +
43
+ 'outline:2px solid #47a4f5' +
40
44
  '}' +
41
45
  '.cke_widget_editable{' +
42
46
  'cursor:text' +
@@ -46,13 +50,13 @@
46
50
  'width:' + DRAG_HANDLER_SIZE + 'px;' +
47
51
  'height:0;' +
48
52
  // Initially drag handler should not be visible, until its position will be
49
- // calculated (http://dev.ckeditor.com/ticket/11177).
53
+ // calculated (https://dev.ckeditor.com/ticket/11177).
50
54
  // We need to hide unpositined handlers, so they don't extend
51
- // widget's outline far to the left (http://dev.ckeditor.com/ticket/12024).
55
+ // widget's outline far to the left (https://dev.ckeditor.com/ticket/12024).
52
56
  'display:none;' +
53
57
  'opacity:0.75;' +
54
58
  'transition:height 0s 0.2s;' + // Delay hiding drag handler.
55
- // Prevent drag handler from being misplaced (http://dev.ckeditor.com/ticket/11198).
59
+ // Prevent drag handler from being misplaced (https://dev.ckeditor.com/ticket/11198).
56
60
  'line-height:0' +
57
61
  '}' +
58
62
  '.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{' +
@@ -80,9 +84,15 @@
80
84
  'cursor:move !important' +
81
85
  '}'
82
86
  );
87
+
88
+ addCustomStyleHandler();
83
89
  },
84
90
 
85
91
  beforeInit: function( editor ) {
92
+ // Widgets require querySelectorAll for proper work (#1319).
93
+ if ( CKEDITOR.document.$.querySelectorAll === undefined ) {
94
+ return;
95
+ }
86
96
  /**
87
97
  * An instance of widget repository. It contains all
88
98
  * {@link CKEDITOR.plugins.widget.repository#registered registered widget definitions} and
@@ -103,6 +113,10 @@
103
113
  },
104
114
 
105
115
  afterInit: function( editor ) {
116
+ // Widgets require querySelectorAll for proper work (#1319).
117
+ if ( CKEDITOR.document.$.querySelectorAll === undefined ) {
118
+ return;
119
+ }
106
120
  addWidgetButtons( editor );
107
121
  setupContextMenu( editor );
108
122
  }
@@ -646,6 +660,11 @@
646
660
 
647
661
  isInline = isWidgetInline( widgetDef, element.getName() );
648
662
 
663
+ // Preserve initial and trailing space by replacing white space with   (#605).
664
+ if ( isInline ) {
665
+ preserveSpaces( element );
666
+ }
667
+
649
668
  wrapper = new CKEDITOR.dom.element( isInline ? 'span' : 'div' );
650
669
  wrapper.setAttributes( getWrapperAttributes( isInline, widgetName ) );
651
670
 
@@ -675,6 +694,11 @@
675
694
 
676
695
  isInline = isWidgetInline( widgetDef, element.name );
677
696
 
697
+ // Preserve initial and trailing space by replacing white space with   (#605).
698
+ if ( isInline ) {
699
+ preserveSpaces( element );
700
+ }
701
+
678
702
  wrapper = new CKEDITOR.htmlParser.element( isInline ? 'span' : 'div', getWrapperAttributes( isInline, widgetName ) );
679
703
  wrapper.attributes[ 'data-cke-display-name' ] = widgetDef.pathName ? widgetDef.pathName : element.name;
680
704
 
@@ -1091,12 +1115,43 @@
1091
1115
  * @param {Boolean} [offline] See {@link #method-destroy} method.
1092
1116
  */
1093
1117
  destroyEditable: function( editableName, offline ) {
1094
- var editable = this.editables[ editableName ];
1118
+ var editable = this.editables[ editableName ],
1119
+ canDestroyFilter = true;
1095
1120
 
1096
1121
  editable.removeListener( 'focus', onEditableFocus );
1097
1122
  editable.removeListener( 'blur', onEditableBlur );
1098
1123
  this.editor.focusManager.remove( editable );
1099
1124
 
1125
+ // Destroy filter if it's no longer used by other editables (#1722).
1126
+ if ( editable.filter ) {
1127
+ for ( var widgetName in this.repository.instances ) {
1128
+ var widget = this.repository.instances[ widgetName ];
1129
+
1130
+ if ( !widget.editables ) {
1131
+ continue;
1132
+ }
1133
+
1134
+ var widgetEditable = widget.editables[ editableName ];
1135
+
1136
+ if ( !widgetEditable || widgetEditable === editable ) {
1137
+ continue;
1138
+ }
1139
+
1140
+ if ( editable.filter === widgetEditable.filter ) {
1141
+ canDestroyFilter = false;
1142
+ }
1143
+ }
1144
+
1145
+ if ( canDestroyFilter ) {
1146
+ editable.filter.destroy();
1147
+
1148
+ var filters = this.repository._.filters[ this.name ];
1149
+ if ( filters ) {
1150
+ delete filters[ editableName ];
1151
+ }
1152
+ }
1153
+ }
1154
+
1100
1155
  if ( !offline ) {
1101
1156
  this.repository.destroyAll( false, editable );
1102
1157
  editable.removeClass( 'cke_widget_editable' );
@@ -1211,7 +1266,7 @@
1211
1266
  * @returns {Boolean} Whether an editable was successfully initialized.
1212
1267
  */
1213
1268
  initEditable: function( editableName, definition ) {
1214
- // Don't fetch just first element which matched selector but look for a correct one. (http://dev.ckeditor.com/ticket/13334)
1269
+ // Don't fetch just first element which matched selector but look for a correct one. (https://dev.ckeditor.com/ticket/13334)
1215
1270
  var editable = this._findOneNotNested( definition.selector );
1216
1271
 
1217
1272
  if ( editable && editable.is( CKEDITOR.dtd.$editable ) ) {
@@ -1255,7 +1310,7 @@
1255
1310
 
1256
1311
  /**
1257
1312
  * Looks inside wrapper element to find a node that
1258
- * matches given selector and is not nested in other widget. (http://dev.ckeditor.com/ticket/13334)
1313
+ * matches given selector and is not nested in other widget. (https://dev.ckeditor.com/ticket/13334)
1259
1314
  *
1260
1315
  * @since 4.5
1261
1316
  * @private
@@ -1320,7 +1375,7 @@
1320
1375
  !isDirty && this.editor.resetDirty();
1321
1376
  }
1322
1377
 
1323
- // Always focus editor (not only when focusManger.hasFocus is false) (because of http://dev.ckeditor.com/ticket/10483).
1378
+ // Always focus editor (not only when focusManger.hasFocus is false) (because of https://dev.ckeditor.com/ticket/10483).
1324
1379
  this.editor.focus();
1325
1380
  },
1326
1381
 
@@ -1473,7 +1528,7 @@
1473
1528
  if ( oldPos && newPos.x == oldPos.x && newPos.y == oldPos.y )
1474
1529
  return;
1475
1530
 
1476
- // We need to make sure that dirty state is not changed (http://dev.ckeditor.com/ticket/11487).
1531
+ // We need to make sure that dirty state is not changed (https://dev.ckeditor.com/ticket/11487).
1477
1532
  var initialDirty = editor.checkDirty();
1478
1533
 
1479
1534
  editor.fire( 'lockSnapshot' );
@@ -1574,6 +1629,18 @@
1574
1629
  return node.type == CKEDITOR.NODE_ELEMENT && node.hasAttribute( 'data-cke-widget-wrapper' );
1575
1630
  };
1576
1631
 
1632
+ /**
1633
+ * Checks whether the `node` is a DOM widget.
1634
+ *
1635
+ * @since 4.8.0
1636
+ * @static
1637
+ * @param {CKEDITOR.dom.node} node
1638
+ * @returns {Boolean}
1639
+ */
1640
+ Widget.isDomWidget = function( node ) {
1641
+ return node ? this.isDomWidgetWrapper( node ) || this.isDomWidgetElement( node ) : false;
1642
+ };
1643
+
1577
1644
  /**
1578
1645
  * Checks whether the `node` is a {@link CKEDITOR.plugins.widget#element widget element}.
1579
1646
  *
@@ -1866,15 +1933,17 @@
1866
1933
  editor.addCommand( widgetDef.name, {
1867
1934
  exec: function( editor, commandData ) {
1868
1935
  var focused = editor.widgets.focused;
1869
- // If a widget of the same type is focused, start editing.
1870
- if ( focused && focused.name == widgetDef.name )
1936
+ if ( focused && focused.name == widgetDef.name ) {
1937
+ // If a widget of the same type is focused, start editing.
1871
1938
  focused.edit();
1872
- // Otherwise...
1873
- // ... use insert method is was defined.
1874
- else if ( widgetDef.insert )
1875
- widgetDef.insert();
1876
- // ... or create a brand-new widget from template.
1877
- else if ( widgetDef.template ) {
1939
+ } else if ( widgetDef.insert ) {
1940
+ // ... use insert method is was defined.
1941
+ widgetDef.insert( {
1942
+ editor: editor,
1943
+ commandData: commandData
1944
+ } );
1945
+ } else if ( widgetDef.template ) {
1946
+ // ... or create a brand-new widget from template.
1878
1947
  var defaults = typeof widgetDef.defaults == 'function' ? widgetDef.defaults() : widgetDef.defaults,
1879
1948
  element = CKEDITOR.dom.element.createFromHtml( widgetDef.template.output( defaults ) ),
1880
1949
  instance,
@@ -1947,25 +2016,38 @@
1947
2016
 
1948
2017
  function addWidgetProcessors( widgetsRepo, widgetDef ) {
1949
2018
  var upcast = widgetDef.upcast,
1950
- upcasts,
1951
2019
  priority = widgetDef.upcastPriority || 10;
1952
2020
 
2021
+ function multipleUpcastsHandler( element, data ) {
2022
+ var upcasts = widgetDef.upcast.split( ',' ),
2023
+ upcast,
2024
+ i;
2025
+
2026
+ for ( i = 0; i < upcasts.length; i++ ) {
2027
+ upcast = upcasts[ i ];
2028
+
2029
+ if ( upcast === element.name ) {
2030
+ return widgetDef.upcasts[ upcast ].call( this, element, data );
2031
+ }
2032
+ }
2033
+
2034
+ return false;
2035
+ }
2036
+
1953
2037
  if ( !upcast )
1954
2038
  return;
1955
2039
 
1956
2040
  // Multiple upcasts defined in string.
1957
2041
  if ( typeof upcast == 'string' ) {
1958
- upcasts = upcast.split( ',' );
1959
- while ( upcasts.length ) {
1960
- addUpcast( widgetDef.upcasts[ upcasts.pop() ], widgetDef.name, priority );
1961
- }
2042
+ // This handler ensures that upcast method is fired only for appropriate element (#1094).
2043
+ addUpcast( multipleUpcastsHandler, widgetDef, priority );
1962
2044
  }
1963
2045
  // Single rule which is automatically activated.
1964
2046
  else {
1965
- addUpcast( upcast, widgetDef.name, priority );
2047
+ addUpcast( upcast, widgetDef, priority );
1966
2048
  }
1967
2049
 
1968
- function addUpcast( upcast, name, priority ) {
2050
+ function addUpcast( upcast, def, priority ) {
1969
2051
  // Find index of the first higher (in terms of value) priority upcast.
1970
2052
  var index = CKEDITOR.tools.getIndex( widgetsRepo._.upcasts, function( element ) {
1971
2053
  return element[ 2 ] > priority;
@@ -1975,7 +2057,7 @@
1975
2057
  index = widgetsRepo._.upcasts.length;
1976
2058
  }
1977
2059
 
1978
- widgetsRepo._.upcasts.splice( index, 0, [ upcast, name, priority ] );
2060
+ widgetsRepo._.upcasts.splice( index, 0, [ CKEDITOR.tools.bind( upcast, def ), def.name, priority ] );
1979
2061
  }
1980
2062
  }
1981
2063
 
@@ -2008,7 +2090,7 @@
2008
2090
 
2009
2091
  // Remove widgets which have no corresponding elements in DOM.
2010
2092
  for ( i in instances ) {
2011
- // http://dev.ckeditor.com/ticket/13410 Remove widgets that are ready. This prevents from destroying widgets that are during loading process.
2093
+ // https://dev.ckeditor.com/ticket/13410 Remove widgets that are ready. This prevents from destroying widgets that are during loading process.
2012
2094
  if ( instances[ i ].isReady() && !editable.contains( instances[ i ].wrapper ) )
2013
2095
  this.destroy( instances[ i ], true );
2014
2096
  }
@@ -2027,7 +2109,7 @@
2027
2109
 
2028
2110
  // Check if:
2029
2111
  // * there's no instance for this widget
2030
- // * wrapper is not inside some temporary element like copybin (http://dev.ckeditor.com/ticket/11088)
2112
+ // * wrapper is not inside some temporary element like copybin (https://dev.ckeditor.com/ticket/11088)
2031
2113
  // * it was a nested widget's wrapper which has been detached from DOM,
2032
2114
  // when nested editable has been initialized (it overwrites its innerHTML
2033
2115
  // and initializes nested widgets).
@@ -2054,8 +2136,64 @@
2054
2136
  // @param {CKEDITOR.htmlParser.element} el
2055
2137
  function cleanUpWidgetElement( el ) {
2056
2138
  var parent = el.parent;
2057
- if ( parent.type == CKEDITOR.NODE_ELEMENT && parent.attributes[ 'data-cke-widget-wrapper' ] )
2139
+
2140
+ if ( parent.type == CKEDITOR.NODE_ELEMENT && parent.attributes[ 'data-cke-widget-wrapper' ] ) {
2058
2141
  parent.replaceWith( el );
2142
+ }
2143
+ }
2144
+
2145
+ // Preserves white spaces in widget element.
2146
+ //
2147
+ // This function is replacing white spaces with &nbsp;
2148
+ // at the beginning of the first text node
2149
+ // and at the end of the last text node.
2150
+ //
2151
+ // @param {CKEDITOR.htmlParser.element} el
2152
+ function preserveSpaces( el ) {
2153
+ if ( typeof el.attributes != 'undefined' && el.attributes[ 'data-widget' ] ) {
2154
+ var firstTextNode = getFirstTextNode( el ),
2155
+ lastTextNode = getLastTextNode( el ),
2156
+ spacesReplaced = false;
2157
+
2158
+ // Check whether the value of the first text node contains white space at the beginning and replace it with &nbsp;.
2159
+ if ( firstTextNode && firstTextNode.value && firstTextNode.value.match( /^\s/g ) ) {
2160
+ firstTextNode.parent.attributes[ 'data-cke-white-space-first' ] = 1;
2161
+ firstTextNode.value = firstTextNode.value.replace( /^\s/g, '&nbsp;' );
2162
+ spacesReplaced = true;
2163
+ }
2164
+
2165
+ // Check whether the value of the last text node contains white space at the end and replace it with &nbsp;.
2166
+ if ( lastTextNode && lastTextNode.value && lastTextNode.value.match( /\s$/g ) ) {
2167
+ lastTextNode.parent.attributes[ 'data-cke-white-space-last' ] = 1;
2168
+ lastTextNode.value = lastTextNode.value.replace( /\s$/g, '&nbsp;' );
2169
+ spacesReplaced = true;
2170
+ }
2171
+
2172
+ if ( spacesReplaced ) {
2173
+ el.attributes[ 'data-cke-widget-white-space' ] = 1;
2174
+ }
2175
+ }
2176
+ }
2177
+
2178
+ // Returns first child text node of the given element.
2179
+ //
2180
+ // @param {CKEDITOR.htmlParser.element} el.
2181
+ // @returns {CKEDITOR.htmlParser.text}
2182
+ function getFirstTextNode( el ) {
2183
+ return el.find( function( node ) {
2184
+ return node.type === 3;
2185
+ }, true ).shift();
2186
+ }
2187
+
2188
+
2189
+ // Returns last child text node of the given element.
2190
+ //
2191
+ // @param {CKEDITOR.htmlParser.element} el.
2192
+ // @returns {CKEDITOR.htmlParser.text}
2193
+ function getLastTextNode( el ) {
2194
+ return el.find( function( node ) {
2195
+ return node.type === 3;
2196
+ }, true ).pop();
2059
2197
  }
2060
2198
 
2061
2199
  // Similar to cleanUpWidgetElement, but works on DOM and finds
@@ -2156,7 +2294,7 @@
2156
2294
  return false;
2157
2295
  }
2158
2296
  else if ( ( upcastsLength = upcasts.length ) ) {
2159
- // Ignore elements with data-cke-widget-upcasted to avoid multiple upcasts (http://dev.ckeditor.com/ticket/11533).
2297
+ // Ignore elements with data-cke-widget-upcasted to avoid multiple upcasts (https://dev.ckeditor.com/ticket/11533).
2160
2298
  // Do not iterate over descendants.
2161
2299
  if ( element.attributes[ 'data-cke-widget-upcasted' ] )
2162
2300
  return false;
@@ -2167,7 +2305,7 @@
2167
2305
  if ( upcastCallbacks[ i ]( element ) === false )
2168
2306
  return;
2169
2307
  // Return nothing in order to continue iterating over ascendants.
2170
- // See http://dev.ckeditor.com/ticket/11186#comment:6
2308
+ // See https://dev.ckeditor.com/ticket/11186#comment:6
2171
2309
  }
2172
2310
 
2173
2311
  for ( i = 0; i < upcastsLength; ++i ) {
@@ -2363,7 +2501,7 @@
2363
2501
  '(?:</(?:div|span)>)?' +
2364
2502
  '(?:</(?:div|span)>)?' +
2365
2503
  '$',
2366
- // IE8 prefers uppercase when browsers stick to lowercase HTML (http://dev.ckeditor.com/ticket/13460).
2504
+ // IE8 prefers uppercase when browsers stick to lowercase HTML (https://dev.ckeditor.com/ticket/13460).
2367
2505
  'i'
2368
2506
  );
2369
2507
 
@@ -2391,9 +2529,10 @@
2391
2529
  // IE needs focus.
2392
2530
  editor.focus();
2393
2531
 
2394
- // and widget need to be focused on drag start (http://dev.ckeditor.com/ticket/12172#comment:10).
2532
+ // and widget need to be focused on drag start (https://dev.ckeditor.com/ticket/12172#comment:10).
2395
2533
  widget.focus();
2396
2534
  }
2535
+
2397
2536
  } );
2398
2537
 
2399
2538
  editor.on( 'drop', function( evt ) {
@@ -2403,7 +2542,7 @@
2403
2542
  dragRange = editor.createRange(),
2404
2543
  sourceWidget;
2405
2544
 
2406
- // Disable cross-editor drag & drop for widgets - http://dev.ckeditor.com/ticket/13599.
2545
+ // Disable cross-editor drag & drop for widgets - https://dev.ckeditor.com/ticket/13599.
2407
2546
  if ( id !== '' && transferType === CKEDITOR.DATA_TRANSFER_CROSS_EDITORS ) {
2408
2547
  evt.cancel();
2409
2548
  return;
@@ -2447,16 +2586,16 @@
2447
2586
  if ( !el.is( CKEDITOR.dtd.$block ) )
2448
2587
  return;
2449
2588
 
2450
- // Allow drop line inside, but never before or after nested editable (http://dev.ckeditor.com/ticket/12006).
2589
+ // Allow drop line inside, but never before or after nested editable (https://dev.ckeditor.com/ticket/12006).
2451
2590
  if ( Widget.isDomNestedEditable( el ) )
2452
2591
  return;
2453
2592
 
2454
- // Do not allow droping inside the widget being dragged (http://dev.ckeditor.com/ticket/13397).
2593
+ // Do not allow droping inside the widget being dragged (https://dev.ckeditor.com/ticket/13397).
2455
2594
  if ( widgetsRepo._.draggedWidget.wrapper.contains( el ) ) {
2456
2595
  return;
2457
2596
  }
2458
2597
 
2459
- // If element is nested editable, make sure widget can be dropped there (http://dev.ckeditor.com/ticket/12006).
2598
+ // If element is nested editable, make sure widget can be dropped there (https://dev.ckeditor.com/ticket/12006).
2460
2599
  var nestedEditable = Widget.getNestedEditable( editable, el );
2461
2600
  if ( nestedEditable ) {
2462
2601
  var draggedWidget = widgetsRepo._.draggedWidget;
@@ -2511,7 +2650,7 @@
2511
2650
  var target = evt.data.getTarget();
2512
2651
 
2513
2652
  // Clicking scrollbar in Chrome will invoke event with target object of document type (#663).
2514
- // In IE8 the target object will be empty (http://dev.ckeditor.com/ticket/10887).
2653
+ // In IE8 the target object will be empty (https://dev.ckeditor.com/ticket/10887).
2515
2654
  // We need to check if target is a proper element.
2516
2655
  widget = ( target instanceof CKEDITOR.dom.element ) ? widgetsRepo.getByElement( target ) : null;
2517
2656
 
@@ -2525,7 +2664,7 @@
2525
2664
  mouseDownOnDragHandler = 1;
2526
2665
 
2527
2666
  // When drag handler is pressed we have to clear current selection if it wasn't already on this widget.
2528
- // Otherwise, the selection may be in a fillingChar, which prevents dragging a widget. (http://dev.ckeditor.com/ticket/13284, see comment 8 and 9.)
2667
+ // Otherwise, the selection may be in a fillingChar, which prevents dragging a widget. (https://dev.ckeditor.com/ticket/13284, see comment 8 and 9.)
2529
2668
  if ( widgetsRepo.focused != widget )
2530
2669
  editor.getSelection().removeAllRanges();
2531
2670
 
@@ -2708,6 +2847,22 @@
2708
2847
  var attrs = element.attributes,
2709
2848
  widget, widgetElement;
2710
2849
 
2850
+ // Reset initial and trailing space by replacing &nbsp; with white space (#605).
2851
+ if ( 'data-cke-widget-white-space' in attrs ) {
2852
+ var firstTextNode = getFirstTextNode( element ),
2853
+ lastTextNode = getLastTextNode( element );
2854
+
2855
+ // Check whether the value of the text node contains &nbsp; at the beginning and replace it with white space.
2856
+ if ( firstTextNode.parent.attributes[ 'data-cke-white-space-first' ] ) {
2857
+ firstTextNode.value = firstTextNode.value.replace( /^&nbsp;/g, ' ' );
2858
+ }
2859
+
2860
+ // Check whether the value of the text node contains &nbsp; at the end and replace it with white space.
2861
+ if ( lastTextNode.parent.attributes[ 'data-cke-white-space-last' ] ) {
2862
+ lastTextNode.value = lastTextNode.value.replace( /&nbsp;$/g, ' ' );
2863
+ }
2864
+ }
2865
+
2711
2866
  // Wrapper.
2712
2867
  // Perform first part of downcasting (cleanup) and cache widgets,
2713
2868
  // because after applying DP's filter all data-cke-* attributes will be gone.
@@ -2732,7 +2887,7 @@
2732
2887
  // Save the reference to this nested editable in the closest widget to be downcasted.
2733
2888
  // Nested editables are downcasted in the successive toDataFormat to create an opportunity
2734
2889
  // for dataFilter's "excludeNestedEditable" option to do its job (that option relies on
2735
- // contenteditable="true" attribute) (http://dev.ckeditor.com/ticket/11372).
2890
+ // contenteditable="true" attribute) (https://dev.ckeditor.com/ticket/11372).
2736
2891
  toBeDowncasted[ toBeDowncasted.length - 1 ].editables[ attrs[ 'data-cke-widget-editable' ] ] = element;
2737
2892
 
2738
2893
  // Don't check children - there won't be next wrapper or nested editable which we
@@ -2843,7 +2998,7 @@
2843
2998
  // If drag'n'drop kind of paste into nested editable (data.range), selection is set AFTER
2844
2999
  // data is pasted, which means editor has no chance to change activeFilter's context.
2845
3000
  // As a result, pasted data is filtered with default editor's filter instead of NE's and
2846
- // funny things get inserted. Changing the filter by analysis of the paste range below (http://dev.ckeditor.com/ticket/13186).
3001
+ // funny things get inserted. Changing the filter by analysis of the paste range below (https://dev.ckeditor.com/ticket/13186).
2847
3002
  if ( data.range ) {
2848
3003
  // Check if pasting into nested editable.
2849
3004
  var nestedEditable = Widget.getNestedEditable( editor.editable(), data.range.startContainer );
@@ -2986,7 +3141,8 @@
2986
3141
 
2987
3142
  function copySingleWidget( widget, isCut ) {
2988
3143
  var editor = widget.editor,
2989
- doc = editor.document;
3144
+ doc = editor.document,
3145
+ isEdge16 = CKEDITOR.env.edge && CKEDITOR.env.version >= 16;
2990
3146
 
2991
3147
  // We're still handling previous copy/cut.
2992
3148
  // When keystroke is used to copy/cut this will also prevent
@@ -2994,9 +3150,12 @@
2994
3150
  if ( doc.getById( 'cke_copybin' ) )
2995
3151
  return;
2996
3152
 
2997
- // [IE] Use span for copybin and its container to avoid bug with expanding editable height by
2998
- // absolutely positioned element.
2999
- var copybinName = ( editor.blockless || CKEDITOR.env.ie ) ? 'span' : 'div',
3153
+ // [IE] Use span for copybin and its container to avoid bug with expanding
3154
+ // editable height by absolutely positioned element.
3155
+ // For Edge 16+ always use div, as span causes scrolling to the end of the document
3156
+ // on widget cut (also for blockless editor) (#1160).
3157
+ // Edge 16+ workaround could be safetly removed after #1169 is fixed.
3158
+ var copybinName = ( ( editor.blockless || CKEDITOR.env.ie ) && !isEdge16 ) ? 'span' : 'div',
3000
3159
  copybin = doc.createElement( copybinName ),
3001
3160
  copybinContainer = doc.createElement( copybinName ),
3002
3161
  // IE8 always jumps to the end of document.
@@ -3065,7 +3224,8 @@
3065
3224
 
3066
3225
  editor.fire( 'unlockSnapshot' );
3067
3226
 
3068
- if ( isCut ) {
3227
+ // Prevent cutting in read-only editor (#1570).
3228
+ if ( isCut && !editor.readOnly ) {
3069
3229
  widget.repository.del( widget );
3070
3230
  editor.fire( 'saveSnapshot' );
3071
3231
  }
@@ -3139,7 +3299,7 @@
3139
3299
  } );
3140
3300
  }
3141
3301
 
3142
- // Add a listener to data event that will set/change widget's label (http://dev.ckeditor.com/ticket/14539).
3302
+ // Add a listener to data event that will set/change widget's label (https://dev.ckeditor.com/ticket/14539).
3143
3303
  function setupA11yListener( widget ) {
3144
3304
  // Note, the function gets executed in a context of widget instance.
3145
3305
  function getLabelDefault() {
@@ -3167,11 +3327,11 @@
3167
3327
  return;
3168
3328
 
3169
3329
  var editor = widget.editor,
3170
- // Use getLast to find wrapper's direct descendant (http://dev.ckeditor.com/ticket/12022).
3330
+ // Use getLast to find wrapper's direct descendant (https://dev.ckeditor.com/ticket/12022).
3171
3331
  container = widget.wrapper.getLast( Widget.isDomDragHandlerContainer ),
3172
3332
  img;
3173
3333
 
3174
- // Reuse drag handler if already exists (http://dev.ckeditor.com/ticket/11281).
3334
+ // Reuse drag handler if already exists (https://dev.ckeditor.com/ticket/11281).
3175
3335
  if ( container )
3176
3336
  img = container.findOne( 'img' );
3177
3337
  else {
@@ -3198,7 +3358,7 @@
3198
3358
  widget.wrapper.append( container );
3199
3359
  }
3200
3360
 
3201
- // Preventing page reload when dropped content on widget wrapper (http://dev.ckeditor.com/ticket/13015).
3361
+ // Preventing page reload when dropped content on widget wrapper (https://dev.ckeditor.com/ticket/13015).
3202
3362
  // Widget is not editable so by default drop on it isn't allowed what means that
3203
3363
  // browser handles it (there's no editable#drop event). If there's no drop event we cannot block
3204
3364
  // the drop, so page is reloaded. This listener enables drop on widget wrappers.
@@ -3226,6 +3386,11 @@
3226
3386
  }
3227
3387
 
3228
3388
  function onBlockWidgetDrag( evt ) {
3389
+ // Allow to drag widget only with left mouse button (#711).
3390
+ if ( CKEDITOR.tools.getMouseButton( evt ) !== CKEDITOR.MOUSE_BUTTON_LEFT ) {
3391
+ return;
3392
+ }
3393
+
3229
3394
  var finder = this.repository.finder,
3230
3395
  locator = this.repository.locator,
3231
3396
  liner = this.repository.liner,
@@ -3267,6 +3432,7 @@
3267
3432
  // Fire drag start as it happens during the native D&D.
3268
3433
  editor.fire( 'dragstart', { target: evt.sender } );
3269
3434
 
3435
+
3270
3436
  function onMouseUp() {
3271
3437
  var l;
3272
3438
 
@@ -3343,7 +3509,7 @@
3343
3509
  if ( !widget.mask )
3344
3510
  return;
3345
3511
 
3346
- // Reuse mask if already exists (http://dev.ckeditor.com/ticket/11281).
3512
+ // Reuse mask if already exists (https://dev.ckeditor.com/ticket/11281).
3347
3513
  var img = widget.wrapper.findOne( '.cke_widget_mask' );
3348
3514
 
3349
3515
  if ( !img ) {
@@ -3384,7 +3550,7 @@
3384
3550
  setupDataClassesListener( widget );
3385
3551
  setupA11yListener( widget );
3386
3552
 
3387
- // http://dev.ckeditor.com/ticket/11145: [IE8] Non-editable content of widget is draggable.
3553
+ // https://dev.ckeditor.com/ticket/11145: [IE8] Non-editable content of widget is draggable.
3388
3554
  if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) {
3389
3555
  widget.wrapper.on( 'dragstart', function( evt ) {
3390
3556
  var target = evt.data.getTarget();
@@ -3422,7 +3588,7 @@
3422
3588
  widget.on( 'doubleclick', function( evt ) {
3423
3589
  if ( widget.edit() ) {
3424
3590
  // We have to cancel event if edit method opens a dialog, otherwise
3425
- // link plugin may open extra dialog (http://dev.ckeditor.com/ticket/12140).
3591
+ // link plugin may open extra dialog (https://dev.ckeditor.com/ticket/12140).
3426
3592
  evt.cancel();
3427
3593
  }
3428
3594
  } );
@@ -3470,7 +3636,7 @@
3470
3636
  // WIDGET STYLE HANDLER ---------------------------------------------------
3471
3637
  //
3472
3638
 
3473
- ( function() {
3639
+ function addCustomStyleHandler() {
3474
3640
  // Styles categorized by group. It is used to prevent applying styles for the same group being used together.
3475
3641
  var styleGroups = {};
3476
3642
 
@@ -3725,7 +3891,7 @@
3725
3891
  }
3726
3892
  }
3727
3893
 
3728
- } )();
3894
+ }
3729
3895
 
3730
3896
  //
3731
3897
  // EXPOSE PUBLIC API ------------------------------------------------------
@@ -3788,7 +3954,9 @@
3788
3954
  * comma-separated list of upcast methods from the {@link #upcasts} object.
3789
3955
  *
3790
3956
  * The upcast function **is not** executed in the widget context (because the widget
3791
- * does not exist yet) and two arguments are passed:
3957
+ * does not exist yet), however, it is executed in the
3958
+ * {@link CKEDITOR.plugins.widget#definition widget's definition} context.
3959
+ * Two arguments are passed to the upcast function:
3792
3960
  *
3793
3961
  * * `element` ({@link CKEDITOR.htmlParser.element}) &ndash; The element to be checked.
3794
3962
  * * `data` (`Object`) &ndash; The object which can be extended with data which will then be passed to the widget.
@@ -3842,7 +4010,7 @@
3842
4010
  * The function to be used to downcast this widget or
3843
4011
  * a name of the downcast option from the {@link #downcasts} object.
3844
4012
  *
3845
- * The downcast funciton will be executed in the {@link CKEDITOR.plugins.widget} context
4013
+ * The downcast function will be executed in the {@link CKEDITOR.plugins.widget} context
3846
4014
  * and with `widgetElement` ({@link CKEDITOR.htmlParser.element}) argument which is
3847
4015
  * the widget's main element.
3848
4016
  *
@@ -3906,6 +4074,9 @@
3906
4074
  * * The widget element will be inserted into DOM.
3907
4075
  *
3908
4076
  * @property {Function} insert
4077
+ * @param {Object} options Options object added in **4.11.0**.
4078
+ * @param {CKEDITOR.editor} options.editor The editor where the widget is going to be inserted to.
4079
+ * @param {Object} [options.commandData] Command data passed to the invoking command, if any.
3909
4080
  */
3910
4081
 
3911
4082
  /**
@@ -4118,7 +4289,7 @@
4118
4289
  */
4119
4290
 
4120
4291
  /**
4121
- * The [Advanced Content Filter](#!/guide/dev_advanced_content_filter) rules
4292
+ * The {@glink guide/dev_advanced_content_filter Advanced Content Filter} rules
4122
4293
  * which will be used to limit the content allowed in this nested editable.
4123
4294
  * This option is similar to {@link CKEDITOR.config#allowedContent} and one can
4124
4295
  * use it to limit the editor features available in the nested editable.
@@ -4130,7 +4301,7 @@
4130
4301
  */
4131
4302
 
4132
4303
  /**
4133
- * The [Advanced Content Filter](#!/guide/dev_advanced_content_filter) rules
4304
+ * The {@glink guide/dev_advanced_content_filter Advanced Content Filter} rules
4134
4305
  * which will be used to blacklist elements within this nested editable.
4135
4306
  * This option is similar to {@link CKEDITOR.config#disallowedContent}.
4136
4307
  *