integral 1.0.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 (761) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +105 -0
  4. data/Rakefile +22 -0
  5. data/app/assets/images/integral/backend/data-unavailable.png +0 -0
  6. data/app/assets/images/integral/backend/logo.png +0 -0
  7. data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
  8. data/app/assets/images/integral/defaults/user_avatar.jpg +0 -0
  9. data/app/assets/images/integral/image-not-set.png +0 -0
  10. data/app/assets/images/integral/posts-hero-banner.jpg +0 -0
  11. data/app/assets/javascripts/ckeditor/loader.js.erb +6 -0
  12. data/app/assets/javascripts/ckeditor/my_config.js.erb +154 -0
  13. data/app/assets/javascripts/ckeditor/my_contents.sass +22 -0
  14. data/app/assets/javascripts/ckeditor/my_javascript.js +12 -0
  15. data/app/assets/javascripts/ckeditor/my_styles.js +5 -0
  16. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/az.js +8 -0
  17. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/bg.js +8 -0
  18. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ca.js +8 -0
  19. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/cs.js +8 -0
  20. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/da.js +8 -0
  21. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/de-ch.js +8 -0
  22. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/de.js +8 -0
  23. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/el.js +8 -0
  24. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/en-au.js +8 -0
  25. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/en.js +8 -0
  26. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/eo.js +8 -0
  27. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/es-mx.js +8 -0
  28. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/es.js +8 -0
  29. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/eu.js +8 -0
  30. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/fr.js +8 -0
  31. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/gl.js +8 -0
  32. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/hr.js +8 -0
  33. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/hu.js +8 -0
  34. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/it.js +8 -0
  35. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ja.js +8 -0
  36. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/km.js +8 -0
  37. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ko.js +8 -0
  38. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ku.js +8 -0
  39. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/mk.js +8 -0
  40. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/nb.js +8 -0
  41. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/nl.js +8 -0
  42. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/oc.js +8 -0
  43. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pl.js +8 -0
  44. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pt-br.js +8 -0
  45. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pt.js +8 -0
  46. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ro.js +8 -0
  47. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ru.js +8 -0
  48. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sk.js +8 -0
  49. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sq.js +8 -0
  50. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sv.js +8 -0
  51. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/tr.js +8 -0
  52. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ug.js +8 -0
  53. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/uk.js +8 -0
  54. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/vi.js +8 -0
  55. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/zh-cn.js +8 -0
  56. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/zh.js +8 -0
  57. data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +218 -0
  58. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +232 -0
  59. data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +102 -0
  60. data/app/assets/javascripts/ckeditor/plugins/autolink/plugin.js +69 -0
  61. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
  62. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
  63. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  64. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
  65. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  66. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  67. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -0
  68. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -0
  69. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
  70. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +6 -0
  71. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +1 -0
  72. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -0
  73. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -0
  74. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
  75. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -0
  76. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
  77. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +12 -0
  78. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +12 -0
  79. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +12 -0
  80. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +12 -0
  81. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +12 -0
  82. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +12 -0
  83. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +12 -0
  84. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +12 -0
  85. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +12 -0
  86. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +12 -0
  87. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +12 -0
  88. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +12 -0
  89. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +12 -0
  90. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +12 -0
  91. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +12 -0
  92. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +12 -0
  93. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +12 -0
  94. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +12 -0
  95. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +12 -0
  96. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +12 -0
  97. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +12 -0
  98. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +12 -0
  99. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +12 -0
  100. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +12 -0
  101. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +12 -0
  102. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +12 -0
  103. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +12 -0
  104. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +12 -0
  105. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +12 -0
  106. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +12 -0
  107. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +12 -0
  108. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +12 -0
  109. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +12 -0
  110. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +12 -0
  111. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +12 -0
  112. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +12 -0
  113. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +12 -0
  114. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +12 -0
  115. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +12 -0
  116. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +12 -0
  117. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +12 -0
  118. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +12 -0
  119. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +12 -0
  120. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +12 -0
  121. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +12 -0
  122. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +12 -0
  123. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +12 -0
  124. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +12 -0
  125. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +12 -0
  126. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +12 -0
  127. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +12 -0
  128. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +12 -0
  129. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +12 -0
  130. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +12 -0
  131. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +12 -0
  132. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +12 -0
  133. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +12 -0
  134. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +12 -0
  135. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +12 -0
  136. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +12 -0
  137. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +12 -0
  138. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +12 -0
  139. data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +1311 -0
  140. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +41 -0
  141. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +39 -0
  142. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +32 -0
  143. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -0
  144. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +74 -0
  145. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +38 -0
  146. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +38 -0
  147. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/bespin.css +34 -0
  148. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +32 -0
  149. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +25 -0
  150. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
  151. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +40 -0
  152. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +35 -0
  153. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +36 -0
  154. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -0
  155. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -0
  156. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +34 -0
  157. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/hopscotch.css +34 -0
  158. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +43 -0
  159. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/isotope.css +34 -0
  160. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -0
  161. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
  162. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +53 -0
  163. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
  164. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +46 -0
  165. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -0
  166. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +36 -0
  167. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -0
  168. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +43 -0
  169. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +27 -0
  170. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +85 -0
  171. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +38 -0
  172. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +38 -0
  173. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +52 -0
  174. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/railscasts.css +34 -0
  175. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +25 -0
  176. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +44 -0
  177. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +168 -0
  178. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +30 -0
  179. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
  180. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +38 -0
  181. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +64 -0
  182. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +32 -0
  183. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +34 -0
  184. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +53 -0
  185. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -0
  186. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +44 -0
  187. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
  188. data/app/assets/javascripts/ckeditor/plugins/embed/icons/embed.png +0 -0
  189. data/app/assets/javascripts/ckeditor/plugins/embed/icons/hidpi/embed.png +0 -0
  190. data/app/assets/javascripts/ckeditor/plugins/embed/plugin.js +105 -0
  191. data/app/assets/javascripts/ckeditor/plugins/embedbase/dialogs/embedbase.js +99 -0
  192. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/az.js +15 -0
  193. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/bg.js +15 -0
  194. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ca.js +15 -0
  195. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/cs.js +15 -0
  196. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/da.js +15 -0
  197. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/de-ch.js +15 -0
  198. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/de.js +15 -0
  199. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/en-au.js +15 -0
  200. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/en.js +15 -0
  201. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/eo.js +15 -0
  202. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/es-mx.js +15 -0
  203. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/es.js +15 -0
  204. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/eu.js +15 -0
  205. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/fr.js +15 -0
  206. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/gl.js +15 -0
  207. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/hr.js +15 -0
  208. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/hu.js +15 -0
  209. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/id.js +15 -0
  210. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/it.js +15 -0
  211. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ja.js +15 -0
  212. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ko.js +15 -0
  213. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ku.js +15 -0
  214. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/nb.js +15 -0
  215. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/nl.js +15 -0
  216. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/oc.js +15 -0
  217. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pl.js +15 -0
  218. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pt-br.js +15 -0
  219. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pt.js +15 -0
  220. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ro.js +15 -0
  221. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ru.js +15 -0
  222. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sk.js +15 -0
  223. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sq.js +15 -0
  224. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sv.js +15 -0
  225. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/tr.js +15 -0
  226. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ug.js +15 -0
  227. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/uk.js +15 -0
  228. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/zh-cn.js +15 -0
  229. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/zh.js +15 -0
  230. data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +652 -0
  231. data/app/assets/javascripts/ckeditor/plugins/embedjs/plugin.js +110 -0
  232. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +172 -0
  233. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +285 -0
  234. data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +1018 -0
  235. data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +7 -0
  236. data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +7 -0
  237. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +7 -0
  238. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +7 -0
  239. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
  240. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +7 -0
  241. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +7 -0
  242. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +7 -0
  243. data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +7 -0
  244. data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +7 -0
  245. data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +7 -0
  246. data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +7 -0
  247. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +7 -0
  248. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +7 -0
  249. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +7 -0
  250. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +7 -0
  251. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +7 -0
  252. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +7 -0
  253. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +7 -0
  254. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
  255. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +7 -0
  256. data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +7 -0
  257. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +7 -0
  258. data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +7 -0
  259. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +7 -0
  260. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +7 -0
  261. data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
  262. data/app/assets/javascripts/ckeditor/plugins/notificationaggregator/plugin.js +548 -0
  263. data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +60 -0
  264. data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +49 -0
  265. data/app/assets/javascripts/ckeditor/plugins/placeholder/icons/hidpi/placeholder.png +0 -0
  266. data/app/assets/javascripts/ckeditor/plugins/placeholder/icons/placeholder.png +0 -0
  267. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +12 -0
  268. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +12 -0
  269. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +12 -0
  270. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +12 -0
  271. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +12 -0
  272. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +12 -0
  273. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +12 -0
  274. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +12 -0
  275. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +12 -0
  276. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +12 -0
  277. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +12 -0
  278. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +12 -0
  279. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +12 -0
  280. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +12 -0
  281. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +12 -0
  282. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +12 -0
  283. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +12 -0
  284. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +12 -0
  285. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +12 -0
  286. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +12 -0
  287. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +12 -0
  288. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +12 -0
  289. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +12 -0
  290. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +12 -0
  291. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +12 -0
  292. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +12 -0
  293. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +12 -0
  294. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +12 -0
  295. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +12 -0
  296. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +12 -0
  297. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +12 -0
  298. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +12 -0
  299. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +12 -0
  300. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +12 -0
  301. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +12 -0
  302. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +12 -0
  303. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +12 -0
  304. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +12 -0
  305. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +12 -0
  306. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +12 -0
  307. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +12 -0
  308. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +12 -0
  309. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +12 -0
  310. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +12 -0
  311. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +12 -0
  312. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +12 -0
  313. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +12 -0
  314. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +12 -0
  315. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +12 -0
  316. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +12 -0
  317. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +12 -0
  318. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +12 -0
  319. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +12 -0
  320. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +12 -0
  321. data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +99 -0
  322. data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +75 -0
  323. data/app/assets/javascripts/ckeditor/plugins/strinsert/README.md +76 -0
  324. data/app/assets/javascripts/ckeditor/plugins/strinsert/bower.json +16 -0
  325. data/app/assets/javascripts/ckeditor/plugins/strinsert/plugin.js +107 -0
  326. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/contents.css +23 -0
  327. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/sample.jpg +0 -0
  328. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/contents.css +36 -0
  329. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +51 -0
  330. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/icons/simplebox.png +0 -0
  331. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +114 -0
  332. data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +131 -0
  333. data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +134 -0
  334. data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +144 -0
  335. data/app/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
  336. data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +8 -0
  337. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +8 -0
  338. data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +8 -0
  339. data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +8 -0
  340. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +8 -0
  341. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +8 -0
  342. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +8 -0
  343. data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +8 -0
  344. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +8 -0
  345. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +8 -0
  346. data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +8 -0
  347. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +8 -0
  348. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +8 -0
  349. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +8 -0
  350. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +8 -0
  351. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +8 -0
  352. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +8 -0
  353. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +8 -0
  354. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +8 -0
  355. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +8 -0
  356. data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +8 -0
  357. data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +8 -0
  358. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +8 -0
  359. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +8 -0
  360. data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +8 -0
  361. data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +8 -0
  362. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +8 -0
  363. data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +8 -0
  364. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +8 -0
  365. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +8 -0
  366. data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +8 -0
  367. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +8 -0
  368. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +8 -0
  369. data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +8 -0
  370. data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +8 -0
  371. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +8 -0
  372. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +8 -0
  373. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +8 -0
  374. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +8 -0
  375. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +8 -0
  376. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +8 -0
  377. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +8 -0
  378. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +8 -0
  379. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +8 -0
  380. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +8 -0
  381. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +8 -0
  382. data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +8 -0
  383. data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +8 -0
  384. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +8 -0
  385. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +8 -0
  386. data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +4147 -0
  387. data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +366 -0
  388. data/app/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +3 -0
  389. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +11 -0
  390. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +13 -0
  391. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +13 -0
  392. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +13 -0
  393. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +13 -0
  394. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +13 -0
  395. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +13 -0
  396. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +14 -0
  397. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +11 -0
  398. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +13 -0
  399. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +13 -0
  400. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +14 -0
  401. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +14 -0
  402. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +13 -0
  403. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +13 -0
  404. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +10 -0
  405. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +13 -0
  406. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +13 -0
  407. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +9 -0
  408. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +13 -0
  409. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +13 -0
  410. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +13 -0
  411. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +13 -0
  412. data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +407 -0
  413. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcount.html +61 -0
  414. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +110 -0
  415. data/app/assets/javascripts/integral/backend.js +268 -0
  416. data/app/assets/javascripts/integral/backend/extensions.js +1 -0
  417. data/app/assets/javascripts/integral/backend/support/Chart.bundle.min.js +10 -0
  418. data/app/assets/javascripts/integral/frontend.js +60 -0
  419. data/app/assets/javascripts/integral/support/character_counter.js +67 -0
  420. data/app/assets/javascripts/integral/support/chart_manager.coffee +145 -0
  421. data/app/assets/javascripts/integral/support/click_to_copy.coffee +28 -0
  422. data/app/assets/javascripts/integral/support/confirm_modal.coffee +58 -0
  423. data/app/assets/javascripts/integral/support/date_picker.coffee +83 -0
  424. data/app/assets/javascripts/integral/support/date_picker/picker.date.js +1435 -0
  425. data/app/assets/javascripts/integral/support/date_picker/picker.js +1132 -0
  426. data/app/assets/javascripts/integral/support/gallery.coffee +82 -0
  427. data/app/assets/javascripts/integral/support/google_analytics.coffee +23 -0
  428. data/app/assets/javascripts/integral/support/grid.coffee +92 -0
  429. data/app/assets/javascripts/integral/support/header_anchors.coffee +22 -0
  430. data/app/assets/javascripts/integral/support/image-preview.coffee +14 -0
  431. data/app/assets/javascripts/integral/support/image_selector.coffee +43 -0
  432. data/app/assets/javascripts/integral/support/image_uploader.coffee +59 -0
  433. data/app/assets/javascripts/integral/support/lib/html.sortable.js +691 -0
  434. data/app/assets/javascripts/integral/support/lib/jquery.are-you-sure.js +231 -0
  435. data/app/assets/javascripts/integral/support/lib/jquery_form.js +11 -0
  436. data/app/assets/javascripts/integral/support/lib/js.cookie.js +165 -0
  437. data/app/assets/javascripts/integral/support/lib/materialize-tags.js +758 -0
  438. data/app/assets/javascripts/integral/support/lib/materialize.clockpicker.js +699 -0
  439. data/app/assets/javascripts/integral/support/lib/swiper.js +7719 -0
  440. data/app/assets/javascripts/integral/support/lib/typeahead.js +2451 -0
  441. data/app/assets/javascripts/integral/support/lib/underscore.js +6 -0
  442. data/app/assets/javascripts/integral/support/list.coffee +71 -0
  443. data/app/assets/javascripts/integral/support/list_item.coffee +249 -0
  444. data/app/assets/javascripts/integral/support/notification_manager.coffee +17 -0
  445. data/app/assets/javascripts/integral/support/record_selector.coffee +161 -0
  446. data/app/assets/javascripts/integral/support/remote_form.coffee +87 -0
  447. data/app/assets/javascripts/integral/support/responsive_swiper.coffee +26 -0
  448. data/app/assets/javascripts/integral/support/scroll_to_top.coffee +17 -0
  449. data/app/assets/javascripts/integral/support/slug_generator.coffee +49 -0
  450. data/app/assets/stylesheets/errors.css +1834 -0
  451. data/app/assets/stylesheets/integral/backend.sass +66 -0
  452. data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +867 -0
  453. data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +491 -0
  454. data/app/assets/stylesheets/integral/backend/devise.sass +40 -0
  455. data/app/assets/stylesheets/integral/backend/foundation_and_overrides.scss +56 -0
  456. data/app/assets/stylesheets/integral/backend/materialize-tags.sass +70 -0
  457. data/app/assets/stylesheets/integral/backend/notifications.sass +43 -0
  458. data/app/assets/stylesheets/integral/backend/overrides.sass +1 -0
  459. data/app/assets/stylesheets/integral/backend/shared.sass +770 -0
  460. data/app/assets/stylesheets/integral/emails.scss +19 -0
  461. data/app/assets/stylesheets/integral/emails/colors.sass +3 -0
  462. data/app/assets/stylesheets/integral/frontend.sass +26 -0
  463. data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +863 -0
  464. data/app/assets/stylesheets/integral/frontend/blog.sass +263 -0
  465. data/app/assets/stylesheets/integral/frontend/demo.sass +158 -0
  466. data/app/assets/stylesheets/integral/frontend/foundation_and_overrides.scss +56 -0
  467. data/app/assets/stylesheets/integral/frontend/layout.sass +66 -0
  468. data/app/assets/stylesheets/integral/frontend/overrides.sass +1 -0
  469. data/app/assets/stylesheets/integral/frontend/share_modal.sass +25 -0
  470. data/app/assets/stylesheets/integral/frontend/shared.sass +73 -0
  471. data/app/assets/stylesheets/integral/support/date-picker.scss +16 -0
  472. data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +452 -0
  473. data/app/assets/stylesheets/integral/support/date_picker/_default.scss +201 -0
  474. data/app/assets/stylesheets/integral/support/date_picker/_default.time.scss +125 -0
  475. data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +220 -0
  476. data/app/assets/stylesheets/integral/support/gallery.sass +54 -0
  477. data/app/assets/stylesheets/integral/support/media-query-indicator.sass +25 -0
  478. data/app/assets/stylesheets/integral/support/mixins.sass +29 -0
  479. data/app/assets/stylesheets/integral/support/scroll-to-top.sass +19 -0
  480. data/app/assets/stylesheets/integral/support/swiper.css +618 -0
  481. data/app/assets/stylesheets/integral/wysiwyg.sass +13 -0
  482. data/app/controllers/integral/application_controller.rb +130 -0
  483. data/app/controllers/integral/backend/activities_controller.rb +55 -0
  484. data/app/controllers/integral/backend/base_controller.rb +123 -0
  485. data/app/controllers/integral/backend/images_controller.rb +120 -0
  486. data/app/controllers/integral/backend/lists_controller.rb +138 -0
  487. data/app/controllers/integral/backend/pages_controller.rb +142 -0
  488. data/app/controllers/integral/backend/posts_controller.rb +132 -0
  489. data/app/controllers/integral/backend/settings_controller.rb +53 -0
  490. data/app/controllers/integral/backend/static_pages_controller.rb +10 -0
  491. data/app/controllers/integral/backend/users_controller.rb +130 -0
  492. data/app/controllers/integral/blog_controller.rb +19 -0
  493. data/app/controllers/integral/contact_controller.rb +36 -0
  494. data/app/controllers/integral/pages_controller.rb +45 -0
  495. data/app/controllers/integral/posts_controller.rb +71 -0
  496. data/app/controllers/integral/tags_controller.rb +38 -0
  497. data/app/decorators/integral/image_decorator.rb +16 -0
  498. data/app/decorators/integral/list_decorator.rb +21 -0
  499. data/app/decorators/integral/page_decorator.rb +26 -0
  500. data/app/decorators/integral/post_decorator.rb +63 -0
  501. data/app/decorators/integral/user_decorator.rb +21 -0
  502. data/app/decorators/integral/version_decorator.rb +57 -0
  503. data/app/helpers/integral/application_helper.rb +52 -0
  504. data/app/helpers/integral/backend/base_helper.rb +72 -0
  505. data/app/helpers/integral/blog_helper.rb +26 -0
  506. data/app/helpers/integral/gallery_helper.rb +36 -0
  507. data/app/helpers/integral/mail_helper.rb +16 -0
  508. data/app/helpers/integral/social_helper.rb +123 -0
  509. data/app/helpers/integral/support_helper.rb +60 -0
  510. data/app/jobs/integral/application_job.rb +10 -0
  511. data/app/jobs/integral/newsletter_signup_job.rb +28 -0
  512. data/app/mailers/integral/contact_mailer.rb +56 -0
  513. data/app/models/ckeditor/asset.rb +8 -0
  514. data/app/models/ckeditor/attachment_file.rb +9 -0
  515. data/app/models/ckeditor/picture.rb +21 -0
  516. data/app/models/integral/application_record.rb +6 -0
  517. data/app/models/integral/basic.rb +11 -0
  518. data/app/models/integral/enquiry.rb +46 -0
  519. data/app/models/integral/image.rb +67 -0
  520. data/app/models/integral/image_version.rb +8 -0
  521. data/app/models/integral/link.rb +11 -0
  522. data/app/models/integral/list.rb +69 -0
  523. data/app/models/integral/list_item.rb +89 -0
  524. data/app/models/integral/list_version.rb +8 -0
  525. data/app/models/integral/newsletter_signup.rb +22 -0
  526. data/app/models/integral/object.rb +30 -0
  527. data/app/models/integral/page.rb +153 -0
  528. data/app/models/integral/page_version.rb +8 -0
  529. data/app/models/integral/post.rb +149 -0
  530. data/app/models/integral/post_version.rb +8 -0
  531. data/app/models/integral/post_viewing.rb +19 -0
  532. data/app/models/integral/role.rb +14 -0
  533. data/app/models/integral/role_assignment.rb +7 -0
  534. data/app/models/integral/settings.rb +5 -0
  535. data/app/models/integral/user.rb +59 -0
  536. data/app/models/integral/user_version.rb +8 -0
  537. data/app/models/integral/version.rb +31 -0
  538. data/app/models/paper_trail/version.rb +9 -0
  539. data/app/policies/integral/base_policy.rb +50 -0
  540. data/app/policies/integral/image_policy.rb +14 -0
  541. data/app/policies/integral/list_policy.rb +9 -0
  542. data/app/policies/integral/page_policy.rb +45 -0
  543. data/app/policies/integral/post_policy.rb +9 -0
  544. data/app/policies/integral/settings_policy.rb +17 -0
  545. data/app/policies/integral/user_policy.rb +17 -0
  546. data/app/policies/integral/version_policy.rb +19 -0
  547. data/app/uploaders/ckeditor_attachment_file_uploader.rb +34 -0
  548. data/app/uploaders/ckeditor_picture_uploader.rb +55 -0
  549. data/app/uploaders/integral/avatar_uploader.rb +9 -0
  550. data/app/uploaders/integral/image_uploader.rb +114 -0
  551. data/app/views/devise/invitations/edit.haml +17 -0
  552. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  553. data/app/views/devise/mailer/invitation_instructions.html.erb +13 -0
  554. data/app/views/devise/mailer/invitation_instructions.text.erb +12 -0
  555. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  556. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  557. data/app/views/devise/passwords/edit.haml +17 -0
  558. data/app/views/devise/passwords/new.haml +12 -0
  559. data/app/views/devise/sessions/new.haml +18 -0
  560. data/app/views/devise/shared/_links.html.erb +25 -0
  561. data/app/views/integral/backend/activities/_grid.haml +23 -0
  562. data/app/views/integral/backend/activities/index.haml +15 -0
  563. data/app/views/integral/backend/activities/shared/_grid.haml +20 -0
  564. data/app/views/integral/backend/activities/shared/_listing.haml +14 -0
  565. data/app/views/integral/backend/activities/shared/_log.haml +56 -0
  566. data/app/views/integral/backend/activities/show.haml +18 -0
  567. data/app/views/integral/backend/images/_create_modal.haml +17 -0
  568. data/app/views/integral/backend/images/_form.haml +41 -0
  569. data/app/views/integral/backend/images/_grid.haml +16 -0
  570. data/app/views/integral/backend/images/edit.haml +3 -0
  571. data/app/views/integral/backend/images/index.haml +18 -0
  572. data/app/views/integral/backend/images/new.haml +1 -0
  573. data/app/views/integral/backend/lists/_child_fields.haml +26 -0
  574. data/app/views/integral/backend/lists/_form.haml +25 -0
  575. data/app/views/integral/backend/lists/_grid.haml +16 -0
  576. data/app/views/integral/backend/lists/_item_container.haml +26 -0
  577. data/app/views/integral/backend/lists/_item_modal.haml +46 -0
  578. data/app/views/integral/backend/lists/_list_item_fields.haml +26 -0
  579. data/app/views/integral/backend/lists/_manager.haml +14 -0
  580. data/app/views/integral/backend/lists/edit.haml +2 -0
  581. data/app/views/integral/backend/lists/index.haml +18 -0
  582. data/app/views/integral/backend/lists/new.haml +1 -0
  583. data/app/views/integral/backend/lists/show.haml +26 -0
  584. data/app/views/integral/backend/pages/_form.haml +52 -0
  585. data/app/views/integral/backend/pages/_grid.haml +21 -0
  586. data/app/views/integral/backend/pages/activities.haml +2 -0
  587. data/app/views/integral/backend/pages/activity.haml +1 -0
  588. data/app/views/integral/backend/pages/edit.html.haml +15 -0
  589. data/app/views/integral/backend/pages/index.haml +22 -0
  590. data/app/views/integral/backend/pages/new.haml +2 -0
  591. data/app/views/integral/backend/posts/_form.haml +57 -0
  592. data/app/views/integral/backend/posts/_grid.haml +25 -0
  593. data/app/views/integral/backend/posts/activities.haml +3 -0
  594. data/app/views/integral/backend/posts/activity.haml +1 -0
  595. data/app/views/integral/backend/posts/edit.haml +16 -0
  596. data/app/views/integral/backend/posts/index.haml +20 -0
  597. data/app/views/integral/backend/posts/new.haml +2 -0
  598. data/app/views/integral/backend/settings/_input.haml +4 -0
  599. data/app/views/integral/backend/settings/_section.haml +11 -0
  600. data/app/views/integral/backend/settings/index.haml +10 -0
  601. data/app/views/integral/backend/settings/sections/_general.haml +12 -0
  602. data/app/views/integral/backend/settings/sections/_lists.haml +4 -0
  603. data/app/views/integral/backend/settings/sections/_seo.haml +8 -0
  604. data/app/views/integral/backend/settings/sections/_social.haml +16 -0
  605. data/app/views/integral/backend/shared/_breadcrumbs.haml +9 -0
  606. data/app/views/integral/backend/shared/_empty_grid.haml +7 -0
  607. data/app/views/integral/backend/shared/_grid.haml +18 -0
  608. data/app/views/integral/backend/shared/_image_preview.haml +23 -0
  609. data/app/views/integral/backend/shared/_image_selector.haml +4 -0
  610. data/app/views/integral/backend/shared/_pagination.haml +1 -0
  611. data/app/views/integral/backend/shared/cards/_at_a_glance.haml +5 -0
  612. data/app/views/integral/backend/shared/cards/_welcome.haml +29 -0
  613. data/app/views/integral/backend/shared/graphs/_donut.haml +5 -0
  614. data/app/views/integral/backend/shared/graphs/_line.haml +5 -0
  615. data/app/views/integral/backend/shared/graphs/_no_data_available.haml +2 -0
  616. data/app/views/integral/backend/shared/record_selector/_collection.haml +13 -0
  617. data/app/views/integral/backend/shared/record_selector/_modal.haml +42 -0
  618. data/app/views/integral/backend/shared/record_selector/_record.haml +6 -0
  619. data/app/views/integral/backend/static_pages/_card.haml +24 -0
  620. data/app/views/integral/backend/static_pages/dashboard.haml +20 -0
  621. data/app/views/integral/backend/users/_form.haml +58 -0
  622. data/app/views/integral/backend/users/_grid.haml +19 -0
  623. data/app/views/integral/backend/users/edit.haml +3 -0
  624. data/app/views/integral/backend/users/index.haml +18 -0
  625. data/app/views/integral/backend/users/new.haml +2 -0
  626. data/app/views/integral/backend/users/show.haml +36 -0
  627. data/app/views/integral/contact_mailer/auto_reply.html.haml +16 -0
  628. data/app/views/integral/contact_mailer/auto_reply.text.erb +15 -0
  629. data/app/views/integral/contact_mailer/forward_enquiry.haml +12 -0
  630. data/app/views/integral/contact_mailer/forward_enquiry.text.erb +9 -0
  631. data/app/views/integral/pages/_demo.haml +188 -0
  632. data/app/views/integral/pages/templates/default.haml +6 -0
  633. data/app/views/integral/posts/_item.haml +16 -0
  634. data/app/views/integral/posts/index.haml +6 -0
  635. data/app/views/integral/posts/templates/default.haml +38 -0
  636. data/app/views/integral/shared/_blog_layout.haml +15 -0
  637. data/app/views/integral/shared/_blog_sidebar.haml +49 -0
  638. data/app/views/integral/shared/_breadcrumbs.haml +5 -0
  639. data/app/views/integral/shared/_media_query_indicator.haml +2 -0
  640. data/app/views/integral/shared/_scroll_to_top.haml +3 -0
  641. data/app/views/integral/shared/_share_modal.haml +20 -0
  642. data/app/views/integral/shared/_social_list_items.haml +41 -0
  643. data/app/views/integral/shared/_swiper_layout.haml +20 -0
  644. data/app/views/integral/shared/gallery/_placeholder.haml +7 -0
  645. data/app/views/integral/shared/gallery/_slide.haml +5 -0
  646. data/app/views/integral/shared/gallery/_thumb_slide.haml +2 -0
  647. data/app/views/integral/shared/gallery/gallery.haml +7 -0
  648. data/app/views/integral/tags/index.haml +6 -0
  649. data/app/views/integral/tags/show.haml +6 -0
  650. data/app/views/layouts/error.haml +12 -0
  651. data/app/views/layouts/integral/backend.html.haml +93 -0
  652. data/app/views/layouts/integral/backend/_create_dropdown.haml +30 -0
  653. data/app/views/layouts/integral/backend/_head.html.haml +17 -0
  654. data/app/views/layouts/integral/backend/_main_menu_items.haml +91 -0
  655. data/app/views/layouts/integral/frontend.html.haml +36 -0
  656. data/app/views/layouts/integral/frontend/_admin_bar.haml +25 -0
  657. data/app/views/layouts/integral/frontend/_footer.haml +23 -0
  658. data/app/views/layouts/integral/frontend/_header.haml +12 -0
  659. data/app/views/layouts/integral/login.haml +8 -0
  660. data/app/views/layouts/integral/mailer.html.inky-haml +17 -0
  661. data/app/views/layouts/integral/mailer/_footer.html.inky-haml +11 -0
  662. data/app/views/layouts/integral/mailer/_header.html.inky-haml +7 -0
  663. data/config/initializers/acts_as_taggable_on.rb +6 -0
  664. data/config/initializers/ckeditor.rb +51 -0
  665. data/config/initializers/client_side_validations.rb +20 -0
  666. data/config/initializers/compression.rb +46 -0
  667. data/config/initializers/devise.rb +308 -0
  668. data/config/initializers/extensions/ckeditor.rb +31 -0
  669. data/config/initializers/friendly_id.rb +88 -0
  670. data/config/initializers/gaffe.rb +3 -0
  671. data/config/initializers/simple_form.rb +169 -0
  672. data/config/initializers/simple_form/length_component.rb +36 -0
  673. data/config/locales/devise.en.yml +60 -0
  674. data/config/locales/devise_invitable.en.yml +31 -0
  675. data/config/locales/en.yml +477 -0
  676. data/config/locales/simple_form.en.yml +31 -0
  677. data/config/routes.rb +3 -0
  678. data/db/migrate/20160129021044_devise_create_integral_users.rb +42 -0
  679. data/db/migrate/20160130051535_add_name_and_avatar_to_users.rb +6 -0
  680. data/db/migrate/20160201003936_add_roles.rb +13 -0
  681. data/db/migrate/20160302071241_create_integral_images.rb +13 -0
  682. data/db/migrate/20160311092506_create_ckeditor_assets.rb +26 -0
  683. data/db/migrate/20160318004136_create_integral_pages.rb +12 -0
  684. data/db/migrate/20160513033619_create_integral_posts.rb +12 -0
  685. data/db/migrate/20160514063048_add_slug_column_to_post.rb +6 -0
  686. data/db/migrate/20160516084702_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
  687. data/db/migrate/20160516084703_add_missing_unique_indices.acts_as_taggable_on_engine.rb +20 -0
  688. data/db/migrate/20160516084704_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
  689. data/db/migrate/20160516084705_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
  690. data/db/migrate/20160516084706_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +10 -0
  691. data/db/migrate/20160519005736_add_image_to_posts.rb +5 -0
  692. data/db/migrate/20160519053329_create_friendly_id_slugs.rb +15 -0
  693. data/db/migrate/20160610021858_add_view_count_to_posts.rb +5 -0
  694. data/db/migrate/20160613035508_add_drafting_to_posts.rb +6 -0
  695. data/db/migrate/20160628050006_create_integral_post_viewings.rb +10 -0
  696. data/db/migrate/20160718011218_add_locale_to_integral_users.rb +5 -0
  697. data/db/migrate/20160722100113_devise_invitable_add_to_integral_users.rb +23 -0
  698. data/db/migrate/20160809115906_add_drafting_to_pages.rb +5 -0
  699. data/db/migrate/20160909124940_add_deleted_at_to_objects.rb +15 -0
  700. data/db/migrate/20161014175823_create_lists.rb +31 -0
  701. data/db/migrate/20161102094859_create_settings.rb +18 -0
  702. data/db/migrate/20170215012231_add_templates_to_pages.rb +5 -0
  703. data/db/migrate/20170425091312_add_image_processing_fields.rb +7 -0
  704. data/db/migrate/20170516033523_add_timestamps_to_lists.rb +6 -0
  705. data/db/migrate/20170608131624_add_file_size_to_images.rb +5 -0
  706. data/db/migrate/20170801182434_add_parent_to_pages.rb +5 -0
  707. data/db/migrate/20170922201940_add_image_id_to_posts.rb +9 -0
  708. data/db/migrate/20171008193414_create_post_versions.rb +21 -0
  709. data/db/migrate/20171030215146_create_page_versions.rb +20 -0
  710. data/db/migrate/20171030215154_create_user_versions.rb +20 -0
  711. data/db/migrate/20171030215202_create_list_versions.rb +20 -0
  712. data/db/migrate/20171123155010_create_integral_enquiries.rb +13 -0
  713. data/db/migrate/20171127141132_add_deleted_at_to_lists.rb +6 -0
  714. data/db/migrate/20171230213848_add_image_to_pages.rb +6 -0
  715. data/db/migrate/20180202010010_add_lock_version_to_integral_objects.rb +9 -0
  716. data/db/migrate/20180202010020_create_image_versions.rb +20 -0
  717. data/db/migrate/20180207174914_add_fields_to_lists.rb +7 -0
  718. data/db/migrate/20180223232512_create_integral_newsletter_signups.rb +11 -0
  719. data/db/migrate/20180306204912_add_admin_to_integral_users.rb +5 -0
  720. data/db/migrate/20180326224500_add_processed_to_enquiries_and_newsletters.rb +6 -0
  721. data/db/migrate/20180509101917_add_context_to_enquiries.rb +6 -0
  722. data/db/migrate/20180920030236_update_posts_and_pages_null.rb +6 -0
  723. data/db/migrate/20181011234446_add_preview_image_to_posts.rb +6 -0
  724. data/db/seeds.rb +53 -0
  725. data/lib/generators/integral/install_generator.rb +19 -0
  726. data/lib/generators/templates/app.yml +24 -0
  727. data/lib/generators/templates/carrierwave.rb +35 -0
  728. data/lib/generators/templates/carrierwave_backgrounder.rb +11 -0
  729. data/lib/generators/templates/integral.rb +129 -0
  730. data/lib/generators/templates/sitemap.rb +41 -0
  731. data/lib/integral.rb +155 -0
  732. data/lib/integral/acts_as_listable.rb +45 -0
  733. data/lib/integral/button_link_renderer.rb +54 -0
  734. data/lib/integral/chart_renderer/base.rb +80 -0
  735. data/lib/integral/chart_renderer/donut.rb +21 -0
  736. data/lib/integral/chart_renderer/line.rb +24 -0
  737. data/lib/integral/content_renderer.rb +78 -0
  738. data/lib/integral/engine.rb +124 -0
  739. data/lib/integral/foundation_builder.rb +33 -0
  740. data/lib/integral/google_tag_manager.rb +33 -0
  741. data/lib/integral/grids/activities_grid.rb +37 -0
  742. data/lib/integral/grids/images_grid.rb +21 -0
  743. data/lib/integral/grids/lists_grid.rb +21 -0
  744. data/lib/integral/grids/pages_grid.rb +27 -0
  745. data/lib/integral/grids/posts_grid.rb +32 -0
  746. data/lib/integral/grids/users_grid.rb +22 -0
  747. data/lib/integral/list_item_renderer.rb +204 -0
  748. data/lib/integral/list_renderer.rb +91 -0
  749. data/lib/integral/middleware/page_router.rb +84 -0
  750. data/lib/integral/partial_list_item_renderer.rb +40 -0
  751. data/lib/integral/router.rb +106 -0
  752. data/lib/integral/slack_bot.rb +45 -0
  753. data/lib/integral/swiper_list_renderer.rb +30 -0
  754. data/lib/integral/version.rb +5 -0
  755. data/lib/integral/widgets/recent_posts.rb +41 -0
  756. data/lib/integral/widgets/swiper_list.rb +40 -0
  757. data/lib/tasks/integral_tasks.rake +57 -0
  758. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  759. data/spec/factories.rb +114 -0
  760. data/spec/support/image.jpg +0 -0
  761. metadata +1734 -0
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'cs', {
6
+ closed: 'Oznámení zavřeno.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'da', {
6
+ closed: 'Notefikation lukket.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'de-ch', {
6
+ closed: 'Benachrichtigung geschlossen.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'de', {
6
+ closed: 'Benachrichtigung geschlossen.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'en', {
6
+ closed: 'Notification closed.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'eo', {
6
+ closed: 'Sciigo fermita'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'eu', {
6
+ closed: 'Jakinarazpena itxita.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'fr', {
6
+ closed: 'La notification est close.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'gl', {
6
+ closed: 'Notificación pechada.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'id', {
6
+ closed: 'Pemberitahuan ditutup'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'it', {
6
+ closed: 'Notifica chiusa.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'km', {
6
+ closed: 'បាន​បិទ​ការ​ផ្ដល់​ដំណឹង។'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'ko', {
6
+ closed: '알림이 닫힘.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'ku', {
6
+ closed: 'ئاگادارکەرەوەکە داخرا.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'nb', {
6
+ closed: 'Varsling lukket.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'nl', {
6
+ closed: 'Melding gesloten.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'pl', {
6
+ closed: 'Powiadomienie zostało zamknięte.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'pt-br', {
6
+ closed: 'Notificação fechada.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'pt', {
6
+ closed: 'Notificação encerrada.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'ru', {
6
+ closed: 'Уведомление закрыто'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'sv', {
6
+ closed: 'Notifiering stängd.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'tr', {
6
+ closed: 'Uyarılar kapatıldı.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'ug', {
6
+ closed: 'ئوقتۇرۇش تاقالدى.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'uk', {
6
+ closed: 'Сповіщення закрито.'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'zh-cn', {
6
+ closed: '通知已关闭。'
7
+ } );
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'notification', 'zh', {
6
+ closed: '通知已關閉。'
7
+ } );
@@ -0,0 +1,923 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+
6
+ /**
7
+ * @fileOverview The "Notification" plugin.
8
+ *
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ CKEDITOR.plugins.add( 'notification', {
14
+ lang: 'cs,da,de,de-ch,en,eo,eu,fr,gl,id,it,km,ko,ku,nb,nl,pl,pt,pt-br,ru,sv,tr,ug,uk,zh,zh-cn', // %REMOVE_LINE_CORE%
15
+ requires: 'toolbar',
16
+
17
+ init: function( editor ) {
18
+ editor._.notificationArea = new Area( editor );
19
+
20
+ // Overwrites default `editor.showNotification`.
21
+ editor.showNotification = function( message, type, progressOrDuration ) {
22
+ var progress, duration;
23
+
24
+ if ( type == 'progress' ) {
25
+ progress = progressOrDuration;
26
+ } else {
27
+ duration = progressOrDuration;
28
+ }
29
+
30
+ var notification = new CKEDITOR.plugins.notification( editor, {
31
+ message: message,
32
+ type: type,
33
+ progress: progress,
34
+ duration: duration
35
+ } );
36
+
37
+ notification.show();
38
+
39
+ return notification;
40
+ };
41
+
42
+ // Close the last notification on ESC.
43
+ editor.on( 'key', function( evt ) {
44
+ if ( evt.data.keyCode == 27 ) { /* ESC */
45
+ var notifications = editor._.notificationArea.notifications;
46
+
47
+ if ( !notifications.length ) {
48
+ return;
49
+ }
50
+
51
+ // As long as this is not a common practice to inform screen-reader users about actions, in this case
52
+ // this is the best solution (unfortunately there is no standard for accessibility for notifications).
53
+ // Notification has an `alert` aria role what means that it does not get a focus nor is needed to be
54
+ // closed (unlike `alertdialog`). However notification will capture ESC key so we need to inform user
55
+ // why it does not do other actions.
56
+ say( editor.lang.notification.closed );
57
+
58
+ // Hide last.
59
+ notifications[ notifications.length - 1 ].hide();
60
+
61
+ evt.cancel();
62
+ }
63
+ } );
64
+
65
+ // Send the message to the screen readers.
66
+ function say( text ) {
67
+ var message = new CKEDITOR.dom.element( 'div' );
68
+ message.setStyles( {
69
+ position: 'fixed',
70
+ 'margin-left': '-9999px'
71
+ } );
72
+ message.setAttributes( {
73
+ 'aria-live': 'assertive',
74
+ 'aria-atomic': 'true'
75
+ } );
76
+ message.setText( text );
77
+
78
+ CKEDITOR.document.getBody().append( message );
79
+
80
+ setTimeout( function() {
81
+ message.remove();
82
+ }, 100 );
83
+ }
84
+ }
85
+ } );
86
+
87
+ /**
88
+ * Notification class. Notifications are used to display short messages to the user. They might be used to show the result of
89
+ * asynchronous actions or information about changes in the editor content. It is recommended to use them instead of
90
+ * alert dialogs. They should **not** be used if a user response is required nor with dialog windows (e.g. in dialog validation).
91
+ *
92
+ * There are four types of notifications available, see the {@link #type} property.
93
+ *
94
+ * Note that the notification constructor only creates a notification instance. To show it, use the {@link #show} method:
95
+ *
96
+ * var notification = new CKEDITOR.plugins.notification( editor, { message: 'Foo' } );
97
+ * notification.show();
98
+ *
99
+ * You can also use the {@link CKEDITOR.editor#showNotification} method:
100
+ *
101
+ * editor.showNotification( 'Foo' );
102
+ *
103
+ * All of the notification actions: ({@link #show}, {@link #update} and {@link #hide}) fire cancelable events
104
+ * on the related {@link CKEDITOR.editor} instance so you can integrate editor notifications with your website notifications.
105
+ *
106
+ * Refer to the [Notifications](http://docs.ckeditor.com/#!/guide/dev_notifications) article for more information about this feature.
107
+ *
108
+ * @since 4.5
109
+ * @class CKEDITOR.plugins.notification
110
+ * @constructor Create a notification object. Call {@link #show} to show the created notification.
111
+ * @param {CKEDITOR.editor} editor The editor instance.
112
+ * @param {Object} options
113
+ * @param {String} options.message The message displayed in the notification.
114
+ * @param {String} [options.type='info'] Notification type, see {@link #type}.
115
+ * @param {Number} [options.progress=0] If the type is `progress` this may be a progress from 0 to 1.
116
+ * @param {Number} [options.duration] How long the notification will be visible, see {@link #duration}.
117
+ */
118
+ function Notification( editor, options ) {
119
+ CKEDITOR.tools.extend( this, options, {
120
+ editor: editor,
121
+ id: 'cke-' + CKEDITOR.tools.getUniqueId(),
122
+ area: editor._.notificationArea
123
+ } );
124
+
125
+ if ( !options.type ) {
126
+ this.type = 'info';
127
+ }
128
+
129
+ this.element = this._createElement();
130
+
131
+ // Don't allow dragging on notification (#13184).
132
+ editor.plugins.clipboard && CKEDITOR.plugins.clipboard.preventDefaultDropOnElement( this.element );
133
+ }
134
+
135
+ /**
136
+ * The editor instance.
137
+ *
138
+ * @readonly
139
+ * @property {CKEDITOR.editor} editor
140
+ */
141
+
142
+ /**
143
+ * Message displayed in the notification.
144
+ *
145
+ * @readonly
146
+ * @property {String} message
147
+ */
148
+
149
+ /**
150
+ * Notification type. There are four types available:
151
+ *
152
+ * * `info` (default) – Information for the user (e.g. "File is uploading.", "ACF modified content."),
153
+ * * `warning` – Warning or error message (e.g. "This type of file is not supported.",
154
+ * "You cannot paste the script."),
155
+ * * `success` – Information that an operation finished successfully (e.g. "File uploaded.", "Data imported.").
156
+ * * `progress` – Information about the progress of an operation. When the operation is done, the notification
157
+ * type should be changed to `success`.
158
+ *
159
+ * @readonly
160
+ * @property {String} type
161
+ */
162
+
163
+ /**
164
+ * If the notification {@link #type} is `'progress'`, this is the progress from `0` to `1`.
165
+ *
166
+ * @readonly
167
+ * @property {Number} progress
168
+ */
169
+
170
+ /**
171
+ * Notification duration. Determines after how many milliseconds the notification should close automatically.
172
+ * `0` means that the notification will not close automatically and that the user needs to close it manually.
173
+ * The default value for `warning` and `progress` notifications is `0`. For `info` and `success` the value can
174
+ * either be set through the {@link CKEDITOR.config#notification_duration} configuration option or equals `5000`
175
+ * if the configuration option is not set.
176
+ *
177
+ * @readonly
178
+ * @property {Number} duration
179
+ */
180
+
181
+ /**
182
+ * Unique notification ID.
183
+ *
184
+ * @readonly
185
+ * @property {Number} id
186
+ */
187
+
188
+ /**
189
+ * Notification DOM element. There is one element per notification. It is created when the notification is created,
190
+ * even if it is not shown. If the notification is hidden, the element is detached from the document but not deleted.
191
+ * It will be reused if the notification is shown again.
192
+ *
193
+ * @readonly
194
+ * @property {CKEDITOR.dom.element} element
195
+ */
196
+
197
+ /**
198
+ * {@link CKEDITOR.plugins.notification.area Notification area} reference.
199
+ *
200
+ * @readonly
201
+ * @property {CKEDITOR.plugins.notification.area} area
202
+ */
203
+
204
+ Notification.prototype = {
205
+ /**
206
+ * Adds the notification element to the notification area. The notification will be hidden automatically if
207
+ * {@link #duration} is set.
208
+ *
209
+ * Fires the {@link CKEDITOR.editor#notificationShow} event.
210
+ */
211
+ show: function() {
212
+ if ( this.editor.fire( 'notificationShow', { notification: this } ) === false ) {
213
+ return;
214
+ }
215
+
216
+ this.area.add( this );
217
+
218
+ this._hideAfterTimeout();
219
+ },
220
+
221
+ /**
222
+ * Updates the notification object and element.
223
+ *
224
+ * Fires the {@link CKEDITOR.editor#notificationUpdate} event.
225
+ *
226
+ * @param {Object} options
227
+ * @param {String} [options.message] {@link #message}
228
+ * @param {String} [options.type] {@link #type}
229
+ * @param {Number} [options.progress] {@link #progress}
230
+ * @param {Number} [options.duration] {@link #duration}
231
+ * @param {Boolean} [options.important=false] If the update is important, the notification will be shown
232
+ * if it was hidden and read by screen readers.
233
+ */
234
+ update: function( options ) {
235
+ var show = true;
236
+
237
+ if ( this.editor.fire( 'notificationUpdate', { notification: this, options: options } ) === false ) {
238
+ // The idea of cancelable event is to let user create his own way of displaying notification, so if
239
+ // `notificationUpdate` event will be canceled there will be no interaction with notification area, but on
240
+ // the other hand the logic should work anyway so object will be updated (including `element` property).
241
+ // Note: we can safely update the element's attributes below, because this element is created inside
242
+ // the constructor. If the notificatinShow event was canceled as well, the element is detached from DOM.
243
+ show = false;
244
+ }
245
+
246
+ var element = this.element,
247
+ messageElement = element.findOne( '.cke_notification_message' ),
248
+ progressElement = element.findOne( '.cke_notification_progress' ),
249
+ type = options.type;
250
+
251
+ element.removeAttribute( 'role' );
252
+
253
+ // Change type to progress if `options.progress` is set.
254
+ if ( options.progress && this.type != 'progress' ) {
255
+ type = 'progress';
256
+ }
257
+
258
+ if ( type ) {
259
+ element.removeClass( this._getClass() );
260
+ element.removeAttribute( 'aria-label' );
261
+
262
+ this.type = type;
263
+
264
+ element.addClass( this._getClass() );
265
+ element.setAttribute( 'aria-label', this.type );
266
+
267
+ if ( this.type == 'progress' && !progressElement ) {
268
+ progressElement = this._createProgressElement();
269
+ progressElement.insertBefore( messageElement );
270
+ } else if ( this.type != 'progress' && progressElement ) {
271
+ progressElement.remove();
272
+ }
273
+ }
274
+
275
+ if ( options.message !== undefined ) {
276
+ this.message = options.message;
277
+ messageElement.setHtml( this.message );
278
+ }
279
+
280
+ if ( options.progress !== undefined ) {
281
+ this.progress = options.progress;
282
+
283
+ if ( progressElement ) {
284
+ progressElement.setStyle( 'width', this._getPercentageProgress() );
285
+ }
286
+ }
287
+
288
+ if ( show && options.important ) {
289
+ element.setAttribute( 'role', 'alert' );
290
+
291
+ if ( !this.isVisible() ) {
292
+ this.area.add( this );
293
+ }
294
+ }
295
+
296
+ // Overwrite even if it is undefined.
297
+ this.duration = options.duration;
298
+
299
+ this._hideAfterTimeout();
300
+ },
301
+
302
+ /**
303
+ * Removes the notification element from the notification area.
304
+ *
305
+ * Fires the {@link CKEDITOR.editor#notificationHide} event.
306
+ */
307
+ hide: function() {
308
+ if ( this.editor.fire( 'notificationHide', { notification: this } ) === false ) {
309
+ return;
310
+ }
311
+
312
+ this.area.remove( this );
313
+ },
314
+
315
+ /**
316
+ * Returns `true` if the notification is in the notification area.
317
+ *
318
+ * @returns {Boolean} `true` if the notification is in the notification area.
319
+ */
320
+ isVisible: function() {
321
+ return CKEDITOR.tools.indexOf( this.area.notifications, this ) >= 0;
322
+ },
323
+
324
+ /**
325
+ * Creates the notification DOM element.
326
+ *
327
+ * @private
328
+ * @returns {CKEDITOR.dom.element} Notification DOM element.
329
+ */
330
+ _createElement: function() {
331
+ var notification = this,
332
+ notificationElement, notificationMessageElement, notificationCloseElement,
333
+ close = this.editor.lang.common.close;
334
+
335
+ notificationElement = new CKEDITOR.dom.element( 'div' );
336
+ notificationElement.addClass( 'cke_notification' );
337
+ notificationElement.addClass( this._getClass() );
338
+ notificationElement.setAttributes( {
339
+ id: this.id,
340
+ role: 'alert',
341
+ 'aria-label': this.type
342
+ } );
343
+
344
+ if ( this.type == 'progress' )
345
+ notificationElement.append( this._createProgressElement() );
346
+
347
+ notificationMessageElement = new CKEDITOR.dom.element( 'p' );
348
+ notificationMessageElement.addClass( 'cke_notification_message' );
349
+ notificationMessageElement.setHtml( this.message );
350
+ notificationElement.append( notificationMessageElement );
351
+
352
+ notificationCloseElement = CKEDITOR.dom.element.createFromHtml(
353
+ '<a class="cke_notification_close" href="javascript:void(0)" title="' + close + '" role="button" tabindex="-1">' +
354
+ '<span class="cke_label">X</span>' +
355
+ '</a>' );
356
+ notificationElement.append( notificationCloseElement );
357
+
358
+ notificationCloseElement.on( 'click', function() {
359
+ // Focus editor on close (#12865)
360
+ notification.editor.focus();
361
+
362
+ notification.hide();
363
+ } );
364
+
365
+ return notificationElement;
366
+ },
367
+
368
+ /**
369
+ * Gets the notification CSS class.
370
+ *
371
+ * @private
372
+ * @returns {String} Notification CSS class.
373
+ */
374
+ _getClass: function() {
375
+ return ( this.type == 'progress' ) ?
376
+ 'cke_notification_info' :
377
+ ( 'cke_notification_' + this.type );
378
+ },
379
+
380
+ /**
381
+ * Creates a progress element for the notification element.
382
+ *
383
+ * @private
384
+ * @returns {CKEDITOR.dom.element} Progress element for the notification element.
385
+ */
386
+ _createProgressElement: function() {
387
+ var element = new CKEDITOR.dom.element( 'span' );
388
+ element.addClass( 'cke_notification_progress' );
389
+ element.setStyle( 'width', this._getPercentageProgress() );
390
+ return element;
391
+ },
392
+
393
+ /**
394
+ * Gets the progress as a percentage (ex. `0.3` -> `30%`).
395
+ *
396
+ * @private
397
+ * @returns {String} Progress as a percentage.
398
+ */
399
+ _getPercentageProgress: function() {
400
+ return Math.round( ( this.progress || 0 ) * 100 ) + '%';
401
+ },
402
+
403
+ /**
404
+ * Hides the notification after a timeout.
405
+ *
406
+ * @private
407
+ */
408
+ _hideAfterTimeout: function() {
409
+ var notification = this,
410
+ duration;
411
+
412
+ if ( this._hideTimeoutId ) {
413
+ clearTimeout( this._hideTimeoutId );
414
+ }
415
+
416
+ if ( typeof this.duration == 'number' ) {
417
+ duration = this.duration;
418
+ } else if ( this.type == 'info' || this.type == 'success' ) {
419
+ duration = ( typeof this.editor.config.notification_duration == 'number' ) ?
420
+ this.editor.config.notification_duration :
421
+ 5000;
422
+ }
423
+
424
+ if ( duration ) {
425
+ notification._hideTimeoutId = setTimeout( function() {
426
+ notification.hide();
427
+ }, duration );
428
+ }
429
+ }
430
+ };
431
+
432
+ /**
433
+ * Notification area is an area where all notifications are put. The area is laid out dynamically.
434
+ * When the first notification is added, the area is shown and all listeners are added.
435
+ * When the last notification is removed, the area is hidden and all listeners are removed.
436
+ *
437
+ * @since 4.5
438
+ * @private
439
+ * @class CKEDITOR.plugins.notification.area
440
+ * @constructor
441
+ * @param {CKEDITOR.editor} editor The editor instance.
442
+ */
443
+ function Area( editor ) {
444
+ var that = this;
445
+
446
+ this.editor = editor;
447
+ this.notifications = [];
448
+ this.element = this._createElement();
449
+ this._uiBuffer = CKEDITOR.tools.eventsBuffer( 10, this._layout, this );
450
+ this._changeBuffer = CKEDITOR.tools.eventsBuffer( 500, this._layout, this );
451
+
452
+ editor.on( 'destroy', function() {
453
+ that._removeListeners();
454
+ that.element.remove();
455
+ } );
456
+ }
457
+
458
+ /**
459
+ * The editor instance.
460
+ *
461
+ * @readonly
462
+ * @property {CKEDITOR.editor} editor
463
+ */
464
+
465
+ /**
466
+ * The array of added notifications.
467
+ *
468
+ * @readonly
469
+ * @property {Array} notifications
470
+ */
471
+
472
+ /**
473
+ * Notification area DOM element. This element is created when the area object is created. It will be attached to the document
474
+ * when the first notification is added and removed when the last notification is removed.
475
+ *
476
+ * @readonly
477
+ * @property {CKEDITOR.dom.element} element
478
+ */
479
+
480
+ /**
481
+ * Notification width. Cached for performance reasons.
482
+ *
483
+ * @private
484
+ * @property {CKEDITOR.dom.element} _notificationWidth
485
+ */
486
+
487
+ /**
488
+ * Notification margin. Cached for performance reasons.
489
+ *
490
+ * @private
491
+ * @property {CKEDITOR.dom.element} _notificationMargin
492
+ */
493
+
494
+ /**
495
+ * Event buffer object for UI events to optimize performance.
496
+ *
497
+ * @private
498
+ * @property {Object} _uiBuffer
499
+ */
500
+
501
+ /**
502
+ * Event buffer object for editor change events to optimize performance.
503
+ *
504
+ * @private
505
+ * @property {Object} _changeBuffer
506
+ */
507
+
508
+ Area.prototype = {
509
+ /**
510
+ * Adds the notification to the notification area. If it is the first notification, the area will also be attached to
511
+ * the document and listeners will be attached.
512
+ *
513
+ * Note that the proper way to show a notification is to call the {@link CKEDITOR.plugins.notification#show} method.
514
+ *
515
+ * @param {CKEDITOR.plugins.notification} notification Notification to add.
516
+ */
517
+ add: function( notification ) {
518
+ this.notifications.push( notification );
519
+
520
+ this.element.append( notification.element );
521
+
522
+ if ( this.element.getChildCount() == 1 ) {
523
+ CKEDITOR.document.getBody().append( this.element );
524
+ this._attachListeners();
525
+ }
526
+
527
+ this._layout();
528
+ },
529
+
530
+ /**
531
+ * Removes the notification from the notification area. If it is the last notification, the area will also be
532
+ * detached from the document and listeners will be detached.
533
+ *
534
+ * Note that the proper way to hide a notification is to call the {@link CKEDITOR.plugins.notification#hide} method.
535
+ *
536
+ * @param {CKEDITOR.plugins.notification} notification Notification to remove.
537
+ */
538
+ remove: function( notification ) {
539
+ var i = CKEDITOR.tools.indexOf( this.notifications, notification );
540
+
541
+ if ( i < 0 ) {
542
+ return;
543
+ }
544
+
545
+ this.notifications.splice( i, 1 );
546
+
547
+ notification.element.remove();
548
+
549
+ if ( !this.element.getChildCount() ) {
550
+ this._removeListeners();
551
+ this.element.remove();
552
+ }
553
+ },
554
+
555
+ /**
556
+ * Creates the notification area element.
557
+ *
558
+ * @private
559
+ * @returns {CKEDITOR.dom.element} Notification area element.
560
+ */
561
+ _createElement: function() {
562
+ var editor = this.editor,
563
+ config = editor.config,
564
+ notificationArea = new CKEDITOR.dom.element( 'div' );
565
+
566
+ notificationArea.addClass( 'cke_notifications_area' );
567
+ notificationArea.setAttribute( 'id', 'cke_notifications_area_' + editor.name );
568
+ notificationArea.setStyle( 'z-index', config.baseFloatZIndex - 2 );
569
+
570
+ return notificationArea;
571
+ },
572
+
573
+ /**
574
+ * Attaches listeners to the notification area.
575
+ *
576
+ * @private
577
+ */
578
+ _attachListeners: function() {
579
+ var win = CKEDITOR.document.getWindow(),
580
+ editor = this.editor;
581
+
582
+ win.on( 'scroll', this._uiBuffer.input );
583
+ win.on( 'resize', this._uiBuffer.input );
584
+ editor.on( 'change', this._changeBuffer.input );
585
+ editor.on( 'floatingSpaceLayout', this._layout, this, null, 20 );
586
+ editor.on( 'blur', this._layout, this, null, 20 );
587
+ },
588
+
589
+ /**
590
+ * Detaches listeners from the notification area.
591
+ *
592
+ * @private
593
+ */
594
+ _removeListeners: function() {
595
+ var win = CKEDITOR.document.getWindow(),
596
+ editor = this.editor;
597
+
598
+ win.removeListener( 'scroll', this._uiBuffer.input );
599
+ win.removeListener( 'resize', this._uiBuffer.input );
600
+ editor.removeListener( 'change', this._changeBuffer.input );
601
+ editor.removeListener( 'floatingSpaceLayout', this._layout );
602
+ editor.removeListener( 'blur', this._layout );
603
+ },
604
+
605
+ /**
606
+ * Sets the position of the notification area based on the editor content, toolbar as well as
607
+ * viewport position and dimensions.
608
+ *
609
+ * @private
610
+ */
611
+ _layout: function() {
612
+ var area = this.element,
613
+ editor = this.editor,
614
+ contentsRect = editor.ui.contentsElement.getClientRect(),
615
+ contentsPos = editor.ui.contentsElement.getDocumentPosition(),
616
+ top = editor.ui.space( 'top' ),
617
+ topRect = top.getClientRect(),
618
+ areaRect = area.getClientRect(),
619
+ notification,
620
+ notificationWidth = this._notificationWidth,
621
+ notificationMargin = this._notificationMargin,
622
+ win = CKEDITOR.document.getWindow(),
623
+ scrollPos = win.getScrollPosition(),
624
+ viewRect = win.getViewPaneSize(),
625
+ body = CKEDITOR.document.getBody(),
626
+ bodyPos = body.getDocumentPosition(),
627
+ cssLength = CKEDITOR.tools.cssLength;
628
+
629
+ // Cache for optimization
630
+ if ( !notificationWidth || !notificationMargin ) {
631
+ notification = this.element.getChild( 0 );
632
+ notificationWidth = this._notificationWidth = notification.getClientRect().width;
633
+ notificationMargin = this._notificationMargin =
634
+ parseInt( notification.getComputedStyle( 'margin-left' ), 10 ) +
635
+ parseInt( notification.getComputedStyle( 'margin-right' ), 10 );
636
+ }
637
+
638
+ // --------------------------------------- Horizontal layout ----------------------------------------
639
+
640
+ // +---Viewport-------------------------------+ +---Viewport-------------------------------+
641
+ // | | | |
642
+ // | +---Toolbar----------------------------+ | | +---Content----------------------------+ |
643
+ // | | | | | | | |
644
+ // | +---Content----------------------------+ | | | | |
645
+ // | | | | | +---Toolbar----------------------+ | |
646
+ // | | +------Notification------+ | | | | | | |
647
+ // | | | | OR | +--------------------------------+ | |
648
+ // | | | | | | | |
649
+ // | | | | | | +------Notification------+ | |
650
+ // | | | | | | | |
651
+ // | | | | | | | |
652
+ // | +--------------------------------------+ | | +--------------------------------------+ |
653
+ // +------------------------------------------+ +------------------------------------------+
654
+ if ( top.isVisible() &&
655
+ topRect.bottom > contentsRect.top &&
656
+ topRect.bottom < contentsRect.bottom - areaRect.height ) {
657
+ setBelowToolbar();
658
+
659
+ // +---Viewport-------------------------------+
660
+ // | |
661
+ // | +---Content----------------------------+ |
662
+ // | | | |
663
+ // | | +------Notification------+ | |
664
+ // | | | |
665
+ // | | | |
666
+ // | | | |
667
+ // | +--------------------------------------+ |
668
+ // | |
669
+ // +------------------------------------------+
670
+ } else if ( contentsRect.top > 0 ) {
671
+ setTopStandard();
672
+
673
+ // +---Content----------------------------+
674
+ // | |
675
+ // +---Viewport-------------------------------+
676
+ // | | | |
677
+ // | | +------Notification------+ | |
678
+ // | | | |
679
+ // | | | |
680
+ // | | | |
681
+ // | +--------------------------------------+ |
682
+ // | |
683
+ // +------------------------------------------+
684
+ } else if ( contentsPos.y + contentsRect.height - areaRect.height > scrollPos.y ) {
685
+ setTopFixed();
686
+
687
+ // +---Content----------------------------+ +---Content----------------------------+
688
+ // | | | |
689
+ // | | | |
690
+ // | | | +------Notification------+ |
691
+ // | | | |
692
+ // | | OR +--------------------------------------+
693
+ // +---Viewport-------------------------------+
694
+ // | | +------Notification------+ | | +---Viewport-------------------------------+
695
+ // | | | | | |
696
+ // | +--------------------------------------+ | | |
697
+ // | | | |
698
+ // +------------------------------------------+ +------------------------------------------+
699
+ } else {
700
+ setBottom();
701
+ }
702
+
703
+ function setTopStandard() {
704
+ area.setStyles( {
705
+ position: 'absolute',
706
+ top: cssLength( contentsPos.y )
707
+ } );
708
+ }
709
+
710
+ function setBelowToolbar() {
711
+ area.setStyles( {
712
+ position: 'fixed',
713
+ top: cssLength( topRect.bottom )
714
+ } );
715
+ }
716
+
717
+ function setTopFixed() {
718
+ area.setStyles( {
719
+ position: 'fixed',
720
+ top: 0
721
+ } );
722
+ }
723
+
724
+ function setBottom() {
725
+ area.setStyles( {
726
+ position: 'absolute',
727
+ top: cssLength( contentsPos.y + contentsRect.height - areaRect.height )
728
+ } );
729
+ }
730
+
731
+ // ---------------------------------------- Vertical layout -----------------------------------------
732
+
733
+ var leftBase = area.getStyle( 'position' ) == 'fixed' ?
734
+ contentsRect.left :
735
+ body.getComputedStyle( 'position' ) != 'static' ? contentsPos.x - bodyPos.x : contentsPos.x;
736
+
737
+ // Content is narrower than notification
738
+ if ( contentsRect.width < notificationWidth + notificationMargin ) {
739
+
740
+ // +---Viewport-------------------------------+
741
+ // | |
742
+ // | +---Content------------+ |
743
+ // | | | |
744
+ // | +------Notification------+ | |
745
+ // | | | |
746
+ // | +----------------------+ |
747
+ // | |
748
+ // +------------------------------------------+
749
+ if ( contentsPos.x + notificationWidth + notificationMargin > scrollPos.x + viewRect.width ) {
750
+ setRight();
751
+
752
+ // +---Viewport-------------------------------+ +---Viewport--------------------------+
753
+ // | | | |
754
+ // | +---Content------------+ | +---Content------------+ |
755
+ // | | | | | | | |
756
+ // | | +------Notification------+ | OR | +------Notification------+ |
757
+ // | | | | | | | |
758
+ // | +----------------------+ | +----------------------+ |
759
+ // | | | |
760
+ // +------------------------------------------+ +-------------------------------------+
761
+ } else {
762
+ setLeft();
763
+ }
764
+
765
+ // Content is wider than notification.
766
+ } else {
767
+
768
+ // +--+Viewport+------------------------+
769
+ // | |
770
+ // | +---Content-----------------------------------------+
771
+ // | | | |
772
+ // | | +-----+Notification+-----+ |
773
+ // | | | |
774
+ // | | | |
775
+ // | | | |
776
+ // | +---------------------------------------------------+
777
+ // | |
778
+ // +------------------------------------+
779
+ if ( contentsPos.x + notificationWidth + notificationMargin > scrollPos.x + viewRect.width ) {
780
+ setLeft();
781
+
782
+ // +---Viewport-------------------------+
783
+ // | |
784
+ // | +---Content----------------------------------------------+
785
+ // | | | |
786
+ // | | +------Notification------+ | |
787
+ // | | | |
788
+ // | | | |
789
+ // | +--------------------------------------------------------+
790
+ // | |
791
+ // +------------------------------------+
792
+ } else if ( contentsPos.x + contentsRect.width / 2 +
793
+ notificationWidth / 2 + notificationMargin > scrollPos.x + viewRect.width ) {
794
+ setRightFixed();
795
+
796
+ // +---Viewport-------------------------+
797
+ // | |
798
+ // +---Content----------------------------+ |
799
+ // | | | |
800
+ // | +------Notification------+ | |
801
+ // | | | |
802
+ // | | | |
803
+ // +--------------------------------------+ |
804
+ // | |
805
+ // +------------------------------------+
806
+ } else if ( contentsRect.left + contentsRect.width - notificationWidth - notificationMargin < 0 ) {
807
+ setRight();
808
+
809
+ // +---Viewport-------------------------+
810
+ // | |
811
+ // +---Content---------------------------------------------+ |
812
+ // | | | |
813
+ // | | +------Notification------+ | |
814
+ // | | | |
815
+ // | | | |
816
+ // +-------------------------------------------------------+ |
817
+ // | |
818
+ // +------------------------------------+
819
+ } else if ( contentsRect.left + contentsRect.width / 2 - notificationWidth / 2 < 0 ) {
820
+ setLeftFixed();
821
+
822
+ // +---Viewport-------------------------+
823
+ // | |
824
+ // | +---Content----------------------+ |
825
+ // | | | |
826
+ // | | +-----Notification-----+ | |
827
+ // | | | |
828
+ // | | | |
829
+ // | +--------------------------------+ |
830
+ // | |
831
+ // +------------------------------------+
832
+ } else {
833
+ setCenter();
834
+ }
835
+ }
836
+
837
+ function setLeft() {
838
+ area.setStyle( 'left', cssLength( leftBase ) );
839
+ }
840
+
841
+ function setLeftFixed() {
842
+ area.setStyle( 'left', cssLength( leftBase - contentsPos.x + scrollPos.x ) );
843
+ }
844
+
845
+ function setCenter() {
846
+ area.setStyle( 'left', cssLength( leftBase + contentsRect.width / 2 - notificationWidth / 2 - notificationMargin / 2 ) );
847
+ }
848
+
849
+ function setRight() {
850
+ area.setStyle( 'left', cssLength( leftBase + contentsRect.width - notificationWidth - notificationMargin ) );
851
+ }
852
+
853
+ function setRightFixed() {
854
+ area.setStyle( 'left', cssLength( leftBase - contentsPos.x + scrollPos.x + viewRect.width -
855
+ notificationWidth - notificationMargin ) );
856
+ }
857
+ }
858
+ };
859
+
860
+ CKEDITOR.plugins.notification = Notification;
861
+
862
+ /**
863
+ * After how many milliseconds the notification of the `info` and `success`
864
+ * {@link CKEDITOR.plugins.notification#type type} should close automatically.
865
+ * `0` means that notifications will not close automatically.
866
+ * Note that `warning` and `progress` notifications will never close automatically.
867
+ *
868
+ * Refer to the [Notifications](http://docs.ckeditor.com/#!/guide/dev_notifications) article
869
+ * for more information about this feature.
870
+ *
871
+ * @since 4.5
872
+ * @cfg {Number} [notification_duration=5000]
873
+ * @member CKEDITOR.config
874
+ */
875
+
876
+ /**
877
+ * Event fired when the {@link CKEDITOR.plugins.notification#show} method is called, before the
878
+ * notification is shown. If this event is canceled, the notification will not be shown.
879
+ *
880
+ * Using this event allows you to fully customize how a notification will be shown. It may be used to integrate
881
+ * the CKEditor notification system with your web page notifications.
882
+ *
883
+ * @since 4.5
884
+ * @event notificationShow
885
+ * @member CKEDITOR.editor
886
+ * @param data
887
+ * @param {CKEDITOR.plugins.notification} data.notification Notification which will be shown.
888
+ * @param {CKEDITOR.editor} editor The editor instance.
889
+ */
890
+
891
+ /**
892
+ * Event fired when the {@link CKEDITOR.plugins.notification#update} method is called, before the
893
+ * notification is updated. If this event is canceled, the notification will not be shown even if the update was important,
894
+ * but the object will be updated anyway. Note that canceling this event does not prevent updating {@link #element}
895
+ * attributes, but if {@link #notificationShow} was canceled as well, this element is detached from the DOM.
896
+ *
897
+ * Using this event allows you to fully customize how a notification will be updated. It may be used to integrate
898
+ * the CKEditor notification system with your web page notifications.
899
+ *
900
+ * @since 4.5
901
+ * @event notificationUpdate
902
+ * @member CKEDITOR.editor
903
+ * @param data
904
+ * @param {CKEDITOR.plugins.notification} data.notification Notification which will be updated.
905
+ * Note that it contains the data that has not been updated yet.
906
+ * @param {Object} data.options Update options, see {@link CKEDITOR.plugins.notification#update}.
907
+ * @param {CKEDITOR.editor} editor The editor instance.
908
+ */
909
+
910
+ /**
911
+ * Event fired when the {@link CKEDITOR.plugins.notification#hide} method is called, before the
912
+ * notification is hidden. If this event is canceled, the notification will not be hidden.
913
+ *
914
+ * Using this event allows you to fully customize how a notification will be hidden. It may be used to integrate
915
+ * the CKEditor notification system with your web page notifications.
916
+ *
917
+ * @since 4.5
918
+ * @event notificationHide
919
+ * @member CKEDITOR.editor
920
+ * @param data
921
+ * @param {CKEDITOR.plugins.notification} data.notification Notification which will be hidden.
922
+ * @param {CKEDITOR.editor} editor The editor instance.
923
+ */