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.
- checksums.yaml +4 -4
- data/app/assets/config/releaf_core_manifest.js +3 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/images/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/app/assets/images/ckeditor/plugins/icons.png +0 -0
- data/app/assets/images/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/app/assets/images/ckeditor/plugins/image/images/noimage.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/app/assets/images/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/app/assets/images/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/app/assets/images/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/images/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/app/assets/images/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/app/assets/images/ckeditor/plugins/widget/images/handle.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/app/assets/images/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/app/assets/javascripts/ckeditor-jquery.js +3 -0
- data/app/assets/javascripts/ckeditor/CHANGES.md +1637 -0
- data/app/assets/javascripts/ckeditor/LICENSE.md +1420 -0
- data/app/assets/javascripts/ckeditor/README.md +39 -0
- data/app/assets/javascripts/ckeditor/basepath.js.erb +6 -0
- data/app/assets/javascripts/ckeditor/build-config.js +190 -0
- data/app/assets/javascripts/ckeditor/ckeditor.js +1331 -0
- data/app/assets/javascripts/ckeditor/config.js +10 -0
- data/app/assets/javascripts/ckeditor/jquery.js +10 -0
- data/app/assets/javascripts/ckeditor/lang/af.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ar.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/az.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bg.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/bs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cs.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/cy.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/da.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de-ch.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/de.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/el.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-au.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es-mx.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/es.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/et.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/eu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fa.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fo.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/fr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/gu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/he.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/hu.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/id.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/is.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/it.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ja.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ka.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/km.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ko.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ku.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/lv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/mn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ms.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nb.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/nl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/no.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/oc.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/pt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ro.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/si.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sl.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sq.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/sv.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/th.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tr.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/tt.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/ug.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/uk.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/vi.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
- data/app/assets/javascripts/ckeditor/lang/zh.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/app/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +25 -0
- data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +24 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +44 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +30 -0
- data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +55 -0
- data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +13 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- data/app/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +91 -0
- data/app/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/app/assets/javascripts/ckeditor/styles.js +137 -0
- data/app/assets/javascripts/releaf/include/remote_validator.js +1 -1
- data/app/assets/javascripts/releaf/include/store_settings.js +2 -2
- data/app/assets/javascripts/releaf/include/url_builder.js +130 -130
- data/app/assets/stylesheets/ckeditor/contents.css +208 -0
- data/app/assets/stylesheets/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
- data/app/assets/stylesheets/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/app/assets/stylesheets/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- data/app/assets/stylesheets/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- data/app/assets/stylesheets/ckeditor/plugins/templates/dialogs/templates.css +84 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/app/assets/stylesheets/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/app/assets/stylesheets/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/app/builders/releaf/builders.rb +4 -1
- data/app/builders/releaf/builders/base.rb +1 -1
- data/app/builders/releaf/builders/form_builder/associations.rb +1 -1
- data/app/builders/releaf/builders/page/layout_builder.rb +1 -1
- data/app/builders/releaf/builders/pagination_builder.rb +1 -1
- data/app/builders/releaf/builders/table_builder.rb +0 -1
- data/app/controllers/releaf/action_controller.rb +2 -2
- data/app/controllers/releaf/root_controller.rb +9 -7
- data/app/helpers/releaf/application_helper.rb +2 -2
- data/app/lib/releaf/action_controller/features.rb +1 -6
- data/app/lib/releaf/build_errors_hash.rb +12 -12
- data/app/lib/releaf/responders.rb +0 -1
- data/app/lib/releaf/search.rb +5 -18
- data/app/models/releaf/settings.rb +1 -1
- data/app/views/releaf/action/create_releaf_richtext_attachment.haml +2 -1
- data/app/views/releaf/error_pages/access_denied.html.haml +1 -1
- data/lib/generators/dummy/install_generator.rb +2 -1
- data/lib/generators/dummy/templates/assets/config/manifest.js +3 -0
- data/lib/generators/dummy/templates/controllers/application_controller.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_authors.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_groups.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_banner_pages.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_banners.rb +2 -2
- data/lib/generators/dummy/templates/migrations/create_book_sequels.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_books.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_bundles.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_chapters.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_home_pages.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_node_extra_fields.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_other_nodes.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_publishers.rb +1 -1
- data/lib/generators/dummy/templates/migrations/create_text_pages.rb +1 -1
- data/lib/generators/dummy/templates/models/author.rb +1 -1
- data/lib/generators/dummy/templates/models/banner.rb +1 -1
- data/lib/generators/dummy/templates/models/banner_group.rb +1 -1
- data/lib/generators/dummy/templates/models/book.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_permissions.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_richtext_attachments.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_settings.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +1 -1
- data/lib/generators/releaf/templates/migrations/create_releaf_users.rb +1 -1
- data/lib/releaf-core.rb +1 -2
- data/lib/releaf/engine.rb +2 -3
- data/lib/releaf/rails_ext/globalize-accessors.rb +64 -0
- data/lib/releaf/rails_ext/validation_error_codes.rb +0 -36
- metadata +420 -222
- data/app/lib/releaf/responders/feature_disabled_responder.rb +0 -9
- data/app/views/releaf/error_pages/feature_disabled.html.haml +0 -1
- data/spec/builders/releaf/builders/association_reflector_spec.rb +0 -138
- data/spec/builders/releaf/builders/base_spec.rb +0 -272
- data/spec/builders/releaf/builders/collection_spec.rb +0 -18
- data/spec/builders/releaf/builders/confirm_destroy_dialog_builder_spec.rb +0 -71
- data/spec/builders/releaf/builders/confirm_dialog_builder_spec.rb +0 -107
- data/spec/builders/releaf/builders/edit_builder_spec.rb +0 -322
- data/spec/builders/releaf/builders/form_builder/associations_spec.rb +0 -129
- data/spec/builders/releaf/builders/form_builder/date_fields_spec.rb +0 -86
- data/spec/builders/releaf/builders/form_builder/i18n_fields_spec.rb +0 -48
- data/spec/builders/releaf/builders/form_builder/label_spec.rb +0 -106
- data/spec/builders/releaf/builders/form_builder/number_fields_spec.rb +0 -37
- data/spec/builders/releaf/builders/form_builder_spec.rb +0 -228
- data/spec/builders/releaf/builders/index_builder_spec.rb +0 -364
- data/spec/builders/releaf/builders/page/header_builder_spec.rb +0 -65
- data/spec/builders/releaf/builders/page/layout_builder_spec.rb +0 -237
- data/spec/builders/releaf/builders/page/menu_builder_spec.rb +0 -345
- data/spec/builders/releaf/builders/pagination_builder_spec.rb +0 -330
- data/spec/builders/releaf/builders/resource_dialog_spec.rb +0 -21
- data/spec/builders/releaf/builders/resource_view_spec.rb +0 -158
- data/spec/builders/releaf/builders/show_builder_spec.rb +0 -7
- data/spec/builders/releaf/builders/table_builder_spec.rb +0 -637
- data/spec/builders/releaf/builders/template_spec.rb +0 -12
- data/spec/builders/releaf/builders/toolbox_builder_spec.rb +0 -67
- data/spec/builders/releaf/builders/toolbox_spec.rb +0 -48
- data/spec/builders/releaf/builders/utilities/date_fields_spec.rb +0 -125
- data/spec/builders/releaf/builders/utilities/resolve_attribute_field_method_name_spec.rb +0 -318
- data/spec/builders/releaf/builders/view_spec.rb +0 -281
- data/spec/builders/releaf/builders_spec.rb +0 -134
- data/spec/builders/releaf/settings/form_builder_spec.rb +0 -48
- data/spec/builders/releaf/settings/table_builder_spec.rb +0 -23
- data/spec/controllers/concerns/releaf/richtext_attachments_spec.rb +0 -51
- data/spec/controllers/releaf/action_controller_spec.rb +0 -423
- data/spec/controllers/releaf/root_controller_spec.rb +0 -45
- data/spec/controllers/releaf/settings_controller_spec.rb +0 -52
- data/spec/error_hash_builder_spec.rb +0 -83
- data/spec/ext/array_reorder_spec.rb +0 -12
- data/spec/features/ajaxbox_spec.rb +0 -111
- data/spec/features/authorization_spec.rb +0 -50
- data/spec/features/breadcrumbs_spec.rb +0 -16
- data/spec/features/dragonfly_integration_spec.rb +0 -24
- data/spec/features/edit_actions_spec.rb +0 -186
- data/spec/features/errors_spec.rb +0 -47
- data/spec/features/index_actions_spec.rb +0 -85
- data/spec/features/index_table_spec.rb +0 -35
- data/spec/features/menu_spec.rb +0 -71
- data/spec/features/richtext_attachments_spec.rb +0 -64
- data/spec/features/richtext_custom_config_spec.rb +0 -28
- data/spec/features/richtext_embed_spec.rb +0 -29
- data/spec/features/richtext_spec.rb +0 -31
- data/spec/features/search_spec.rb +0 -825
- data/spec/features/settings_spec.rb +0 -70
- data/spec/features/title_spec.rb +0 -13
- data/spec/fixtures/common_fields.yml +0 -17
- data/spec/fixtures/cs.png +0 -0
- data/spec/fixtures/time.formats.xlsx +0 -0
- data/spec/fixtures/unicorn.jpg +0 -0
- data/spec/helpers/application_helper_spec.rb +0 -73
- data/spec/helpers/button_helper_spec.rb +0 -146
- data/spec/lib/releaf/action_controller/features_spec.rb +0 -171
- data/spec/lib/releaf/action_controller/search_spec.rb +0 -84
- data/spec/lib/releaf/application_spec.rb +0 -43
- data/spec/lib/releaf/assets_resolver_spec.rb +0 -130
- data/spec/lib/releaf/build_errors_hash_spec.rb +0 -141
- data/spec/lib/releaf/configuration_spec.rb +0 -205
- data/spec/lib/releaf/controller_definition_spec.rb +0 -78
- data/spec/lib/releaf/controller_group_definition_spec.rb +0 -33
- data/spec/lib/releaf/default_searchable_fields_spec.rb +0 -161
- data/spec/lib/releaf/instance_cache_spec.rb +0 -98
- data/spec/lib/releaf/resource_base_spec.rb +0 -212
- data/spec/lib/releaf/resource_fields_spec.rb +0 -12
- data/spec/lib/releaf/resource_params_spec.rb +0 -115
- data/spec/lib/releaf/resource_table_fields_spec.rb +0 -20
- data/spec/lib/releaf/resource_utilities_spec.rb +0 -87
- data/spec/lib/releaf/responders/access_denied_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/after_save_responder_spec.rb +0 -88
- data/spec/lib/releaf/responders/confirm_destroy_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/destroy_responder_spec.rb +0 -30
- data/spec/lib/releaf/responders/error_responder_spec.rb +0 -26
- data/spec/lib/releaf/responders/feature_disabled_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders/page_not_found_responder_spec.rb +0 -12
- data/spec/lib/releaf/responders_spec.rb +0 -60
- data/spec/lib/releaf/root/configuration_spec.rb +0 -9
- data/spec/lib/releaf/root/default_controller_resolver_spec.rb +0 -44
- data/spec/lib/releaf/root_spec.rb +0 -13
- data/spec/lib/releaf/service_spec.rb +0 -20
- data/spec/lib/releaf/settings/normalize_value_spec.rb +0 -103
- data/spec/lib/releaf/settings/register_spec.rb +0 -135
- data/spec/lib/releaf/settings_manager_spec.rb +0 -22
- data/spec/lib/validation_error_codes_spec.rb +0 -56
- data/spec/misc/factories_spec.rb +0 -31
- data/spec/models/settings_spec.rb +0 -100
- data/spec/routing/route_mapper_spec.rb +0 -185
- data/spec/rspec_helpers/test_helpers_spec.rb +0 -20
- data/spec/rspec_helpers/test_spec.rb +0 -14
- data/spec/services/array/reorder_spec.rb +0 -121
@@ -1 +0,0 @@
|
|
1
|
-
= render 'releaf/error_pages/error', message: t('%{feature} feature disabled for %{controller}', feature: @feature, controller: controller_name, scope: controller_scope_name, default: '%{feature} feature disabled for %{controller}')
|
@@ -1,138 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
describe Releaf::Builders::AssociationReflector, type: :class do
|
4
|
-
let(:reflection){ Book.reflect_on_association("chapters") }
|
5
|
-
subject{ described_class.new(reflection, :b, "xx") }
|
6
|
-
|
7
|
-
describe "#initialize" do
|
8
|
-
it "assigns given reflection" do
|
9
|
-
expect(subject.reflection).to eq(reflection)
|
10
|
-
end
|
11
|
-
|
12
|
-
it "assigns given fields" do
|
13
|
-
expect(subject.fields).to eq(:b)
|
14
|
-
end
|
15
|
-
|
16
|
-
it "normalizes to symbol and assigns given sortable name" do
|
17
|
-
expect(subject.sortable_column_name).to eq(:xx)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "#destroyable?" do
|
22
|
-
context "when reflection allow to destroy through nested attributes" do
|
23
|
-
it "returns true" do
|
24
|
-
subject.reflection = Book.reflect_on_association("book_sequels")
|
25
|
-
expect(subject.destroyable?).to be true
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
context "when reflection does not allow to destroy through nested attributes" do
|
30
|
-
it "returns false" do
|
31
|
-
expect(subject.destroyable?).to be false
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
it "caches result" do
|
36
|
-
expect(subject.reflection.active_record).to receive(:nested_attributes_options).and_call_original.once
|
37
|
-
subject.destroyable?
|
38
|
-
subject.destroyable?
|
39
|
-
subject.destroyable?
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
describe "#sortable?" do
|
44
|
-
context "when expected and actual order clauses are same" do
|
45
|
-
it "returns true" do
|
46
|
-
allow(subject).to receive(:expected_order_clause).and_return(:a)
|
47
|
-
allow(subject).to receive(:actual_order_clause).and_return(:a)
|
48
|
-
expect(subject.sortable?).to be true
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
context "when expected and actual order clauses differs" do
|
53
|
-
it "returns false" do
|
54
|
-
allow(subject).to receive(:expected_order_clause).and_return(:a)
|
55
|
-
allow(subject).to receive(:actual_order_clause).and_return(:b)
|
56
|
-
expect(subject.sortable?).to be false
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
it "caches result" do
|
61
|
-
expect(subject).to receive(:expected_order_clause).and_return(:x).once
|
62
|
-
expect(subject).to receive(:actual_order_clause).and_return(:y).once
|
63
|
-
subject.sortable?
|
64
|
-
subject.sortable?
|
65
|
-
subject.sortable?
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
describe "#actual_order_clause" do
|
70
|
-
context "when scope exists within reflection" do
|
71
|
-
it "returns actual reflection klass order clause with evaluated scope" do
|
72
|
-
relation = reflection.klass.all.order(:item_position)
|
73
|
-
allow(subject).to receive(:extract_order_clause).with(relation).and_return(:y)
|
74
|
-
expect(subject.actual_order_clause).to eq(:y)
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
context "when no scope exists within reflection" do
|
79
|
-
it "returns actual reflection klass order clause" do
|
80
|
-
subject.reflection = Book.reflect_on_association("sequels")
|
81
|
-
relation = subject.reflection.klass.all
|
82
|
-
allow(subject).to receive(:extract_order_clause).with(relation).and_return(:y)
|
83
|
-
expect(subject.actual_order_clause).to eq(:y)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
describe "#expected_order_clause" do
|
89
|
-
it "returns expected reflection klass order clause for sortable column name" do
|
90
|
-
subject.sortable_column_name = :title
|
91
|
-
relation = reflection.klass.all.order(:title)
|
92
|
-
allow(subject).to receive(:extract_order_clause).with(relation).and_return(:y)
|
93
|
-
expect(subject.expected_order_clause).to eq(:y)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
describe "#extract_order_clause" do
|
98
|
-
it "returns order clauses normalized to string for given relation" do
|
99
|
-
relation = Book.order(genre: :desc)
|
100
|
-
expected_result = if mysql?
|
101
|
-
"`books`.`genre` DESC"
|
102
|
-
elsif postgresql?
|
103
|
-
'"books"."genre" DESC'
|
104
|
-
else
|
105
|
-
fail
|
106
|
-
end
|
107
|
-
expect(subject.extract_order_clause(relation)).to eq(expected_result)
|
108
|
-
end
|
109
|
-
|
110
|
-
context "when relation has no order clauses" do
|
111
|
-
it "returns empty string" do
|
112
|
-
relation = Book.all
|
113
|
-
expect(subject.extract_order_clause(relation)).to eq("")
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
describe "#value_as_sql" do
|
119
|
-
context "when given value respond to sql" do
|
120
|
-
it "return resulting sql" do
|
121
|
-
expected_result = if mysql?
|
122
|
-
"SELECT `books`.* FROM `books`"
|
123
|
-
elsif postgresql?
|
124
|
-
'SELECT "books".* FROM "books"'
|
125
|
-
else
|
126
|
-
fail
|
127
|
-
end
|
128
|
-
expect(subject.value_as_sql(Book.all)).to eq(expected_result)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
|
-
context "when given value does not respond to sql" do
|
133
|
-
it "return given value" do
|
134
|
-
expect(subject.value_as_sql(12)).to eq(12)
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
138
|
-
end
|
@@ -1,272 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Builders::Base, type: :module do
|
4
|
-
class FormBuilderTestHelper < ActionView::Base
|
5
|
-
include Releaf::ButtonHelper
|
6
|
-
include Releaf::ApplicationHelper
|
7
|
-
include FontAwesome::Rails::IconHelper
|
8
|
-
end
|
9
|
-
class BuilderIncluder
|
10
|
-
include Releaf::Builders::Base
|
11
|
-
attr_accessor :template
|
12
|
-
end
|
13
|
-
|
14
|
-
let(:subject){ BuilderIncluder.new }
|
15
|
-
let(:template){ FormBuilderTestHelper.new }
|
16
|
-
|
17
|
-
before do
|
18
|
-
subject.template = template
|
19
|
-
end
|
20
|
-
|
21
|
-
describe "delegations" do
|
22
|
-
[:controller, :controller_name, :url_for, :form_for,
|
23
|
-
:releaf_button, :params, :form_tag, :file_field_tag,
|
24
|
-
:request, :check_box_tag, :label_tag, :content_tag, :hidden_field_tag,
|
25
|
-
:render, :link_to, :flash, :truncate, :radio_button_tag,
|
26
|
-
:options_for_select, :action_name, :options_from_collection_for_select,
|
27
|
-
:select_tag, :text_field_tag,
|
28
|
-
:image_tag, :cookies, :button_tag, :merge_attributes
|
29
|
-
].each do|method_name|
|
30
|
-
it "deletages #{method_name} to template" do
|
31
|
-
expect(subject).to delegate_method(method_name).to(:template)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
[:controller_scope_name, :feature_available?, :builder_class, :index_path].each do|method_name|
|
36
|
-
it "delegates #{method_name} to controller" do
|
37
|
-
expect(subject).to delegate_method(method_name).to(:controller)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe "#layout_settings" do
|
43
|
-
it "returns settings manager setting for given key" do
|
44
|
-
allow(Releaf.application.config.settings_manager).to receive(:read)
|
45
|
-
.with(controller: "_ctrl_", key: "a.x").and_return("xxxxx")
|
46
|
-
allow(subject).to receive(:controller).and_return("_ctrl_")
|
47
|
-
|
48
|
-
expect(subject.layout_settings("a.x")).to eq("xxxxx")
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
describe "#html_escape" do
|
53
|
-
it "escapes given value with " do
|
54
|
-
allow(ERB::Util).to receive(:html_escape).with("a").and_return("b")
|
55
|
-
expect(subject.html_escape("a")).to eq("b")
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
it "aliases #button to #releaf_button" do
|
60
|
-
allow(subject.template).to receive(:releaf_button).with("x", a: "y", b: "z").and_return("xx")
|
61
|
-
expect(subject.button("x", a: "y", b: "z")).to eq("xx")
|
62
|
-
end
|
63
|
-
|
64
|
-
describe "#icon" do
|
65
|
-
it "returns template fa_icon output" do
|
66
|
-
expect(subject.icon("check")).to eq('<i class="fa fa-check"></i>')
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe "#tag" do
|
71
|
-
context "when block is not given" do
|
72
|
-
context "when passing string as content" do
|
73
|
-
let(:output) do
|
74
|
-
subject.tag(:span, "<p>x</p>", class: "red")
|
75
|
-
end
|
76
|
-
|
77
|
-
it "returns an instance of ActiveSupport::SafeBuffer" do
|
78
|
-
expect( output ).to be_a ActiveSupport::SafeBuffer
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
it "passes all arguments to template #content_tag method and returns properly escaped result" do
|
83
|
-
expect( output ).to eq('<span class="red"><p>x</p></span>')
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
context "when passing safe buffer as content" do
|
88
|
-
let(:output) do
|
89
|
-
subject.tag(:span, ActiveSupport::SafeBuffer.new("<p>x</p>"), class: "red")
|
90
|
-
end
|
91
|
-
|
92
|
-
it "returns an instance of ActiveSupport::SafeBuffer" do
|
93
|
-
expect( output ).to be_a ActiveSupport::SafeBuffer
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
it "passes all arguments to template #content_tag method and returns properly escaped result" do
|
98
|
-
expect( output ).to eq('<span class="red"><p>x</p></span>')
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
end
|
103
|
-
|
104
|
-
context "when block is given" do
|
105
|
-
context "when block evaluates to array" do
|
106
|
-
let(:content) do
|
107
|
-
[
|
108
|
-
'<p>foo</p>',
|
109
|
-
'bar',
|
110
|
-
ActiveSupport::SafeBuffer.new('<p>baz</p>')
|
111
|
-
]
|
112
|
-
end
|
113
|
-
|
114
|
-
let(:output) do
|
115
|
-
subject.tag(:div, class: 'important') { content }
|
116
|
-
end
|
117
|
-
|
118
|
-
it "returns an instance of ActiveSupport::SafeBuffer" do
|
119
|
-
expect( output ).to be_a ActiveSupport::SafeBuffer
|
120
|
-
end
|
121
|
-
|
122
|
-
it "safely joins array" do
|
123
|
-
expect( template ).to receive(:safe_join).with(content).and_call_original
|
124
|
-
output
|
125
|
-
end
|
126
|
-
|
127
|
-
it "passes joined result to #template#content_tag as content" do
|
128
|
-
allow( template ).to receive(:safe_join).with(content).and_return('super duper')
|
129
|
-
expect( output ).to eq('<div class="important">super duper</div>')
|
130
|
-
end
|
131
|
-
|
132
|
-
it "returns properly escaped result" do
|
133
|
-
expect( output ).to eq('<div class="important"><p>foo</p>bar<p>baz</p></div>')
|
134
|
-
end
|
135
|
-
|
136
|
-
end
|
137
|
-
|
138
|
-
context "when block evaluates to other than array" do
|
139
|
-
let(:output) do
|
140
|
-
subject.tag(:div, class: 'important') { '<p>content</p>' }
|
141
|
-
end
|
142
|
-
|
143
|
-
it "returns an instance of ActiveSupport::SafeBuffer" do
|
144
|
-
expect( output ).to be_a ActiveSupport::SafeBuffer
|
145
|
-
end
|
146
|
-
|
147
|
-
it "doesn't call #template#safe_join" do
|
148
|
-
expect( template ).to_not receive(:safe_join)
|
149
|
-
output
|
150
|
-
end
|
151
|
-
|
152
|
-
it "keeps safe buffer unmodified and pass to #template#content_tag as content which won't be escaped" do
|
153
|
-
expect( subject.tag(:div, class: 'important') { ActiveSupport::SafeBuffer.new('<p>content</p>') } ).to eq '<div class="important"><p>content</p></div>'
|
154
|
-
end
|
155
|
-
|
156
|
-
it "passes block result to #template#content_tag as content which will be escaped" do
|
157
|
-
expect( output ).to eq '<div class="important"><p>content</p></div>'
|
158
|
-
end
|
159
|
-
|
160
|
-
it "casts block result to string" do
|
161
|
-
expect( subject.tag(:div, class: 'important') { 1 } ).to eq '<div class="important">1</div>'
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
describe "#wrapper" do
|
168
|
-
context "when block is given" do
|
169
|
-
let(:output) do
|
170
|
-
subject.wrapper(class: 'c') do
|
171
|
-
'<span class="a">b</span>'.html_safe
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
it "wrapps given content within div element with given attributes" do
|
176
|
-
expect(output).to eq('<div class="c"><span class="a">b</span></div>')
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
context "when block is not given" do
|
181
|
-
it "wrapps given content within div element with given attributes" do
|
182
|
-
expect(subject.wrapper('<span class="a">b</span>'.html_safe, class: "c")).to eq('<div class="c"><span class="a">b</span></div>')
|
183
|
-
end
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
|
-
describe "#template_variable" do
|
188
|
-
it "returns template instance variable value for given key" do
|
189
|
-
template.instance_variable_set("@test", "xx")
|
190
|
-
expect(subject.template_variable("test")).to eq("xx")
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
describe "#safe_join" do
|
195
|
-
let(:content) do
|
196
|
-
['foo', '<p>bar</p>', ActiveSupport::SafeBuffer.new('<p>baz</p>')]
|
197
|
-
end
|
198
|
-
|
199
|
-
let(:output) do
|
200
|
-
subject.safe_join { content }
|
201
|
-
end
|
202
|
-
|
203
|
-
it "returns an instance of ActiveSupport::SafeBuffer" do
|
204
|
-
expect( output ).to be_a ActiveSupport::SafeBuffer
|
205
|
-
end
|
206
|
-
|
207
|
-
it "passes block result to #template#safe_join" do
|
208
|
-
expect( template ).to receive(:safe_join).with(content).and_call_original
|
209
|
-
output
|
210
|
-
end
|
211
|
-
|
212
|
-
it "returns correctly escaped result" do
|
213
|
-
expect( output ).to eq 'foo<p>bar</p><p>baz</p>'
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
describe "#t" do
|
218
|
-
before do
|
219
|
-
allow(subject).to receive(:default_translation_scope).and_return("_default_scope_")
|
220
|
-
end
|
221
|
-
|
222
|
-
it "passes all arguments to I18n.t and returns translation" do
|
223
|
-
allow(I18n).to receive(:t).with("x", default: "y", scope: "z").and_return("translated value")
|
224
|
-
expect(subject.t("x", default: "y", scope: "z")).to eq("translated value")
|
225
|
-
end
|
226
|
-
|
227
|
-
context "when :scope option passed" do
|
228
|
-
it "uses default translation scope controller translation scope" do
|
229
|
-
expect(I18n).to receive(:t).with("x", scope: "zzz").and_return("asd")
|
230
|
-
subject.t("x", scope: "zzz")
|
231
|
-
end
|
232
|
-
end
|
233
|
-
|
234
|
-
context "when no :scope option passed" do
|
235
|
-
it "adds controller translation scope" do
|
236
|
-
expect(I18n).to receive(:t).with("x", scope: "_default_scope_").and_return("asd")
|
237
|
-
subject.t("x")
|
238
|
-
end
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
describe "#translate_locale" do
|
243
|
-
it "returns translated locale within `locales` scope" do
|
244
|
-
allow(subject).to receive(:t).with("de", scope: "locales").and_return("dzerman")
|
245
|
-
expect(subject.translate_locale("de")).to eq("dzerman")
|
246
|
-
end
|
247
|
-
end
|
248
|
-
|
249
|
-
describe "#locale_options" do
|
250
|
-
it "returns array with translated locales usable for rails options helper" do
|
251
|
-
allow(subject).to receive(:t).with("de", scope: "locales").and_return("dzerman")
|
252
|
-
allow(subject).to receive(:t).with("lv", scope: "locales").and_return("latvian")
|
253
|
-
expect(subject.locale_options(["de", "lv"])).to eq([["dzerman", "de"], ["latvian", "lv"]])
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
|
-
describe "#resource_title" do
|
258
|
-
it "pass given resource to Releaf::ResourceBase.title and return result" do
|
259
|
-
allow(Releaf::ResourceBase).to receive(:title).with("x").and_return("ljhg")
|
260
|
-
expect(subject.resource_title("x")).to eq("ljhg")
|
261
|
-
end
|
262
|
-
end
|
263
|
-
|
264
|
-
describe "#default_translation_scope" do
|
265
|
-
it "returns controller scope" do
|
266
|
-
controller = Releaf::ActionController.new
|
267
|
-
allow(subject).to receive(:controller).and_return(controller)
|
268
|
-
allow(controller).to receive(:controller_scope_name).and_return("x")
|
269
|
-
expect(subject.default_translation_scope).to eq("x")
|
270
|
-
end
|
271
|
-
end
|
272
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Builders::Collection, type: :module do
|
4
|
-
class CollectionIncluder
|
5
|
-
include Releaf::Builders::Base
|
6
|
-
include Releaf::Builders::Template
|
7
|
-
include Releaf::Builders::Collection
|
8
|
-
end
|
9
|
-
class CollectionTestHelper < ActionView::Base
|
10
|
-
end
|
11
|
-
|
12
|
-
it "it assigns template collection instance variable to instance 'collection' accessor on initialization" do
|
13
|
-
template = CollectionTestHelper.new
|
14
|
-
template.instance_variable_set("@collection", "x")
|
15
|
-
subject = CollectionIncluder.new(template)
|
16
|
-
expect(subject.collection).to eq("x")
|
17
|
-
end
|
18
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
require "rails_helper"
|
2
|
-
|
3
|
-
describe Releaf::Builders::ConfirmDestroyDialogBuilder, type: :class do
|
4
|
-
class ConfirmDestroyDialogTestHelper < ActionView::Base
|
5
|
-
include FontAwesome::Rails::IconHelper
|
6
|
-
include Releaf::ButtonHelper
|
7
|
-
include Releaf::ApplicationHelper
|
8
|
-
|
9
|
-
def protect_against_forgery?
|
10
|
-
true
|
11
|
-
end
|
12
|
-
|
13
|
-
def form_authenticity_token
|
14
|
-
"xxx"
|
15
|
-
end
|
16
|
-
|
17
|
-
def request_forgery_protection_token
|
18
|
-
"yyy"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
let(:template){ ConfirmDestroyDialogTestHelper.new }
|
23
|
-
let(:object){ Book.new(id: 99, title: "book title") }
|
24
|
-
let(:subject){ described_class.new(template) }
|
25
|
-
|
26
|
-
before do
|
27
|
-
subject.resource = object
|
28
|
-
allow(subject.template).to receive(:controller).and_return(Releaf::ActionController.new)
|
29
|
-
allow(subject.controller).to receive(:index_path).and_return("y")
|
30
|
-
end
|
31
|
-
|
32
|
-
describe "#question_content" do
|
33
|
-
it "localized destroy question" do
|
34
|
-
allow(subject).to receive(:t).with("Do you want to delete the following object?").and_return("xx")
|
35
|
-
expect(subject.question_content).to eq("xx")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
describe "#description_content" do
|
40
|
-
it "returns `resource_title` value" do
|
41
|
-
allow(subject).to receive(:resource_title).with(object).and_return("xx")
|
42
|
-
expect(subject.description_content).to eq("xx")
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
describe "#section_body" do
|
47
|
-
it "returns destroy description content" do
|
48
|
-
content = '<div class="body"><i class="fa fa-trash-o"></i><div class="question">Do you want to delete the following object?</div><div class="description">book title</div></div>'
|
49
|
-
expect(subject.section_body).to eq(content)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe "#confirm_method" do
|
54
|
-
it "returns :delete" do
|
55
|
-
expect(subject.confirm_method).to eq(:delete)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
describe "#icon_name" do
|
60
|
-
it "returns trash icon" do
|
61
|
-
expect(subject.icon_name).to eq("trash-o")
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
describe "#confirm_url" do
|
66
|
-
it "returns resource destroy url" do
|
67
|
-
allow(subject.template).to receive(:url_for).with(action: 'destroy', id: 99, index_path: "y").and_return("x")
|
68
|
-
expect(subject.confirm_url).to eq("x")
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|