releaf-core 1.1.21 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (495) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/releaf_core_manifest.js +3 -0
  3. data/app/assets/images/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  4. data/app/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  5. data/app/assets/images/ckeditor/plugins/flash/images/placeholder.png +0 -0
  6. data/app/assets/images/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  7. data/app/assets/images/ckeditor/plugins/icons.png +0 -0
  8. data/app/assets/images/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  9. data/app/assets/images/ckeditor/plugins/image/images/noimage.png +0 -0
  10. data/app/assets/images/ckeditor/plugins/link/images/anchor.png +0 -0
  11. data/app/assets/images/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  12. data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  13. data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  14. data/app/assets/images/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  15. data/app/assets/images/ckeditor/plugins/magicline/images/icon.png +0 -0
  16. data/app/assets/images/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  17. data/app/assets/images/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  18. data/app/assets/images/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  19. data/app/assets/images/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  20. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  21. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  22. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  23. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  24. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  25. data/app/assets/images/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  26. data/app/assets/images/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  27. data/app/assets/images/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  28. data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  29. data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  30. data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  31. data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  32. data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  33. data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  34. data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  35. data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  36. data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  37. data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  38. data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  39. data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  40. data/app/assets/images/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  41. data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  42. data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  43. data/app/assets/images/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  44. data/app/assets/images/ckeditor/plugins/smiley/images/envelope.png +0 -0
  45. data/app/assets/images/ckeditor/plugins/smiley/images/heart.gif +0 -0
  46. data/app/assets/images/ckeditor/plugins/smiley/images/heart.png +0 -0
  47. data/app/assets/images/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  48. data/app/assets/images/ckeditor/plugins/smiley/images/kiss.png +0 -0
  49. data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  50. data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  51. data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  52. data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  53. data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  54. data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  55. data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  56. data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  57. data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  58. data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  59. data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  60. data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  61. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  62. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  63. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  64. data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  65. data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  66. data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  67. data/app/assets/images/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  68. data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  69. data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  70. data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  71. data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  72. data/app/assets/images/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  73. data/app/assets/images/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  74. data/app/assets/images/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  75. data/app/assets/images/ckeditor/plugins/widget/images/handle.png +0 -0
  76. data/app/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
  77. data/app/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  78. data/app/assets/images/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  79. data/app/assets/images/ckeditor/skins/moono-lisa/images/close.png +0 -0
  80. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  81. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  82. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  83. data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  84. data/app/assets/images/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  85. data/app/assets/images/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  86. data/app/assets/images/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  87. data/app/assets/images/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  88. data/app/assets/javascripts/ckeditor-jquery.js +3 -0
  89. data/app/assets/javascripts/ckeditor/CHANGES.md +1637 -0
  90. data/app/assets/javascripts/ckeditor/LICENSE.md +1420 -0
  91. data/app/assets/javascripts/ckeditor/README.md +39 -0
  92. data/app/assets/javascripts/ckeditor/basepath.js.erb +6 -0
  93. data/app/assets/javascripts/ckeditor/build-config.js +190 -0
  94. data/app/assets/javascripts/ckeditor/ckeditor.js +1331 -0
  95. data/app/assets/javascripts/ckeditor/config.js +10 -0
  96. data/app/assets/javascripts/ckeditor/jquery.js +10 -0
  97. data/app/assets/javascripts/ckeditor/lang/af.js +5 -0
  98. data/app/assets/javascripts/ckeditor/lang/ar.js +5 -0
  99. data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
  100. data/app/assets/javascripts/ckeditor/lang/bg.js +5 -0
  101. data/app/assets/javascripts/ckeditor/lang/bn.js +5 -0
  102. data/app/assets/javascripts/ckeditor/lang/bs.js +5 -0
  103. data/app/assets/javascripts/ckeditor/lang/ca.js +5 -0
  104. data/app/assets/javascripts/ckeditor/lang/cs.js +5 -0
  105. data/app/assets/javascripts/ckeditor/lang/cy.js +5 -0
  106. data/app/assets/javascripts/ckeditor/lang/da.js +5 -0
  107. data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
  108. data/app/assets/javascripts/ckeditor/lang/de.js +5 -0
  109. data/app/assets/javascripts/ckeditor/lang/el.js +5 -0
  110. data/app/assets/javascripts/ckeditor/lang/en-au.js +5 -0
  111. data/app/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
  112. data/app/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
  113. data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
  114. data/app/assets/javascripts/ckeditor/lang/eo.js +5 -0
  115. data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
  116. data/app/assets/javascripts/ckeditor/lang/es.js +5 -0
  117. data/app/assets/javascripts/ckeditor/lang/et.js +5 -0
  118. data/app/assets/javascripts/ckeditor/lang/eu.js +5 -0
  119. data/app/assets/javascripts/ckeditor/lang/fa.js +5 -0
  120. data/app/assets/javascripts/ckeditor/lang/fi.js +5 -0
  121. data/app/assets/javascripts/ckeditor/lang/fo.js +5 -0
  122. data/app/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
  123. data/app/assets/javascripts/ckeditor/lang/fr.js +5 -0
  124. data/app/assets/javascripts/ckeditor/lang/gl.js +5 -0
  125. data/app/assets/javascripts/ckeditor/lang/gu.js +5 -0
  126. data/app/assets/javascripts/ckeditor/lang/he.js +5 -0
  127. data/app/assets/javascripts/ckeditor/lang/hi.js +5 -0
  128. data/app/assets/javascripts/ckeditor/lang/hr.js +5 -0
  129. data/app/assets/javascripts/ckeditor/lang/hu.js +5 -0
  130. data/app/assets/javascripts/ckeditor/lang/id.js +5 -0
  131. data/app/assets/javascripts/ckeditor/lang/is.js +5 -0
  132. data/app/assets/javascripts/ckeditor/lang/it.js +5 -0
  133. data/app/assets/javascripts/ckeditor/lang/ja.js +5 -0
  134. data/app/assets/javascripts/ckeditor/lang/ka.js +5 -0
  135. data/app/assets/javascripts/ckeditor/lang/km.js +5 -0
  136. data/app/assets/javascripts/ckeditor/lang/ko.js +5 -0
  137. data/app/assets/javascripts/ckeditor/lang/ku.js +5 -0
  138. data/app/assets/javascripts/ckeditor/lang/lt.js +5 -0
  139. data/app/assets/javascripts/ckeditor/lang/lv.js +5 -0
  140. data/app/assets/javascripts/ckeditor/lang/mk.js +5 -0
  141. data/app/assets/javascripts/ckeditor/lang/mn.js +5 -0
  142. data/app/assets/javascripts/ckeditor/lang/ms.js +5 -0
  143. data/app/assets/javascripts/ckeditor/lang/nb.js +5 -0
  144. data/app/assets/javascripts/ckeditor/lang/nl.js +5 -0
  145. data/app/assets/javascripts/ckeditor/lang/no.js +5 -0
  146. data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
  147. data/app/assets/javascripts/ckeditor/lang/pl.js +5 -0
  148. data/app/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
  149. data/app/assets/javascripts/ckeditor/lang/pt.js +5 -0
  150. data/app/assets/javascripts/ckeditor/lang/ro.js +5 -0
  151. data/app/assets/javascripts/ckeditor/lang/ru.js +5 -0
  152. data/app/assets/javascripts/ckeditor/lang/si.js +5 -0
  153. data/app/assets/javascripts/ckeditor/lang/sk.js +5 -0
  154. data/app/assets/javascripts/ckeditor/lang/sl.js +5 -0
  155. data/app/assets/javascripts/ckeditor/lang/sq.js +5 -0
  156. data/app/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
  157. data/app/assets/javascripts/ckeditor/lang/sr.js +5 -0
  158. data/app/assets/javascripts/ckeditor/lang/sv.js +5 -0
  159. data/app/assets/javascripts/ckeditor/lang/th.js +5 -0
  160. data/app/assets/javascripts/ckeditor/lang/tr.js +5 -0
  161. data/app/assets/javascripts/ckeditor/lang/tt.js +5 -0
  162. data/app/assets/javascripts/ckeditor/lang/ug.js +5 -0
  163. data/app/assets/javascripts/ckeditor/lang/uk.js +5 -0
  164. data/app/assets/javascripts/ckeditor/lang/vi.js +5 -0
  165. data/app/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
  166. data/app/assets/javascripts/ckeditor/lang/zh.js +5 -0
  167. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  168. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  169. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  170. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  171. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  172. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  173. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  174. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  175. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  176. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +12 -0
  177. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
  178. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  179. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  180. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  181. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  182. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  183. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  184. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  185. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  186. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  187. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  188. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  189. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
  190. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  191. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  192. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  193. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  194. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  195. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  196. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  197. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  198. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  199. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  200. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  201. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  202. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  203. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  204. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  205. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
  206. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  207. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  208. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  209. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  210. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  211. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  212. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  213. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
  214. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  215. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  216. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  217. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  218. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  219. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  220. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
  221. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
  222. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
  223. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  224. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  225. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  226. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  227. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
  228. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  229. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  230. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  231. data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  232. data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +8 -0
  233. data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  234. data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
  235. data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  236. data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
  237. data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +25 -0
  238. data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +24 -0
  239. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
  240. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
  241. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
  242. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
  243. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +9 -0
  244. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +21 -0
  245. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
  246. data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
  247. data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
  248. data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +44 -0
  249. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  250. data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +30 -0
  251. data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
  252. data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +55 -0
  253. data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +13 -0
  254. data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
  255. data/app/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
  256. data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  257. data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -0
  258. data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
  259. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  260. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  261. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  262. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  263. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  264. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  265. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  266. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  267. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  268. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  269. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  270. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  271. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  272. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  273. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  274. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  275. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  276. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  277. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  278. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  279. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  280. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  281. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  282. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
  283. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  284. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  285. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  286. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  287. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  288. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  289. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  290. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  291. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  292. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  293. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  294. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  295. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  296. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  297. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  298. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  299. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  300. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  301. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  302. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  303. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  304. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  305. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  306. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  307. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  308. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  309. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  310. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  311. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  312. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  313. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  314. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  315. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  316. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
  317. data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  318. data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
  319. data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
  320. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
  321. data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +7 -0
  322. data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
  323. data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
  324. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  325. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  326. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +91 -0
  327. data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  328. data/app/assets/javascripts/ckeditor/styles.js +137 -0
  329. data/app/assets/javascripts/releaf/include/remote_validator.js +1 -1
  330. data/app/assets/javascripts/releaf/include/store_settings.js +2 -2
  331. data/app/assets/javascripts/releaf/include/url_builder.js +130 -130
  332. data/app/assets/stylesheets/ckeditor/contents.css +208 -0
  333. data/app/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
  334. data/app/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
  335. data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  336. data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  337. data/app/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  338. data/app/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  339. data/app/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  340. data/app/assets/stylesheets/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  341. data/app/assets/stylesheets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  342. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +5 -0
  343. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  344. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  345. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  346. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +5 -0
  347. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  348. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  349. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  350. data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  351. data/app/builders/releaf/builders.rb +4 -1
  352. data/app/builders/releaf/builders/base.rb +1 -1
  353. data/app/builders/releaf/builders/form_builder/associations.rb +1 -1
  354. data/app/builders/releaf/builders/page/layout_builder.rb +1 -1
  355. data/app/builders/releaf/builders/pagination_builder.rb +1 -1
  356. data/app/builders/releaf/builders/table_builder.rb +0 -1
  357. data/app/controllers/releaf/action_controller.rb +2 -2
  358. data/app/controllers/releaf/root_controller.rb +9 -7
  359. data/app/helpers/releaf/application_helper.rb +2 -2
  360. data/app/lib/releaf/action_controller/features.rb +1 -6
  361. data/app/lib/releaf/build_errors_hash.rb +12 -12
  362. data/app/lib/releaf/responders.rb +0 -1
  363. data/app/lib/releaf/search.rb +5 -18
  364. data/app/models/releaf/settings.rb +1 -1
  365. data/app/views/releaf/action/create_releaf_richtext_attachment.haml +2 -1
  366. data/app/views/releaf/error_pages/access_denied.html.haml +1 -1
  367. data/lib/generators/dummy/install_generator.rb +2 -1
  368. data/lib/generators/dummy/templates/assets/config/manifest.js +3 -0
  369. data/lib/generators/dummy/templates/controllers/application_controller.rb +1 -1
  370. data/lib/generators/dummy/templates/migrations/create_authors.rb +1 -1
  371. data/lib/generators/dummy/templates/migrations/create_banner_groups.rb +1 -1
  372. data/lib/generators/dummy/templates/migrations/create_banner_pages.rb +2 -2
  373. data/lib/generators/dummy/templates/migrations/create_banners.rb +2 -2
  374. data/lib/generators/dummy/templates/migrations/create_book_sequels.rb +1 -1
  375. data/lib/generators/dummy/templates/migrations/create_books.rb +1 -1
  376. data/lib/generators/dummy/templates/migrations/create_bundles.rb +1 -1
  377. data/lib/generators/dummy/templates/migrations/create_chapters.rb +1 -1
  378. data/lib/generators/dummy/templates/migrations/create_home_pages.rb +1 -1
  379. data/lib/generators/dummy/templates/migrations/create_node_extra_fields.rb +1 -1
  380. data/lib/generators/dummy/templates/migrations/create_other_nodes.rb +1 -1
  381. data/lib/generators/dummy/templates/migrations/create_publishers.rb +1 -1
  382. data/lib/generators/dummy/templates/migrations/create_text_pages.rb +1 -1
  383. data/lib/generators/dummy/templates/models/author.rb +1 -1
  384. data/lib/generators/dummy/templates/models/banner.rb +1 -1
  385. data/lib/generators/dummy/templates/models/banner_group.rb +1 -1
  386. data/lib/generators/dummy/templates/models/book.rb +1 -1
  387. data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +1 -1
  388. data/lib/generators/releaf/templates/migrations/create_releaf_permissions.rb +1 -1
  389. data/lib/generators/releaf/templates/migrations/create_releaf_richtext_attachments.rb +1 -1
  390. data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -1
  391. data/lib/generators/releaf/templates/migrations/create_releaf_settings.rb +1 -1
  392. data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +1 -1
  393. data/lib/generators/releaf/templates/migrations/create_releaf_users.rb +1 -1
  394. data/lib/releaf-core.rb +1 -2
  395. data/lib/releaf/engine.rb +2 -3
  396. data/lib/releaf/rails_ext/globalize-accessors.rb +64 -0
  397. data/lib/releaf/rails_ext/validation_error_codes.rb +0 -36
  398. metadata +420 -222
  399. data/app/lib/releaf/responders/feature_disabled_responder.rb +0 -9
  400. data/app/views/releaf/error_pages/feature_disabled.html.haml +0 -1
  401. data/spec/builders/releaf/builders/association_reflector_spec.rb +0 -138
  402. data/spec/builders/releaf/builders/base_spec.rb +0 -272
  403. data/spec/builders/releaf/builders/collection_spec.rb +0 -18
  404. data/spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb +0 -71
  405. data/spec/builders/releaf/builders/confirm_dialog_builder_spec.rb +0 -107
  406. data/spec/builders/releaf/builders/edit_builder_spec.rb +0 -322
  407. data/spec/builders/releaf/builders/form_builder/associations_spec.rb +0 -129
  408. data/spec/builders/releaf/builders/form_builder/date_fields_spec.rb +0 -86
  409. data/spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb +0 -48
  410. data/spec/builders/releaf/builders/form_builder/label_spec.rb +0 -106
  411. data/spec/builders/releaf/builders/form_builder/number_fields_spec.rb +0 -37
  412. data/spec/builders/releaf/builders/form_builder_spec.rb +0 -228
  413. data/spec/builders/releaf/builders/index_builder_spec.rb +0 -364
  414. data/spec/builders/releaf/builders/page/header_builder_spec.rb +0 -65
  415. data/spec/builders/releaf/builders/page/layout_builder_spec.rb +0 -237
  416. data/spec/builders/releaf/builders/page/menu_builder_spec.rb +0 -345
  417. data/spec/builders/releaf/builders/pagination_builder_spec.rb +0 -330
  418. data/spec/builders/releaf/builders/resource_dialog_spec.rb +0 -21
  419. data/spec/builders/releaf/builders/resource_view_spec.rb +0 -158
  420. data/spec/builders/releaf/builders/show_builder_spec.rb +0 -7
  421. data/spec/builders/releaf/builders/table_builder_spec.rb +0 -637
  422. data/spec/builders/releaf/builders/template_spec.rb +0 -12
  423. data/spec/builders/releaf/builders/toolbox_builder_spec.rb +0 -67
  424. data/spec/builders/releaf/builders/toolbox_spec.rb +0 -48
  425. data/spec/builders/releaf/builders/utilities/date_fields_spec.rb +0 -125
  426. data/spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb +0 -318
  427. data/spec/builders/releaf/builders/view_spec.rb +0 -281
  428. data/spec/builders/releaf/builders_spec.rb +0 -134
  429. data/spec/builders/releaf/settings/form_builder_spec.rb +0 -48
  430. data/spec/builders/releaf/settings/table_builder_spec.rb +0 -23
  431. data/spec/controllers/concerns/releaf/richtext_attachments_spec.rb +0 -51
  432. data/spec/controllers/releaf/action_controller_spec.rb +0 -423
  433. data/spec/controllers/releaf/root_controller_spec.rb +0 -45
  434. data/spec/controllers/releaf/settings_controller_spec.rb +0 -52
  435. data/spec/error_hash_builder_spec.rb +0 -83
  436. data/spec/ext/array_reorder_spec.rb +0 -12
  437. data/spec/features/ajaxbox_spec.rb +0 -111
  438. data/spec/features/authorization_spec.rb +0 -50
  439. data/spec/features/breadcrumbs_spec.rb +0 -16
  440. data/spec/features/dragonfly_integration_spec.rb +0 -24
  441. data/spec/features/edit_actions_spec.rb +0 -186
  442. data/spec/features/errors_spec.rb +0 -47
  443. data/spec/features/index_actions_spec.rb +0 -85
  444. data/spec/features/index_table_spec.rb +0 -35
  445. data/spec/features/menu_spec.rb +0 -71
  446. data/spec/features/richtext_attachments_spec.rb +0 -64
  447. data/spec/features/richtext_custom_config_spec.rb +0 -28
  448. data/spec/features/richtext_embed_spec.rb +0 -29
  449. data/spec/features/richtext_spec.rb +0 -31
  450. data/spec/features/search_spec.rb +0 -825
  451. data/spec/features/settings_spec.rb +0 -70
  452. data/spec/features/title_spec.rb +0 -13
  453. data/spec/fixtures/common_fields.yml +0 -17
  454. data/spec/fixtures/cs.png +0 -0
  455. data/spec/fixtures/time.formats.xlsx +0 -0
  456. data/spec/fixtures/unicorn.jpg +0 -0
  457. data/spec/helpers/application_helper_spec.rb +0 -73
  458. data/spec/helpers/button_helper_spec.rb +0 -146
  459. data/spec/lib/releaf/action_controller/features_spec.rb +0 -171
  460. data/spec/lib/releaf/action_controller/search_spec.rb +0 -84
  461. data/spec/lib/releaf/application_spec.rb +0 -43
  462. data/spec/lib/releaf/assets_resolver_spec.rb +0 -130
  463. data/spec/lib/releaf/build_errors_hash_spec.rb +0 -141
  464. data/spec/lib/releaf/configuration_spec.rb +0 -205
  465. data/spec/lib/releaf/controller_definition_spec.rb +0 -78
  466. data/spec/lib/releaf/controller_group_definition_spec.rb +0 -33
  467. data/spec/lib/releaf/default_searchable_fields_spec.rb +0 -161
  468. data/spec/lib/releaf/instance_cache_spec.rb +0 -98
  469. data/spec/lib/releaf/resource_base_spec.rb +0 -212
  470. data/spec/lib/releaf/resource_fields_spec.rb +0 -12
  471. data/spec/lib/releaf/resource_params_spec.rb +0 -115
  472. data/spec/lib/releaf/resource_table_fields_spec.rb +0 -20
  473. data/spec/lib/releaf/resource_utilities_spec.rb +0 -87
  474. data/spec/lib/releaf/responders/access_denied_responder_spec.rb +0 -12
  475. data/spec/lib/releaf/responders/after_save_responder_spec.rb +0 -88
  476. data/spec/lib/releaf/responders/confirm_destroy_responder_spec.rb +0 -26
  477. data/spec/lib/releaf/responders/destroy_responder_spec.rb +0 -30
  478. data/spec/lib/releaf/responders/error_responder_spec.rb +0 -26
  479. data/spec/lib/releaf/responders/feature_disabled_responder_spec.rb +0 -12
  480. data/spec/lib/releaf/responders/page_not_found_responder_spec.rb +0 -12
  481. data/spec/lib/releaf/responders_spec.rb +0 -60
  482. data/spec/lib/releaf/root/configuration_spec.rb +0 -9
  483. data/spec/lib/releaf/root/default_controller_resolver_spec.rb +0 -44
  484. data/spec/lib/releaf/root_spec.rb +0 -13
  485. data/spec/lib/releaf/service_spec.rb +0 -20
  486. data/spec/lib/releaf/settings/normalize_value_spec.rb +0 -103
  487. data/spec/lib/releaf/settings/register_spec.rb +0 -135
  488. data/spec/lib/releaf/settings_manager_spec.rb +0 -22
  489. data/spec/lib/validation_error_codes_spec.rb +0 -56
  490. data/spec/misc/factories_spec.rb +0 -31
  491. data/spec/models/settings_spec.rb +0 -100
  492. data/spec/routing/route_mapper_spec.rb +0 -185
  493. data/spec/rspec_helpers/test_helpers_spec.rb +0 -20
  494. data/spec/rspec_helpers/test_spec.rb +0 -14
  495. data/spec/services/array/reorder_spec.rb +0 -121
@@ -1,70 +0,0 @@
1
- require 'rails_helper'
2
- feature "Settings", js: true do
3
- scenario "edit settings" do
4
- values = [
5
- {key: "content.updated_at", default: Time.parse("2014-07-01 14:33:59"), description: "Content update time", type: :time},
6
- {key: "content.updated", default: true, description: "Content is updated?", type: :boolean},
7
- {key: "content.rating", default: 5.65, type: :decimal},
8
- {key: "content.title", default: "some"},
9
- {key: "content.date", default: DateTime.parse("2015-05-02"), type: "date"},
10
- {key: "content.textarea", type: :textarea},
11
- {key: "content.richtext", type: :richtext},
12
- ]
13
- Releaf::Settings.destroy_all
14
- Releaf::Settings.register(*values)
15
- auth_as_user
16
-
17
- visit releaf_settings_path
18
- expect(page).to have_number_of_resources(7)
19
- expect(page).to have_css(".table.releaf\\/settings tbody tr:first-child td:first-child", text: "content.date")
20
- expect(page).to have_css(".table.releaf\\/settings tbody tr:first-child td:nth-child(2)", text: /^Sat, 02 May 2015 00:00:00 \+0000$/)
21
- expect(page).to have_css(".table.releaf\\/settings tbody tr:last-child td:first-child", text: "content.updated_at")
22
-
23
- search "content.updated"
24
- expect(page).to have_number_of_resources(2)
25
-
26
- click_link "content.updated_at"
27
- update_resource do
28
- fill_in "Content update time", with: '2014-04-01 12:33:59'
29
- end
30
-
31
- click_link "Back to list"
32
- expect(page).to have_content("2014-04-01 12:33:59")
33
- expect(Releaf::Settings["content.updated_at"]).to eq(Time.parse("2014-04-01 12:33:59"))
34
-
35
- click_link "content.updated"
36
- expect(page).to have_field("Content is updated?")
37
- expect(page).to have_css(".field input[type='checkbox'][checked='checked']")
38
-
39
- visit releaf_settings_path
40
-
41
- click_link "content.rating"
42
- expect(page).to have_field("Value")
43
- expect(page).to have_css(".field input[type='number'][value='5.65']")
44
-
45
- click_link "Back to list"
46
-
47
- click_link "content.textarea"
48
- expect(page).to have_field("Value")
49
- expect(page).to have_css(".field textarea[name='resource[value]']")
50
-
51
- update_resource do
52
- fill_in "Value", with: "AA\nBB\nCC\nDD\n"
53
- end
54
- click_link "Back to list"
55
-
56
- expect(Releaf::Settings["content.textarea"]).to eq("AA\r\nBB\r\nCC\r\nDD\r\n")
57
- expect(page).to have_content("AA\nBB\nCC\nDD\n")
58
-
59
- click_link "content.richtext"
60
- wait_for_all_richtexts
61
-
62
- update_resource do
63
- fill_in_richtext "Value", with: "<p>EE<br/>FF</p>\nGG\n<b>HH</b>\n"
64
- end
65
- click_link "Back to list"
66
-
67
- expect(Releaf::Settings["content.richtext"]).to eq("<p>EE<br />\r\nFF</p>\r\n\r\n<p>GG <b>HH</b></p>\r\n")
68
- expect(page).to have_content("EE\nFF\nGG\nHH\n")
69
- end
70
- end
@@ -1,13 +0,0 @@
1
- require 'rails_helper'
2
- feature "Controller title" do
3
- scenario "shows only application title" do
4
- visit releaf_root_path
5
- expect(page.title).to eq("Dummy")
6
- end
7
-
8
- scenario "shows only controller and application title" do
9
- auth_as_user
10
- visit releaf_permissions_user_profile_path
11
- expect(page.title).to eq("Releaf/permissions/profile - Dummy")
12
- end
13
- end
@@ -1,17 +0,0 @@
1
- -
2
- field_name: 'meta_description'
3
- field_type: 'boolean'
4
- apply_to: '*'
5
- default: 'common stuff'
6
- deny_for: 'Text'
7
-
8
- -
9
- field_name: 'meta_copyright'
10
- field_type: 'text'
11
- apply_to: ['Text', 'ContactsController']
12
- levels: [1]
13
-
14
- -
15
- field_name: 'other_attribute'
16
- field_type: 'text'
17
- apply_to: 'ContactsController'
Binary file
Binary file
@@ -1,73 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe Releaf::ApplicationHelper do
4
- describe "#releaf_table" do
5
- it "returns table builder output for collection and resource class with given options" do
6
- builder = Releaf::Permissions::Users::TableBuilder
7
- collection = "collection"
8
-
9
- allow(builder).to receive(:new).with(collection, TextPage, subject, toolbox: false).and_call_original
10
- allow_any_instance_of(builder).to receive(:output).and_return("table")
11
-
12
- expect(releaf_table(collection, TextPage, builder: builder, toolbox: false)).to eq("table")
13
- end
14
- end
15
-
16
- describe "#merge_attributes" do
17
- it "makes deep merge second over first hash" do
18
- expect(helper.merge_attributes({a: {b: "c"}, d: "e"}, {a: {b: "č"}, f: "x"})).to eq(a: {b: "č"}, d: "e", f: "x")
19
- end
20
-
21
- it "merges class values from both hashes" do
22
- expect(helper.merge_attributes({class: ["a", "b"]}, {})[:class]).to eq(["a", "b"])
23
- expect(helper.merge_attributes({}, {class: "d c"})[:class]).to eq(["d c"])
24
- expect(helper.merge_attributes({class: ["a", "b"]}, {class: "d c"})[:class]).to eq(["a", "b", "d c"])
25
- end
26
-
27
- it "removes empty class values on merging" do
28
- expect(helper.merge_attributes({class: ["a", nil, "b"]}, {class: ["", "c"]})[:class]).to eq(["a", "b", "c"])
29
- end
30
- end
31
-
32
- describe "#i18n_options_for_select" do
33
- Color = Struct.new(:id, :to_s)
34
- let(:helper) do
35
- helper = instance_double(Releaf::ActionController)
36
- helper.extend Releaf::ApplicationHelper
37
- helper.extend ActionView::Helpers
38
-
39
- helper
40
- end
41
-
42
- before do
43
- translation = Releaf::I18nDatabase::I18nEntry.create(key: "admin.xx.colors-red")
44
- translation.i18n_entry_translation.create(locale: "en", text: "Color red")
45
- Releaf::I18nDatabase::Backend.reset_cache
46
- allow(helper).to receive(:controller_scope_name).and_return("admin.xx")
47
- end
48
-
49
- context "when array of string" do
50
- it "returns translated options" do
51
- input = ["red", "green", "blue"]
52
- output = ['<option value="red">Color red</option>', '<option selected="selected" value="green">green</option>', '<option value="blue">blue</option>'].join("\n")
53
- expect(helper.i18n_options_for_select(input, "green", "colors")).to eq(output)
54
- end
55
- end
56
-
57
- context "when hash" do
58
- it "returns translated options" do
59
- input = {"red" => "r", "green" => "g", "blue" => "b"}
60
- output = ['<option value="r">Color red</option>', '<option selected="selected" value="g">green</option>', '<option value="b">blue</option>'].join("\n")
61
- expect(helper.i18n_options_for_select(input, "g", "colors")).to eq(output)
62
- end
63
- end
64
-
65
- context "when array of string for another translation scope" do
66
- it "returns translated options" do
67
- input = ["red", "green", "blue"]
68
- output = ['<option value="red">red</option>', '<option selected="selected" value="green">green</option>', '<option value="blue">blue</option>'].join("\n")
69
- expect(helper.i18n_options_for_select(input, "green", "colors", {:scope => "admin.products"})).to eq(output)
70
- end
71
- end
72
- end
73
- end
@@ -1,146 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe Releaf::ButtonHelper do
4
-
5
- describe "#releaf_button" do
6
-
7
- it "returns an HTML button element with title, icon, text and optional extra attributes" do
8
- output = '<button class="button with-icon danger secondary" title="escape&gt;&lt;this" type="button" autocomplete="off" data-x="escape&lt;this&gt;too"><i class="fa fa-plus"></i>escape&gt;&lt;this</button>'
9
- expect(helper.releaf_button("escape><this", "plus", class: [ :danger, "secondary" ], 'data-x' => 'escape<this>too' )).to eq(output)
10
- end
11
-
12
- it "uses #releaf_button_attributes and #releaf_button_content to collect button attributes and content" do
13
- processed_attributes = { attr: :value, data: { attrx: "valuex" } }
14
-
15
- expect(helper).to receive(:releaf_button_attributes).with("foo", "bar", {} ).and_return(processed_attributes)
16
- expect(helper).to receive(:releaf_button_content).with("foo", "bar", processed_attributes).and_return("button content")
17
-
18
- expect(helper.releaf_button("foo", "bar")).to eq('<button attr="value" data-attrx="valuex">button content</button>')
19
- end
20
-
21
- context "when href is given in attributes" do
22
-
23
- it "returns a link element instead of a button" do
24
- html = '<a class="button with-icon" title="x" href="http://example.com/?a&amp;b"><i class="fa fa-plus"></i>x</a>'
25
- expect(helper.releaf_button("x", "plus", href: "http://example.com/?a&b")).to eq(html)
26
- end
27
-
28
- it "returns a link element even if the given href is blank" do
29
- html = '<a class="button with-icon" title="x"><i class="fa fa-plus"></i>x</a>'
30
- expect(helper.releaf_button("x", "plus", href: nil)).to eq(html)
31
- end
32
-
33
- end
34
-
35
- end
36
-
37
- describe "#releaf_button_attributes" do
38
-
39
- it "returns a hash of attributes" do
40
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar )).to be_a Hash
41
- end
42
-
43
- it "adds button class" do
44
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar )[:class]).to include( "button" )
45
- end
46
-
47
- it "sets title attribute to given text" do
48
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar )).to include( title: :text_foo )
49
- end
50
-
51
- context "when href attribute given" do
52
- it "does not set type attribute" do
53
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar, href: :baz )).to_not include( :type )
54
- end
55
- end
56
-
57
- context "when href attribute not given" do
58
- it "sets type attribute to button" do
59
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar )).to include( type: :button )
60
- end
61
- end
62
-
63
- context "when icon given" do
64
-
65
- context "when text also given" do
66
- it "adds with-icon class" do
67
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar )[:class]).to include( "with-icon" )
68
- end
69
- end
70
-
71
- context "when text not given" do
72
- it "adds only-icon class" do
73
- expect(helper.releaf_button_attributes( nil, :icon_bar )[:class]).to include( "only-icon" )
74
- end
75
- end
76
-
77
- end
78
-
79
- context "when extra attributes given" do
80
-
81
- it "includes given custom attributes with the default ones" do
82
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar, data: { x: "y" })).to include( class: ["button", "with-icon"], data: { x: "y" } )
83
- end
84
-
85
- it "overwrites default attributes if needed" do
86
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar, type: :submit, title: "custom")).to include( type: :submit, title: "custom" )
87
- end
88
-
89
- it "combines given class names with the deault ones" do
90
- expect(helper.releaf_button_attributes( :text_foo, :icon_bar, class: "danger") ).to include( class: ["button", "with-icon", "danger"] )
91
- end
92
-
93
- end
94
-
95
- end
96
-
97
-
98
- describe "#releaf_button_content" do
99
-
100
- let(:icon_html) { '<i class="fa fa-icon_bar"></i>' }
101
-
102
- it "returns an html-safe buffer" do
103
- expect(helper.releaf_button_content( :text_foo, :icon_bar )).to be_a ActiveSupport::SafeBuffer
104
- end
105
-
106
- context "when text and icon given" do
107
- it "returns icon HTML followed by given text" do
108
- expect(helper.releaf_button_content( "escape<this>text", :icon_bar )).to eq(icon_html + 'escape&lt;this&gt;text')
109
- end
110
- end
111
-
112
- context "when only text given" do
113
- it "returns given text" do
114
- expect(helper.releaf_button_content( "escape<this>text", nil )).to eq('escape&lt;this&gt;text')
115
- end
116
- end
117
-
118
- context "when only icon given" do
119
-
120
- context "when title attribute is present" do
121
- it "returns icon HTML" do
122
- expect(helper.releaf_button_content( nil, :icon_bar, title: "foo" )).to eq(icon_html)
123
- end
124
- end
125
-
126
- context "when title attribute is not present" do
127
-
128
- it "raises an ArgumentError" do
129
- expect{ helper.releaf_button_content(nil, :icon_bar, title: "") }.to raise_error(ArgumentError, "Title is required for icon-only buttons")
130
- end
131
-
132
- end
133
-
134
- end
135
-
136
-
137
- context "when both text and icon are blank" do
138
- it "raises an ArgumentError" do
139
- expect{ helper.releaf_button_content(nil, nil ) }.to raise_error(ArgumentError, "Either text or icon is required for buttons")
140
- expect{ helper.releaf_button_content("", "" ) }.to raise_error(ArgumentError, "Either text or icon is required for buttons")
141
- end
142
- end
143
-
144
- end
145
-
146
- end
@@ -1,171 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe Releaf::ActionController::Features do
4
- let(:subject){ DummyActionControllerFeaturesIncluder.new }
5
-
6
- class DummyActionControllerFeaturesIncluder < Releaf::ActionController
7
- include Releaf::ActionController::Features
8
- include Releaf::Responders
9
- def params
10
- {action: "some_action"}
11
- end
12
- end
13
-
14
- describe "#verify_feature_availability!" do
15
- before do
16
- allow(subject).to receive(:action_feature).with("some_action").and_return(:feature_name)
17
- end
18
-
19
- it "adds itself to before filters" do
20
- before_actions = subject._process_action_callbacks.select{|f| f.kind == :before}.map{|f| f.filter }
21
- expect(before_actions).to include(:verify_controller_access!)
22
- end
23
-
24
- context "when no feature defined for action" do
25
- it "doesn no raise `Releaf::FeatureDisabled` exception" do
26
- allow(subject).to receive(:action_feature).with("some_action").and_return(nil)
27
- expect{ subject.verify_feature_availability! }.to_not raise_error
28
- end
29
- end
30
-
31
- context "when current feature is available" do
32
- it "doesn no raise `Releaf::FeatureDisabled` exception" do
33
- allow(subject).to receive(:feature_available?).with(:feature_name).and_return(true)
34
- expect{ subject.verify_feature_availability! }.to_not raise_error
35
- end
36
- end
37
-
38
- context "when current feature is not available" do
39
- it "raises `Releaf::FeatureDisabled` exception with stringified feature name" do
40
- allow(subject).to receive(:feature_available?).with(:feature_name).and_return(false)
41
- expect{ subject.verify_feature_availability! }.to raise_error(Releaf::FeatureDisabled, "feature_name")
42
- end
43
- end
44
- end
45
-
46
- describe "#action_feature" do
47
- before do
48
- allow(subject).to receive(:action_features).and_return(create: "xxx", te: "kkk")
49
- end
50
-
51
- it "returns matching feature for given action from action features" do
52
- expect(subject.action_feature(:create)).to eq("xxx")
53
- end
54
-
55
- it "symbolize given action name" do
56
- expect(subject.action_feature("te")).to eq("kkk")
57
- end
58
- end
59
-
60
- describe "#features" do
61
- it "returns array instance" do
62
- expect(subject.features).to be_instance_of Array
63
- end
64
-
65
- it "returned array contains features as symbols" do
66
- subject.features.each do|feature_name|
67
- expect(feature_name).to be_instance_of Symbol
68
- end
69
- end
70
- end
71
-
72
- describe "#action_features" do
73
- it "returns instance of `Hash`" do
74
- expect(subject.action_features).to be_instance_of(Hash)
75
- end
76
-
77
- it "returns hash with action and feature mapp as symbols" do
78
- subject.action_features.each_pair do|action_name, feature_name|
79
- expect(action_name).to be_instance_of(Symbol)
80
- expect(feature_name).to be_instance_of(Symbol)
81
- end
82
- end
83
-
84
- context "when `show` feature is available" do
85
- it "returns show to show feature mapping" do
86
- allow(subject).to receive(:feature_available?).with(:show).and_return(true)
87
- expect(subject.action_features[:show]).to eq(:show)
88
- end
89
- end
90
-
91
- context "when `show` feature is not available" do
92
- it "returns show to edit feature mapping" do
93
- allow(subject).to receive(:feature_available?).with(:show).and_return(false)
94
- expect(subject.action_features[:show]).to eq(:edit)
95
- end
96
- end
97
- end
98
-
99
- describe "#feature_disabled" do
100
- before do
101
- allow(subject).to receive(:action_responder).with(:feature_disabled).and_return("_res")
102
- end
103
-
104
- it "adds itself as rescue handler from `Releaf::FeatureDisabled` exception" do
105
- expect(Hash[subject.rescue_handlers]["Releaf::FeatureDisabled"]).to eq(:feature_disabled)
106
- end
107
-
108
- it "calls disabled feature responder" do
109
- expect(subject).to receive(:respond_with).with(nil, responder: "_res")
110
- subject.feature_disabled(Releaf::FeatureDisabled.new("xx"))
111
- end
112
-
113
- it "assigns @feature instance variable from exception message" do
114
- allow(subject).to receive(:respond_with)
115
- expect{ subject.feature_disabled(Releaf::FeatureDisabled.new("xx")) }.to change{ subject.instance_variable_get(:@feature) }
116
- .to("xx")
117
- end
118
- end
119
-
120
- describe "#feature_available?" do
121
- it "adds itself as helper" do
122
- expect(subject._helper_methods).to include(:feature_available?)
123
- end
124
-
125
- it "returns whether feature is defined within features variable" do
126
- allow(subject).to receive(:features).and_return([:edit])
127
- expect(subject.feature_available?(:create)).to be false
128
-
129
- allow(subject).to receive(:features).and_return([:edit, :create])
130
- expect(subject.feature_available?(:create)).to be true
131
- end
132
-
133
- context "when `search` feature requested" do
134
- it "also checks whether `index` feature is enabled" do
135
- allow(subject).to receive(:feature_available?).with(:search).and_call_original
136
- allow(subject).to receive(:feature_available?).with(:index).and_return(false)
137
-
138
- allow(subject).to receive(:features).and_return([:edit])
139
- expect(subject.feature_available?(:search)).to be false
140
-
141
- allow(subject).to receive(:features).and_return([:edit, :search])
142
- expect(subject.feature_available?(:search)).to be false
143
-
144
- allow(subject).to receive(:feature_available?).with(:index).and_return(true)
145
- expect(subject.feature_available?(:search)).to be true
146
-
147
- allow(subject).to receive(:features).and_return([:edit])
148
- expect(subject.feature_available?(:search)).to be false
149
- end
150
- end
151
-
152
- context "when `create_another` feature requested" do
153
- it "also checks whether `create` feature is enabled" do
154
- allow(subject).to receive(:feature_available?).with(:create_another).and_call_original
155
- allow(subject).to receive(:feature_available?).with(:create).and_return(false)
156
-
157
- allow(subject).to receive(:features).and_return([:edit])
158
- expect(subject.feature_available?(:create_another)).to be false
159
-
160
- allow(subject).to receive(:features).and_return([:edit, :create_another])
161
- expect(subject.feature_available?(:create_another)).to be false
162
-
163
- allow(subject).to receive(:feature_available?).with(:create).and_return(true)
164
- expect(subject.feature_available?(:create_another)).to be true
165
-
166
- allow(subject).to receive(:features).and_return([:edit])
167
- expect(subject.feature_available?(:create_another)).to be false
168
- end
169
- end
170
- end
171
- end