integral 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +105 -0
- data/Rakefile +22 -0
- data/app/assets/images/integral/backend/data-unavailable.png +0 -0
- data/app/assets/images/integral/backend/logo.png +0 -0
- data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
- data/app/assets/images/integral/defaults/user_avatar.jpg +0 -0
- data/app/assets/images/integral/image-not-set.png +0 -0
- data/app/assets/images/integral/posts-hero-banner.jpg +0 -0
- data/app/assets/javascripts/ckeditor/loader.js.erb +6 -0
- data/app/assets/javascripts/ckeditor/my_config.js.erb +154 -0
- data/app/assets/javascripts/ckeditor/my_contents.sass +22 -0
- data/app/assets/javascripts/ckeditor/my_javascript.js +12 -0
- data/app/assets/javascripts/ckeditor/my_styles.js +5 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/az.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/bg.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ca.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/cs.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/da.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/de-ch.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/de.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/el.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/en-au.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/en.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/eo.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/es-mx.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/es.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/eu.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/fr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/gl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/hr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/hu.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/it.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ja.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/km.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ko.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ku.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/mk.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/nb.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/nl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/oc.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pt-br.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/pt.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ro.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ru.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sk.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sq.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/sv.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/tr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/ug.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/uk.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/vi.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/zh-cn.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/zh.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +218 -0
- data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +232 -0
- data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +102 -0
- data/app/assets/javascripts/ckeditor/plugins/autolink/plugin.js +69 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +6 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +1311 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +41 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +39 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +32 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +5 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +74 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +38 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +38 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/bespin.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +32 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +25 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +40 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +35 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +36 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +23 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +13 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/hopscotch.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +43 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/isotope.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +47 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +53 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +37 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +46 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +43 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +36 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +12 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +43 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +27 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +85 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +38 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +38 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +52 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/railscasts.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +25 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +44 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +168 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +30 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +38 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +64 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +32 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +53 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +43 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +44 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
- data/app/assets/javascripts/ckeditor/plugins/embed/icons/embed.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/embed/icons/hidpi/embed.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/embed/plugin.js +105 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/dialogs/embedbase.js +99 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/az.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/bg.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ca.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/cs.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/da.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/de-ch.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/de.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/en-au.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/en.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/eo.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/es-mx.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/es.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/eu.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/fr.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/gl.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/hr.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/hu.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/id.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/it.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ja.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ko.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ku.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/nb.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/nl.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/oc.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pl.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pt-br.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/pt.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ro.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ru.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sk.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sq.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/sv.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/tr.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ug.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/uk.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/zh-cn.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/zh.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +652 -0
- data/app/assets/javascripts/ckeditor/plugins/embedjs/plugin.js +110 -0
- data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +172 -0
- data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +285 -0
- data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +1018 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
- data/app/assets/javascripts/ckeditor/plugins/notificationaggregator/plugin.js +548 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +60 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +49 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/icons/hidpi/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/icons/placeholder.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +99 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +75 -0
- data/app/assets/javascripts/ckeditor/plugins/strinsert/README.md +76 -0
- data/app/assets/javascripts/ckeditor/plugins/strinsert/bower.json +16 -0
- data/app/assets/javascripts/ckeditor/plugins/strinsert/plugin.js +107 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/contents.css +23 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/sample.jpg +0 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/contents.css +36 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +51 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/icons/simplebox.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +114 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +131 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +134 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +144 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/images/handle.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +4147 -0
- data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +366 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +3 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +11 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +10 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +9 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +407 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcount.html +61 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +110 -0
- data/app/assets/javascripts/integral/backend.js +268 -0
- data/app/assets/javascripts/integral/backend/extensions.js +1 -0
- data/app/assets/javascripts/integral/backend/support/Chart.bundle.min.js +10 -0
- data/app/assets/javascripts/integral/frontend.js +60 -0
- data/app/assets/javascripts/integral/support/character_counter.js +67 -0
- data/app/assets/javascripts/integral/support/chart_manager.coffee +145 -0
- data/app/assets/javascripts/integral/support/click_to_copy.coffee +28 -0
- data/app/assets/javascripts/integral/support/confirm_modal.coffee +58 -0
- data/app/assets/javascripts/integral/support/date_picker.coffee +83 -0
- data/app/assets/javascripts/integral/support/date_picker/picker.date.js +1435 -0
- data/app/assets/javascripts/integral/support/date_picker/picker.js +1132 -0
- data/app/assets/javascripts/integral/support/gallery.coffee +82 -0
- data/app/assets/javascripts/integral/support/google_analytics.coffee +23 -0
- data/app/assets/javascripts/integral/support/grid.coffee +92 -0
- data/app/assets/javascripts/integral/support/header_anchors.coffee +22 -0
- data/app/assets/javascripts/integral/support/image-preview.coffee +14 -0
- data/app/assets/javascripts/integral/support/image_selector.coffee +43 -0
- data/app/assets/javascripts/integral/support/image_uploader.coffee +59 -0
- data/app/assets/javascripts/integral/support/lib/html.sortable.js +691 -0
- data/app/assets/javascripts/integral/support/lib/jquery.are-you-sure.js +231 -0
- data/app/assets/javascripts/integral/support/lib/jquery_form.js +11 -0
- data/app/assets/javascripts/integral/support/lib/js.cookie.js +165 -0
- data/app/assets/javascripts/integral/support/lib/materialize-tags.js +758 -0
- data/app/assets/javascripts/integral/support/lib/materialize.clockpicker.js +699 -0
- data/app/assets/javascripts/integral/support/lib/swiper.js +7719 -0
- data/app/assets/javascripts/integral/support/lib/typeahead.js +2451 -0
- data/app/assets/javascripts/integral/support/lib/underscore.js +6 -0
- data/app/assets/javascripts/integral/support/list.coffee +71 -0
- data/app/assets/javascripts/integral/support/list_item.coffee +249 -0
- data/app/assets/javascripts/integral/support/notification_manager.coffee +17 -0
- data/app/assets/javascripts/integral/support/record_selector.coffee +161 -0
- data/app/assets/javascripts/integral/support/remote_form.coffee +87 -0
- data/app/assets/javascripts/integral/support/responsive_swiper.coffee +26 -0
- data/app/assets/javascripts/integral/support/scroll_to_top.coffee +17 -0
- data/app/assets/javascripts/integral/support/slug_generator.coffee +49 -0
- data/app/assets/stylesheets/errors.css +1834 -0
- data/app/assets/stylesheets/integral/backend.sass +66 -0
- data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +867 -0
- data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +491 -0
- data/app/assets/stylesheets/integral/backend/devise.sass +40 -0
- data/app/assets/stylesheets/integral/backend/foundation_and_overrides.scss +56 -0
- data/app/assets/stylesheets/integral/backend/materialize-tags.sass +70 -0
- data/app/assets/stylesheets/integral/backend/notifications.sass +43 -0
- data/app/assets/stylesheets/integral/backend/overrides.sass +1 -0
- data/app/assets/stylesheets/integral/backend/shared.sass +770 -0
- data/app/assets/stylesheets/integral/emails.scss +19 -0
- data/app/assets/stylesheets/integral/emails/colors.sass +3 -0
- data/app/assets/stylesheets/integral/frontend.sass +26 -0
- data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +863 -0
- data/app/assets/stylesheets/integral/frontend/blog.sass +263 -0
- data/app/assets/stylesheets/integral/frontend/demo.sass +158 -0
- data/app/assets/stylesheets/integral/frontend/foundation_and_overrides.scss +56 -0
- data/app/assets/stylesheets/integral/frontend/layout.sass +66 -0
- data/app/assets/stylesheets/integral/frontend/overrides.sass +1 -0
- data/app/assets/stylesheets/integral/frontend/share_modal.sass +25 -0
- data/app/assets/stylesheets/integral/frontend/shared.sass +73 -0
- data/app/assets/stylesheets/integral/support/date-picker.scss +16 -0
- data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +452 -0
- data/app/assets/stylesheets/integral/support/date_picker/_default.scss +201 -0
- data/app/assets/stylesheets/integral/support/date_picker/_default.time.scss +125 -0
- data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +220 -0
- data/app/assets/stylesheets/integral/support/gallery.sass +54 -0
- data/app/assets/stylesheets/integral/support/media-query-indicator.sass +25 -0
- data/app/assets/stylesheets/integral/support/mixins.sass +29 -0
- data/app/assets/stylesheets/integral/support/scroll-to-top.sass +19 -0
- data/app/assets/stylesheets/integral/support/swiper.css +618 -0
- data/app/assets/stylesheets/integral/wysiwyg.sass +13 -0
- data/app/controllers/integral/application_controller.rb +130 -0
- data/app/controllers/integral/backend/activities_controller.rb +55 -0
- data/app/controllers/integral/backend/base_controller.rb +123 -0
- data/app/controllers/integral/backend/images_controller.rb +120 -0
- data/app/controllers/integral/backend/lists_controller.rb +138 -0
- data/app/controllers/integral/backend/pages_controller.rb +142 -0
- data/app/controllers/integral/backend/posts_controller.rb +132 -0
- data/app/controllers/integral/backend/settings_controller.rb +53 -0
- data/app/controllers/integral/backend/static_pages_controller.rb +10 -0
- data/app/controllers/integral/backend/users_controller.rb +130 -0
- data/app/controllers/integral/blog_controller.rb +19 -0
- data/app/controllers/integral/contact_controller.rb +36 -0
- data/app/controllers/integral/pages_controller.rb +45 -0
- data/app/controllers/integral/posts_controller.rb +71 -0
- data/app/controllers/integral/tags_controller.rb +38 -0
- data/app/decorators/integral/image_decorator.rb +16 -0
- data/app/decorators/integral/list_decorator.rb +21 -0
- data/app/decorators/integral/page_decorator.rb +26 -0
- data/app/decorators/integral/post_decorator.rb +63 -0
- data/app/decorators/integral/user_decorator.rb +21 -0
- data/app/decorators/integral/version_decorator.rb +57 -0
- data/app/helpers/integral/application_helper.rb +52 -0
- data/app/helpers/integral/backend/base_helper.rb +72 -0
- data/app/helpers/integral/blog_helper.rb +26 -0
- data/app/helpers/integral/gallery_helper.rb +36 -0
- data/app/helpers/integral/mail_helper.rb +16 -0
- data/app/helpers/integral/social_helper.rb +123 -0
- data/app/helpers/integral/support_helper.rb +60 -0
- data/app/jobs/integral/application_job.rb +10 -0
- data/app/jobs/integral/newsletter_signup_job.rb +28 -0
- data/app/mailers/integral/contact_mailer.rb +56 -0
- data/app/models/ckeditor/asset.rb +8 -0
- data/app/models/ckeditor/attachment_file.rb +9 -0
- data/app/models/ckeditor/picture.rb +21 -0
- data/app/models/integral/application_record.rb +6 -0
- data/app/models/integral/basic.rb +11 -0
- data/app/models/integral/enquiry.rb +46 -0
- data/app/models/integral/image.rb +67 -0
- data/app/models/integral/image_version.rb +8 -0
- data/app/models/integral/link.rb +11 -0
- data/app/models/integral/list.rb +69 -0
- data/app/models/integral/list_item.rb +89 -0
- data/app/models/integral/list_version.rb +8 -0
- data/app/models/integral/newsletter_signup.rb +22 -0
- data/app/models/integral/object.rb +30 -0
- data/app/models/integral/page.rb +153 -0
- data/app/models/integral/page_version.rb +8 -0
- data/app/models/integral/post.rb +149 -0
- data/app/models/integral/post_version.rb +8 -0
- data/app/models/integral/post_viewing.rb +19 -0
- data/app/models/integral/role.rb +14 -0
- data/app/models/integral/role_assignment.rb +7 -0
- data/app/models/integral/settings.rb +5 -0
- data/app/models/integral/user.rb +59 -0
- data/app/models/integral/user_version.rb +8 -0
- data/app/models/integral/version.rb +31 -0
- data/app/models/paper_trail/version.rb +9 -0
- data/app/policies/integral/base_policy.rb +50 -0
- data/app/policies/integral/image_policy.rb +14 -0
- data/app/policies/integral/list_policy.rb +9 -0
- data/app/policies/integral/page_policy.rb +45 -0
- data/app/policies/integral/post_policy.rb +9 -0
- data/app/policies/integral/settings_policy.rb +17 -0
- data/app/policies/integral/user_policy.rb +17 -0
- data/app/policies/integral/version_policy.rb +19 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +34 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +55 -0
- data/app/uploaders/integral/avatar_uploader.rb +9 -0
- data/app/uploaders/integral/image_uploader.rb +114 -0
- data/app/views/devise/invitations/edit.haml +17 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/invitation_instructions.html.erb +13 -0
- data/app/views/devise/mailer/invitation_instructions.text.erb +12 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.haml +17 -0
- data/app/views/devise/passwords/new.haml +12 -0
- data/app/views/devise/sessions/new.haml +18 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/integral/backend/activities/_grid.haml +23 -0
- data/app/views/integral/backend/activities/index.haml +15 -0
- data/app/views/integral/backend/activities/shared/_grid.haml +20 -0
- data/app/views/integral/backend/activities/shared/_listing.haml +14 -0
- data/app/views/integral/backend/activities/shared/_log.haml +56 -0
- data/app/views/integral/backend/activities/show.haml +18 -0
- data/app/views/integral/backend/images/_create_modal.haml +17 -0
- data/app/views/integral/backend/images/_form.haml +41 -0
- data/app/views/integral/backend/images/_grid.haml +16 -0
- data/app/views/integral/backend/images/edit.haml +3 -0
- data/app/views/integral/backend/images/index.haml +18 -0
- data/app/views/integral/backend/images/new.haml +1 -0
- data/app/views/integral/backend/lists/_child_fields.haml +26 -0
- data/app/views/integral/backend/lists/_form.haml +25 -0
- data/app/views/integral/backend/lists/_grid.haml +16 -0
- data/app/views/integral/backend/lists/_item_container.haml +26 -0
- data/app/views/integral/backend/lists/_item_modal.haml +46 -0
- data/app/views/integral/backend/lists/_list_item_fields.haml +26 -0
- data/app/views/integral/backend/lists/_manager.haml +14 -0
- data/app/views/integral/backend/lists/edit.haml +2 -0
- data/app/views/integral/backend/lists/index.haml +18 -0
- data/app/views/integral/backend/lists/new.haml +1 -0
- data/app/views/integral/backend/lists/show.haml +26 -0
- data/app/views/integral/backend/pages/_form.haml +52 -0
- data/app/views/integral/backend/pages/_grid.haml +21 -0
- data/app/views/integral/backend/pages/activities.haml +2 -0
- data/app/views/integral/backend/pages/activity.haml +1 -0
- data/app/views/integral/backend/pages/edit.html.haml +15 -0
- data/app/views/integral/backend/pages/index.haml +22 -0
- data/app/views/integral/backend/pages/new.haml +2 -0
- data/app/views/integral/backend/posts/_form.haml +57 -0
- data/app/views/integral/backend/posts/_grid.haml +25 -0
- data/app/views/integral/backend/posts/activities.haml +3 -0
- data/app/views/integral/backend/posts/activity.haml +1 -0
- data/app/views/integral/backend/posts/edit.haml +16 -0
- data/app/views/integral/backend/posts/index.haml +20 -0
- data/app/views/integral/backend/posts/new.haml +2 -0
- data/app/views/integral/backend/settings/_input.haml +4 -0
- data/app/views/integral/backend/settings/_section.haml +11 -0
- data/app/views/integral/backend/settings/index.haml +10 -0
- data/app/views/integral/backend/settings/sections/_general.haml +12 -0
- data/app/views/integral/backend/settings/sections/_lists.haml +4 -0
- data/app/views/integral/backend/settings/sections/_seo.haml +8 -0
- data/app/views/integral/backend/settings/sections/_social.haml +16 -0
- data/app/views/integral/backend/shared/_breadcrumbs.haml +9 -0
- data/app/views/integral/backend/shared/_empty_grid.haml +7 -0
- data/app/views/integral/backend/shared/_grid.haml +18 -0
- data/app/views/integral/backend/shared/_image_preview.haml +23 -0
- data/app/views/integral/backend/shared/_image_selector.haml +4 -0
- data/app/views/integral/backend/shared/_pagination.haml +1 -0
- data/app/views/integral/backend/shared/cards/_at_a_glance.haml +5 -0
- data/app/views/integral/backend/shared/cards/_welcome.haml +29 -0
- data/app/views/integral/backend/shared/graphs/_donut.haml +5 -0
- data/app/views/integral/backend/shared/graphs/_line.haml +5 -0
- data/app/views/integral/backend/shared/graphs/_no_data_available.haml +2 -0
- data/app/views/integral/backend/shared/record_selector/_collection.haml +13 -0
- data/app/views/integral/backend/shared/record_selector/_modal.haml +42 -0
- data/app/views/integral/backend/shared/record_selector/_record.haml +6 -0
- data/app/views/integral/backend/static_pages/_card.haml +24 -0
- data/app/views/integral/backend/static_pages/dashboard.haml +20 -0
- data/app/views/integral/backend/users/_form.haml +58 -0
- data/app/views/integral/backend/users/_grid.haml +19 -0
- data/app/views/integral/backend/users/edit.haml +3 -0
- data/app/views/integral/backend/users/index.haml +18 -0
- data/app/views/integral/backend/users/new.haml +2 -0
- data/app/views/integral/backend/users/show.haml +36 -0
- data/app/views/integral/contact_mailer/auto_reply.html.haml +16 -0
- data/app/views/integral/contact_mailer/auto_reply.text.erb +15 -0
- data/app/views/integral/contact_mailer/forward_enquiry.haml +12 -0
- data/app/views/integral/contact_mailer/forward_enquiry.text.erb +9 -0
- data/app/views/integral/pages/_demo.haml +188 -0
- data/app/views/integral/pages/templates/default.haml +6 -0
- data/app/views/integral/posts/_item.haml +16 -0
- data/app/views/integral/posts/index.haml +6 -0
- data/app/views/integral/posts/templates/default.haml +38 -0
- data/app/views/integral/shared/_blog_layout.haml +15 -0
- data/app/views/integral/shared/_blog_sidebar.haml +49 -0
- data/app/views/integral/shared/_breadcrumbs.haml +5 -0
- data/app/views/integral/shared/_media_query_indicator.haml +2 -0
- data/app/views/integral/shared/_scroll_to_top.haml +3 -0
- data/app/views/integral/shared/_share_modal.haml +20 -0
- data/app/views/integral/shared/_social_list_items.haml +41 -0
- data/app/views/integral/shared/_swiper_layout.haml +20 -0
- data/app/views/integral/shared/gallery/_placeholder.haml +7 -0
- data/app/views/integral/shared/gallery/_slide.haml +5 -0
- data/app/views/integral/shared/gallery/_thumb_slide.haml +2 -0
- data/app/views/integral/shared/gallery/gallery.haml +7 -0
- data/app/views/integral/tags/index.haml +6 -0
- data/app/views/integral/tags/show.haml +6 -0
- data/app/views/layouts/error.haml +12 -0
- data/app/views/layouts/integral/backend.html.haml +93 -0
- data/app/views/layouts/integral/backend/_create_dropdown.haml +30 -0
- data/app/views/layouts/integral/backend/_head.html.haml +17 -0
- data/app/views/layouts/integral/backend/_main_menu_items.haml +91 -0
- data/app/views/layouts/integral/frontend.html.haml +36 -0
- data/app/views/layouts/integral/frontend/_admin_bar.haml +25 -0
- data/app/views/layouts/integral/frontend/_footer.haml +23 -0
- data/app/views/layouts/integral/frontend/_header.haml +12 -0
- data/app/views/layouts/integral/login.haml +8 -0
- data/app/views/layouts/integral/mailer.html.inky-haml +17 -0
- data/app/views/layouts/integral/mailer/_footer.html.inky-haml +11 -0
- data/app/views/layouts/integral/mailer/_header.html.inky-haml +7 -0
- data/config/initializers/acts_as_taggable_on.rb +6 -0
- data/config/initializers/ckeditor.rb +51 -0
- data/config/initializers/client_side_validations.rb +20 -0
- data/config/initializers/compression.rb +46 -0
- data/config/initializers/devise.rb +308 -0
- data/config/initializers/extensions/ckeditor.rb +31 -0
- data/config/initializers/friendly_id.rb +88 -0
- data/config/initializers/gaffe.rb +3 -0
- data/config/initializers/simple_form.rb +169 -0
- data/config/initializers/simple_form/length_component.rb +36 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/locales/devise_invitable.en.yml +31 -0
- data/config/locales/en.yml +477 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20160129021044_devise_create_integral_users.rb +42 -0
- data/db/migrate/20160130051535_add_name_and_avatar_to_users.rb +6 -0
- data/db/migrate/20160201003936_add_roles.rb +13 -0
- data/db/migrate/20160302071241_create_integral_images.rb +13 -0
- data/db/migrate/20160311092506_create_ckeditor_assets.rb +26 -0
- data/db/migrate/20160318004136_create_integral_pages.rb +12 -0
- data/db/migrate/20160513033619_create_integral_posts.rb +12 -0
- data/db/migrate/20160514063048_add_slug_column_to_post.rb +6 -0
- data/db/migrate/20160516084702_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
- data/db/migrate/20160516084703_add_missing_unique_indices.acts_as_taggable_on_engine.rb +20 -0
- data/db/migrate/20160516084704_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +15 -0
- data/db/migrate/20160516084705_add_missing_taggable_index.acts_as_taggable_on_engine.rb +10 -0
- data/db/migrate/20160516084706_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +10 -0
- data/db/migrate/20160519005736_add_image_to_posts.rb +5 -0
- data/db/migrate/20160519053329_create_friendly_id_slugs.rb +15 -0
- data/db/migrate/20160610021858_add_view_count_to_posts.rb +5 -0
- data/db/migrate/20160613035508_add_drafting_to_posts.rb +6 -0
- data/db/migrate/20160628050006_create_integral_post_viewings.rb +10 -0
- data/db/migrate/20160718011218_add_locale_to_integral_users.rb +5 -0
- data/db/migrate/20160722100113_devise_invitable_add_to_integral_users.rb +23 -0
- data/db/migrate/20160809115906_add_drafting_to_pages.rb +5 -0
- data/db/migrate/20160909124940_add_deleted_at_to_objects.rb +15 -0
- data/db/migrate/20161014175823_create_lists.rb +31 -0
- data/db/migrate/20161102094859_create_settings.rb +18 -0
- data/db/migrate/20170215012231_add_templates_to_pages.rb +5 -0
- data/db/migrate/20170425091312_add_image_processing_fields.rb +7 -0
- data/db/migrate/20170516033523_add_timestamps_to_lists.rb +6 -0
- data/db/migrate/20170608131624_add_file_size_to_images.rb +5 -0
- data/db/migrate/20170801182434_add_parent_to_pages.rb +5 -0
- data/db/migrate/20170922201940_add_image_id_to_posts.rb +9 -0
- data/db/migrate/20171008193414_create_post_versions.rb +21 -0
- data/db/migrate/20171030215146_create_page_versions.rb +20 -0
- data/db/migrate/20171030215154_create_user_versions.rb +20 -0
- data/db/migrate/20171030215202_create_list_versions.rb +20 -0
- data/db/migrate/20171123155010_create_integral_enquiries.rb +13 -0
- data/db/migrate/20171127141132_add_deleted_at_to_lists.rb +6 -0
- data/db/migrate/20171230213848_add_image_to_pages.rb +6 -0
- data/db/migrate/20180202010010_add_lock_version_to_integral_objects.rb +9 -0
- data/db/migrate/20180202010020_create_image_versions.rb +20 -0
- data/db/migrate/20180207174914_add_fields_to_lists.rb +7 -0
- data/db/migrate/20180223232512_create_integral_newsletter_signups.rb +11 -0
- data/db/migrate/20180306204912_add_admin_to_integral_users.rb +5 -0
- data/db/migrate/20180326224500_add_processed_to_enquiries_and_newsletters.rb +6 -0
- data/db/migrate/20180509101917_add_context_to_enquiries.rb +6 -0
- data/db/migrate/20180920030236_update_posts_and_pages_null.rb +6 -0
- data/db/migrate/20181011234446_add_preview_image_to_posts.rb +6 -0
- data/db/seeds.rb +53 -0
- data/lib/generators/integral/install_generator.rb +19 -0
- data/lib/generators/templates/app.yml +24 -0
- data/lib/generators/templates/carrierwave.rb +35 -0
- data/lib/generators/templates/carrierwave_backgrounder.rb +11 -0
- data/lib/generators/templates/integral.rb +129 -0
- data/lib/generators/templates/sitemap.rb +41 -0
- data/lib/integral.rb +155 -0
- data/lib/integral/acts_as_listable.rb +45 -0
- data/lib/integral/button_link_renderer.rb +54 -0
- data/lib/integral/chart_renderer/base.rb +80 -0
- data/lib/integral/chart_renderer/donut.rb +21 -0
- data/lib/integral/chart_renderer/line.rb +24 -0
- data/lib/integral/content_renderer.rb +78 -0
- data/lib/integral/engine.rb +124 -0
- data/lib/integral/foundation_builder.rb +33 -0
- data/lib/integral/google_tag_manager.rb +33 -0
- data/lib/integral/grids/activities_grid.rb +37 -0
- data/lib/integral/grids/images_grid.rb +21 -0
- data/lib/integral/grids/lists_grid.rb +21 -0
- data/lib/integral/grids/pages_grid.rb +27 -0
- data/lib/integral/grids/posts_grid.rb +32 -0
- data/lib/integral/grids/users_grid.rb +22 -0
- data/lib/integral/list_item_renderer.rb +204 -0
- data/lib/integral/list_renderer.rb +91 -0
- data/lib/integral/middleware/page_router.rb +84 -0
- data/lib/integral/partial_list_item_renderer.rb +40 -0
- data/lib/integral/router.rb +106 -0
- data/lib/integral/slack_bot.rb +45 -0
- data/lib/integral/swiper_list_renderer.rb +30 -0
- data/lib/integral/version.rb +5 -0
- data/lib/integral/widgets/recent_posts.rb +41 -0
- data/lib/integral/widgets/swiper_list.rb +40 -0
- data/lib/tasks/integral_tasks.rake +57 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/spec/factories.rb +114 -0
- data/spec/support/image.jpg +0 -0
- metadata +1734 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'pt', {
|
|
6
|
+
pathName: 'objeto de media',
|
|
7
|
+
title: 'Embeber media',
|
|
8
|
+
button: 'Insert Media Embed', // MISSING
|
|
9
|
+
unsupportedUrlGiven: 'O URL especificado não é suportado.',
|
|
10
|
+
unsupportedUrl: 'The URL {url} is not supported by Media Embed.', // MISSING
|
|
11
|
+
fetchingFailedGiven: 'Failed to fetch content for the given URL.', // MISSING
|
|
12
|
+
fetchingFailed: 'Failed to fetch content for {url}.', // MISSING
|
|
13
|
+
fetchingOne: 'Fetching oEmbed response...', // MISSING
|
|
14
|
+
fetchingMany: 'Fetching oEmbed responses, {current} of {max} done...' // MISSING
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'ro', {
|
|
6
|
+
pathName: 'obiect multimedia',
|
|
7
|
+
title: 'Încorporare obiect multimedia',
|
|
8
|
+
button: 'Inserare încorporare multimedia',
|
|
9
|
+
unsupportedUrlGiven: 'URL-ul specificat nu este suportat.',
|
|
10
|
+
unsupportedUrl: 'URL-ul {url} nu este suportat de funcția încorporare multimedia.',
|
|
11
|
+
fetchingFailedGiven: 'Nu s-a putut citi conținutul pentru URL-ul specificat.',
|
|
12
|
+
fetchingFailed: 'Nu s-a putut citi conținutul pentru {url}.',
|
|
13
|
+
fetchingOne: 'Se citește răspunsul oEmbed...',
|
|
14
|
+
fetchingMany: 'Se citesc răspunsurile oEmbed, {current} din {max} realizat...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'ru', {
|
|
6
|
+
pathName: 'Медиа объект',
|
|
7
|
+
title: 'Медиаконтент',
|
|
8
|
+
button: 'Вставить Медиаконтент',
|
|
9
|
+
unsupportedUrlGiven: 'Данный URL не поддерживается.',
|
|
10
|
+
unsupportedUrl: 'URL {url} не поддерживается Media Embed.',
|
|
11
|
+
fetchingFailedGiven: 'Не удалось подгрузить содержимое для заданного URL',
|
|
12
|
+
fetchingFailed: 'Не удалось подгрузить содержимое для {url}',
|
|
13
|
+
fetchingOne: 'Подгружаем oEmbed ответ...',
|
|
14
|
+
fetchingMany: 'Подгружаем oEmbed ответы, {current} из {max} подгружено...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'sk', {
|
|
6
|
+
pathName: 'media objekt',
|
|
7
|
+
title: 'Media Embed',
|
|
8
|
+
button: 'Vložte Media Embed',
|
|
9
|
+
unsupportedUrlGiven: 'Zadaná URL nie je podporovaná.',
|
|
10
|
+
unsupportedUrl: 'URL {url} nie je podporovaná Media Embedom.',
|
|
11
|
+
fetchingFailedGiven: 'Nepodarilo sa získať obsah zo zadanej URL.',
|
|
12
|
+
fetchingFailed: 'Nepodarilo sa získať obsah z {url}.',
|
|
13
|
+
fetchingOne: 'Získavanie oEmbed odpovede...',
|
|
14
|
+
fetchingMany: 'Získavanie oEmbed odpovede, {current} z {max} hotových...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'sq', {
|
|
6
|
+
pathName: 'Objekt mediatik',
|
|
7
|
+
title: 'Media Bashkangjitur',
|
|
8
|
+
button: 'Shto Lidhje Mediatike',
|
|
9
|
+
unsupportedUrlGiven: 'URL e shkruar nuk është e mbështetur.',
|
|
10
|
+
unsupportedUrl: 'URL {url} nuk është e mbështetur nga Media Embed.',
|
|
11
|
+
fetchingFailedGiven: 'Dështoi tërheqja e përmbajtjes nga URL e dhënë.',
|
|
12
|
+
fetchingFailed: 'Dështoi tërheqja e përmbajtjes nga {url}.',
|
|
13
|
+
fetchingOne: 'Përgjigja e tërheqjes së oEmbed...',
|
|
14
|
+
fetchingMany: 'Përgjigja e tërheqjes së oEmbed, janë realizuar {current} nga {max}...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'sv', {
|
|
6
|
+
pathName: 'mediaobjekt',
|
|
7
|
+
title: 'Mediainbäddning',
|
|
8
|
+
button: 'Lägg in mediainbäddning',
|
|
9
|
+
unsupportedUrlGiven: 'Den angivna URL:en stöds inte.',
|
|
10
|
+
unsupportedUrl: 'URL:en {url} stöds inte av mediainbäddningen.',
|
|
11
|
+
fetchingFailedGiven: 'Lyckades inte hämta innehållet från den angivna URL:en.',
|
|
12
|
+
fetchingFailed: 'Lyckades inte hämta innehåll från {url}.',
|
|
13
|
+
fetchingOne: 'Hämtar oEmbed-svar...',
|
|
14
|
+
fetchingMany: 'Hämtar oEmbed-svar, {current} av {max} färdiga...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'tr', {
|
|
6
|
+
pathName: 'medya nesnesi',
|
|
7
|
+
title: 'Gömülmüş Medya',
|
|
8
|
+
button: 'Gömülü Medya Ekle',
|
|
9
|
+
unsupportedUrlGiven: 'Belirtmiş olduğunuz URL desteklenmiyor.',
|
|
10
|
+
unsupportedUrl: 'Belirttiğiniz URL {url} gömülü medya tarafından desteklenmiyor.',
|
|
11
|
+
fetchingFailedGiven: 'Vermiş olduğunuz URL\'nin içeriği alınamadı.',
|
|
12
|
+
fetchingFailed: '{url} içeriği alınamadı.',
|
|
13
|
+
fetchingOne: 'oEmbed cevabı alınıyor...',
|
|
14
|
+
fetchingMany: 'oEmbed cevabı alınıyor, {current} / {max} tamamlandı...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'ug', {
|
|
6
|
+
pathName: 'ۋاسىتە ئوبيېكتى',
|
|
7
|
+
title: 'سىڭدۈرمە ۋاسىتە',
|
|
8
|
+
button: 'سىڭدۈرمە ۋاسىتە قىستۇر',
|
|
9
|
+
unsupportedUrlGiven: 'بەلگىلەنگەن ئۇلانمىنى قوللىمايدۇ .',
|
|
10
|
+
unsupportedUrl: 'The URL {url} is not supported by Media Embed.', // MISSING
|
|
11
|
+
fetchingFailedGiven: 'Failed to fetch content for the given URL.', // MISSING
|
|
12
|
+
fetchingFailed: 'Failed to fetch content for {url}.', // MISSING
|
|
13
|
+
fetchingOne: 'oEmbed نىڭ ئىنكاسىغا ئېرىشىۋاتىدۇ ...',
|
|
14
|
+
fetchingMany: 'Fetching oEmbed responses, {current} of {max} done...' // MISSING
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'uk', {
|
|
6
|
+
pathName: 'Медіаоб’єкт',
|
|
7
|
+
title: 'Медіаконтент',
|
|
8
|
+
button: 'Вставити медіаконтент',
|
|
9
|
+
unsupportedUrlGiven: 'Вказане URL посилання не підтримується.',
|
|
10
|
+
unsupportedUrl: 'URL посилання {url} не підтримується медіаконтентом.',
|
|
11
|
+
fetchingFailedGiven: 'Не вдалося отримати контент для даного URL посилання.',
|
|
12
|
+
fetchingFailed: 'Не вдалося отримати контент для {url}.',
|
|
13
|
+
fetchingOne: 'Отримання oEmbed відповіді...',
|
|
14
|
+
fetchingMany: 'Отримання {current} із {max} oEmbed відповідей завершено....'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'zh-cn', {
|
|
6
|
+
pathName: '媒体对象',
|
|
7
|
+
title: '嵌入媒体',
|
|
8
|
+
button: '插入媒体',
|
|
9
|
+
unsupportedUrlGiven: '不支持指定的 URL',
|
|
10
|
+
unsupportedUrl: '嵌入媒体不支持此 URL {url}',
|
|
11
|
+
fetchingFailedGiven: '无法抓取此 URL 的内容',
|
|
12
|
+
fetchingFailed: '无法抓取 {url} 的内容',
|
|
13
|
+
fetchingOne: '正在抓取...',
|
|
14
|
+
fetchingMany: '正在抓取,{max} 中的 {current} ...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
CKEDITOR.plugins.setLang( 'embedbase', 'zh', {
|
|
6
|
+
pathName: '媒體元件',
|
|
7
|
+
title: '內嵌媒體',
|
|
8
|
+
button: '插入內嵌媒體',
|
|
9
|
+
unsupportedUrlGiven: '不支援指定的 URL。',
|
|
10
|
+
unsupportedUrl: '內嵌媒體不支援 URL {url} 。',
|
|
11
|
+
fetchingFailedGiven: '抓取指定 URL 的內容失敗。',
|
|
12
|
+
fetchingFailed: '抓取 {url} 的內容失敗。',
|
|
13
|
+
fetchingOne: '正在抓取 oEmbed 回應...',
|
|
14
|
+
fetchingMany: '正在抓取 oEmbed 回應,{max} 中的 {current} 已完成...'
|
|
15
|
+
} );
|
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
( function() {
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* JSONP communication.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
* @singleton
|
|
14
|
+
* @class CKEDITOR.plugins.embedBase._jsonp
|
|
15
|
+
*/
|
|
16
|
+
var Jsonp = {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a `<script>` element and attaches it to the document `<body>`.
|
|
19
|
+
*
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
_attachScript: function( url, errorCallback ) {
|
|
23
|
+
// ATM we cannot use CKE scriptloader here, because it will make sure that script
|
|
24
|
+
// with given URL is added only once.
|
|
25
|
+
var script = new CKEDITOR.dom.element( 'script' );
|
|
26
|
+
script.setAttribute( 'src', url );
|
|
27
|
+
script.on( 'error', errorCallback );
|
|
28
|
+
|
|
29
|
+
CKEDITOR.document.getBody().append( script );
|
|
30
|
+
|
|
31
|
+
return script;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Sends a request using the JSONP technique.
|
|
36
|
+
*
|
|
37
|
+
* @param {CKEDITOR.template} urlTemplate The template of the URL to be requested. All properties
|
|
38
|
+
* passed in `urlParams` can be used, plus a `{callback}`, which represents a JSONP callback, must be defined.
|
|
39
|
+
* @param {Object} urlParams Parameters to be passed to the `urlTemplate`.
|
|
40
|
+
* @param {Function} callback
|
|
41
|
+
* @param {Function} [errorCallback]
|
|
42
|
+
* @returns {Object} The request object with a `cancel()` method.
|
|
43
|
+
*/
|
|
44
|
+
sendRequest: function( urlTemplate, urlParams, callback, errorCallback ) {
|
|
45
|
+
var request = {};
|
|
46
|
+
urlParams = urlParams || {};
|
|
47
|
+
|
|
48
|
+
var callbackKey = CKEDITOR.tools.getNextNumber(),
|
|
49
|
+
scriptElement;
|
|
50
|
+
|
|
51
|
+
urlParams.callback = 'CKEDITOR._.jsonpCallbacks[' + callbackKey + ']';
|
|
52
|
+
|
|
53
|
+
CKEDITOR._.jsonpCallbacks[ callbackKey ] = function( response ) {
|
|
54
|
+
// On IEs scripts are sometimes loaded synchronously. It is bad for two reasons:
|
|
55
|
+
// * nature of sendRequest() is unstable,
|
|
56
|
+
// * scriptElement does not exist yet.
|
|
57
|
+
setTimeout( function() {
|
|
58
|
+
cleanUp();
|
|
59
|
+
callback( response );
|
|
60
|
+
} );
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
scriptElement = this._attachScript( urlTemplate.output( urlParams ), function() {
|
|
64
|
+
cleanUp();
|
|
65
|
+
errorCallback && errorCallback();
|
|
66
|
+
} );
|
|
67
|
+
|
|
68
|
+
request.cancel = cleanUp;
|
|
69
|
+
|
|
70
|
+
function cleanUp() {
|
|
71
|
+
if ( scriptElement ) {
|
|
72
|
+
scriptElement.remove();
|
|
73
|
+
delete CKEDITOR._.jsonpCallbacks[ callbackKey ];
|
|
74
|
+
scriptElement = null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return request;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
CKEDITOR.plugins.add( 'embedbase', {
|
|
83
|
+
lang: 'az,bg,ca,cs,da,de,de-ch,en,en-au,eo,es,es-mx,eu,fr,gl,hr,hu,id,it,ja,ko,ku,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sv,tr,ug,uk,zh,zh-cn', // %REMOVE_LINE_CORE%
|
|
84
|
+
requires: 'dialog,widget,notificationaggregator',
|
|
85
|
+
|
|
86
|
+
onLoad: function() {
|
|
87
|
+
CKEDITOR._.jsonpCallbacks = {};
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
init: function() {
|
|
91
|
+
CKEDITOR.dialog.add( 'embedBase', this.path + 'dialogs/embedbase.js' );
|
|
92
|
+
}
|
|
93
|
+
} );
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Creates a new embed widget base definition. After other necessary properties are filled this definition
|
|
97
|
+
* may be {@link CKEDITOR.plugins.widget.repository#add registered} as a new, independent widget for
|
|
98
|
+
* embedding content.
|
|
99
|
+
*
|
|
100
|
+
* By default an embed widget is set up to work with [oEmbed providers](http://www.oembed.com/) using JSONP
|
|
101
|
+
* requests, such as [Iframely](https://iframely.com/) or [Noembed](https://noembed.com/). It can be,
|
|
102
|
+
* however, easily configured to use other providers and communication methods, including custom systems
|
|
103
|
+
* or local embed databases.
|
|
104
|
+
*
|
|
105
|
+
* See example usage of this method in:
|
|
106
|
+
*
|
|
107
|
+
* * [/plugins/embed/plugin.js](https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/embed/plugin.js)
|
|
108
|
+
* * [/plugins/embedsemantic/plugin.js](https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/embedsemantic/plugin.js)
|
|
109
|
+
*
|
|
110
|
+
* Note that both these plugins reuse the [dialog](https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/embedbase/dialogs/embedbase.js)
|
|
111
|
+
* defined by the `embedbase` plugin. Integration of the asynchronous way of loading content with a dialog requires additional
|
|
112
|
+
* effort. Check the dialog's code for more details.
|
|
113
|
+
*
|
|
114
|
+
* @static
|
|
115
|
+
* @param {CKEDITOR.editor} editor
|
|
116
|
+
* @returns {CKEDITOR.plugins.embedBase.baseDefinition}
|
|
117
|
+
* @member CKEDITOR.plugins.embedBase
|
|
118
|
+
*/
|
|
119
|
+
function createWidgetBaseDefinition( editor ) {
|
|
120
|
+
var aggregator,
|
|
121
|
+
lang = editor.lang.embedbase;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* An embed widget base definition. It predefines a few {@link CKEDITOR.plugins.widget.definition widget definition}
|
|
125
|
+
* properties such as {@link #mask}, {@link #template} and {@link #pathName} and adds methods related to
|
|
126
|
+
* content embedding.
|
|
127
|
+
*
|
|
128
|
+
* To create a base definition use the {@link CKEDITOR.plugins.embedBase#createWidgetBaseDefinition} method.
|
|
129
|
+
*
|
|
130
|
+
* Note: For easier browsing of this class's API you can hide inherited method using the "Show" drop-down
|
|
131
|
+
* on the right-hand side.
|
|
132
|
+
*
|
|
133
|
+
* @abstract
|
|
134
|
+
* @class CKEDITOR.plugins.embedBase.baseDefinition
|
|
135
|
+
* @extends CKEDITOR.plugins.widget.definition
|
|
136
|
+
*/
|
|
137
|
+
return {
|
|
138
|
+
mask: true,
|
|
139
|
+
template: '<div></div>',
|
|
140
|
+
pathName: lang.pathName,
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Response cache. This cache object will be shared between all instances of this widget.
|
|
144
|
+
*
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
_cache: {},
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* A regular expression to pre-validate URLs.
|
|
151
|
+
*
|
|
152
|
+
* See:
|
|
153
|
+
*
|
|
154
|
+
* * [https://iframely.com/docs/providers],
|
|
155
|
+
* * {@link #isUrlValid}.
|
|
156
|
+
*/
|
|
157
|
+
urlRegExp: /^((https?:)?\/\/|www\.)/i,
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The template used to generate the URL of the content provider. Content provider is a service
|
|
161
|
+
* which the embed widget will request in order to get an [oEmbed](http://www.oembed.com/) response that
|
|
162
|
+
* can be transformed into content which can be embedded in the editor.
|
|
163
|
+
*
|
|
164
|
+
* Example content providers are:
|
|
165
|
+
*
|
|
166
|
+
* * [Iframely](https://iframely.com/),
|
|
167
|
+
* * [Noembed](https://noembed.com/).
|
|
168
|
+
*
|
|
169
|
+
* Both Iframely and Noembed are **proxy** services which support **JSONP requests**, hence they are not limited by the
|
|
170
|
+
* same-origin policy. Unfortunately, usually oEmbed services exposed by real content providers
|
|
171
|
+
* like YouTube or Twitter do not support XHR with CORS or do not support oEmbed at all which makes it
|
|
172
|
+
* impossible or hard to get such content to be embedded in the editor. This problem is solved by proxy content providers
|
|
173
|
+
* like Iframely and Noembed.
|
|
174
|
+
*
|
|
175
|
+
* This property must be defined after creating an embed widget base definition.
|
|
176
|
+
*
|
|
177
|
+
* By default two values are passed to the template:
|
|
178
|
+
*
|
|
179
|
+
* * `{url}` – The URL of the resource to be embedded.
|
|
180
|
+
* * `{callback}` – The JSONP callback to be executed.
|
|
181
|
+
*
|
|
182
|
+
* Example value:
|
|
183
|
+
*
|
|
184
|
+
* widgetDefinition.providerUrl = new CKEDITOR.template(
|
|
185
|
+
* '//ckeditor.iframe.ly/api/oembed?url={url}&callback={callback}'
|
|
186
|
+
* );
|
|
187
|
+
*
|
|
188
|
+
* @property {CKEDITOR.template} providerUrl
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
init: function() {
|
|
192
|
+
this.on( 'sendRequest', function( evt ) {
|
|
193
|
+
this._sendRequest( evt.data );
|
|
194
|
+
}, this, null, 999 );
|
|
195
|
+
|
|
196
|
+
// Expose the widget in the dialog - needed to trigger loadContent() and do error handling.
|
|
197
|
+
this.on( 'dialog', function( evt ) {
|
|
198
|
+
evt.data.widget = this;
|
|
199
|
+
}, this );
|
|
200
|
+
|
|
201
|
+
this.on( 'handleResponse', function( evt ) {
|
|
202
|
+
if ( evt.data.html ) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
var retHtml = this._responseToHtml( evt.data.url, evt.data.response );
|
|
207
|
+
|
|
208
|
+
if ( retHtml !== null ) {
|
|
209
|
+
evt.data.html = retHtml;
|
|
210
|
+
} else {
|
|
211
|
+
evt.data.errorMessage = 'unsupportedUrl';
|
|
212
|
+
evt.cancel();
|
|
213
|
+
}
|
|
214
|
+
}, this, null, 999 );
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Loads content for a given resource URL by requesting the {@link #providerUrl provider}.
|
|
219
|
+
*
|
|
220
|
+
* Usually widgets are controlled by the {@link CKEDITOR.plugins.widget#setData} method. However,
|
|
221
|
+
* loading content is an asynchronous operation due to client-server communication, and it would not
|
|
222
|
+
* be possible to pass callbacks to the {@link CKEDITOR.plugins.widget#setData} method so this new method
|
|
223
|
+
* is defined for embed widgets.
|
|
224
|
+
*
|
|
225
|
+
* This method fires two events that allow to customize widget behavior without changing its code:
|
|
226
|
+
*
|
|
227
|
+
* * {@link #sendRequest},
|
|
228
|
+
* * {@link #handleResponse} (if the request was successful).
|
|
229
|
+
*
|
|
230
|
+
* Note: This method is always asynchronous, even if the cache was hit.
|
|
231
|
+
*
|
|
232
|
+
* Example usage:
|
|
233
|
+
*
|
|
234
|
+
* var url = 'https://twitter.com/reinmarpl/status/573118615274315776';
|
|
235
|
+
* widget.loadContent( url, {
|
|
236
|
+
* callback: function() {
|
|
237
|
+
* // Success. It is a good time to save a snapshot.
|
|
238
|
+
* editor.fire( 'saveSnapshot' );
|
|
239
|
+
* console.log( widget.data.url ); // The above URL. It is only changed
|
|
240
|
+
* // once the content is successfully loaded.
|
|
241
|
+
* },
|
|
242
|
+
*
|
|
243
|
+
* errorCallback: function( message ) {
|
|
244
|
+
* editor.showNotification( widget.getErrorMessage( message, url ), 'warning' );
|
|
245
|
+
* }
|
|
246
|
+
* } );
|
|
247
|
+
*
|
|
248
|
+
* @param {String} url Resource URL to be embedded.
|
|
249
|
+
* @param {Object} opts
|
|
250
|
+
* @param {Function} [opts.callback] Callback called when content was successfully loaded into the editor.
|
|
251
|
+
* @param {Function} [opts.errorCallback] Callback called when an error occurred.
|
|
252
|
+
* @param {String} opts.errorCallback.messageTypeOrMessage See {@link #getErrorMessage}.
|
|
253
|
+
* @param {Boolean} [opts.noNotifications] Do not show notifications (useful when the dialog is open).
|
|
254
|
+
* @returns {CKEDITOR.plugins.embedBase.request}
|
|
255
|
+
*/
|
|
256
|
+
loadContent: function( url, opts ) {
|
|
257
|
+
opts = opts || {};
|
|
258
|
+
|
|
259
|
+
var that = this,
|
|
260
|
+
cachedResponse = this._getCachedResponse( url ),
|
|
261
|
+
request = {
|
|
262
|
+
noNotifications: opts.noNotifications,
|
|
263
|
+
url: url,
|
|
264
|
+
callback: finishLoading,
|
|
265
|
+
errorCallback: function( msg ) {
|
|
266
|
+
that._handleError( request, msg );
|
|
267
|
+
if ( opts.errorCallback ) {
|
|
268
|
+
opts.errorCallback( msg );
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
if ( cachedResponse ) {
|
|
274
|
+
// Keep the async nature (it caused a bug the very first day when the loadContent()
|
|
275
|
+
// was synchronous when cache was hit :D).
|
|
276
|
+
setTimeout( function() {
|
|
277
|
+
finishLoading( cachedResponse );
|
|
278
|
+
} );
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if ( !opts.noNotifications ) {
|
|
283
|
+
request.task = this._createTask();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// The execution will be followed by #sendRequest's listener.
|
|
287
|
+
this.fire( 'sendRequest', request );
|
|
288
|
+
|
|
289
|
+
function finishLoading( response ) {
|
|
290
|
+
request.response = response;
|
|
291
|
+
|
|
292
|
+
// Check if widget is still valid.
|
|
293
|
+
if ( !that.editor.widgets.instances[ that.id ] ) {
|
|
294
|
+
CKEDITOR.warn( 'embedbase-widget-invalid' );
|
|
295
|
+
|
|
296
|
+
if ( request.task ) {
|
|
297
|
+
request.task.done();
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if ( that._handleResponse( request ) ) {
|
|
304
|
+
that._cacheResponse( url, response );
|
|
305
|
+
if ( opts.callback ) {
|
|
306
|
+
opts.callback();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return request;
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Checks whether the URL is valid. Usually the content provider makes the final validation
|
|
316
|
+
* as only the provider knows what kind of URLs are accepted. However, to give the user some immediate feedback
|
|
317
|
+
* a synchronous validation is performed using the {@link #urlRegExp} pattern and the {@link #validateUrl} event.
|
|
318
|
+
*
|
|
319
|
+
* @param {String} url The URL to check.
|
|
320
|
+
* @returns {Boolean} Whether the URL is valid (supported).
|
|
321
|
+
*/
|
|
322
|
+
isUrlValid: function( url ) {
|
|
323
|
+
return this.urlRegExp.test( url ) && this.fire( 'validateUrl', url ) !== false;
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Generates an error message based on the message type (with a possible suffix) or
|
|
328
|
+
* the custom message template.
|
|
329
|
+
*
|
|
330
|
+
* This method is used when showing a notification or an alert (in a dialog) about an error.
|
|
331
|
+
* Usually it is used with an error type which is a string from the `editor.lang.embedbase` object.
|
|
332
|
+
*
|
|
333
|
+
* There are two error types available at the moment: `'unsupportedUrl'` and `'fetchingFailed'`.
|
|
334
|
+
* Additionally, both can be suffixed with `'Given'`. See the language entries to see the difference.
|
|
335
|
+
* Inside the dialog this method is used with a suffix and to generate a notification message it is
|
|
336
|
+
* used without a suffix.
|
|
337
|
+
*
|
|
338
|
+
* Additionally, a custom message may be passed and just like language entries, it can use the `{url}`
|
|
339
|
+
* placeholder.
|
|
340
|
+
*
|
|
341
|
+
* While {@link #handleResponse handling the response} you can set an error message or its type. It will
|
|
342
|
+
* be passed to this method later.
|
|
343
|
+
*
|
|
344
|
+
* widget.on( 'handleResponse', function( evt ) {
|
|
345
|
+
* if ( evt.data.response.type != 'rich' ) {
|
|
346
|
+
* evt.data.errorMessage = '{url} cannot be embedded. Only rich type is supported.';
|
|
347
|
+
* evt.cancel();
|
|
348
|
+
*
|
|
349
|
+
* // Or:
|
|
350
|
+
* evt.data.errorMessage = 'unsupportedUrl.';
|
|
351
|
+
* evt.cancel();
|
|
352
|
+
* }
|
|
353
|
+
* } );
|
|
354
|
+
*
|
|
355
|
+
* If you need to display your own error:
|
|
356
|
+
*
|
|
357
|
+
* editor.showNotification(
|
|
358
|
+
* widget.getErrorMessage( '{url} cannot be embedded. Only rich type is supported.', wrongUrl )
|
|
359
|
+
* );
|
|
360
|
+
*
|
|
361
|
+
* Or with a message type:
|
|
362
|
+
*
|
|
363
|
+
* editor.showNotification(
|
|
364
|
+
* widget.getErrorMessage( 'unsupportedUrl', wrongUrl )
|
|
365
|
+
* );
|
|
366
|
+
*
|
|
367
|
+
* @param {String} messageTypeOrMessage
|
|
368
|
+
* @param {String} [url]
|
|
369
|
+
* @param {String} [suffix]
|
|
370
|
+
* @returns {String}
|
|
371
|
+
*/
|
|
372
|
+
getErrorMessage: function( messageTypeOrMessage, url, suffix ) {
|
|
373
|
+
var message = editor.lang.embedbase[ messageTypeOrMessage + ( suffix || '' ) ];
|
|
374
|
+
if ( !message ) {
|
|
375
|
+
message = messageTypeOrMessage;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
return new CKEDITOR.template( message ).output( { url: url || '' } );
|
|
379
|
+
},
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Sends the request to the {@link #providerUrl provider} using
|
|
383
|
+
* the {@link CKEDITOR.plugins.embedBase._jsonp JSONP} technique.
|
|
384
|
+
*
|
|
385
|
+
* @private
|
|
386
|
+
* @param {CKEDITOR.plugins.embedBase.request} request
|
|
387
|
+
*/
|
|
388
|
+
_sendRequest: function( request ) {
|
|
389
|
+
var that = this,
|
|
390
|
+
jsonpRequest = Jsonp.sendRequest(
|
|
391
|
+
this.providerUrl,
|
|
392
|
+
{
|
|
393
|
+
url: encodeURIComponent( request.url )
|
|
394
|
+
},
|
|
395
|
+
request.callback,
|
|
396
|
+
function() {
|
|
397
|
+
request.errorCallback( 'fetchingFailed' );
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
request.cancel = function() {
|
|
402
|
+
jsonpRequest.cancel();
|
|
403
|
+
that.fire( 'requestCanceled', request );
|
|
404
|
+
};
|
|
405
|
+
},
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Handles the response of a successful request.
|
|
409
|
+
*
|
|
410
|
+
* Fires the {@link #handleResponse} event in order to convert the oEmbed response
|
|
411
|
+
* to HTML that can be embedded.
|
|
412
|
+
*
|
|
413
|
+
* If the response can be handled, the {@link #_setContent content is set}.
|
|
414
|
+
*
|
|
415
|
+
* @private
|
|
416
|
+
* @param {CKEDITOR.plugins.embedBase.request} request
|
|
417
|
+
* @returns {Boolean} Whether the response can be handled. Returns `false` if {@link #handleResponse}
|
|
418
|
+
* was canceled or the default listener could not convert oEmbed response into embeddable HTML.
|
|
419
|
+
*/
|
|
420
|
+
_handleResponse: function( request ) {
|
|
421
|
+
var evtData = {
|
|
422
|
+
url: request.url,
|
|
423
|
+
html: '',
|
|
424
|
+
response: request.response
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
if ( this.fire( 'handleResponse', evtData ) !== false ) {
|
|
428
|
+
if ( request.task ) {
|
|
429
|
+
request.task.done();
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
this._setContent( request.url, evtData.html );
|
|
433
|
+
return true;
|
|
434
|
+
} else {
|
|
435
|
+
request.errorCallback( evtData.errorMessage );
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Handles an error. An error can be caused either by a request failure or an unsupported
|
|
442
|
+
* oEmbed response type.
|
|
443
|
+
*
|
|
444
|
+
* @private
|
|
445
|
+
* @param {CKEDITOR.plugins.embedBase.request} request
|
|
446
|
+
* @param {String} messageTypeOrMessage See {@link #getErrorMessage}.
|
|
447
|
+
*/
|
|
448
|
+
_handleError: function( request, messageTypeOrMessage ) {
|
|
449
|
+
if ( request.task ) {
|
|
450
|
+
request.task.cancel();
|
|
451
|
+
|
|
452
|
+
if ( !request.noNotifications ) {
|
|
453
|
+
editor.showNotification( this.getErrorMessage( messageTypeOrMessage, request.url ), 'warning' );
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Returns embeddable HTML for an oEmbed response if it is of the `photo`, `video` or `rich` type.
|
|
460
|
+
*
|
|
461
|
+
* @private
|
|
462
|
+
* @param {Object} response The oEmbed response.
|
|
463
|
+
* @returns {String/null} HTML string to be embedded or `null` if this response type is not supported.
|
|
464
|
+
*/
|
|
465
|
+
_responseToHtml: function( url, response ) {
|
|
466
|
+
if ( response.type == 'photo' ) {
|
|
467
|
+
return '<img src="' + CKEDITOR.tools.htmlEncodeAttr( response.url ) + '" ' +
|
|
468
|
+
'alt="' + CKEDITOR.tools.htmlEncodeAttr( response.title || '' ) + '" style="max-width:100%;height:auto" />';
|
|
469
|
+
} else if ( response.type == 'video' || response.type == 'rich' ) {
|
|
470
|
+
// Embedded iframes are added to page's focus list. Adding negative tabindex attribute
|
|
471
|
+
// removes their ability to be focused by user. (https://dev.ckeditor.com/ticket/14538)
|
|
472
|
+
response.html = response.html.replace( /<iframe/g, '<iframe tabindex="-1"' );
|
|
473
|
+
|
|
474
|
+
return response.html;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return null;
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The very final step of {@link #loadContent content loading}. The `url` data property is changed
|
|
482
|
+
* and the content is embedded ({@link CKEDITOR.plugins.widget#element}'s HTML is set).
|
|
483
|
+
*
|
|
484
|
+
* @private
|
|
485
|
+
* @param {String} url The resource URL.
|
|
486
|
+
* @param {String} content HTML content to be embedded.
|
|
487
|
+
*/
|
|
488
|
+
_setContent: function( url, content ) {
|
|
489
|
+
this.setData( 'url', url );
|
|
490
|
+
this.element.setHtml( content );
|
|
491
|
+
},
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Creates a notification aggregator task.
|
|
495
|
+
*
|
|
496
|
+
* @private
|
|
497
|
+
* @returns {CKEDITOR.plugins.notificationAggregator.task}
|
|
498
|
+
*/
|
|
499
|
+
_createTask: function() {
|
|
500
|
+
if ( !aggregator || aggregator.isFinished() ) {
|
|
501
|
+
aggregator = new CKEDITOR.plugins.notificationAggregator( editor, lang.fetchingMany, lang.fetchingOne );
|
|
502
|
+
|
|
503
|
+
aggregator.on( 'finished', function() {
|
|
504
|
+
aggregator.notification.hide();
|
|
505
|
+
} );
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
return aggregator.createTask();
|
|
509
|
+
},
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Caches the provider response.
|
|
513
|
+
*
|
|
514
|
+
* @private
|
|
515
|
+
* @param {String} url
|
|
516
|
+
* @param {Object} response
|
|
517
|
+
*/
|
|
518
|
+
_cacheResponse: function( url, response ) {
|
|
519
|
+
this._cache[ url ] = response;
|
|
520
|
+
},
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Returns the cached response.
|
|
524
|
+
*
|
|
525
|
+
* @private
|
|
526
|
+
* @param {String} url
|
|
527
|
+
* @returns {Object/undefined} Response or `undefined` if the cache was missed.
|
|
528
|
+
*/
|
|
529
|
+
_getCachedResponse: function( url ) {
|
|
530
|
+
return this._cache[ url ];
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Fired by the {@link #isUrlValid} method. Cancel the event to make the URL invalid.
|
|
536
|
+
*
|
|
537
|
+
* @event validateUrl
|
|
538
|
+
* @param {String} data The URL being validated.
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Fired by the {@link #loadContent} method to dispatch a request to the provider.
|
|
543
|
+
* You can cancel this event and send the request using a different technique.
|
|
544
|
+
* By default, if the event is not stopped or canceled a request will be sent
|
|
545
|
+
* using the JSONP technique.
|
|
546
|
+
*
|
|
547
|
+
* widget.on( 'sendRequest', function( evt ) {
|
|
548
|
+
* var request = evt.data;
|
|
549
|
+
*
|
|
550
|
+
* // Send the request using a technique of your choice (XHR with CORS for instance).
|
|
551
|
+
* myApp.requestOembedProvider( request.url, function( err, response ) {
|
|
552
|
+
* if ( err ) {
|
|
553
|
+
* request.errorCallback( err );
|
|
554
|
+
* } else {
|
|
555
|
+
* request.callback( response );
|
|
556
|
+
* }
|
|
557
|
+
* } );
|
|
558
|
+
*
|
|
559
|
+
* // Do not call other listeners, so the default behavior (JSONP request)
|
|
560
|
+
* // will not be executed.
|
|
561
|
+
* evt.stop();
|
|
562
|
+
* } );
|
|
563
|
+
*
|
|
564
|
+
* @event sendRequest
|
|
565
|
+
* @param {CKEDITOR.plugins.embedBase.request} data
|
|
566
|
+
*/
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Fired after receiving a response from the {@link #providerUrl provider}.
|
|
570
|
+
* This event listener job is to turn the oEmbed response to embeddable HTML by setting
|
|
571
|
+
* `evt.data.html`.
|
|
572
|
+
*
|
|
573
|
+
* widget.on( 'handleReaponse', function( evt ) {
|
|
574
|
+
* evt.data.html = customOembedToHtmlConverter( evt.data.response );
|
|
575
|
+
* } );
|
|
576
|
+
*
|
|
577
|
+
* This event can also be canceled to indicate that the response cannot be handled. In such
|
|
578
|
+
* case the `evt.data.errorMessage` must be set (see {@link #getErrorMessage}).
|
|
579
|
+
*
|
|
580
|
+
* widget.on( 'handleReaponse', function( evt ) {
|
|
581
|
+
* if ( evt.data.response.type == 'photo' ) {
|
|
582
|
+
* // Will display the editor.lang.embedbase.unsupportedUrl(Given) message.
|
|
583
|
+
* evt.data.errorMessage = 'unsupportedUrl';
|
|
584
|
+
* evt.cancel();
|
|
585
|
+
* }
|
|
586
|
+
* } );
|
|
587
|
+
*
|
|
588
|
+
* This event has a default late-listener (with a priority of `999`) that, if `evt.data.html` has not
|
|
589
|
+
* been set yet, will try to handle the response by using the {@link #_responseToHtml} method.
|
|
590
|
+
*
|
|
591
|
+
* @event handleResponse
|
|
592
|
+
* @param {Object} data
|
|
593
|
+
* @param {String} data.url The resource URL.
|
|
594
|
+
* @param {Object} data.response The oEmbed response.
|
|
595
|
+
* @param {String} [data.html=''] The HTML which will be embedded.
|
|
596
|
+
* @param {String} [data.errorMessage] The error message or message type (see {@link #getErrorMessage})
|
|
597
|
+
* that must be set if this event is canceled to indicate an unsupported oEmbed response.
|
|
598
|
+
*/
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Class representing the request object. It is created by the {@link CKEDITOR.plugins.embedBase.baseDefinition#loadContent}
|
|
603
|
+
* method and is passed to other methods and events of this class.
|
|
604
|
+
*
|
|
605
|
+
* @abstract
|
|
606
|
+
* @class CKEDITOR.plugins.embedBase.request
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The resource URL to be embedded (not the {@link CKEDITOR.plugins.embedBase.baseDefinition#providerUrl provider URL}).
|
|
611
|
+
*
|
|
612
|
+
* @property {String} url
|
|
613
|
+
*/
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Success callback to be executed once a response to a request is received.
|
|
617
|
+
*
|
|
618
|
+
* @property {Function} [callback]
|
|
619
|
+
* @param {Object} response The response object.
|
|
620
|
+
*/
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Callback executed in case of an error.
|
|
624
|
+
*
|
|
625
|
+
* @property {Function} [errorCallback]
|
|
626
|
+
* @param {String} messageTypeOrMessage See {@link CKEDITOR.plugins.embedBase.baseDefinition#getErrorMessage}.
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Task that should be resolved once the request is done.
|
|
631
|
+
*
|
|
632
|
+
* @property {CKEDITOR.plugins.notificationAggregator.task} [task]
|
|
633
|
+
*/
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Response object. It is set once a response is received.
|
|
637
|
+
*
|
|
638
|
+
* @property {Object} [response]
|
|
639
|
+
*/
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Cancels the request.
|
|
643
|
+
*
|
|
644
|
+
* @method cancel
|
|
645
|
+
*/
|
|
646
|
+
|
|
647
|
+
CKEDITOR.plugins.embedBase = {
|
|
648
|
+
createWidgetBaseDefinition: createWidgetBaseDefinition,
|
|
649
|
+
_jsonp: Jsonp
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
} )();
|