integral 1.0.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (637) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +11 -49
  3. data/Rakefile +1 -1
  4. data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
  5. data/app/assets/images/logo.png +0 -0
  6. data/app/assets/javascripts/ckeditor/my_config.js.erb +26 -18
  7. data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/lv.js +8 -0
  8. data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +1 -1
  9. data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +14 -14
  10. data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +8 -8
  11. data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  12. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  13. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  14. data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  15. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autocomplete.png +0 -0
  16. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
  17. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
  18. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
  19. data/app/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
  20. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
  21. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
  22. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  23. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
  24. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
  25. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
  26. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
  27. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  28. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
  29. data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
  30. data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -7
  31. data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
  32. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
  33. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
  34. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
  35. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
  36. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
  37. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
  38. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
  39. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
  40. data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
  41. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ar.js +15 -0
  42. data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/lv.js +15 -0
  43. data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +1 -1
  44. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/copywidget.png +0 -0
  45. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/editwidget.png +0 -0
  46. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/copywidget.png +0 -0
  47. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/editwidget.png +0 -0
  48. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/removewidget.png +0 -0
  49. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/widget.png +0 -0
  50. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/removewidget.png +0 -0
  51. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/widget.png +0 -0
  52. data/app/assets/javascripts/ckeditor/plugins/foundation-callout/plugin.js +86 -0
  53. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
  54. data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
  55. data/app/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
  56. data/app/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
  57. data/app/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
  58. data/app/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
  59. data/app/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
  60. data/app/assets/javascripts/ckeditor/plugins/image2/lang/af.js +21 -0
  61. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ar.js +21 -0
  62. data/app/assets/javascripts/ckeditor/plugins/image2/lang/az.js +21 -0
  63. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bg.js +21 -0
  64. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bn.js +21 -0
  65. data/app/assets/javascripts/ckeditor/plugins/image2/lang/bs.js +21 -0
  66. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ca.js +21 -0
  67. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cs.js +21 -0
  68. data/app/assets/javascripts/ckeditor/plugins/image2/lang/cy.js +21 -0
  69. data/app/assets/javascripts/ckeditor/plugins/image2/lang/da.js +21 -0
  70. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de-ch.js +21 -0
  71. data/app/assets/javascripts/ckeditor/plugins/image2/lang/de.js +21 -0
  72. data/app/assets/javascripts/ckeditor/plugins/image2/lang/el.js +21 -0
  73. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-au.js +21 -0
  74. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-ca.js +21 -0
  75. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-gb.js +21 -0
  76. data/app/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
  77. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eo.js +21 -0
  78. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es-mx.js +21 -0
  79. data/app/assets/javascripts/ckeditor/plugins/image2/lang/es.js +21 -0
  80. data/app/assets/javascripts/ckeditor/plugins/image2/lang/et.js +21 -0
  81. data/app/assets/javascripts/ckeditor/plugins/image2/lang/eu.js +21 -0
  82. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fa.js +21 -0
  83. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fi.js +21 -0
  84. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fo.js +21 -0
  85. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
  86. data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr.js +21 -0
  87. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gl.js +21 -0
  88. data/app/assets/javascripts/ckeditor/plugins/image2/lang/gu.js +21 -0
  89. data/app/assets/javascripts/ckeditor/plugins/image2/lang/he.js +21 -0
  90. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hi.js +21 -0
  91. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hr.js +21 -0
  92. data/app/assets/javascripts/ckeditor/plugins/image2/lang/hu.js +21 -0
  93. data/app/assets/javascripts/ckeditor/plugins/image2/lang/id.js +21 -0
  94. data/app/assets/javascripts/ckeditor/plugins/image2/lang/is.js +21 -0
  95. data/app/assets/javascripts/ckeditor/plugins/image2/lang/it.js +21 -0
  96. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ja.js +21 -0
  97. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ka.js +21 -0
  98. data/app/assets/javascripts/ckeditor/plugins/image2/lang/km.js +21 -0
  99. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ko.js +21 -0
  100. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ku.js +21 -0
  101. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lt.js +21 -0
  102. data/app/assets/javascripts/ckeditor/plugins/image2/lang/lv.js +21 -0
  103. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mk.js +21 -0
  104. data/app/assets/javascripts/ckeditor/plugins/image2/lang/mn.js +21 -0
  105. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ms.js +21 -0
  106. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nb.js +21 -0
  107. data/app/assets/javascripts/ckeditor/plugins/image2/lang/nl.js +21 -0
  108. data/app/assets/javascripts/ckeditor/plugins/image2/lang/no.js +21 -0
  109. data/app/assets/javascripts/ckeditor/plugins/image2/lang/oc.js +21 -0
  110. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pl.js +21 -0
  111. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt-br.js +21 -0
  112. data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt.js +21 -0
  113. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ro.js +21 -0
  114. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
  115. data/app/assets/javascripts/ckeditor/plugins/image2/lang/si.js +21 -0
  116. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sk.js +21 -0
  117. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sl.js +21 -0
  118. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sq.js +21 -0
  119. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
  120. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr.js +21 -0
  121. data/app/assets/javascripts/ckeditor/plugins/image2/lang/sv.js +21 -0
  122. data/app/assets/javascripts/ckeditor/plugins/image2/lang/th.js +21 -0
  123. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tr.js +21 -0
  124. data/app/assets/javascripts/ckeditor/plugins/image2/lang/tt.js +21 -0
  125. data/app/assets/javascripts/ckeditor/plugins/image2/lang/ug.js +21 -0
  126. data/app/assets/javascripts/ckeditor/plugins/image2/lang/uk.js +21 -0
  127. data/app/assets/javascripts/ckeditor/plugins/image2/lang/vi.js +21 -0
  128. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
  129. data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh.js +21 -0
  130. data/app/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
  131. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
  132. data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
  133. data/app/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
  134. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +4 -4
  135. data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +4 -4
  136. data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +7 -7
  137. data/app/assets/javascripts/ckeditor/plugins/linkballoon/README.md +5 -0
  138. data/app/assets/javascripts/ckeditor/plugins/linkballoon/assets/demo.png +0 -0
  139. data/app/assets/javascripts/ckeditor/plugins/linkballoon/plugin.js +25 -0
  140. data/app/assets/javascripts/ckeditor/plugins/notification/lang/az.js +7 -0
  141. data/app/assets/javascripts/ckeditor/plugins/notification/lang/bg.js +7 -0
  142. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ca.js +7 -0
  143. data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +2 -2
  144. data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +2 -2
  145. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +2 -2
  146. data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +2 -2
  147. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en-au.js +7 -0
  148. data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +2 -2
  149. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +2 -2
  150. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es-mx.js +7 -0
  151. data/app/assets/javascripts/ckeditor/plugins/notification/lang/es.js +7 -0
  152. data/app/assets/javascripts/ckeditor/plugins/notification/lang/et.js +7 -0
  153. data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +2 -2
  154. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fa.js +7 -0
  155. data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +3 -3
  156. data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +2 -2
  157. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hr.js +7 -0
  158. data/app/assets/javascripts/ckeditor/plugins/notification/lang/hu.js +7 -0
  159. data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +2 -2
  160. data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +2 -2
  161. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ja.js +7 -0
  162. data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +2 -2
  163. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +2 -2
  164. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +2 -2
  165. data/app/assets/javascripts/ckeditor/plugins/notification/lang/lv.js +7 -0
  166. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +2 -2
  167. data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +2 -2
  168. data/app/assets/javascripts/ckeditor/plugins/notification/lang/oc.js +7 -0
  169. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +2 -2
  170. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +2 -2
  171. data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +2 -2
  172. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ro.js +7 -0
  173. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +2 -2
  174. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sk.js +7 -0
  175. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sq.js +7 -0
  176. data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +2 -2
  177. data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +2 -2
  178. data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +2 -2
  179. data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +2 -2
  180. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +3 -3
  181. data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +2 -2
  182. data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +794 -784
  183. data/app/assets/javascripts/ckeditor/plugins/openlink/README.md +50 -0
  184. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/hidpi/openLink.png +0 -0
  185. data/app/assets/javascripts/ckeditor/plugins/openlink/icons/openLink.png +0 -0
  186. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/bg.js +7 -0
  187. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/de.js +7 -0
  188. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/en.js +7 -0
  189. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/pl.js +7 -0
  190. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/ru.js +7 -0
  191. data/app/assets/javascripts/ckeditor/plugins/openlink/lang/uk.js +7 -0
  192. data/app/assets/javascripts/ckeditor/plugins/openlink/plugin.js +178 -0
  193. data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +5 -5
  194. data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +2 -2
  195. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +2 -2
  196. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +2 -2
  197. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +2 -2
  198. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +5 -5
  199. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +2 -2
  200. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +2 -2
  201. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +2 -2
  202. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +2 -2
  203. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +2 -2
  204. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +2 -2
  205. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +2 -2
  206. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-au.js +12 -0
  207. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +2 -2
  208. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +2 -2
  209. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +2 -2
  210. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +2 -2
  211. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +2 -2
  212. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +2 -2
  213. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +2 -2
  214. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +2 -2
  215. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +2 -2
  216. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +2 -2
  217. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +2 -2
  218. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +2 -2
  219. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +2 -2
  220. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +2 -2
  221. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +2 -2
  222. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +2 -2
  223. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +2 -2
  224. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +2 -2
  225. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +2 -2
  226. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +2 -2
  227. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +2 -2
  228. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +5 -5
  229. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +2 -2
  230. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +2 -2
  231. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +2 -2
  232. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +2 -2
  233. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +2 -2
  234. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +2 -2
  235. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +2 -2
  236. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ro.js +12 -0
  237. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +2 -2
  238. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +2 -2
  239. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +2 -2
  240. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +2 -2
  241. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +2 -2
  242. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +2 -2
  243. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +2 -2
  244. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +2 -2
  245. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +2 -2
  246. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +2 -2
  247. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +2 -2
  248. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +2 -2
  249. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +2 -2
  250. data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +2 -2
  251. data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +3 -3
  252. data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +6 -6
  253. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +4 -4
  254. data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +3 -3
  255. data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +2 -2
  256. data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +2 -2
  257. data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +2 -2
  258. data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +2 -2
  259. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +2 -2
  260. data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +2 -2
  261. data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +3 -3
  262. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +2 -2
  263. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +2 -2
  264. data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +2 -2
  265. data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +2 -2
  266. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +2 -2
  267. data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +2 -2
  268. data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +2 -2
  269. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-au.js +8 -0
  270. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +2 -2
  271. data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +2 -2
  272. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +2 -2
  273. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +2 -2
  274. data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +2 -2
  275. data/app/assets/javascripts/ckeditor/plugins/widget/lang/et.js +8 -0
  276. data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +2 -2
  277. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +3 -3
  278. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +2 -2
  279. data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +2 -2
  280. data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +2 -2
  281. data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +2 -2
  282. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +2 -2
  283. data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +2 -2
  284. data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +2 -2
  285. data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +2 -2
  286. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +2 -2
  287. data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +2 -2
  288. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +2 -2
  289. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +2 -2
  290. data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +3 -3
  291. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +2 -2
  292. data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +2 -2
  293. data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +2 -2
  294. data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +2 -2
  295. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +2 -2
  296. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +2 -2
  297. data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +2 -2
  298. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ro.js +8 -0
  299. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +2 -2
  300. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +2 -2
  301. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +2 -2
  302. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +3 -3
  303. data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +2 -2
  304. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +2 -2
  305. data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +2 -2
  306. data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +2 -2
  307. data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +2 -2
  308. data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +2 -2
  309. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +2 -2
  310. data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +2 -2
  311. data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +235 -64
  312. data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +6 -11
  313. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +1 -0
  314. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/bg.js +17 -0
  315. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +1 -0
  316. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/cs.js +15 -0
  317. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +1 -0
  318. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +1 -0
  319. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +1 -0
  320. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +5 -1
  321. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +1 -0
  322. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/eu.js +17 -0
  323. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fa.js +13 -0
  324. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +1 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +1 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +1 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +1 -0
  328. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hu.js +14 -0
  329. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +4 -3
  330. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +5 -5
  331. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ko.js +16 -0
  332. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +3 -2
  333. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +1 -0
  334. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +4 -3
  335. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +1 -0
  336. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +1 -0
  337. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ro.js +15 -0
  338. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
  339. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sk.js +15 -0
  340. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +5 -3
  341. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +1 -0
  342. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/uk.js +17 -0
  343. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -0
  344. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh.js +14 -0
  345. data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +485 -302
  346. data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
  347. data/app/assets/javascripts/integral/backend.js +197 -26
  348. data/app/assets/javascripts/integral/frontend.js +37 -2
  349. data/app/assets/javascripts/integral/support/character_counter.js +14 -8
  350. data/app/assets/javascripts/integral/support/confirm_modal.coffee +2 -2
  351. data/app/assets/javascripts/integral/support/date_picker.coffee +54 -59
  352. data/app/assets/javascripts/integral/support/gallery.coffee +85 -43
  353. data/app/assets/javascripts/integral/support/grid.coffee +11 -4
  354. data/app/assets/javascripts/integral/support/lib/lazysizes.js +755 -0
  355. data/app/assets/javascripts/integral/support/lib/materialize-tags.js +49 -44
  356. data/app/assets/javascripts/integral/support/list.coffee +1 -0
  357. data/app/assets/javascripts/integral/support/ls.instagram.js +57 -0
  358. data/app/assets/javascripts/integral/support/ls.twitter.js +66 -0
  359. data/app/assets/javascripts/integral/support/record_selector.coffee +3 -1
  360. data/app/assets/javascripts/integral/support/remote_form.coffee +18 -11
  361. data/app/assets/javascripts/integral/support/slug_generator.coffee +1 -0
  362. data/app/assets/stylesheets/integral/backend.sass +36 -24
  363. data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +5 -6
  364. data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +31 -64
  365. data/app/assets/stylesheets/integral/backend/devise.sass +2 -3
  366. data/app/assets/stylesheets/integral/backend/materialize-tags.sass +2 -1
  367. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_notifications.scss +150 -0
  368. data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_profile.scss +59 -0
  369. data/app/assets/stylesheets/integral/backend/modules/timeline.scss +214 -0
  370. data/app/assets/stylesheets/integral/backend/shared.sass +121 -13
  371. data/app/assets/stylesheets/integral/frontend.scss +45 -0
  372. data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +2 -2
  373. data/app/assets/stylesheets/integral/frontend/blog.sass +155 -142
  374. data/app/assets/stylesheets/integral/frontend/layout.sass +13 -3
  375. data/app/assets/stylesheets/integral/frontend/modules/article-footer.scss +55 -0
  376. data/app/assets/stylesheets/integral/frontend/modules/article.scss +34 -0
  377. data/app/assets/stylesheets/integral/frontend/modules/horizontal-post.scss +44 -0
  378. data/app/assets/stylesheets/integral/frontend/modules/inline-articles.scss +23 -0
  379. data/app/assets/stylesheets/integral/frontend/modules/latest-post.scss +37 -0
  380. data/app/assets/stylesheets/integral/frontend/modules/list-widget.scss +50 -0
  381. data/app/assets/stylesheets/integral/frontend/modules/piped-list.scss +33 -0
  382. data/app/assets/stylesheets/integral/frontend/modules/post-tags.scss +19 -0
  383. data/app/assets/stylesheets/integral/frontend/modules/scroll-container.scss +9 -0
  384. data/app/assets/stylesheets/integral/frontend/modules/sidebar-articles.scss +42 -0
  385. data/app/assets/stylesheets/integral/frontend/modules/sidebar-tags.scss +6 -0
  386. data/app/assets/stylesheets/integral/frontend/modules/sidebar-widget.scss +47 -0
  387. data/app/assets/stylesheets/integral/frontend/modules/vertical-post.scss +31 -0
  388. data/app/assets/stylesheets/integral/frontend/share_modal.sass +0 -5
  389. data/app/assets/stylesheets/integral/support/gallery.sass +18 -2
  390. data/app/assets/stylesheets/integral/support/media-query-indicator.sass +9 -3
  391. data/app/controllers/integral/application_controller.rb +10 -3
  392. data/app/controllers/integral/backend/activities_controller.rb +31 -26
  393. data/app/controllers/integral/backend/base_controller.rb +265 -26
  394. data/app/controllers/integral/backend/categories_controller.rb +49 -0
  395. data/app/controllers/integral/backend/images_controller.rb +39 -56
  396. data/app/controllers/integral/backend/lists_controller.rb +16 -104
  397. data/app/controllers/integral/backend/notification_subscriptions_controller.rb +23 -0
  398. data/app/controllers/integral/backend/pages_controller.rb +15 -117
  399. data/app/controllers/integral/backend/posts_controller.rb +22 -108
  400. data/app/controllers/integral/backend/settings_controller.rb +7 -8
  401. data/app/controllers/integral/backend/static_pages_controller.rb +14 -0
  402. data/app/controllers/integral/backend/users_controller.rb +61 -79
  403. data/app/controllers/integral/blog_controller.rb +12 -0
  404. data/app/controllers/integral/categories_controller.rb +45 -0
  405. data/app/controllers/integral/pages_controller.rb +7 -3
  406. data/app/controllers/integral/posts_controller.rb +7 -9
  407. data/app/controllers/integral/tags_controller.rb +5 -2
  408. data/app/decorators/integral/base_decorator.rb +16 -0
  409. data/app/decorators/integral/category_decorator.rb +30 -0
  410. data/app/decorators/integral/image_decorator.rb +3 -3
  411. data/app/decorators/integral/list_decorator.rb +1 -13
  412. data/app/decorators/integral/notification/notification_decorator.rb +74 -0
  413. data/app/decorators/integral/page_decorator.rb +1 -13
  414. data/app/decorators/integral/paginating_decorator.rb +6 -0
  415. data/app/decorators/integral/post_decorator.rb +44 -4
  416. data/app/decorators/integral/user_decorator.rb +1 -13
  417. data/app/decorators/integral/version_decorator.rb +58 -15
  418. data/app/helpers/integral/application_helper.rb +7 -0
  419. data/app/helpers/integral/backend/base_helper.rb +139 -13
  420. data/app/helpers/integral/blog_helper.rb +46 -0
  421. data/app/helpers/integral/social_helper.rb +0 -23
  422. data/app/jobs/integral/application_job.rb +1 -0
  423. data/app/jobs/integral/newsletter_signup_job.rb +0 -2
  424. data/app/jobs/integral/webhook/delivery_job.rb +37 -0
  425. data/app/mailers/integral/contact_mailer.rb +4 -1
  426. data/app/mailers/integral/devise_mailer.rb +6 -0
  427. data/app/models/concerns/integral/lazy_contentable.rb +54 -0
  428. data/app/models/concerns/integral/notification/subscribable.rb +67 -0
  429. data/app/models/concerns/integral/webhook/delivery.rb +30 -0
  430. data/app/models/concerns/integral/webhook/observable.rb +23 -0
  431. data/app/models/integral/application_record.rb +9 -0
  432. data/app/models/integral/category.rb +29 -0
  433. data/app/models/integral/category_version.rb +8 -0
  434. data/app/models/integral/image.rb +40 -3
  435. data/app/models/integral/list.rb +11 -4
  436. data/app/models/integral/list_item.rb +15 -16
  437. data/app/models/integral/list_item_connection.rb +6 -0
  438. data/app/models/integral/notification/notification.rb +28 -0
  439. data/app/models/integral/notification/subscription.rb +14 -0
  440. data/app/models/integral/page.rb +32 -10
  441. data/app/models/integral/post.rb +39 -14
  442. data/app/models/integral/user.rb +51 -2
  443. data/app/models/integral/version.rb +2 -2
  444. data/app/models/integral/webhook/endpoint.rb +40 -0
  445. data/app/models/integral/webhook/event.rb +20 -0
  446. data/app/policies/integral/base_policy.rb +7 -11
  447. data/app/policies/integral/category_policy.rb +9 -0
  448. data/app/policies/integral/page_policy.rb +1 -0
  449. data/app/policies/integral/version_policy.rb +0 -8
  450. data/app/serializers/integral/post_serializer.rb +24 -0
  451. data/app/uploaders/integral/avatar_uploader.rb +1 -1
  452. data/app/views/devise/invitations/edit.haml +1 -4
  453. data/app/views/devise/mailer/invitation_instructions.inky-haml +20 -0
  454. data/app/views/devise/sessions/new.haml +2 -2
  455. data/app/views/integral/backend/activities/_activity.haml +21 -0
  456. data/app/views/integral/backend/activities/grid/_dropdown_actions.haml +1 -0
  457. data/app/views/integral/backend/activities/grid/_row_content.haml +13 -0
  458. data/app/views/integral/backend/activities/index.haml +7 -13
  459. data/app/views/integral/backend/activities/shared/_grid.haml +35 -19
  460. data/app/views/integral/backend/activities/shared/index.haml +15 -0
  461. data/app/views/integral/backend/activities/shared/{_log.haml → show.haml} +7 -7
  462. data/app/views/integral/backend/activities/show.haml +1 -1
  463. data/app/views/integral/backend/categories/_modal.haml +24 -0
  464. data/app/views/integral/backend/images/_form.haml +16 -28
  465. data/app/views/integral/backend/images/edit.haml +2 -2
  466. data/app/views/integral/backend/images/grid/_dropdown_actions.haml +5 -0
  467. data/app/views/integral/backend/images/grid/_row_content.haml +5 -0
  468. data/app/views/integral/backend/images/index.haml +11 -17
  469. data/app/views/integral/backend/images/list.haml +11 -0
  470. data/app/views/integral/backend/images/show.haml +26 -0
  471. data/app/views/integral/backend/lists/_form.haml +7 -20
  472. data/app/views/integral/backend/lists/_item_container.haml +1 -1
  473. data/app/views/integral/backend/lists/_item_modal.haml +3 -3
  474. data/app/views/integral/backend/lists/_list_item_fields.haml +3 -2
  475. data/app/views/integral/backend/lists/_manager.haml +11 -13
  476. data/app/views/integral/backend/lists/edit.haml +22 -1
  477. data/app/views/integral/backend/lists/grid/_dropdown_actions.haml +9 -0
  478. data/app/views/integral/backend/lists/grid/_row_content.haml +3 -0
  479. data/app/views/integral/backend/lists/index.haml +11 -17
  480. data/app/views/integral/backend/lists/list.haml +11 -0
  481. data/app/views/integral/backend/lists/show.haml +27 -23
  482. data/app/views/integral/backend/notifications/_notification.haml +21 -0
  483. data/app/views/integral/backend/pages/_form.haml +20 -47
  484. data/app/views/integral/backend/pages/edit.haml +18 -0
  485. data/app/views/integral/backend/pages/grid/_dropdown_actions.haml +11 -0
  486. data/app/views/integral/backend/pages/grid/_row_content.haml +5 -0
  487. data/app/views/integral/backend/pages/index.haml +11 -21
  488. data/app/views/integral/backend/pages/list.haml +15 -0
  489. data/app/views/integral/backend/pages/show.haml +32 -0
  490. data/app/views/integral/backend/posts/_form.haml +19 -51
  491. data/app/views/integral/backend/posts/edit.haml +5 -10
  492. data/app/views/integral/backend/posts/grid/_dropdown_actions.haml +10 -0
  493. data/app/views/integral/backend/posts/grid/_row_content.haml +6 -0
  494. data/app/views/integral/backend/posts/index.haml +13 -19
  495. data/app/views/integral/backend/posts/list.haml +13 -0
  496. data/app/views/integral/backend/posts/new.haml +0 -1
  497. data/app/views/integral/backend/posts/show.haml +31 -0
  498. data/app/views/integral/backend/settings/sections/_social.haml +1 -3
  499. data/app/views/integral/backend/shared/_activity_modal.haml +13 -0
  500. data/app/views/integral/backend/shared/_breadcrumbs.haml +7 -4
  501. data/app/views/integral/backend/shared/_image_preview.haml +10 -3
  502. data/app/views/integral/backend/shared/_image_selector.haml +1 -1
  503. data/app/views/integral/backend/shared/_notification_subscription_toggle.haml +22 -0
  504. data/app/views/integral/backend/shared/action_bar/_index.haml +9 -0
  505. data/app/views/integral/backend/shared/action_bar/_show.haml +3 -0
  506. data/app/views/integral/backend/shared/cards/_at_a_glance.haml +3 -3
  507. data/app/views/integral/backend/shared/cards/_categories.haml +33 -0
  508. data/app/views/integral/backend/{static_pages/_card.haml → shared/cards/_object.haml} +1 -1
  509. data/app/views/integral/backend/shared/cards/_recent_activity.haml +20 -0
  510. data/app/views/integral/backend/shared/cards/_recent_resources.haml +17 -0
  511. data/app/views/integral/backend/shared/cards/_recent_user_activity.haml +1 -0
  512. data/app/views/integral/backend/shared/cards/_top_post_authors.haml +18 -0
  513. data/app/views/integral/backend/shared/cards/_welcome.haml +24 -25
  514. data/app/views/integral/backend/shared/{_empty_grid.haml → grid/_empty.haml} +0 -0
  515. data/app/views/integral/backend/shared/grid/_form.haml +9 -0
  516. data/app/views/integral/backend/shared/grid/_grid.haml +21 -0
  517. data/app/views/integral/backend/shared/{_pagination.haml → grid/_pagination.haml} +0 -0
  518. data/app/views/integral/backend/shared/grid/_row_layout.haml +8 -0
  519. data/app/views/integral/backend/shared/record_selector/_collection.haml +1 -0
  520. data/app/views/integral/backend/shared/record_selector/_modal.haml +9 -10
  521. data/app/views/integral/backend/shared/record_selector/_record.haml +6 -4
  522. data/app/views/integral/backend/static_pages/dashboard.haml +17 -15
  523. data/app/views/integral/backend/users/_form.haml +35 -47
  524. data/app/views/integral/backend/users/edit.haml +1 -1
  525. data/app/views/integral/backend/users/grid/_dropdown_actions.haml +17 -0
  526. data/app/views/integral/backend/users/grid/_row_content.haml +8 -0
  527. data/app/views/integral/backend/users/index.haml +11 -17
  528. data/app/views/integral/backend/users/list.haml +12 -0
  529. data/app/views/integral/backend/users/show.haml +22 -19
  530. data/app/views/integral/categories/show.haml +5 -0
  531. data/app/views/integral/pages/_demo.haml +2 -2
  532. data/app/views/integral/posts/_article_footer.haml +17 -0
  533. data/app/views/integral/posts/_card.haml +11 -0
  534. data/app/views/integral/posts/_latest_post.haml +8 -0
  535. data/app/views/integral/posts/_most_read_section.haml +8 -0
  536. data/app/views/integral/posts/_post.haml +11 -0
  537. data/app/views/integral/posts/_similar_posts.haml +5 -0
  538. data/app/views/integral/posts/index.haml +7 -5
  539. data/app/views/integral/posts/templates/default.haml +35 -35
  540. data/app/views/integral/shared/_share_modal.haml +0 -3
  541. data/app/views/integral/shared/_social_list_items.haml +6 -12
  542. data/app/views/integral/shared/_subscribe_modal.haml +14 -0
  543. data/app/views/integral/shared/blog/_categories.haml +15 -0
  544. data/app/views/integral/shared/blog/_layout.haml +9 -0
  545. data/app/views/integral/shared/blog/_sidebar.haml +10 -0
  546. data/app/views/integral/shared/gallery/_placeholder.haml +2 -2
  547. data/app/views/integral/shared/gallery/_slide.haml +2 -2
  548. data/app/views/integral/shared/gallery/gallery.haml +5 -2
  549. data/app/views/integral/shared/sidebar/_item.haml +8 -0
  550. data/app/views/integral/shared/sidebar/_newsletter_signup.haml +7 -0
  551. data/app/views/integral/shared/sidebar/_popular_posts.haml +7 -0
  552. data/app/views/integral/shared/sidebar/_popular_tags.haml +7 -0
  553. data/app/views/integral/shared/sidebar/_recent_posts.haml +7 -0
  554. data/app/views/integral/tags/index.haml +2 -2
  555. data/app/views/integral/tags/show.haml +3 -6
  556. data/app/views/layouts/integral/backend.html.haml +27 -5
  557. data/app/views/layouts/integral/backend/_create_dropdown.haml +1 -30
  558. data/app/views/layouts/integral/backend/_main_menu_items.haml +1 -91
  559. data/app/views/layouts/integral/frontend.html.haml +3 -3
  560. data/config/initializers/devise.rb +1 -1
  561. data/config/locales/en.yml +131 -56
  562. data/config/routes.rb +2 -0
  563. data/db/migrate/20190414172018_create_webhook_endpoints.rb +10 -0
  564. data/db/migrate/20190929191412_add_integral_post_categories.rb +13 -0
  565. data/db/migrate/20191203090008_add_image_to_integral_categories.rb +6 -0
  566. data/db/migrate/20200401210442_create_category_versions.rb +20 -0
  567. data/db/migrate/20200407022636_create_integral_notifications.rb +25 -0
  568. data/db/migrate/20200421223602_add_status_to_integral_users.rb +5 -0
  569. data/db/seeds.rb +16 -10
  570. data/lib/generators/integral/assets_generator.rb +54 -0
  571. data/lib/generators/integral/install_generator.rb +37 -3
  572. data/lib/generators/integral/views_generator.rb +66 -0
  573. data/lib/generators/templates/app.yml +0 -1
  574. data/lib/generators/templates/integral.rb +5 -0
  575. data/lib/generators/templates/routes.rb +7 -0
  576. data/lib/generators/templates/seeds.rb +2 -0
  577. data/lib/integral.rb +4 -30
  578. data/lib/integral/acts_as_integral.rb +115 -0
  579. data/lib/integral/acts_as_listable.rb +3 -3
  580. data/lib/integral/chart_renderer/base.rb +2 -0
  581. data/lib/integral/content_renderer.rb +3 -3
  582. data/lib/integral/engine.rb +12 -2
  583. data/lib/integral/grids/activities_grid.rb +15 -2
  584. data/lib/integral/grids/lists_grid.rb +1 -0
  585. data/lib/integral/grids/posts_grid.rb +5 -1
  586. data/lib/integral/grids/users_grid.rb +5 -0
  587. data/lib/integral/list_item_renderer.rb +4 -2
  588. data/lib/integral/list_renderer.rb +6 -1
  589. data/lib/integral/middleware/page_router.rb +15 -6
  590. data/lib/integral/router.rb +41 -7
  591. data/lib/integral/version.rb +1 -1
  592. data/lib/integral/widgets/recent_posts.rb +1 -1
  593. data/lib/integral/widgets/swiper_list.rb +3 -2
  594. data/public/images/integral/demo/continous-integration.png +0 -0
  595. data/public/images/integral/demo/foundation-frontend-framework.jpg +0 -0
  596. data/public/images/integral/demo/heroku.png +0 -0
  597. data/public/images/integral/demo/integral-cms-without-hassle.jpg +0 -0
  598. data/public/images/integral/demo/integral-features-activity-tracking.jpg +0 -0
  599. data/public/images/integral/demo/integral-features-contact-form.png +0 -0
  600. data/public/images/integral/demo/integral-features-design.jpg +0 -0
  601. data/public/images/integral/demo/integral-features-dynamic-pages.jpg +0 -0
  602. data/public/images/integral/demo/integral-features-image-management.jpg +0 -0
  603. data/public/images/integral/demo/integral-features-integrated-blog.jpg +0 -0
  604. data/public/images/integral/demo/integral-features-list-management.jpg +0 -0
  605. data/public/images/integral/demo/integral-features-seo-ready.jpg +0 -0
  606. data/public/images/integral/demo/integral-features-user-management.jpg +0 -0
  607. data/public/images/integral/demo/integral-presentation.png +0 -0
  608. data/public/integral/ckeditor_demo_content.html +0 -13
  609. data/spec/factories.rb +30 -8
  610. metadata +322 -127
  611. data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +0 -13
  612. data/app/assets/javascripts/integral/support/date_picker/picker.date.js +0 -1435
  613. data/app/assets/javascripts/integral/support/date_picker/picker.js +0 -1132
  614. data/app/assets/stylesheets/integral/frontend.sass +0 -26
  615. data/app/assets/stylesheets/integral/support/date-picker.scss +0 -16
  616. data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +0 -452
  617. data/app/assets/stylesheets/integral/support/date_picker/_default.scss +0 -201
  618. data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +0 -220
  619. data/app/assets/stylesheets/integral/wysiwyg.sass +0 -13
  620. data/app/views/devise/mailer/invitation_instructions.html.erb +0 -13
  621. data/app/views/integral/backend/activities/_grid.haml +0 -23
  622. data/app/views/integral/backend/activities/shared/_listing.haml +0 -14
  623. data/app/views/integral/backend/images/_grid.haml +0 -16
  624. data/app/views/integral/backend/lists/_grid.haml +0 -16
  625. data/app/views/integral/backend/pages/_grid.haml +0 -21
  626. data/app/views/integral/backend/pages/activities.haml +0 -2
  627. data/app/views/integral/backend/pages/activity.haml +0 -1
  628. data/app/views/integral/backend/pages/edit.html.haml +0 -15
  629. data/app/views/integral/backend/posts/_grid.haml +0 -25
  630. data/app/views/integral/backend/posts/activities.haml +0 -3
  631. data/app/views/integral/backend/posts/activity.haml +0 -1
  632. data/app/views/integral/backend/shared/_grid.haml +0 -18
  633. data/app/views/integral/backend/users/_grid.haml +0 -19
  634. data/app/views/integral/posts/_item.haml +0 -16
  635. data/app/views/integral/shared/_blog_layout.haml +0 -15
  636. data/app/views/integral/shared/_blog_sidebar.haml +0 -49
  637. data/lib/integral/slack_bot.rb +0 -45
@@ -0,0 +1,35 @@
1
+ /*
2
+ Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ .cke_widget_wrapper:hover:after {
7
+ content: "id: " attr(data-cke-widget-id);
8
+ position: absolute;
9
+ top: 0;
10
+ right: 0;
11
+ padding: 2px 4px;
12
+ background: #EEE;
13
+ border: solid 1px #DDD;
14
+ border-radius: 2px;
15
+ color: #BBB;
16
+ font: bold 10px sans-serif;
17
+ }
18
+
19
+ .align-left {
20
+ float: left;
21
+ margin-right: 20px;
22
+ }
23
+
24
+ .align-right {
25
+ float: right;
26
+ margin-left: 20px;
27
+ }
28
+
29
+ .align-center {
30
+ text-align: center;
31
+ }
32
+
33
+ .align-center > figure {
34
+ display: inline-block;
35
+ }
@@ -0,0 +1,339 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
4
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
5
+ -->
6
+ <html>
7
+ <head>
8
+ <meta charset="utf-8">
9
+ <title>Widget Image &mdash; CKEditor Sample</title>
10
+ <script src="../../../ckeditor.js"></script>
11
+ <script src="../../../dev/console/console.js"></script>
12
+ <script src="../../../dev/console/focusconsole.js"></script>
13
+ <script src="../../widget/dev/console.js"></script>
14
+ <script>
15
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
16
+ CKEDITOR.tools.enableHtml5Elements( document );
17
+
18
+ var editor;
19
+
20
+ // The instanceReady event is fired, when an instance of CKEditor has finished
21
+ // its initialization.
22
+ CKEDITOR.on( 'instanceReady', function( ev ) {
23
+ editor = ev.editor;
24
+
25
+ // Show this "on" button.
26
+ document.getElementById( 'readOnlyOn' ).style.display = '';
27
+
28
+ // Event fired when the readOnly property changes.
29
+ editor.on( 'readOnly', function() {
30
+ document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : '';
31
+ document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none';
32
+ });
33
+ });
34
+
35
+ function toggleReadOnly( isReadOnly ) {
36
+ // Change the read-only state of the editor.
37
+ // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setReadOnly
38
+ editor.setReadOnly( isReadOnly );
39
+ }
40
+
41
+ </script>
42
+ <link href="../../../samples/old/sample.css" rel="stylesheet">
43
+
44
+ <style>
45
+
46
+ body {
47
+ font-size: 13px;
48
+ }
49
+ .editable {
50
+ padding: 20px;
51
+ border: 2px solid #dfdfdf;
52
+ overflow: auto;
53
+ }
54
+
55
+ body p {
56
+ line-height: 1.8em;
57
+ }
58
+
59
+ /* Reset some styles from sample.css */
60
+ .cke_editable.cke_editable_inline
61
+ {
62
+ cursor: auto;
63
+ }
64
+ .cke_editable.cke_editable_inline.cke_focus
65
+ {
66
+ box-shadow: none;
67
+ background: inherit;
68
+ cursor: auto;
69
+ }
70
+
71
+ </style>
72
+ <link href="contents.css" rel="stylesheet">
73
+ <link href="../../../contents.css" rel="stylesheet">
74
+ </head>
75
+ <body>
76
+ <h1 class="samples">
77
+ <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Widget Image
78
+ </h1>
79
+
80
+ <h2>Classic (iframe-based) Sample</h2>
81
+
82
+ <textarea id="editor1" cols="10" rows="10">
83
+ <h1>Apollo 11</h1>
84
+
85
+ <figure class="image" style="float: right">
86
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" data-foo="*********" data-bar="@@@@@@@@" />
87
+ <figcaption>Roll out of Saturn V on launch pad</figcaption>
88
+ </figure>
89
+
90
+ <p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
91
+
92
+ <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
93
+
94
+ <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
95
+
96
+ <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
97
+
98
+ <blockquote>
99
+ <p>One small step for [a] man, one giant leap for mankind.</p>
100
+ </blockquote>
101
+
102
+ <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
103
+
104
+ <blockquote>
105
+ <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
106
+ </blockquote>
107
+
108
+ <figure class="image" style="float: right">
109
+ <img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
110
+ <figcaption>The Eagle in lunar orbit</figcaption>
111
+ </figure>
112
+
113
+ <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
114
+
115
+ <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
116
+
117
+ <ol>
118
+ <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
119
+ <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
120
+ <li><strong>Lunar Module</strong> for landing on the Moon.</li>
121
+ </ol>
122
+
123
+ <p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
124
+
125
+ <p style="text-align:center">
126
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
127
+ </p>
128
+
129
+ <hr />
130
+ <p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
131
+ </textarea>
132
+
133
+ <h2>Inline Sample</h2>
134
+
135
+ <div id="editor2" contenteditable="true" class="editable">
136
+ <h2>Apollo 11</h2>
137
+
138
+ <figure class="image" style="float: right">
139
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
140
+ <figcaption>Roll out of Saturn V on launch pad</figcaption>
141
+ </figure>
142
+
143
+ <p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
144
+
145
+ <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
146
+
147
+ <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
148
+
149
+ <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
150
+
151
+ <blockquote>
152
+ <p>One small step for [a] man, one giant leap for mankind.</p>
153
+ </blockquote>
154
+
155
+ <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
156
+
157
+ <blockquote>
158
+ <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
159
+ </blockquote>
160
+
161
+ <figure class="image" style="float: right">
162
+ <img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
163
+ <figcaption>The Eagle in lunar orbit</figcaption>
164
+ </figure>
165
+
166
+ <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
167
+
168
+ <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
169
+
170
+ <ol>
171
+ <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
172
+ <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
173
+ <li><strong>Lunar Module</strong> for landing on the Moon.</li>
174
+ </ol>
175
+
176
+ <p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
177
+
178
+ <p style="text-align:center">
179
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
180
+ </p>
181
+
182
+ <hr />
183
+ <p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
184
+ </div>
185
+
186
+ <h2>Div Editing Area Sample</h2>
187
+
188
+ <textarea id="editor3" cols="10" rows="10">
189
+ <h1>Apollo 11</h1>
190
+
191
+ <figure class="caption" style="float: right">
192
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
193
+ <figcaption>Roll out of Saturn V on launch pad</figcaption>
194
+ </figure>
195
+
196
+ <p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
197
+
198
+ <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
199
+
200
+ <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
201
+
202
+ <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
203
+
204
+ <blockquote>
205
+ <p>One small step for [a] man, one giant leap for mankind.</p>
206
+ </blockquote>
207
+
208
+ <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
209
+
210
+ <blockquote>
211
+ <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
212
+ </blockquote>
213
+
214
+ <figure class="caption" style="float: right">
215
+ <img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
216
+ <figcaption>The Eagle in lunar orbit</figcaption>
217
+ </figure>
218
+
219
+ <h2>Technical Details <a id="tech-details" name="tech-details"></a></h2>
220
+
221
+ <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
222
+
223
+ <ol>
224
+ <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
225
+ <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
226
+ <li><strong>Lunar Module</strong> for landing on the Moon.</li>
227
+ </ol>
228
+
229
+ <p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
230
+
231
+ <p style="text-align:center">
232
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
233
+ </p>
234
+
235
+ <hr />
236
+ <p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
237
+ </textarea>
238
+
239
+ <h2>alignClasses samples</h2>
240
+
241
+ <textarea id="editor4" cols="10" rows="10">
242
+ <h1>Apollo 11</h1>
243
+
244
+ <figure class="align-left image">
245
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" data-foo="*********" data-bar="@@@@@@@@" />
246
+ <figcaption>Roll out of Saturn V on launch pad</figcaption>
247
+ </figure>
248
+
249
+ <p><strong>Apollo 11</strong> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
250
+
251
+ <blockquote>
252
+ <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
253
+ </blockquote>
254
+
255
+ <figure class="align-right image">
256
+ <img alt="The Eagle" src="assets/image2.jpg" style="width: 200px" />
257
+ <figcaption>The Eagle in lunar orbit</figcaption>
258
+ </figure>
259
+
260
+ <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
261
+
262
+ <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
263
+
264
+ <ol>
265
+ <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
266
+ <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
267
+ <li><strong>Lunar Module</strong> for landing on the Moon.</li>
268
+ </ol>
269
+
270
+ <p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
271
+
272
+ <p class="align-center">
273
+ <img alt="Saturn V" src="assets/image1.jpg" width="200" />
274
+ </p>
275
+
276
+ <hr />
277
+ <p style="text-align:right"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
278
+ </textarea>
279
+
280
+ <p>
281
+ <input id="readOnlyOn" onclick="toggleReadOnly( true );" type="button" value="Make it read-only" style="display:none">
282
+ <input id="readOnlyOff" onclick="toggleReadOnly( false );" type="button" value="Make it editable again" style="display:none">
283
+ </p>
284
+
285
+ <script>
286
+
287
+ CKEDITOR.disableAutoInline = true;
288
+
289
+ CKEDITOR.replace( 'editor1', {
290
+ extraPlugins: 'image2',
291
+ height: 600,
292
+ contentsCss: [ '../../../contents.css', 'contents.css' ],
293
+ extraAllowedContent: 'img[data-foo,data-bar]',
294
+
295
+ filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
296
+ filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
297
+ filebrowserUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
298
+ filebrowserImageUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
299
+ } );
300
+
301
+ CKEDITOR.inline( 'editor2', {
302
+ extraPlugins: 'image2,sourcedialog'
303
+ } );
304
+
305
+ CKEDITOR.replace( 'editor3', {
306
+ extraPlugins: 'image2,divarea',
307
+ height: 600
308
+ } );
309
+
310
+ CKEDITOR.replace( 'editor4', {
311
+ extraPlugins: 'image2',
312
+ image2_alignClasses: [ 'align-left', 'align-center', 'align-right' ],
313
+ contentsCss: [ '../../../contents.css', 'contents.css' ],
314
+ height: 600
315
+ } );
316
+
317
+ CKCONSOLE.create( 'widget', { editor: 'editor1' } );
318
+ CKCONSOLE.create( 'focus', { editor: 'editor1' } );
319
+ CKCONSOLE.create( 'widget', { editor: 'editor2', folded: true } );
320
+ CKCONSOLE.create( 'focus', { editor: 'editor2', folded: true } );
321
+ CKCONSOLE.create( 'widget', { editor: 'editor3' } );
322
+ CKCONSOLE.create( 'focus', { editor: 'editor3' } );
323
+ CKCONSOLE.create( 'widget', { editor: 'editor4' } );
324
+ CKCONSOLE.create( 'focus', { editor: 'editor4' } );
325
+
326
+ </script>
327
+
328
+ <div id="footer">
329
+ <hr>
330
+ <p>
331
+ CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
332
+ </p>
333
+ <p id="copy">
334
+ Copyright &copy; 2003-2018, <a class="samples" href="https://cksource.com/">CKSource</a> - Frederico
335
+ Knabben. All rights reserved.
336
+ </p>
337
+ </div>
338
+ </body>
339
+ </html>
@@ -0,0 +1,553 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @fileOverview Image plugin based on Widgets API
8
+ */
9
+
10
+ 'use strict';
11
+
12
+ CKEDITOR.dialog.add( 'image2', function( editor ) {
13
+
14
+ // RegExp: 123, 123px, empty string ""
15
+ var regexGetSizeOrEmpty = /(^\s*(\d+)(px)?\s*$)|^$/i,
16
+
17
+ lockButtonId = CKEDITOR.tools.getNextId(),
18
+ resetButtonId = CKEDITOR.tools.getNextId(),
19
+
20
+ lang = editor.lang.image2,
21
+ commonLang = editor.lang.common,
22
+
23
+ lockResetStyle = 'margin-top:18px;width:40px;height:20px;',
24
+ lockResetHtml = new CKEDITOR.template(
25
+ '<div>' +
26
+ '<a href="javascript:void(0)" tabindex="-1" title="' + lang.lockRatio + '" class="cke_btn_locked" id="{lockButtonId}" role="checkbox">' +
27
+ '<span class="cke_icon"></span>' +
28
+ '<span class="cke_label">' + lang.lockRatio + '</span>' +
29
+ '</a>' +
30
+
31
+ '<a href="javascript:void(0)" tabindex="-1" title="' + lang.resetSize + '" class="cke_btn_reset" id="{resetButtonId}" role="button">' +
32
+ '<span class="cke_label">' + lang.resetSize + '</span>' +
33
+ '</a>' +
34
+ '</div>' ).output( {
35
+ lockButtonId: lockButtonId,
36
+ resetButtonId: resetButtonId
37
+ } ),
38
+
39
+ helpers = CKEDITOR.plugins.image2,
40
+
41
+ // Editor instance configuration.
42
+ config = editor.config,
43
+
44
+ hasFileBrowser = !!( config.filebrowserImageBrowseUrl || config.filebrowserBrowseUrl ),
45
+
46
+ // Content restrictions defined by the widget which
47
+ // impact on dialog structure and presence of fields.
48
+ features = editor.widgets.registered.image.features,
49
+
50
+ // Functions inherited from image2 plugin.
51
+ getNatural = helpers.getNatural,
52
+
53
+ // Global variables referring to the dialog's context.
54
+ doc, widget, image,
55
+
56
+ // Global variable referring to this dialog's image pre-loader.
57
+ preLoader,
58
+
59
+ // Global variables holding the original size of the image.
60
+ domWidth, domHeight,
61
+
62
+ // Global variables related to image pre-loading.
63
+ preLoadedWidth, preLoadedHeight, srcChanged,
64
+
65
+ // Global variables related to size locking.
66
+ lockRatio, userDefinedLock,
67
+
68
+ // Global variables referring to dialog fields and elements.
69
+ lockButton, resetButton, widthField, heightField,
70
+
71
+ natural;
72
+
73
+ // Validates dimension. Allowed values are:
74
+ // "123px", "123", "" (empty string)
75
+ function validateDimension() {
76
+ var match = this.getValue().match( regexGetSizeOrEmpty ),
77
+ isValid = !!( match && parseInt( match[ 1 ], 10 ) !== 0 );
78
+
79
+ if ( !isValid )
80
+ alert( commonLang[ 'invalidLength' ].replace( '%1', commonLang[ this.id ] ).replace( '%2', 'px' ) ); // jshint ignore:line
81
+
82
+ return isValid;
83
+ }
84
+
85
+ // Creates a function that pre-loads images. The callback function passes
86
+ // [image, width, height] or null if loading failed.
87
+ //
88
+ // @returns {Function}
89
+ function createPreLoader() {
90
+ var image = doc.createElement( 'img' ),
91
+ listeners = [];
92
+
93
+ function addListener( event, callback ) {
94
+ listeners.push( image.once( event, function( evt ) {
95
+ removeListeners();
96
+ callback( evt );
97
+ } ) );
98
+ }
99
+
100
+ function removeListeners() {
101
+ var l;
102
+
103
+ while ( ( l = listeners.pop() ) )
104
+ l.removeListener();
105
+ }
106
+
107
+ // @param {String} src.
108
+ // @param {Function} callback.
109
+ return function( src, callback, scope ) {
110
+ addListener( 'load', function() {
111
+ // Don't use image.$.(width|height) since it's buggy in IE9-10 (https://dev.ckeditor.com/ticket/11159)
112
+ var dimensions = getNatural( image );
113
+
114
+ callback.call( scope, image, dimensions.width, dimensions.height );
115
+ } );
116
+
117
+ addListener( 'error', function() {
118
+ callback( null );
119
+ } );
120
+
121
+ addListener( 'abort', function() {
122
+ callback( null );
123
+ } );
124
+
125
+ image.setAttribute( 'src',
126
+ ( config.baseHref || '' ) + src + '?' + Math.random().toString( 16 ).substring( 2 ) );
127
+ };
128
+ }
129
+
130
+ // This function updates width and height fields once the
131
+ // "src" field is altered. Along with dimensions, also the
132
+ // dimensions lock is adjusted.
133
+ function onChangeSrc() {
134
+ var value = this.getValue();
135
+
136
+ toggleDimensions( false );
137
+
138
+ // Remember that src is different than default.
139
+ if ( value !== widget.data.src ) {
140
+ // Update dimensions of the image once it's preloaded.
141
+ preLoader( value, function( image, width, height ) {
142
+ // Re-enable width and height fields.
143
+ toggleDimensions( true );
144
+
145
+ // There was problem loading the image. Unlock ratio.
146
+ if ( !image )
147
+ return toggleLockRatio( false );
148
+
149
+ // Fill width field with the width of the new image.
150
+ widthField.setValue( editor.config.image2_prefillDimensions === false ? 0 : width );
151
+
152
+ // // Fill height field with the height of the new image.
153
+ // heightField.setValue( editor.config.image2_prefillDimensions === false ? 0 : height );
154
+
155
+ // Cache the new width and update initial cache (#1348).
156
+ preLoadedWidth = domWidth = width;
157
+
158
+ // Cache the new height and update initial cache (#1348).
159
+ preLoadedHeight = domHeight = height;
160
+
161
+ // // Check for new lock value if image exist.
162
+ // toggleLockRatio( helpers.checkHasNaturalRatio( image ) );
163
+ } );
164
+
165
+ srcChanged = true;
166
+ }
167
+
168
+ // Value is the same as in widget data but is was
169
+ // modified back in time. Roll back dimensions when restoring
170
+ // default src.
171
+ else if ( srcChanged ) {
172
+ // Re-enable width and height fields.
173
+ toggleDimensions( true );
174
+
175
+ // Restore width field with cached width.
176
+ widthField.setValue( domWidth );
177
+
178
+ // // Restore height field with cached height.
179
+ // heightField.setValue( domHeight );
180
+
181
+ // Src equals default one back again.
182
+ srcChanged = false;
183
+ }
184
+
185
+ // Value is the same as in widget data and it hadn't
186
+ // been modified.
187
+ else {
188
+ // Re-enable width and height fields.
189
+ toggleDimensions( true );
190
+ }
191
+ }
192
+
193
+ function onChangeDimension() {
194
+ // If ratio is un-locked, then we don't care what's next.
195
+ if ( !lockRatio )
196
+ return;
197
+
198
+ var value = this.getValue();
199
+
200
+ // No reason to auto-scale or unlock if the field is empty.
201
+ if ( !value )
202
+ return;
203
+
204
+ // If the value of the field is invalid (e.g. with %), unlock ratio.
205
+ if ( !value.match( regexGetSizeOrEmpty ) )
206
+ toggleLockRatio( false );
207
+
208
+ // No automatic re-scale when dimension is '0'.
209
+ if ( value === '0' )
210
+ return;
211
+
212
+ var isWidth = this.id == 'width',
213
+ // If dialog opened for the new image, domWidth and domHeight
214
+ // will be empty. Use dimensions from pre-loader in such case instead.
215
+ width = domWidth || preLoadedWidth,
216
+ height = domHeight || preLoadedHeight;
217
+
218
+ // If changing width, then auto-scale height.
219
+ if ( isWidth )
220
+ value = Math.round( height * ( value / width ) );
221
+
222
+ // If changing height, then auto-scale width.
223
+ else
224
+ value = Math.round( width * ( value / height ) );
225
+
226
+ // If the value is a number, apply it to the other field.
227
+ if ( !isNaN( value ) )
228
+ ( isWidth ? heightField : widthField ).setValue( value );
229
+ }
230
+
231
+ // Set-up function for lock and reset buttons:
232
+ // * Adds lock and reset buttons to focusables. Check if button exist first
233
+ // because it may be disabled e.g. due to ACF restrictions.
234
+ // * Register mouseover and mouseout event listeners for UI manipulations.
235
+ // * Register click event listeners for buttons.
236
+ function onLoadLockReset() {
237
+ var dialog = this.getDialog();
238
+
239
+ function setupMouseClasses( el ) {
240
+ el.on( 'mouseover', function() {
241
+ this.addClass( 'cke_btn_over' );
242
+ }, el );
243
+
244
+ el.on( 'mouseout', function() {
245
+ this.removeClass( 'cke_btn_over' );
246
+ }, el );
247
+ }
248
+
249
+ // Create references to lock and reset buttons for this dialog instance.
250
+ lockButton = doc.getById( lockButtonId );
251
+ resetButton = doc.getById( resetButtonId );
252
+
253
+ // Activate (Un)LockRatio button
254
+ if ( lockButton ) {
255
+ // Consider that there's an additional focusable field
256
+ // in the dialog when the "browse" button is visible.
257
+ dialog.addFocusable( lockButton, 4 + hasFileBrowser );
258
+
259
+ lockButton.on( 'click', function( evt ) {
260
+ toggleLockRatio();
261
+ evt.data && evt.data.preventDefault();
262
+ }, this.getDialog() );
263
+
264
+ setupMouseClasses( lockButton );
265
+ }
266
+
267
+ // Activate the reset size button.
268
+ if ( resetButton ) {
269
+ // Consider that there's an additional focusable field
270
+ // in the dialog when the "browse" button is visible.
271
+ dialog.addFocusable( resetButton, 5 + hasFileBrowser );
272
+
273
+ // Fills width and height fields with the original dimensions of the
274
+ // image (stored in widget#data since widget#init).
275
+ resetButton.on( 'click', function( evt ) {
276
+ // If there's a new image loaded, reset button should revert
277
+ // cached dimensions of pre-loaded DOM element.
278
+ if ( srcChanged ) {
279
+ widthField.setValue( preLoadedWidth );
280
+ heightField.setValue( preLoadedHeight );
281
+ }
282
+
283
+ // If the old image remains, reset button should revert
284
+ // dimensions as loaded when the dialog was first shown.
285
+ else {
286
+ widthField.setValue( domWidth );
287
+ heightField.setValue( domHeight );
288
+ }
289
+
290
+ evt.data && evt.data.preventDefault();
291
+ }, this );
292
+
293
+ setupMouseClasses( resetButton );
294
+ }
295
+ }
296
+
297
+ function toggleLockRatio( enable ) {
298
+ // No locking if there's no radio (i.e. due to ACF).
299
+ if ( !lockButton )
300
+ return;
301
+
302
+ if ( typeof enable == 'boolean' ) {
303
+ // If user explicitly wants to decide whether
304
+ // to lock or not, don't do anything.
305
+ if ( userDefinedLock )
306
+ return;
307
+
308
+ lockRatio = enable;
309
+ }
310
+
311
+ // Undefined. User changed lock value.
312
+ else {
313
+ var width = widthField.getValue(),
314
+ height;
315
+
316
+ userDefinedLock = true;
317
+ lockRatio = !lockRatio;
318
+
319
+ // Automatically adjust height to width to match
320
+ // the original ratio (based on dom- dimensions).
321
+ if ( lockRatio && width ) {
322
+ height = domHeight / domWidth * width;
323
+
324
+ if ( !isNaN( height ) )
325
+ heightField.setValue( Math.round( height ) );
326
+ }
327
+ }
328
+
329
+ lockButton[ lockRatio ? 'removeClass' : 'addClass' ]( 'cke_btn_unlocked' );
330
+ lockButton.setAttribute( 'aria-checked', lockRatio );
331
+
332
+ // Ratio button hc presentation - WHITE SQUARE / BLACK SQUARE
333
+ if ( CKEDITOR.env.hc ) {
334
+ var icon = lockButton.getChild( 0 );
335
+ icon.setHtml( lockRatio ? CKEDITOR.env.ie ? '\u25A0' : '\u25A3' : CKEDITOR.env.ie ? '\u25A1' : '\u25A2' );
336
+ }
337
+ }
338
+
339
+ function toggleDimensions( enable ) {
340
+ // var method = enable ? 'enable' : 'disable';
341
+ //
342
+ // widthField[ method ]();
343
+ // heightField[ method ]();
344
+ }
345
+
346
+ var srcBoxChildren = [
347
+ {
348
+ id: 'src',
349
+ type: 'text',
350
+ label: commonLang.url,
351
+ onKeyup: onChangeSrc,
352
+ onChange: onChangeSrc,
353
+ setup: function( widget ) {
354
+ this.setValue( widget.data.src );
355
+ },
356
+ commit: function( widget ) {
357
+ widget.setData( 'src', this.getValue() );
358
+ },
359
+ validate: CKEDITOR.dialog.validate.notEmpty( lang.urlMissing )
360
+ }
361
+ ];
362
+
363
+ // Render the "Browse" button on demand to avoid an "empty" (hidden child)
364
+ // space in dialog layout that distorts the UI.
365
+ if ( hasFileBrowser ) {
366
+ srcBoxChildren.push( {
367
+ type: 'button',
368
+ id: 'browse',
369
+ // v-align with the 'txtUrl' field.
370
+ // TODO: We need something better than a fixed size here.
371
+ style: 'display:inline-block;margin-top:14px;',
372
+ align: 'center',
373
+ label: editor.lang.common.browseServer,
374
+ hidden: true,
375
+ filebrowser: 'info:src'
376
+ } );
377
+ }
378
+
379
+ return {
380
+ title: lang.title,
381
+ minWidth: 250,
382
+ minHeight: 100,
383
+ onLoad: function() {
384
+ // Create a "global" reference to the document for this dialog instance.
385
+ doc = this._.element.getDocument();
386
+
387
+ // Create a pre-loader used for determining dimensions of new images.
388
+ preLoader = createPreLoader();
389
+ },
390
+ onShow: function() {
391
+ // Create a "global" reference to edited widget.
392
+ widget = this.widget;
393
+
394
+ // Create a "global" reference to widget's image.
395
+ image = widget.parts.image;
396
+
397
+ // Reset global variables.
398
+ srcChanged = userDefinedLock = lockRatio = false;
399
+
400
+ // Natural dimensions of the image.
401
+ natural = getNatural( image );
402
+
403
+ // Get the natural width of the image.
404
+ preLoadedWidth = domWidth = natural.width;
405
+
406
+ // Get the natural height of the image.
407
+ preLoadedHeight = domHeight = natural.height;
408
+ },
409
+ contents: [
410
+ {
411
+ id: 'info',
412
+ label: lang.infoTab,
413
+ elements: [
414
+ {
415
+ type: 'vbox',
416
+ padding: 0,
417
+ children: [
418
+ {
419
+ type: 'hbox',
420
+ widths: [ '100%' ],
421
+ className: 'cke_dialog_image_url',
422
+ children: srcBoxChildren
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ id: 'alt',
428
+ type: 'text',
429
+ label: lang.alt,
430
+ setup: function( widget ) {
431
+ this.setValue( widget.data.alt );
432
+ },
433
+ commit: function( widget ) {
434
+ widget.setData( 'alt', this.getValue() );
435
+ },
436
+ validate: editor.config.image2_altRequired === true ? CKEDITOR.dialog.validate.notEmpty( lang.altMissing ) : null
437
+ },
438
+ {
439
+ type: 'hbox',
440
+ widths: [ '25%', '25%', '50%' ],
441
+ requiredContent: features.dimension.requiredContent,
442
+ children: [
443
+ {
444
+ type: 'text',
445
+ width: '45px',
446
+ id: 'width',
447
+ label: commonLang.width,
448
+ validate: validateDimension,
449
+ onKeyUp: onChangeDimension,
450
+ onLoad: function() {
451
+ widthField = this;
452
+ },
453
+ setup: function( widget ) {
454
+ this.setValue( widget.data.width );
455
+ },
456
+ commit: function( widget ) {
457
+ widget.setData( 'width', this.getValue() );
458
+ }
459
+ },
460
+ {
461
+ type: 'text',
462
+ id: 'height',
463
+ width: '45px',
464
+ label: commonLang.height,
465
+ validate: validateDimension,
466
+ onKeyUp: onChangeDimension,
467
+ onLoad: function() {
468
+ heightField = this;
469
+ },
470
+ setup: function( widget ) {
471
+ this.setValue( widget.data.height );
472
+ },
473
+ commit: function( widget ) {
474
+ widget.setData( 'height', this.getValue() );
475
+ }
476
+ },
477
+ {
478
+ id: 'lock',
479
+ type: 'html',
480
+ style: lockResetStyle,
481
+ onLoad: onLoadLockReset,
482
+ setup: function( widget ) {
483
+ toggleLockRatio( widget.data.lock );
484
+ },
485
+ commit: function( widget ) {
486
+ widget.setData( 'lock', lockRatio );
487
+ },
488
+ html: lockResetHtml
489
+ }
490
+ ]
491
+ },
492
+ {
493
+ type: 'hbox',
494
+ id: 'alignment',
495
+ requiredContent: features.align.requiredContent,
496
+ children: [
497
+ {
498
+ id: 'align',
499
+ type: 'radio',
500
+ items: [
501
+ [ commonLang.alignNone, 'none' ],
502
+ [ commonLang.left, 'left' ],
503
+ [ commonLang.center, 'center' ],
504
+ [ commonLang.right, 'right' ]
505
+ ],
506
+ label: commonLang.align,
507
+ setup: function( widget ) {
508
+ this.setValue( widget.data.align );
509
+ },
510
+ commit: function( widget ) {
511
+ widget.setData( 'align', this.getValue() );
512
+ }
513
+ }
514
+ ]
515
+ },
516
+ {
517
+ id: 'hasCaption',
518
+ type: 'checkbox',
519
+ label: lang.captioned,
520
+ requiredContent: features.caption.requiredContent,
521
+ setup: function( widget ) {
522
+ this.setValue( widget.data.hasCaption );
523
+ },
524
+ commit: function( widget ) {
525
+ widget.setData( 'hasCaption', this.getValue() );
526
+ }
527
+ }
528
+ ]
529
+ },
530
+ {
531
+ id: 'Upload',
532
+ hidden: true,
533
+ filebrowser: 'uploadButton',
534
+ label: lang.uploadTab,
535
+ elements: [
536
+ {
537
+ type: 'file',
538
+ id: 'upload',
539
+ label: lang.btnUpload,
540
+ style: 'height:40px'
541
+ },
542
+ {
543
+ type: 'fileButton',
544
+ id: 'uploadButton',
545
+ filebrowser: 'info:src',
546
+ label: lang.btnUpload,
547
+ 'for': [ 'Upload', 'upload' ]
548
+ }
549
+ ]
550
+ }
551
+ ]
552
+ };
553
+ } );