integral 1.0.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (637) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +11 -49
  3. data/Rakefile +1 -1
  4. data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
  5. data/app/assets/images/logo.png +0 -0
  6. data/app/assets/javascripts/ckeditor/my_config.js.erb +26 -18
  7. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/lv.js +8 -0
  8. data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +1 -1
  9. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +14 -14
  10. data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +8 -8
  11. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  12. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  13. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  14. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  15. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  16. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  17. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  18. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  19. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  20. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  21. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  22. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  23. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  24. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  25. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  26. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  27. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  28. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  29. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  30. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -7
  31. data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
  32. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
  33. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
  34. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  35. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  36. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  37. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  38. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  39. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  40. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  41. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ar.js +15 -0
  42. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/lv.js +15 -0
  43. data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +1 -1
  44. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/copywidget.png +0 -0
  45. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/editwidget.png +0 -0
  46. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/copywidget.png +0 -0
  47. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/editwidget.png +0 -0
  48. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/removewidget.png +0 -0
  49. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/widget.png +0 -0
  50. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/removewidget.png +0 -0
  51. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/widget.png +0 -0
  52. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/plugin.js +86 -0
  53. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  54. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  55. data/app/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  56. data/app/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  57. data/app/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  58. data/app/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  59. data/app/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  60. data/app/assets/javascripts/ckeditor/plugins/image2/lang/af.js +21 -0
  61. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ar.js +21 -0
  62. data/app/assets/javascripts/ckeditor/plugins/image2/lang/az.js +21 -0
  63. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bg.js +21 -0
  64. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bn.js +21 -0
  65. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bs.js +21 -0
  66. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ca.js +21 -0
  67. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cs.js +21 -0
  68. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cy.js +21 -0
  69. data/app/assets/javascripts/ckeditor/plugins/image2/lang/da.js +21 -0
  70. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de-ch.js +21 -0
  71. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de.js +21 -0
  72. data/app/assets/javascripts/ckeditor/plugins/image2/lang/el.js +21 -0
  73. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-au.js +21 -0
  74. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-ca.js +21 -0
  75. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-gb.js +21 -0
  76. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  77. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eo.js +21 -0
  78. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es-mx.js +21 -0
  79. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es.js +21 -0
  80. data/app/assets/javascripts/ckeditor/plugins/image2/lang/et.js +21 -0
  81. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eu.js +21 -0
  82. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fa.js +21 -0
  83. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fi.js +21 -0
  84. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fo.js +21 -0
  85. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
  86. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr.js +21 -0
  87. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gl.js +21 -0
  88. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gu.js +21 -0
  89. data/app/assets/javascripts/ckeditor/plugins/image2/lang/he.js +21 -0
  90. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hi.js +21 -0
  91. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hr.js +21 -0
  92. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hu.js +21 -0
  93. data/app/assets/javascripts/ckeditor/plugins/image2/lang/id.js +21 -0
  94. data/app/assets/javascripts/ckeditor/plugins/image2/lang/is.js +21 -0
  95. data/app/assets/javascripts/ckeditor/plugins/image2/lang/it.js +21 -0
  96. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ja.js +21 -0
  97. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ka.js +21 -0
  98. data/app/assets/javascripts/ckeditor/plugins/image2/lang/km.js +21 -0
  99. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ko.js +21 -0
  100. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ku.js +21 -0
  101. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lt.js +21 -0
  102. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lv.js +21 -0
  103. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mk.js +21 -0
  104. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mn.js +21 -0
  105. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ms.js +21 -0
  106. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nb.js +21 -0
  107. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nl.js +21 -0
  108. data/app/assets/javascripts/ckeditor/plugins/image2/lang/no.js +21 -0
  109. data/app/assets/javascripts/ckeditor/plugins/image2/lang/oc.js +21 -0
  110. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pl.js +21 -0
  111. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt-br.js +21 -0
  112. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt.js +21 -0
  113. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ro.js +21 -0
  114. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  115. data/app/assets/javascripts/ckeditor/plugins/image2/lang/si.js +21 -0
  116. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sk.js +21 -0
  117. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sl.js +21 -0
  118. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sq.js +21 -0
  119. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
  120. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr.js +21 -0
  121. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sv.js +21 -0
  122. data/app/assets/javascripts/ckeditor/plugins/image2/lang/th.js +21 -0
  123. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tr.js +21 -0
  124. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tt.js +21 -0
  125. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ug.js +21 -0
  126. data/app/assets/javascripts/ckeditor/plugins/image2/lang/uk.js +21 -0
  127. data/app/assets/javascripts/ckeditor/plugins/image2/lang/vi.js +21 -0
  128. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
  129. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh.js +21 -0
  130. data/app/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
  131. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  132. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  133. data/app/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
  134. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +4 -4
  135. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +4 -4
  136. data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +7 -7
  137. data/app/assets/javascripts/ckeditor/plugins/linkballoon/README.md +5 -0
  138. data/app/assets/javascripts/ckeditor/plugins/linkballoon/assets/demo.png +0 -0
  139. data/app/assets/javascripts/ckeditor/plugins/linkballoon/plugin.js +25 -0
  140. data/app/assets/javascripts/ckeditor/plugins/notification/lang/az.js +7 -0
  141. data/app/assets/javascripts/ckeditor/plugins/notification/lang/bg.js +7 -0
  142. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ca.js +7 -0
  143. data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +2 -2
  144. data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +2 -2
  145. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +2 -2
  146. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +2 -2
  147. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en-au.js +7 -0
  148. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +2 -2
  149. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +2 -2
  150. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es-mx.js +7 -0
  151. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es.js +7 -0
  152. data/app/assets/javascripts/ckeditor/plugins/notification/lang/et.js +7 -0
  153. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +2 -2
  154. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fa.js +7 -0
  155. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +3 -3
  156. data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +2 -2
  157. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hr.js +7 -0
  158. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hu.js +7 -0
  159. data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +2 -2
  160. data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +2 -2
  161. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ja.js +7 -0
  162. data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +2 -2
  163. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +2 -2
  164. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +2 -2
  165. data/app/assets/javascripts/ckeditor/plugins/notification/lang/lv.js +7 -0
  166. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +2 -2
  167. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +2 -2
  168. data/app/assets/javascripts/ckeditor/plugins/notification/lang/oc.js +7 -0
  169. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +2 -2
  170. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +2 -2
  171. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +2 -2
  172. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ro.js +7 -0
  173. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +2 -2
  174. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sk.js +7 -0
  175. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sq.js +7 -0
  176. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +2 -2
  177. data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +2 -2
  178. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +2 -2
  179. data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +2 -2
  180. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +3 -3
  181. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +2 -2
  182. data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +794 -784
  183. data/app/assets/javascripts/ckeditor/plugins/openlink/README.md +50 -0
  184. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/hidpi/openLink.png +0 -0
  185. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/openLink.png +0 -0
  186. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/bg.js +7 -0
  187. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/de.js +7 -0
  188. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/en.js +7 -0
  189. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/pl.js +7 -0
  190. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/ru.js +7 -0
  191. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/uk.js +7 -0
  192. data/app/assets/javascripts/ckeditor/plugins/openlink/plugin.js +178 -0
  193. data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +5 -5
  194. data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +2 -2
  195. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +2 -2
  196. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +2 -2
  197. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +2 -2
  198. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +5 -5
  199. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +2 -2
  200. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +2 -2
  201. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +2 -2
  202. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +2 -2
  203. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +2 -2
  204. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +2 -2
  205. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +2 -2
  206. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-au.js +12 -0
  207. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +2 -2
  208. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +2 -2
  209. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +2 -2
  210. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +2 -2
  211. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +2 -2
  212. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +2 -2
  213. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +2 -2
  214. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +2 -2
  215. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +2 -2
  216. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +2 -2
  217. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +2 -2
  218. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +2 -2
  219. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +2 -2
  220. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +2 -2
  221. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +2 -2
  222. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +2 -2
  223. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +2 -2
  224. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +2 -2
  225. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +2 -2
  226. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +2 -2
  227. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +2 -2
  228. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +5 -5
  229. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +2 -2
  230. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +2 -2
  231. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +2 -2
  232. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +2 -2
  233. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +2 -2
  234. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +2 -2
  235. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +2 -2
  236. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ro.js +12 -0
  237. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +2 -2
  238. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +2 -2
  239. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +2 -2
  240. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +2 -2
  241. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +2 -2
  242. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +2 -2
  243. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +2 -2
  244. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +2 -2
  245. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +2 -2
  246. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +2 -2
  247. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +2 -2
  248. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +2 -2
  249. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +2 -2
  250. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +2 -2
  251. data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +3 -3
  252. data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +6 -6
  253. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +4 -4
  254. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +3 -3
  255. data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +2 -2
  256. data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +2 -2
  257. data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +2 -2
  258. data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +2 -2
  259. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +2 -2
  260. data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +2 -2
  261. data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +3 -3
  262. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +2 -2
  263. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +2 -2
  264. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +2 -2
  265. data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +2 -2
  266. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +2 -2
  267. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +2 -2
  268. data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +2 -2
  269. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-au.js +8 -0
  270. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +2 -2
  271. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +2 -2
  272. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +2 -2
  273. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +2 -2
  274. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +2 -2
  275. data/app/assets/javascripts/ckeditor/plugins/widget/lang/et.js +8 -0
  276. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +2 -2
  277. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +3 -3
  278. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +2 -2
  279. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +2 -2
  280. data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +2 -2
  281. data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +2 -2
  282. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +2 -2
  283. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +2 -2
  284. data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +2 -2
  285. data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +2 -2
  286. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +2 -2
  287. data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +2 -2
  288. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +2 -2
  289. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +2 -2
  290. data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +3 -3
  291. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +2 -2
  292. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +2 -2
  293. data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +2 -2
  294. data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +2 -2
  295. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +2 -2
  296. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +2 -2
  297. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +2 -2
  298. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ro.js +8 -0
  299. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +2 -2
  300. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +2 -2
  301. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +2 -2
  302. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +3 -3
  303. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +2 -2
  304. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +2 -2
  305. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +2 -2
  306. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +2 -2
  307. data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +2 -2
  308. data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +2 -2
  309. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +2 -2
  310. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +2 -2
  311. data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +235 -64
  312. data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +6 -11
  313. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +1 -0
  314. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/bg.js +17 -0
  315. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +1 -0
  316. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/cs.js +15 -0
  317. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +1 -0
  318. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +1 -0
  319. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +1 -0
  320. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +5 -1
  321. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +1 -0
  322. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/eu.js +17 -0
  323. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fa.js +13 -0
  324. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +1 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +1 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +1 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +1 -0
  328. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hu.js +14 -0
  329. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +4 -3
  330. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +5 -5
  331. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ko.js +16 -0
  332. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +3 -2
  333. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +1 -0
  334. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +4 -3
  335. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +1 -0
  336. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +1 -0
  337. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ro.js +15 -0
  338. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  339. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sk.js +15 -0
  340. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +5 -3
  341. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +1 -0
  342. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/uk.js +17 -0
  343. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -0
  344. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh.js +14 -0
  345. data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +485 -302
  346. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  347. data/app/assets/javascripts/integral/backend.js +197 -26
  348. data/app/assets/javascripts/integral/frontend.js +37 -2
  349. data/app/assets/javascripts/integral/support/character_counter.js +14 -8
  350. data/app/assets/javascripts/integral/support/confirm_modal.coffee +2 -2
  351. data/app/assets/javascripts/integral/support/date_picker.coffee +54 -59
  352. data/app/assets/javascripts/integral/support/gallery.coffee +85 -43
  353. data/app/assets/javascripts/integral/support/grid.coffee +11 -4
  354. data/app/assets/javascripts/integral/support/lib/lazysizes.js +755 -0
  355. data/app/assets/javascripts/integral/support/lib/materialize-tags.js +49 -44
  356. data/app/assets/javascripts/integral/support/list.coffee +1 -0
  357. data/app/assets/javascripts/integral/support/ls.instagram.js +57 -0
  358. data/app/assets/javascripts/integral/support/ls.twitter.js +66 -0
  359. data/app/assets/javascripts/integral/support/record_selector.coffee +3 -1
  360. data/app/assets/javascripts/integral/support/remote_form.coffee +18 -11
  361. data/app/assets/javascripts/integral/support/slug_generator.coffee +1 -0
  362. data/app/assets/stylesheets/integral/backend.sass +36 -24
  363. data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +5 -6
  364. data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +31 -64
  365. data/app/assets/stylesheets/integral/backend/devise.sass +2 -3
  366. data/app/assets/stylesheets/integral/backend/materialize-tags.sass +2 -1
  367. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_notifications.scss +150 -0
  368. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_profile.scss +59 -0
  369. data/app/assets/stylesheets/integral/backend/modules/timeline.scss +214 -0
  370. data/app/assets/stylesheets/integral/backend/shared.sass +121 -13
  371. data/app/assets/stylesheets/integral/frontend.scss +45 -0
  372. data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +2 -2
  373. data/app/assets/stylesheets/integral/frontend/blog.sass +155 -142
  374. data/app/assets/stylesheets/integral/frontend/layout.sass +13 -3
  375. data/app/assets/stylesheets/integral/frontend/modules/article-footer.scss +55 -0
  376. data/app/assets/stylesheets/integral/frontend/modules/article.scss +34 -0
  377. data/app/assets/stylesheets/integral/frontend/modules/horizontal-post.scss +44 -0
  378. data/app/assets/stylesheets/integral/frontend/modules/inline-articles.scss +23 -0
  379. data/app/assets/stylesheets/integral/frontend/modules/latest-post.scss +37 -0
  380. data/app/assets/stylesheets/integral/frontend/modules/list-widget.scss +50 -0
  381. data/app/assets/stylesheets/integral/frontend/modules/piped-list.scss +33 -0
  382. data/app/assets/stylesheets/integral/frontend/modules/post-tags.scss +19 -0
  383. data/app/assets/stylesheets/integral/frontend/modules/scroll-container.scss +9 -0
  384. data/app/assets/stylesheets/integral/frontend/modules/sidebar-articles.scss +42 -0
  385. data/app/assets/stylesheets/integral/frontend/modules/sidebar-tags.scss +6 -0
  386. data/app/assets/stylesheets/integral/frontend/modules/sidebar-widget.scss +47 -0
  387. data/app/assets/stylesheets/integral/frontend/modules/vertical-post.scss +31 -0
  388. data/app/assets/stylesheets/integral/frontend/share_modal.sass +0 -5
  389. data/app/assets/stylesheets/integral/support/gallery.sass +18 -2
  390. data/app/assets/stylesheets/integral/support/media-query-indicator.sass +9 -3
  391. data/app/controllers/integral/application_controller.rb +10 -3
  392. data/app/controllers/integral/backend/activities_controller.rb +31 -26
  393. data/app/controllers/integral/backend/base_controller.rb +265 -26
  394. data/app/controllers/integral/backend/categories_controller.rb +49 -0
  395. data/app/controllers/integral/backend/images_controller.rb +39 -56
  396. data/app/controllers/integral/backend/lists_controller.rb +16 -104
  397. data/app/controllers/integral/backend/notification_subscriptions_controller.rb +23 -0
  398. data/app/controllers/integral/backend/pages_controller.rb +15 -117
  399. data/app/controllers/integral/backend/posts_controller.rb +22 -108
  400. data/app/controllers/integral/backend/settings_controller.rb +7 -8
  401. data/app/controllers/integral/backend/static_pages_controller.rb +14 -0
  402. data/app/controllers/integral/backend/users_controller.rb +61 -79
  403. data/app/controllers/integral/blog_controller.rb +12 -0
  404. data/app/controllers/integral/categories_controller.rb +45 -0
  405. data/app/controllers/integral/pages_controller.rb +7 -3
  406. data/app/controllers/integral/posts_controller.rb +7 -9
  407. data/app/controllers/integral/tags_controller.rb +5 -2
  408. data/app/decorators/integral/base_decorator.rb +16 -0
  409. data/app/decorators/integral/category_decorator.rb +30 -0
  410. data/app/decorators/integral/image_decorator.rb +3 -3
  411. data/app/decorators/integral/list_decorator.rb +1 -13
  412. data/app/decorators/integral/notification/notification_decorator.rb +74 -0
  413. data/app/decorators/integral/page_decorator.rb +1 -13
  414. data/app/decorators/integral/paginating_decorator.rb +6 -0
  415. data/app/decorators/integral/post_decorator.rb +44 -4
  416. data/app/decorators/integral/user_decorator.rb +1 -13
  417. data/app/decorators/integral/version_decorator.rb +58 -15
  418. data/app/helpers/integral/application_helper.rb +7 -0
  419. data/app/helpers/integral/backend/base_helper.rb +139 -13
  420. data/app/helpers/integral/blog_helper.rb +46 -0
  421. data/app/helpers/integral/social_helper.rb +0 -23
  422. data/app/jobs/integral/application_job.rb +1 -0
  423. data/app/jobs/integral/newsletter_signup_job.rb +0 -2
  424. data/app/jobs/integral/webhook/delivery_job.rb +37 -0
  425. data/app/mailers/integral/contact_mailer.rb +4 -1
  426. data/app/mailers/integral/devise_mailer.rb +6 -0
  427. data/app/models/concerns/integral/lazy_contentable.rb +54 -0
  428. data/app/models/concerns/integral/notification/subscribable.rb +67 -0
  429. data/app/models/concerns/integral/webhook/delivery.rb +30 -0
  430. data/app/models/concerns/integral/webhook/observable.rb +23 -0
  431. data/app/models/integral/application_record.rb +9 -0
  432. data/app/models/integral/category.rb +29 -0
  433. data/app/models/integral/category_version.rb +8 -0
  434. data/app/models/integral/image.rb +40 -3
  435. data/app/models/integral/list.rb +11 -4
  436. data/app/models/integral/list_item.rb +15 -16
  437. data/app/models/integral/list_item_connection.rb +6 -0
  438. data/app/models/integral/notification/notification.rb +28 -0
  439. data/app/models/integral/notification/subscription.rb +14 -0
  440. data/app/models/integral/page.rb +32 -10
  441. data/app/models/integral/post.rb +39 -14
  442. data/app/models/integral/user.rb +51 -2
  443. data/app/models/integral/version.rb +2 -2
  444. data/app/models/integral/webhook/endpoint.rb +40 -0
  445. data/app/models/integral/webhook/event.rb +20 -0
  446. data/app/policies/integral/base_policy.rb +7 -11
  447. data/app/policies/integral/category_policy.rb +9 -0
  448. data/app/policies/integral/page_policy.rb +1 -0
  449. data/app/policies/integral/version_policy.rb +0 -8
  450. data/app/serializers/integral/post_serializer.rb +24 -0
  451. data/app/uploaders/integral/avatar_uploader.rb +1 -1
  452. data/app/views/devise/invitations/edit.haml +1 -4
  453. data/app/views/devise/mailer/invitation_instructions.inky-haml +20 -0
  454. data/app/views/devise/sessions/new.haml +2 -2
  455. data/app/views/integral/backend/activities/_activity.haml +21 -0
  456. data/app/views/integral/backend/activities/grid/_dropdown_actions.haml +1 -0
  457. data/app/views/integral/backend/activities/grid/_row_content.haml +13 -0
  458. data/app/views/integral/backend/activities/index.haml +7 -13
  459. data/app/views/integral/backend/activities/shared/_grid.haml +35 -19
  460. data/app/views/integral/backend/activities/shared/index.haml +15 -0
  461. data/app/views/integral/backend/activities/shared/{_log.haml → show.haml} +7 -7
  462. data/app/views/integral/backend/activities/show.haml +1 -1
  463. data/app/views/integral/backend/categories/_modal.haml +24 -0
  464. data/app/views/integral/backend/images/_form.haml +16 -28
  465. data/app/views/integral/backend/images/edit.haml +2 -2
  466. data/app/views/integral/backend/images/grid/_dropdown_actions.haml +5 -0
  467. data/app/views/integral/backend/images/grid/_row_content.haml +5 -0
  468. data/app/views/integral/backend/images/index.haml +11 -17
  469. data/app/views/integral/backend/images/list.haml +11 -0
  470. data/app/views/integral/backend/images/show.haml +26 -0
  471. data/app/views/integral/backend/lists/_form.haml +7 -20
  472. data/app/views/integral/backend/lists/_item_container.haml +1 -1
  473. data/app/views/integral/backend/lists/_item_modal.haml +3 -3
  474. data/app/views/integral/backend/lists/_list_item_fields.haml +3 -2
  475. data/app/views/integral/backend/lists/_manager.haml +11 -13
  476. data/app/views/integral/backend/lists/edit.haml +22 -1
  477. data/app/views/integral/backend/lists/grid/_dropdown_actions.haml +9 -0
  478. data/app/views/integral/backend/lists/grid/_row_content.haml +3 -0
  479. data/app/views/integral/backend/lists/index.haml +11 -17
  480. data/app/views/integral/backend/lists/list.haml +11 -0
  481. data/app/views/integral/backend/lists/show.haml +27 -23
  482. data/app/views/integral/backend/notifications/_notification.haml +21 -0
  483. data/app/views/integral/backend/pages/_form.haml +20 -47
  484. data/app/views/integral/backend/pages/edit.haml +18 -0
  485. data/app/views/integral/backend/pages/grid/_dropdown_actions.haml +11 -0
  486. data/app/views/integral/backend/pages/grid/_row_content.haml +5 -0
  487. data/app/views/integral/backend/pages/index.haml +11 -21
  488. data/app/views/integral/backend/pages/list.haml +15 -0
  489. data/app/views/integral/backend/pages/show.haml +32 -0
  490. data/app/views/integral/backend/posts/_form.haml +19 -51
  491. data/app/views/integral/backend/posts/edit.haml +5 -10
  492. data/app/views/integral/backend/posts/grid/_dropdown_actions.haml +10 -0
  493. data/app/views/integral/backend/posts/grid/_row_content.haml +6 -0
  494. data/app/views/integral/backend/posts/index.haml +13 -19
  495. data/app/views/integral/backend/posts/list.haml +13 -0
  496. data/app/views/integral/backend/posts/new.haml +0 -1
  497. data/app/views/integral/backend/posts/show.haml +31 -0
  498. data/app/views/integral/backend/settings/sections/_social.haml +1 -3
  499. data/app/views/integral/backend/shared/_activity_modal.haml +13 -0
  500. data/app/views/integral/backend/shared/_breadcrumbs.haml +7 -4
  501. data/app/views/integral/backend/shared/_image_preview.haml +10 -3
  502. data/app/views/integral/backend/shared/_image_selector.haml +1 -1
  503. data/app/views/integral/backend/shared/_notification_subscription_toggle.haml +22 -0
  504. data/app/views/integral/backend/shared/action_bar/_index.haml +9 -0
  505. data/app/views/integral/backend/shared/action_bar/_show.haml +3 -0
  506. data/app/views/integral/backend/shared/cards/_at_a_glance.haml +3 -3
  507. data/app/views/integral/backend/shared/cards/_categories.haml +33 -0
  508. data/app/views/integral/backend/{static_pages/_card.haml → shared/cards/_object.haml} +1 -1
  509. data/app/views/integral/backend/shared/cards/_recent_activity.haml +20 -0
  510. data/app/views/integral/backend/shared/cards/_recent_resources.haml +17 -0
  511. data/app/views/integral/backend/shared/cards/_recent_user_activity.haml +1 -0
  512. data/app/views/integral/backend/shared/cards/_top_post_authors.haml +18 -0
  513. data/app/views/integral/backend/shared/cards/_welcome.haml +24 -25
  514. data/app/views/integral/backend/shared/{_empty_grid.haml → grid/_empty.haml} +0 -0
  515. data/app/views/integral/backend/shared/grid/_form.haml +9 -0
  516. data/app/views/integral/backend/shared/grid/_grid.haml +21 -0
  517. data/app/views/integral/backend/shared/{_pagination.haml → grid/_pagination.haml} +0 -0
  518. data/app/views/integral/backend/shared/grid/_row_layout.haml +8 -0
  519. data/app/views/integral/backend/shared/record_selector/_collection.haml +1 -0
  520. data/app/views/integral/backend/shared/record_selector/_modal.haml +9 -10
  521. data/app/views/integral/backend/shared/record_selector/_record.haml +6 -4
  522. data/app/views/integral/backend/static_pages/dashboard.haml +17 -15
  523. data/app/views/integral/backend/users/_form.haml +35 -47
  524. data/app/views/integral/backend/users/edit.haml +1 -1
  525. data/app/views/integral/backend/users/grid/_dropdown_actions.haml +17 -0
  526. data/app/views/integral/backend/users/grid/_row_content.haml +8 -0
  527. data/app/views/integral/backend/users/index.haml +11 -17
  528. data/app/views/integral/backend/users/list.haml +12 -0
  529. data/app/views/integral/backend/users/show.haml +22 -19
  530. data/app/views/integral/categories/show.haml +5 -0
  531. data/app/views/integral/pages/_demo.haml +2 -2
  532. data/app/views/integral/posts/_article_footer.haml +17 -0
  533. data/app/views/integral/posts/_card.haml +11 -0
  534. data/app/views/integral/posts/_latest_post.haml +8 -0
  535. data/app/views/integral/posts/_most_read_section.haml +8 -0
  536. data/app/views/integral/posts/_post.haml +11 -0
  537. data/app/views/integral/posts/_similar_posts.haml +5 -0
  538. data/app/views/integral/posts/index.haml +7 -5
  539. data/app/views/integral/posts/templates/default.haml +35 -35
  540. data/app/views/integral/shared/_share_modal.haml +0 -3
  541. data/app/views/integral/shared/_social_list_items.haml +6 -12
  542. data/app/views/integral/shared/_subscribe_modal.haml +14 -0
  543. data/app/views/integral/shared/blog/_categories.haml +15 -0
  544. data/app/views/integral/shared/blog/_layout.haml +9 -0
  545. data/app/views/integral/shared/blog/_sidebar.haml +10 -0
  546. data/app/views/integral/shared/gallery/_placeholder.haml +2 -2
  547. data/app/views/integral/shared/gallery/_slide.haml +2 -2
  548. data/app/views/integral/shared/gallery/gallery.haml +5 -2
  549. data/app/views/integral/shared/sidebar/_item.haml +8 -0
  550. data/app/views/integral/shared/sidebar/_newsletter_signup.haml +7 -0
  551. data/app/views/integral/shared/sidebar/_popular_posts.haml +7 -0
  552. data/app/views/integral/shared/sidebar/_popular_tags.haml +7 -0
  553. data/app/views/integral/shared/sidebar/_recent_posts.haml +7 -0
  554. data/app/views/integral/tags/index.haml +2 -2
  555. data/app/views/integral/tags/show.haml +3 -6
  556. data/app/views/layouts/integral/backend.html.haml +27 -5
  557. data/app/views/layouts/integral/backend/_create_dropdown.haml +1 -30
  558. data/app/views/layouts/integral/backend/_main_menu_items.haml +1 -91
  559. data/app/views/layouts/integral/frontend.html.haml +3 -3
  560. data/config/initializers/devise.rb +1 -1
  561. data/config/locales/en.yml +131 -56
  562. data/config/routes.rb +2 -0
  563. data/db/migrate/20190414172018_create_webhook_endpoints.rb +10 -0
  564. data/db/migrate/20190929191412_add_integral_post_categories.rb +13 -0
  565. data/db/migrate/20191203090008_add_image_to_integral_categories.rb +6 -0
  566. data/db/migrate/20200401210442_create_category_versions.rb +20 -0
  567. data/db/migrate/20200407022636_create_integral_notifications.rb +25 -0
  568. data/db/migrate/20200421223602_add_status_to_integral_users.rb +5 -0
  569. data/db/seeds.rb +16 -10
  570. data/lib/generators/integral/assets_generator.rb +54 -0
  571. data/lib/generators/integral/install_generator.rb +37 -3
  572. data/lib/generators/integral/views_generator.rb +66 -0
  573. data/lib/generators/templates/app.yml +0 -1
  574. data/lib/generators/templates/integral.rb +5 -0
  575. data/lib/generators/templates/routes.rb +7 -0
  576. data/lib/generators/templates/seeds.rb +2 -0
  577. data/lib/integral.rb +4 -30
  578. data/lib/integral/acts_as_integral.rb +115 -0
  579. data/lib/integral/acts_as_listable.rb +3 -3
  580. data/lib/integral/chart_renderer/base.rb +2 -0
  581. data/lib/integral/content_renderer.rb +3 -3
  582. data/lib/integral/engine.rb +12 -2
  583. data/lib/integral/grids/activities_grid.rb +15 -2
  584. data/lib/integral/grids/lists_grid.rb +1 -0
  585. data/lib/integral/grids/posts_grid.rb +5 -1
  586. data/lib/integral/grids/users_grid.rb +5 -0
  587. data/lib/integral/list_item_renderer.rb +4 -2
  588. data/lib/integral/list_renderer.rb +6 -1
  589. data/lib/integral/middleware/page_router.rb +15 -6
  590. data/lib/integral/router.rb +41 -7
  591. data/lib/integral/version.rb +1 -1
  592. data/lib/integral/widgets/recent_posts.rb +1 -1
  593. data/lib/integral/widgets/swiper_list.rb +3 -2
  594. data/public/images/integral/demo/continous-integration.png +0 -0
  595. data/public/images/integral/demo/foundation-frontend-framework.jpg +0 -0
  596. data/public/images/integral/demo/heroku.png +0 -0
  597. data/public/images/integral/demo/integral-cms-without-hassle.jpg +0 -0
  598. data/public/images/integral/demo/integral-features-activity-tracking.jpg +0 -0
  599. data/public/images/integral/demo/integral-features-contact-form.png +0 -0
  600. data/public/images/integral/demo/integral-features-design.jpg +0 -0
  601. data/public/images/integral/demo/integral-features-dynamic-pages.jpg +0 -0
  602. data/public/images/integral/demo/integral-features-image-management.jpg +0 -0
  603. data/public/images/integral/demo/integral-features-integrated-blog.jpg +0 -0
  604. data/public/images/integral/demo/integral-features-list-management.jpg +0 -0
  605. data/public/images/integral/demo/integral-features-seo-ready.jpg +0 -0
  606. data/public/images/integral/demo/integral-features-user-management.jpg +0 -0
  607. data/public/images/integral/demo/integral-presentation.png +0 -0
  608. data/public/integral/ckeditor_demo_content.html +0 -13
  609. data/spec/factories.rb +30 -8
  610. metadata +322 -127
  611. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +0 -13
  612. data/app/assets/javascripts/integral/support/date_picker/picker.date.js +0 -1435
  613. data/app/assets/javascripts/integral/support/date_picker/picker.js +0 -1132
  614. data/app/assets/stylesheets/integral/frontend.sass +0 -26
  615. data/app/assets/stylesheets/integral/support/date-picker.scss +0 -16
  616. data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +0 -452
  617. data/app/assets/stylesheets/integral/support/date_picker/_default.scss +0 -201
  618. data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +0 -220
  619. data/app/assets/stylesheets/integral/wysiwyg.sass +0 -13
  620. data/app/views/devise/mailer/invitation_instructions.html.erb +0 -13
  621. data/app/views/integral/backend/activities/_grid.haml +0 -23
  622. data/app/views/integral/backend/activities/shared/_listing.haml +0 -14
  623. data/app/views/integral/backend/images/_grid.haml +0 -16
  624. data/app/views/integral/backend/lists/_grid.haml +0 -16
  625. data/app/views/integral/backend/pages/_grid.haml +0 -21
  626. data/app/views/integral/backend/pages/activities.haml +0 -2
  627. data/app/views/integral/backend/pages/activity.haml +0 -1
  628. data/app/views/integral/backend/pages/edit.html.haml +0 -15
  629. data/app/views/integral/backend/posts/_grid.haml +0 -25
  630. data/app/views/integral/backend/posts/activities.haml +0 -3
  631. data/app/views/integral/backend/posts/activity.haml +0 -1
  632. data/app/views/integral/backend/shared/_grid.haml +0 -18
  633. data/app/views/integral/backend/users/_grid.haml +0 -19
  634. data/app/views/integral/posts/_item.haml +0 -16
  635. data/app/views/integral/shared/_blog_layout.haml +0 -15
  636. data/app/views/integral/shared/_blog_sidebar.haml +0 -49
  637. data/lib/integral/slack_bot.rb +0 -45
@@ -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
  *