integral 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ja', {
|
6
|
+
toolbar: 'ソース',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ka', {
|
6
|
+
toolbar: 'კოდები',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'km', {
|
6
|
+
toolbar: 'កូត',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ko', {
|
6
|
+
toolbar: '소스',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ku', {
|
6
|
+
toolbar: 'سەرچاوە',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'lt', {
|
6
|
+
toolbar: 'Šaltinis',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'lv', {
|
6
|
+
toolbar: 'HTML kods',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'mk', {
|
6
|
+
toolbar: 'Source',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'mn', {
|
6
|
+
toolbar: 'Код',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ms', {
|
6
|
+
toolbar: 'Sumber',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'nb', {
|
6
|
+
toolbar: 'Kilde',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'nl', {
|
6
|
+
toolbar: 'Broncode',
|
7
|
+
searchCode: 'Zoek in broncode',
|
8
|
+
autoFormat: 'Formatteer selectie',
|
9
|
+
commentSelectedRange: 'Zet selectie in commentaar',
|
10
|
+
uncommentSelectedRange: 'Haal selectie uit commentaar',
|
11
|
+
autoCompleteToggle: 'Zet automatisch aanvullen van HTML tags aan/uit'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'no', {
|
6
|
+
toolbar: 'Kilde',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'pl', {
|
6
|
+
toolbar: 'Źródło dokumentu',
|
7
|
+
autoFormat: 'Sformatuj zaznaczenie',
|
8
|
+
commentSelectedRange: 'Zakomentuj zaznaczenie',
|
9
|
+
uncommentSelectedRange: 'Odkomentuj zaznaczenie',
|
10
|
+
searchCode: 'Wyszukaj w źródle',
|
11
|
+
autoCompleteToggle: 'Włącza/Wyłącza automatyczne uzupełniania tagów HTML'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'pt-br', {
|
6
|
+
toolbar: 'Código-Fonte',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'pt', {
|
6
|
+
toolbar: 'Fonte',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ro', {
|
6
|
+
toolbar: 'Sursa',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ru', {
|
6
|
+
toolbar: 'Источник',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'sk', {
|
6
|
+
toolbar: 'Zdroj',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'sl', {
|
6
|
+
toolbar: 'Izvorna koda',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'sr-latn', {
|
6
|
+
toolbar: 'Kôd',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'sr', {
|
6
|
+
toolbar: 'Kôд',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'sv', {
|
6
|
+
toolbar: 'Källa',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'th', {
|
6
|
+
toolbar: 'ดูรหัส HTML',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'tr', {
|
6
|
+
toolbar: 'Kaynak',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'ug', {
|
6
|
+
toolbar: 'مەنبە',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'uk', {
|
6
|
+
toolbar: 'Джерело',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'vi', {
|
6
|
+
toolbar: 'Mã HTML',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'zh-cn', {
|
6
|
+
toolbar: '源码',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'codemirror', 'zh', {
|
6
|
+
toolbar: '原始碼',
|
7
|
+
searchCode: 'Search Source',
|
8
|
+
autoFormat: 'Format Selection',
|
9
|
+
commentSelectedRange: 'Comment Selection',
|
10
|
+
uncommentSelectedRange: 'Uncomment Selection',
|
11
|
+
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
|
12
|
+
});
|
@@ -0,0 +1,1311 @@
|
|
1
|
+
/*
|
2
|
+
* The "codemirror" plugin. It's indented to enhance the
|
3
|
+
* "sourcearea" editing mode, which displays the xhtml source code with
|
4
|
+
* syntax highlight and line numbers.
|
5
|
+
* Licensed under the MIT license
|
6
|
+
* CodeMirror Plugin: http://codemirror.net/ (MIT License)
|
7
|
+
*/
|
8
|
+
|
9
|
+
(function() {
|
10
|
+
CKEDITOR.plugins.add('codemirror', {
|
11
|
+
icons: 'searchcode,autoformat,commentselectedrange,uncommentselectedrange,autocomplete', // %REMOVE_LINE_CORE%
|
12
|
+
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh', // %REMOVE_LINE_CORE%
|
13
|
+
version: '1.17.3',
|
14
|
+
init: function (editor) {
|
15
|
+
var rootPath = this.path,
|
16
|
+
defaultConfig = {
|
17
|
+
autoCloseBrackets: true,
|
18
|
+
autoCloseTags: true,
|
19
|
+
autoFormatOnStart: false,
|
20
|
+
autoFormatOnUncomment: false,
|
21
|
+
autoLoadCodeMirror: true,
|
22
|
+
continueComments: true,
|
23
|
+
enableCodeFolding: true,
|
24
|
+
enableCodeFormatting: true,
|
25
|
+
enableSearchTools: true,
|
26
|
+
highlightMatches: true,
|
27
|
+
indentWithTabs: false,
|
28
|
+
lineNumbers: true,
|
29
|
+
lineWrapping: true,
|
30
|
+
mode: 'htmlmixed',
|
31
|
+
matchBrackets: true,
|
32
|
+
maxHighlightLineLength: 1000,
|
33
|
+
matchTags: true,
|
34
|
+
showAutoCompleteButton: true,
|
35
|
+
showCommentButton: true,
|
36
|
+
showFormatButton: true,
|
37
|
+
showSearchButton: true,
|
38
|
+
showTrailingSpace: true,
|
39
|
+
showUncommentButton: true,
|
40
|
+
styleActiveLine: true,
|
41
|
+
theme: 'default',
|
42
|
+
useBeautifyOnStart: false
|
43
|
+
};
|
44
|
+
|
45
|
+
// Get Config & Lang
|
46
|
+
var config = CKEDITOR.tools.extend(defaultConfig, editor.config.codemirror || {}, true),
|
47
|
+
lang = editor.lang.codemirror;
|
48
|
+
|
49
|
+
// check for old config settings for legacy support
|
50
|
+
if (editor.config.codemirror_theme) {
|
51
|
+
config.theme = editor.config.codemirror_theme;
|
52
|
+
}
|
53
|
+
if (editor.config.codemirror_autoFormatOnStart) {
|
54
|
+
config.autoFormatOnStart = editor.config.codemirror_autoFormatOnStart;
|
55
|
+
}
|
56
|
+
|
57
|
+
// automatically switch to bbcode mode if bbcode plugin is enabled
|
58
|
+
if (editor.plugins.bbcode && config.mode.indexOf("bbcode") <= 0) {
|
59
|
+
config.mode = "bbcode";
|
60
|
+
}
|
61
|
+
var requirePresent = "function" === typeof require;
|
62
|
+
|
63
|
+
if (requirePresent){
|
64
|
+
var location = window.CKEDITOR_GETURL('plugins/codemirror/js');
|
65
|
+
require.config({
|
66
|
+
packages: [{
|
67
|
+
name: 'codemirror',
|
68
|
+
location: location,
|
69
|
+
main: 'codemirror.min.js'
|
70
|
+
}, {
|
71
|
+
name: 'codemirror-mode-twig',
|
72
|
+
location: location,
|
73
|
+
main: 'codemirror.mode.twig.min.js'
|
74
|
+
}, {
|
75
|
+
name: 'codemirror-mode-html',
|
76
|
+
location: location,
|
77
|
+
main: 'codemirror.mode.htmlmixed.min.js'
|
78
|
+
}, {
|
79
|
+
name: 'codemirror-mode-php',
|
80
|
+
location: location,
|
81
|
+
main: 'codemirror.mode.php.min.js'
|
82
|
+
}, {
|
83
|
+
name: 'codemirror-mode-js',
|
84
|
+
location: location,
|
85
|
+
main: 'codemirror.mode.js.min.js'
|
86
|
+
}, {
|
87
|
+
name: 'codemirror-addons',
|
88
|
+
location: location,
|
89
|
+
main: 'codemirror.addons.min.js'
|
90
|
+
}, {
|
91
|
+
name: 'codemirror-addon-search',
|
92
|
+
location: location,
|
93
|
+
main: 'codemirror.addons.search.min.js'
|
94
|
+
}, {
|
95
|
+
name: 'codemirror-beautify',
|
96
|
+
location: location,
|
97
|
+
main: 'beautify.min.js'
|
98
|
+
}],
|
99
|
+
bundles: {
|
100
|
+
'codemirror': ['core', 'codemirror.js'],
|
101
|
+
'codemirror-mode-twig': ['modeTwig'],
|
102
|
+
'codemirror-mode-html': ['modeHtml'],
|
103
|
+
'codemirror-mode-php': ['modePHP'],
|
104
|
+
'codemirror-mode-js': ['modeJS'],
|
105
|
+
'codemirror-addons': ['addons'],
|
106
|
+
'codemirror-addon-search': ['addonSearch'],
|
107
|
+
'codemirror-beautify': ['beautifyModule']
|
108
|
+
},
|
109
|
+
map: {
|
110
|
+
'*': {
|
111
|
+
//all the requires pointing to ../../lib/codemirror from addons will be redirected to module named codemirror.js
|
112
|
+
//which is located in bundle 'codemirror' whose js file is codemirror.min.js
|
113
|
+
'lib/codemirror': 'codemirror.js'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
});
|
117
|
+
}
|
118
|
+
// Source mode isn't available in inline mode yet.
|
119
|
+
if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE || editor.plugins.sourcedialog) {
|
120
|
+
|
121
|
+
// Override Source Dialog
|
122
|
+
CKEDITOR.dialog.add('sourcedialog', function (editor) {
|
123
|
+
var sizeDialog = CKEDITOR.document.getWindow().getViewPaneSize(),
|
124
|
+
minWidth = Math.min(sizeDialog.width - 70, 800),
|
125
|
+
minHeight = sizeDialog.height / 1.5,
|
126
|
+
oldData;
|
127
|
+
|
128
|
+
function loadCodeMirrorInline(editor, textarea, dialog) {
|
129
|
+
var size = dialog.getSize(),
|
130
|
+
width = size.width,
|
131
|
+
height = size.height / 1.5;
|
132
|
+
|
133
|
+
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(textarea, {
|
134
|
+
mode: config.mode,
|
135
|
+
matchBrackets: config.matchBrackets,
|
136
|
+
maxHighlightLineLength: config.maxHighlightLineLength,
|
137
|
+
matchTags: config.matchTags,
|
138
|
+
workDelay: 300,
|
139
|
+
workTime: 35,
|
140
|
+
readOnly: editor.readOnly,
|
141
|
+
lineNumbers: config.lineNumbers,
|
142
|
+
lineWrapping: config.lineWrapping,
|
143
|
+
autoCloseTags: config.autoCloseTags,
|
144
|
+
autoCloseBrackets: config.autoCloseBrackets,
|
145
|
+
highlightSelectionMatches: config.highlightMatches,
|
146
|
+
continueComments: config.continueComments,
|
147
|
+
indentWithTabs: config.indentWithTabs,
|
148
|
+
theme: config.theme,
|
149
|
+
showTrailingSpace: config.showTrailingSpace,
|
150
|
+
showCursorWhenSelecting: true,
|
151
|
+
styleActiveLine: config.styleActiveLine,
|
152
|
+
viewportMargin: Infinity,
|
153
|
+
//extraKeys: {"Ctrl-Space": "autocomplete"},
|
154
|
+
extraKeys: {
|
155
|
+
"Ctrl-Q": function (codeMirror_Editor) {
|
156
|
+
if (config.enableCodeFolding) {
|
157
|
+
window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
},
|
161
|
+
foldGutter: true,
|
162
|
+
gutters: ["CodeMirror-linenumbbers", "CodeMirror-foldgutter"]
|
163
|
+
});
|
164
|
+
|
165
|
+
|
166
|
+
var holderHeight = height + 'px';
|
167
|
+
var holderWidth = width + 'px';
|
168
|
+
|
169
|
+
// Store config so we can access it within commands etc.
|
170
|
+
window["codemirror_" + editor.id].config = config;
|
171
|
+
|
172
|
+
if (config.autoFormatOnStart) {
|
173
|
+
if (config.useBeautifyOnStart) {
|
174
|
+
var indent_size = 4,
|
175
|
+
indent_char = ' ',
|
176
|
+
brace_style = 'collapse'; //collapse, expand, end-expand
|
177
|
+
|
178
|
+
var source = window["codemirror_" + editor.id].getValue();
|
179
|
+
|
180
|
+
window["codemirror_" + editor.id].setValue(html_beautify(source, indent_size, indent_char, 120, brace_style));
|
181
|
+
} else {
|
182
|
+
window["codemirror_" + editor.id].autoFormatAll({
|
183
|
+
line: 0,
|
184
|
+
ch: 0
|
185
|
+
}, {
|
186
|
+
line: window["codemirror_" + editor.id].lineCount(),
|
187
|
+
ch: 0
|
188
|
+
});
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
function getSelectedRange() {
|
193
|
+
return {
|
194
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
195
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
196
|
+
};
|
197
|
+
}
|
198
|
+
|
199
|
+
window["codemirror_" + editor.id].on("change", function () {
|
200
|
+
window["codemirror_" + editor.id].save();
|
201
|
+
editor.fire('change', this);
|
202
|
+
});
|
203
|
+
|
204
|
+
|
205
|
+
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
206
|
+
|
207
|
+
// Enable Code Folding (Requires 'lineNumbers' to be set to 'true')
|
208
|
+
if (config.lineNumbers && config.enableCodeFolding) {
|
209
|
+
window["codemirror_" + editor.id].on("gutterClick", window["foldFunc_" + editor.id]);
|
210
|
+
}
|
211
|
+
// Run config.onLoad callback, if present.
|
212
|
+
if (typeof config.onLoad === 'function') {
|
213
|
+
config.onLoad(window["codemirror_" + editor.id], editor);
|
214
|
+
}
|
215
|
+
|
216
|
+
// inherit blur event
|
217
|
+
window["codemirror_" + editor.id].on("blur", function () {
|
218
|
+
editor.fire('blur', this);
|
219
|
+
});
|
220
|
+
|
221
|
+
window["codemirror_" + editor.id].on("keypress", function (codeMirror_Editor, evt) {
|
222
|
+
if (config.enableCodeFormatting) {
|
223
|
+
var range = getSelectedRange();
|
224
|
+
if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && !evt.altKey) {
|
225
|
+
window["codemirror_" + editor.id].commentRange(true, range.from, range.to);
|
226
|
+
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && evt.shiftKey && !evt.altKey) {
|
227
|
+
window["codemirror_" + editor.id].commentRange(false, range.from, range.to);
|
228
|
+
if (config.autoFormatOnUncomment) {
|
229
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
230
|
+
}
|
231
|
+
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && evt.altKey) {
|
232
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
233
|
+
}/* else if (evt.type === "keydown") {
|
234
|
+
CodeMirror.commands.newlineAndIndentContinueMarkdownList(window["codemirror_" + editor.id]);
|
235
|
+
}*/
|
236
|
+
}
|
237
|
+
});
|
238
|
+
|
239
|
+
if (editor.plugins.textselection && textRange && !editor.config.fullPage) {
|
240
|
+
|
241
|
+
var start, end;
|
242
|
+
|
243
|
+
start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
|
244
|
+
|
245
|
+
if (typeof (textRange.endOffset) == 'undefined') {
|
246
|
+
window["codemirror_" + editor.id].focus();
|
247
|
+
window["codemirror_" + editor.id].setCursor(start);
|
248
|
+
} else {
|
249
|
+
window["codemirror_" + editor.id].focus();
|
250
|
+
end = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.endOffset);
|
251
|
+
window["codemirror_" + editor.id].setSelection(start, end);
|
252
|
+
}
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
|
257
|
+
return {
|
258
|
+
title: editor.lang.sourcedialog.title,
|
259
|
+
minWidth: minWidth,
|
260
|
+
minHeight: minHeight,
|
261
|
+
resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
|
262
|
+
onLoad: function() {
|
263
|
+
this.on('resize',
|
264
|
+
function (event) {
|
265
|
+
var parts = event.sender.parts;
|
266
|
+
var title = parts.title;
|
267
|
+
var footer = parts.footer;
|
268
|
+
|
269
|
+
var holderHeight = (event.data.height - title.$.offsetHeight - footer.$.offsetHeight) + 'px';
|
270
|
+
var holderWidth = event.data.width + 'px';
|
271
|
+
|
272
|
+
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
273
|
+
},
|
274
|
+
this);
|
275
|
+
},
|
276
|
+
onShow: function (event) {
|
277
|
+
// Set Elements
|
278
|
+
this.getContentElement('main', 'data').focus();
|
279
|
+
this.getContentElement('main', 'AutoComplete').setValue(config.autoCloseTags, true);
|
280
|
+
|
281
|
+
var textArea = this.getContentElement('main', 'data').getInputElement().$;
|
282
|
+
|
283
|
+
// Load the content
|
284
|
+
this.setValueOf('main', 'data', oldData = editor.getData());
|
285
|
+
|
286
|
+
if (config.autoLoadCodeMirror) {
|
287
|
+
|
288
|
+
if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
|
289
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
|
290
|
+
}
|
291
|
+
|
292
|
+
if (config.theme.length &&
|
293
|
+
config.theme != 'default' &&
|
294
|
+
!IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
295
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
296
|
+
}
|
297
|
+
if(requirePresent) {
|
298
|
+
require(getCodeMirrorDependencies(),function (codemirror, addons){
|
299
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
300
|
+
});
|
301
|
+
} else {
|
302
|
+
if (typeof (CodeMirror) == 'undefined') {
|
303
|
+
|
304
|
+
CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
|
305
|
+
function() {
|
306
|
+
|
307
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
308
|
+
function() {
|
309
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
310
|
+
});
|
311
|
+
});
|
312
|
+
|
313
|
+
|
314
|
+
} else {
|
315
|
+
if (CodeMirror.prototype['autoFormatAll']) {
|
316
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
317
|
+
} else {
|
318
|
+
// loading the add-on scripts.
|
319
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
320
|
+
function() {
|
321
|
+
loadCodeMirrorInline(editor, textArea, event.sender);
|
322
|
+
});
|
323
|
+
}
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
},
|
328
|
+
onCancel: function (event) {
|
329
|
+
if (event.data.hide) {
|
330
|
+
window["codemirror_" + editor.id].toTextArea();
|
331
|
+
|
332
|
+
// Free Memory
|
333
|
+
window["codemirror_" + editor.id] = null;
|
334
|
+
|
335
|
+
editor.fire('blur', this);
|
336
|
+
editor.fire('focus', this);
|
337
|
+
}
|
338
|
+
},
|
339
|
+
onOk: (function () {
|
340
|
+
|
341
|
+
function setData(newData) {
|
342
|
+
var that = this;
|
343
|
+
|
344
|
+
editor.setData(newData, function () {
|
345
|
+
that.hide();
|
346
|
+
|
347
|
+
// Ensure correct selection.
|
348
|
+
var range = editor.createRange();
|
349
|
+
range.moveToElementEditStart(editor.editable());
|
350
|
+
range.select();
|
351
|
+
});
|
352
|
+
}
|
353
|
+
|
354
|
+
return function () {
|
355
|
+
window["codemirror_" + editor.id].toTextArea();
|
356
|
+
|
357
|
+
// Free Memory
|
358
|
+
window["codemirror_" + editor.id] = null;
|
359
|
+
|
360
|
+
// Remove CR from input data for reliable comparison with editor data.
|
361
|
+
var newData = this.getValueOf('main', 'data').replace(/\r/g, '');
|
362
|
+
|
363
|
+
// Avoid unnecessary setData. Also preserve selection
|
364
|
+
// when user changed his mind and goes back to wysiwyg editing.
|
365
|
+
if (newData === oldData) {
|
366
|
+
editor.fire('blur', this);
|
367
|
+
editor.fire('focus', this);
|
368
|
+
return true;
|
369
|
+
}
|
370
|
+
|
371
|
+
// Set data asynchronously to avoid errors in IE.
|
372
|
+
CKEDITOR.env.ie ? CKEDITOR.tools.setTimeout(setData, 0, this, newData) : setData.call(this, newData);
|
373
|
+
|
374
|
+
editor.fire('blur', this);
|
375
|
+
editor.fire('focus', this);
|
376
|
+
|
377
|
+
// Don't let the dialog close before setData is over.
|
378
|
+
return false;
|
379
|
+
};
|
380
|
+
})(),
|
381
|
+
|
382
|
+
contents: [{
|
383
|
+
id: 'main',
|
384
|
+
label: editor.lang.sourcedialog.title,
|
385
|
+
elements: [
|
386
|
+
{
|
387
|
+
type: 'hbox',
|
388
|
+
style: 'width: 80px;margin:0;',
|
389
|
+
widths: ['20px', '20px', '20px', '20px'],
|
390
|
+
children: [
|
391
|
+
{
|
392
|
+
type: 'button',
|
393
|
+
id: 'searchCode',
|
394
|
+
label: '',
|
395
|
+
title: lang.searchCode,
|
396
|
+
'class': 'searchCodeButton',
|
397
|
+
onClick: function() {
|
398
|
+
CodeMirror.commands.find(window["codemirror_" + editor.id]);
|
399
|
+
}
|
400
|
+
}, {
|
401
|
+
type: 'button',
|
402
|
+
id: 'autoFormat',
|
403
|
+
label: '',
|
404
|
+
title: lang.autoFormat,
|
405
|
+
'class': 'autoFormat',
|
406
|
+
onClick: function() {
|
407
|
+
var range = {
|
408
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
409
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
410
|
+
};
|
411
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
412
|
+
}
|
413
|
+
}, {
|
414
|
+
type: 'button',
|
415
|
+
id: 'CommentSelectedRange',
|
416
|
+
label: '',
|
417
|
+
title: lang.commentSelectedRange,
|
418
|
+
'class': 'CommentSelectedRange',
|
419
|
+
onClick: function () {
|
420
|
+
var range = {
|
421
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
422
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
423
|
+
};
|
424
|
+
window["codemirror_" + editor.id].commentRange(true, range.from, range.to);
|
425
|
+
}
|
426
|
+
}, {
|
427
|
+
type: 'button',
|
428
|
+
id: 'UncommentSelectedRange',
|
429
|
+
label: '',
|
430
|
+
title: lang.uncommentSelectedRange,
|
431
|
+
'class': 'UncommentSelectedRange',
|
432
|
+
onClick: function () {
|
433
|
+
var range = {
|
434
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
435
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
436
|
+
};
|
437
|
+
window["codemirror_" + editor.id].commentRange(false, range.from, range.to);
|
438
|
+
if (window["codemirror_" + editor.id].config.autoFormatOnUncomment) {
|
439
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}]
|
443
|
+
}, {
|
444
|
+
type: 'checkbox',
|
445
|
+
id: 'AutoComplete',
|
446
|
+
label: lang.autoCompleteToggle,
|
447
|
+
title: lang.autoCompleteToggle,
|
448
|
+
onChange: function () {
|
449
|
+
window["codemirror_" + editor.id].setOption("autoCloseTags", this.getValue());
|
450
|
+
}
|
451
|
+
}, {
|
452
|
+
type: 'textarea',
|
453
|
+
id: 'data',
|
454
|
+
dir: 'ltr',
|
455
|
+
inputStyle: 'cursor:auto;' +
|
456
|
+
'width:' + minWidth + 'px;' +
|
457
|
+
'height:' + minHeight + 'px;' +
|
458
|
+
'tab-size:4;' +
|
459
|
+
'text-align:left;',
|
460
|
+
'class': 'cke_source cke_enable_context_menu'
|
461
|
+
}
|
462
|
+
]
|
463
|
+
}]
|
464
|
+
};
|
465
|
+
});
|
466
|
+
|
467
|
+
// return;
|
468
|
+
}
|
469
|
+
|
470
|
+
/*
|
471
|
+
// Override Copy Button
|
472
|
+
if (editor.commands.copy) {
|
473
|
+
editor.commands.copy.modes = {
|
474
|
+
wysiwyg: 1,
|
475
|
+
source: 1
|
476
|
+
};
|
477
|
+
|
478
|
+
// TODO
|
479
|
+
}
|
480
|
+
|
481
|
+
// Override Paste Button
|
482
|
+
if (editor.commands.paste) {
|
483
|
+
editor.commands.paste.modes = {
|
484
|
+
wysiwyg: 1,
|
485
|
+
source: 1
|
486
|
+
};
|
487
|
+
// TODO
|
488
|
+
|
489
|
+
}
|
490
|
+
|
491
|
+
// Override Cut Button
|
492
|
+
if (editor.commands.cut) {
|
493
|
+
editor.commands.cut.modes = {
|
494
|
+
wysiwyg: 1,
|
495
|
+
source: 1
|
496
|
+
};
|
497
|
+
|
498
|
+
// TODO
|
499
|
+
}*/
|
500
|
+
|
501
|
+
// Override Find Button
|
502
|
+
if (editor.commands.find) {
|
503
|
+
editor.commands.find.modes = {
|
504
|
+
wysiwyg: 1,
|
505
|
+
source: 1
|
506
|
+
};
|
507
|
+
|
508
|
+
editor.commands.find.exec = function() {
|
509
|
+
if (editor.mode === 'wysiwyg') {
|
510
|
+
editor.openDialog('find');
|
511
|
+
} else {
|
512
|
+
CodeMirror.commands.find(window["codemirror_" + editor.id]);
|
513
|
+
}
|
514
|
+
};
|
515
|
+
}
|
516
|
+
|
517
|
+
// Override Replace Button
|
518
|
+
if (editor.commands.replace) {
|
519
|
+
editor.commands.replace.modes = {
|
520
|
+
wysiwyg: 1,
|
521
|
+
source: 1
|
522
|
+
};
|
523
|
+
|
524
|
+
editor.commands.replace.exec = function () {
|
525
|
+
if (editor.mode === 'wysiwyg') {
|
526
|
+
editor.openDialog('replace');
|
527
|
+
} else {
|
528
|
+
CodeMirror.commands.replace(window["codemirror_" + editor.id]);
|
529
|
+
}
|
530
|
+
};
|
531
|
+
}
|
532
|
+
|
533
|
+
var sourcearea = CKEDITOR.plugins.sourcearea;
|
534
|
+
|
535
|
+
// check if sourcearea plugin is overrriden
|
536
|
+
if (!sourcearea.commands.searchCode) {
|
537
|
+
|
538
|
+
CKEDITOR.plugins.sourcearea.commands = {
|
539
|
+
source: {
|
540
|
+
modes: {
|
541
|
+
wysiwyg: 1,
|
542
|
+
source: 1
|
543
|
+
},
|
544
|
+
editorFocus: false,
|
545
|
+
readOnly: 1,
|
546
|
+
exec: function(editorInstance) {
|
547
|
+
if (editorInstance.mode === 'wysiwyg') {
|
548
|
+
editorInstance.fire('saveSnapshot');
|
549
|
+
}
|
550
|
+
editorInstance.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
|
551
|
+
editorInstance.setMode(editorInstance.mode === 'source' ? 'wysiwyg' : 'source');
|
552
|
+
},
|
553
|
+
canUndo: false
|
554
|
+
},
|
555
|
+
searchCode: {
|
556
|
+
modes: {
|
557
|
+
wysiwyg: 0,
|
558
|
+
source: 1
|
559
|
+
},
|
560
|
+
editorFocus: false,
|
561
|
+
readOnly: 1,
|
562
|
+
exec: function (editorInstance) {
|
563
|
+
CodeMirror.commands.find(window["codemirror_" + editorInstance.id]);
|
564
|
+
},
|
565
|
+
canUndo: true
|
566
|
+
},
|
567
|
+
autoFormat: {
|
568
|
+
modes: {
|
569
|
+
wysiwyg: 0,
|
570
|
+
source: 1
|
571
|
+
},
|
572
|
+
editorFocus: false,
|
573
|
+
readOnly: 1,
|
574
|
+
exec: function (editorInstance) {
|
575
|
+
var range = {
|
576
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
577
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
578
|
+
};
|
579
|
+
window["codemirror_" + editorInstance.id].autoFormatRange(range.from, range.to);
|
580
|
+
},
|
581
|
+
canUndo: true
|
582
|
+
},
|
583
|
+
commentSelectedRange: {
|
584
|
+
modes: {
|
585
|
+
wysiwyg: 0,
|
586
|
+
source: 1
|
587
|
+
},
|
588
|
+
editorFocus: false,
|
589
|
+
readOnly: 1,
|
590
|
+
exec: function (editorInstance) {
|
591
|
+
var range = {
|
592
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
593
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
594
|
+
};
|
595
|
+
window["codemirror_" + editorInstance.id].commentRange(true, range.from, range.to);
|
596
|
+
},
|
597
|
+
canUndo: true
|
598
|
+
},
|
599
|
+
uncommentSelectedRange: {
|
600
|
+
modes: {
|
601
|
+
wysiwyg: 0,
|
602
|
+
source: 1
|
603
|
+
},
|
604
|
+
editorFocus: false,
|
605
|
+
readOnly: 1,
|
606
|
+
exec: function (editorInstance) {
|
607
|
+
var range = {
|
608
|
+
from: window["codemirror_" + editorInstance.id].getCursor(true),
|
609
|
+
to: window["codemirror_" + editorInstance.id].getCursor(false)
|
610
|
+
};
|
611
|
+
window["codemirror_" + editorInstance.id].commentRange(false, range.from, range.to);
|
612
|
+
if (window["codemirror_" + editorInstance.id].config.autoFormatOnUncomment) {
|
613
|
+
window["codemirror_" + editorInstance.id].autoFormatRange(
|
614
|
+
range.from,
|
615
|
+
range.to);
|
616
|
+
}
|
617
|
+
},
|
618
|
+
canUndo: true
|
619
|
+
},
|
620
|
+
autoCompleteToggle: {
|
621
|
+
modes: {
|
622
|
+
wysiwyg: 0,
|
623
|
+
source: 1
|
624
|
+
},
|
625
|
+
editorFocus: false,
|
626
|
+
readOnly: 1,
|
627
|
+
exec: function (editorInstance) {
|
628
|
+
if (this.state == CKEDITOR.TRISTATE_ON) {
|
629
|
+
window["codemirror_" + editorInstance.id].setOption("autoCloseTags", false);
|
630
|
+
} else if (this.state == CKEDITOR.TRISTATE_OFF) {
|
631
|
+
window["codemirror_" + editorInstance.id].setOption("autoCloseTags", true);
|
632
|
+
}
|
633
|
+
|
634
|
+
this.toggleState();
|
635
|
+
},
|
636
|
+
canUndo: true
|
637
|
+
}
|
638
|
+
};
|
639
|
+
}
|
640
|
+
|
641
|
+
editor.addMode('source', function (callback) {
|
642
|
+
if (!config.autoLoadCodeMirror) {
|
643
|
+
return;
|
644
|
+
}
|
645
|
+
|
646
|
+
if (!IsStyleSheetAlreadyLoaded(rootPath + 'css/codemirror.min.css')) {
|
647
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'css/codemirror.min.css');
|
648
|
+
}
|
649
|
+
|
650
|
+
if (config.theme.length &&
|
651
|
+
config.theme != 'default' &&
|
652
|
+
!IsStyleSheetAlreadyLoaded(rootPath + 'theme/' + config.theme + '.css')) {
|
653
|
+
CKEDITOR.document.appendStyleSheet(rootPath + 'theme/' + config.theme + '.css');
|
654
|
+
}
|
655
|
+
|
656
|
+
if (requirePresent) {
|
657
|
+
require(getCodeMirrorDependencies(), function () {
|
658
|
+
loadCodeMirror(editor);
|
659
|
+
callback();
|
660
|
+
});
|
661
|
+
} else {
|
662
|
+
if (typeof (CodeMirror) == 'undefined') {
|
663
|
+
|
664
|
+
CKEDITOR.scriptLoader.load(rootPath + 'js/codemirror.min.js',
|
665
|
+
function() {
|
666
|
+
|
667
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
668
|
+
function() {
|
669
|
+
loadCodeMirror(editor);
|
670
|
+
callback();
|
671
|
+
});
|
672
|
+
});
|
673
|
+
} else {
|
674
|
+
if (CodeMirror.prototype['autoFormatAll']) {
|
675
|
+
loadCodeMirror(editor);
|
676
|
+
callback();
|
677
|
+
} else {
|
678
|
+
// loading the add-on scripts.
|
679
|
+
CKEDITOR.scriptLoader.load(getCodeMirrorScripts(),
|
680
|
+
function() {
|
681
|
+
loadCodeMirror(editor);
|
682
|
+
callback();
|
683
|
+
});
|
684
|
+
}
|
685
|
+
}
|
686
|
+
}
|
687
|
+
|
688
|
+
});
|
689
|
+
function getCodeMirrorDependencies() {
|
690
|
+
var dependencies = ['core', 'addons'];
|
691
|
+
switch (config.mode) {
|
692
|
+
case "bbcode":
|
693
|
+
case "bbcodemixed":
|
694
|
+
dependencies.push('modeHtml');
|
695
|
+
break;
|
696
|
+
case "application/x-httpd-php":
|
697
|
+
dependencies.push('modePHP');
|
698
|
+
break;
|
699
|
+
case "text/javascript":
|
700
|
+
dependencies.push('modeJs');
|
701
|
+
break;
|
702
|
+
case "twig":
|
703
|
+
dependencies.push('modeTwig');
|
704
|
+
break;
|
705
|
+
case "htmlmixed":
|
706
|
+
case "text/html":
|
707
|
+
default:
|
708
|
+
dependencies.push('modeHtml');
|
709
|
+
}
|
710
|
+
|
711
|
+
if (config.useBeautifyOnStart) {
|
712
|
+
dependencies.push('beautifyModule');
|
713
|
+
}
|
714
|
+
|
715
|
+
if (config.enableSearchTools) {
|
716
|
+
dependencies.push('addonSearch');
|
717
|
+
}
|
718
|
+
return dependencies;
|
719
|
+
}
|
720
|
+
|
721
|
+
function getCodeMirrorScripts() {
|
722
|
+
var scriptFiles = [rootPath + 'js/codemirror.addons.min.js'];
|
723
|
+
|
724
|
+
switch (config.mode) {
|
725
|
+
case "bbcode":
|
726
|
+
{
|
727
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.bbcode.min.js');
|
728
|
+
}
|
729
|
+
|
730
|
+
break;
|
731
|
+
case "bbcodemixed":
|
732
|
+
{
|
733
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.bbcodemixed.min.js');
|
734
|
+
}
|
735
|
+
|
736
|
+
break;
|
737
|
+
case "htmlmixed":
|
738
|
+
{
|
739
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
740
|
+
}
|
741
|
+
|
742
|
+
break;
|
743
|
+
case "text/html":
|
744
|
+
{
|
745
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
746
|
+
}
|
747
|
+
|
748
|
+
break;
|
749
|
+
case "application/x-httpd-php":
|
750
|
+
{
|
751
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.php.min.js');
|
752
|
+
}
|
753
|
+
|
754
|
+
break;
|
755
|
+
case "text/javascript":
|
756
|
+
{
|
757
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.javascript.min.js');
|
758
|
+
}
|
759
|
+
|
760
|
+
break;
|
761
|
+
case "twig":
|
762
|
+
{
|
763
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.twig.min.js');
|
764
|
+
}
|
765
|
+
|
766
|
+
break;
|
767
|
+
default:
|
768
|
+
scriptFiles.push(rootPath + 'js/codemirror.mode.htmlmixed.min.js');
|
769
|
+
}
|
770
|
+
|
771
|
+
if (config.useBeautifyOnStart) {
|
772
|
+
scriptFiles.push(rootPath + 'js/beautify.min.js');
|
773
|
+
}
|
774
|
+
|
775
|
+
if (config.enableSearchTools) {
|
776
|
+
scriptFiles.push(rootPath + 'js/codemirror.addons.search.min.js');
|
777
|
+
}
|
778
|
+
return scriptFiles;
|
779
|
+
}
|
780
|
+
|
781
|
+
function loadCodeMirror(editor) {
|
782
|
+
var contentsSpace = editor.ui.space('contents'),
|
783
|
+
textarea = contentsSpace.getDocument().createElement('textarea');
|
784
|
+
|
785
|
+
textarea.setStyles(
|
786
|
+
CKEDITOR.tools.extend({
|
787
|
+
// IE7 has overflow the <textarea> from wrapping table cell.
|
788
|
+
width: CKEDITOR.env.ie7Compat ? '99%' : '100%',
|
789
|
+
height: '100%',
|
790
|
+
resize: 'none',
|
791
|
+
outline: 'none',
|
792
|
+
'text-align': 'left'
|
793
|
+
},
|
794
|
+
CKEDITOR.tools.cssVendorPrefix('tab-size', editor.config.sourceAreaTabSize || 4)));
|
795
|
+
var ariaLabel = [editor.lang.editor, editor.name].join(',');
|
796
|
+
textarea.setAttributes({
|
797
|
+
dir: 'ltr',
|
798
|
+
tabIndex: CKEDITOR.env.webkit ? -1 : editor.tabIndex,
|
799
|
+
'role': 'textbox',
|
800
|
+
'aria-label': ariaLabel
|
801
|
+
});
|
802
|
+
textarea.addClass('cke_source');
|
803
|
+
textarea.addClass('cke_reset');
|
804
|
+
textarea.addClass('cke_enable_context_menu');
|
805
|
+
editor.ui.space('contents').append(textarea);
|
806
|
+
window["editable_" + editor.id] = editor.editable(new sourceEditable(editor, textarea));
|
807
|
+
// Fill the textarea with the current editor data.
|
808
|
+
window["editable_" + editor.id].setData(editor.getData(1));
|
809
|
+
window["editable_" + editor.id].editorID = editor.id;
|
810
|
+
editor.fire('ariaWidget', this);
|
811
|
+
|
812
|
+
var sourceAreaElement = window["editable_" + editor.id],
|
813
|
+
holderElement = sourceAreaElement.getParent();
|
814
|
+
|
815
|
+
/*CodeMirror.commands.autocomplete = function(cm) {
|
816
|
+
CodeMirror.showHint(cm, CodeMirror.htmlHint);
|
817
|
+
};*/
|
818
|
+
|
819
|
+
// Enable Code Folding (Requires 'lineNumbers' to be set to 'true')
|
820
|
+
if (config.lineNumbers && config.enableCodeFolding) {
|
821
|
+
window["foldFunc_" + editor.id] = CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder);
|
822
|
+
}
|
823
|
+
|
824
|
+
function getCodeMirrorKey(ckeditorKeystroke) {
|
825
|
+
var MODIFIERS = [
|
826
|
+
[CKEDITOR.SHIFT, "Shift-"],
|
827
|
+
[CKEDITOR.CTRL, "Ctrl-"],
|
828
|
+
[CKEDITOR.ALT, "Alt-"]
|
829
|
+
];
|
830
|
+
var keyModifiers = "";
|
831
|
+
for (var i = 0; i < MODIFIERS.length; i++) {
|
832
|
+
if (ckeditorKeystroke & MODIFIERS[i][0]) {
|
833
|
+
ckeditorKeystroke -= MODIFIERS[i][0];
|
834
|
+
keyModifiers += MODIFIERS[i][1];
|
835
|
+
}
|
836
|
+
}
|
837
|
+
if (CodeMirror.keyNames[ckeditorKeystroke]) {
|
838
|
+
return keyModifiers + CodeMirror.keyNames[ckeditorKeystroke];
|
839
|
+
}
|
840
|
+
return null;
|
841
|
+
}
|
842
|
+
|
843
|
+
function addCKEditorKeystrokes(editorExtraKeys) {
|
844
|
+
var ckeditorKeystrokes = editor.config.keystrokes;
|
845
|
+
if (CKEDITOR.tools.isArray(ckeditorKeystrokes)) {
|
846
|
+
for (var i = 0; i < ckeditorKeystrokes.length; i++) {
|
847
|
+
var key = getCodeMirrorKey(ckeditorKeystrokes[i][0]);
|
848
|
+
if (key !== null) {
|
849
|
+
(function (command) {
|
850
|
+
editorExtraKeys[key] = function () {
|
851
|
+
editor.execCommand(command);
|
852
|
+
}
|
853
|
+
})(ckeditorKeystrokes[i][1]);
|
854
|
+
}
|
855
|
+
}
|
856
|
+
}
|
857
|
+
}
|
858
|
+
|
859
|
+
var extraKeys = {
|
860
|
+
"Ctrl-Q": function(codeMirror_Editor) {
|
861
|
+
if (config.enableCodeFolding) {
|
862
|
+
window["foldFunc_" + editor.id](codeMirror_Editor, codeMirror_Editor.getCursor().line);
|
863
|
+
}
|
864
|
+
}
|
865
|
+
};
|
866
|
+
|
867
|
+
addCKEditorKeystrokes(extraKeys);
|
868
|
+
|
869
|
+
window["codemirror_" + editor.id] = CodeMirror.fromTextArea(sourceAreaElement.$, {
|
870
|
+
mode: config.mode,
|
871
|
+
matchBrackets: config.matchBrackets,
|
872
|
+
maxHighlightLineLength: config.maxHighlightLineLength,
|
873
|
+
matchTags: config.matchTags,
|
874
|
+
workDelay: 300,
|
875
|
+
workTime: 35,
|
876
|
+
readOnly: editor.readOnly,
|
877
|
+
lineNumbers: config.lineNumbers,
|
878
|
+
lineWrapping: true,
|
879
|
+
autoCloseTags: config.autoCloseTags,
|
880
|
+
autoCloseBrackets: config.autoCloseBrackets,
|
881
|
+
highlightSelectionMatches: config.highlightMatches,
|
882
|
+
continueComments: config.continueComments,
|
883
|
+
indentWithTabs: config.indentWithTabs,
|
884
|
+
theme: config.theme,
|
885
|
+
showTrailingSpace: config.showTrailingSpace,
|
886
|
+
showCursorWhenSelecting: true,
|
887
|
+
styleActiveLine: config.styleActiveLine,
|
888
|
+
//extraKeys: {"Ctrl-Space": "autocomplete"},
|
889
|
+
extraKeys: extraKeys,
|
890
|
+
foldGutter: true,
|
891
|
+
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
892
|
+
});
|
893
|
+
|
894
|
+
var holderHeight = holderElement.$.clientHeight == 0 ? editor.ui.space('contents').getStyle('height') : holderElement.$.clientHeight + 'px';
|
895
|
+
var holderWidth = holderElement.$.clientWidth + 'px';
|
896
|
+
|
897
|
+
// Store config so we can access it within commands etc.
|
898
|
+
window["codemirror_" + editor.id].config = config;
|
899
|
+
if (config.autoFormatOnStart) {
|
900
|
+
if (config.useBeautifyOnStart) {
|
901
|
+
var indent_size = 4;
|
902
|
+
var indent_char = ' ';
|
903
|
+
var brace_style = 'collapse'; //collapse, expand, end-expand
|
904
|
+
|
905
|
+
var source = window["codemirror_" + editor.id].getValue();
|
906
|
+
|
907
|
+
window["codemirror_" + editor.id].setValue(html_beautify(source, indent_size, indent_char, 120, brace_style));
|
908
|
+
} else {
|
909
|
+
window["codemirror_" + editor.id].autoFormatAll({
|
910
|
+
line: 0,
|
911
|
+
ch: 0
|
912
|
+
}, {
|
913
|
+
line: window["codemirror_" + editor.id].lineCount(),
|
914
|
+
ch: 0
|
915
|
+
});
|
916
|
+
}
|
917
|
+
}
|
918
|
+
|
919
|
+
function getSelectedRange() {
|
920
|
+
return {
|
921
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
922
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
923
|
+
};
|
924
|
+
}
|
925
|
+
|
926
|
+
window["codemirror_" + editor.id].on("change", function () {
|
927
|
+
window["codemirror_" + editor.id].save();
|
928
|
+
editor.fire('change', this);
|
929
|
+
});
|
930
|
+
|
931
|
+
window["codemirror_" + editor.id].setSize(null, holderHeight);
|
932
|
+
|
933
|
+
// Enable Code Folding (Requires 'lineNumbers' to be set to 'true')
|
934
|
+
if (config.lineNumbers && config.enableCodeFolding) {
|
935
|
+
window["codemirror_" + editor.id].on("gutterClick", window["foldFunc_" + editor.id]);
|
936
|
+
}
|
937
|
+
|
938
|
+
// Run config.onLoad callback, if present.
|
939
|
+
if (typeof config.onLoad === 'function') {
|
940
|
+
config.onLoad(window["codemirror_" + editor.id], editor);
|
941
|
+
}
|
942
|
+
|
943
|
+
// inherit blur event
|
944
|
+
window["codemirror_" + editor.id].on("blur", function () {
|
945
|
+
editor.fire('blur', this);
|
946
|
+
});
|
947
|
+
|
948
|
+
window["codemirror_" + editor.id].on("keypress", function (codeMirror_Editor, evt) {
|
949
|
+
if (config.enableCodeFormatting) {
|
950
|
+
var range = getSelectedRange();
|
951
|
+
if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && !evt.altKey) {
|
952
|
+
window["codemirror_" + editor.id].commentRange(true, range.from, range.to);
|
953
|
+
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && evt.shiftKey && !evt.altKey) {
|
954
|
+
window["codemirror_" + editor.id].commentRange(false, range.from, range.to);
|
955
|
+
if (config.autoFormatOnUncomment) {
|
956
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
957
|
+
}
|
958
|
+
} else if (evt.type === "keydown" && evt.ctrlKey && evt.keyCode === 75 && !evt.shiftKey && evt.altKey) {
|
959
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
960
|
+
}/* else if (evt.type === "keydown") {
|
961
|
+
CodeMirror.commands.newlineAndIndentContinueMarkdownList(window["codemirror_" + editor.id]);
|
962
|
+
}*/
|
963
|
+
}
|
964
|
+
});
|
965
|
+
}
|
966
|
+
|
967
|
+
editor.addCommand('source', sourcearea.commands.source);
|
968
|
+
if (editor.ui.addButton) {
|
969
|
+
editor.ui.addButton('Source', {
|
970
|
+
label: editor.lang.codemirror.toolbar,
|
971
|
+
command: 'source',
|
972
|
+
toolbar: 'mode,10'
|
973
|
+
});
|
974
|
+
}
|
975
|
+
if (config.enableCodeFormatting) {
|
976
|
+
editor.addCommand('searchCode', sourcearea.commands.searchCode);
|
977
|
+
editor.addCommand('autoFormat', sourcearea.commands.autoFormat);
|
978
|
+
editor.addCommand('commentSelectedRange', sourcearea.commands.commentSelectedRange);
|
979
|
+
editor.addCommand('uncommentSelectedRange', sourcearea.commands.uncommentSelectedRange);
|
980
|
+
editor.addCommand('autoCompleteToggle', sourcearea.commands.autoCompleteToggle);
|
981
|
+
|
982
|
+
if (editor.ui.addButton) {
|
983
|
+
if (config.showFormatButton || config.showCommentButton || config.showUncommentButton || config.showSearchButton) {
|
984
|
+
editor.ui.add('-', CKEDITOR.UI_SEPARATOR, { toolbar: 'mode,30' });
|
985
|
+
}
|
986
|
+
if (config.showSearchButton && config.enableSearchTools) {
|
987
|
+
editor.ui.addButton('searchCode', {
|
988
|
+
label: lang.searchCode,
|
989
|
+
command: 'searchCode',
|
990
|
+
toolbar: 'mode,40'
|
991
|
+
});
|
992
|
+
}
|
993
|
+
if (config.showFormatButton) {
|
994
|
+
editor.ui.addButton('autoFormat', {
|
995
|
+
label: lang.autoFormat,
|
996
|
+
command: 'autoFormat',
|
997
|
+
toolbar: 'mode,50'
|
998
|
+
});
|
999
|
+
}
|
1000
|
+
if (config.showCommentButton) {
|
1001
|
+
editor.ui.addButton('CommentSelectedRange', {
|
1002
|
+
label: lang.commentSelectedRange,
|
1003
|
+
command: 'commentSelectedRange',
|
1004
|
+
toolbar: 'mode,60'
|
1005
|
+
});
|
1006
|
+
}
|
1007
|
+
if (config.showUncommentButton) {
|
1008
|
+
editor.ui.addButton('UncommentSelectedRange', {
|
1009
|
+
label: lang.uncommentSelectedRange,
|
1010
|
+
command: 'uncommentSelectedRange',
|
1011
|
+
toolbar: 'mode,70'
|
1012
|
+
});
|
1013
|
+
}
|
1014
|
+
if (config.showAutoCompleteButton) {
|
1015
|
+
editor.ui.addButton('AutoComplete', {
|
1016
|
+
label: lang.autoCompleteToggle,
|
1017
|
+
command: 'autoCompleteToggle',
|
1018
|
+
toolbar: 'mode,80'
|
1019
|
+
});
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
editor.on('beforeModeUnload', function (evt) {
|
1025
|
+
if (editor.mode === 'source' && editor.plugins.textselection && !editor.config.fullPage) {
|
1026
|
+
|
1027
|
+
var range = editor.getTextSelection();
|
1028
|
+
|
1029
|
+
range.startOffset = LineChannelToOffSet(window["codemirror_" + editor.id], window["codemirror_" + editor.id].getCursor(true));
|
1030
|
+
range.endOffset = LineChannelToOffSet(window["codemirror_" + editor.id], window["codemirror_" + editor.id].getCursor(false));
|
1031
|
+
|
1032
|
+
// Fly the range when create bookmark.
|
1033
|
+
delete range.element;
|
1034
|
+
range.createBookmark(editor);
|
1035
|
+
sourceBookmark = true;
|
1036
|
+
|
1037
|
+
if (editor.undoManager) {
|
1038
|
+
editor.undoManager.unlock();
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
evt.data = range.content;
|
1042
|
+
}
|
1043
|
+
});
|
1044
|
+
editor.on('mode', function () {
|
1045
|
+
editor.getCommand('source').setState(editor.mode === 'source' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
1046
|
+
|
1047
|
+
if (editor.mode === 'source') {
|
1048
|
+
editor.getCommand('autoCompleteToggle').setState(window["codemirror_" + editor.id].config.autoCloseTags ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
1049
|
+
|
1050
|
+
if (editor.plugins.textselection && textRange && !editor.config.fullPage) {
|
1051
|
+
|
1052
|
+
//textRange.element = new CKEDITOR.dom.element(editor._.editable.$);
|
1053
|
+
//textRange.select();
|
1054
|
+
|
1055
|
+
var start, end;
|
1056
|
+
|
1057
|
+
start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);
|
1058
|
+
|
1059
|
+
if (typeof (textRange.endOffset) == 'undefined') {
|
1060
|
+
window["codemirror_" + editor.id].focus();
|
1061
|
+
window["codemirror_" + editor.id].setCursor(start);
|
1062
|
+
} else {
|
1063
|
+
window["codemirror_" + editor.id].focus();
|
1064
|
+
end = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.endOffset);
|
1065
|
+
window["codemirror_" + editor.id].setSelection(start, end);
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
});
|
1071
|
+
editor.on('resize', function() {
|
1072
|
+
if (window["editable_" + editor.id] && editor.mode === 'source') {
|
1073
|
+
var holderElement = window["editable_" + editor.id].getParent();
|
1074
|
+
var holderHeight = holderElement.$.clientHeight + 'px';
|
1075
|
+
var holderWidth = holderElement.$.clientWidth + 'px';
|
1076
|
+
window["codemirror_" + editor.id].setSize(holderWidth, holderHeight);
|
1077
|
+
}
|
1078
|
+
});
|
1079
|
+
|
1080
|
+
editor.on('readOnly', function () {
|
1081
|
+
if (window["editable_" + editor.id] && editor.mode === 'source') {
|
1082
|
+
window["codemirror_" + editor.id].setOption("readOnly", this.readOnly);
|
1083
|
+
}
|
1084
|
+
});
|
1085
|
+
|
1086
|
+
editor.on('instanceReady', function (evt) {
|
1087
|
+
|
1088
|
+
//editor.container.getPrivate().events.contextmenu.listeners.splice(0, 1);
|
1089
|
+
|
1090
|
+
var selectAllCommand = editor.commands.selectAll;
|
1091
|
+
|
1092
|
+
// Replace Complete SelectAll command from the plugin, otherwise it will not work in IE10
|
1093
|
+
if (selectAllCommand != null) {
|
1094
|
+
selectAllCommand.exec = function () {
|
1095
|
+
if (editor.mode === 'source') {
|
1096
|
+
window["codemirror_" + editor.id].setSelection({
|
1097
|
+
line: 0,
|
1098
|
+
ch: 0
|
1099
|
+
}, {
|
1100
|
+
line: window["codemirror_" + editor.id].lineCount(),
|
1101
|
+
ch: 0
|
1102
|
+
});
|
1103
|
+
} else {
|
1104
|
+
var editable = editor.editable();
|
1105
|
+
if (editable.is('body'))
|
1106
|
+
editor.document.$.execCommand('SelectAll', false, null);
|
1107
|
+
else {
|
1108
|
+
var range = editor.createRange();
|
1109
|
+
range.selectNodeContents(editable);
|
1110
|
+
range.select();
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
// Force triggering selectionChange (#7008)
|
1114
|
+
editor.forceNextSelectionCheck();
|
1115
|
+
editor.selectionChange();
|
1116
|
+
}
|
1117
|
+
};
|
1118
|
+
}
|
1119
|
+
});
|
1120
|
+
|
1121
|
+
if (typeof (jQuery) != 'undefined' && jQuery('a[data-toggle="tab"]') && window["codemirror_" + editor.id]) {
|
1122
|
+
jQuery('a[data-toggle="tab"]').on('shown.bs.tab', function() {
|
1123
|
+
window["codemirror_" + editor.id].refresh();
|
1124
|
+
});
|
1125
|
+
}
|
1126
|
+
|
1127
|
+
editor.on('setData', function(data) {
|
1128
|
+
|
1129
|
+
if (window["editable_" + data.editor.id] && data.editor.mode === 'source') {
|
1130
|
+
window["codemirror_" + data.editor.id].setValue(data.data.dataValue);
|
1131
|
+
}
|
1132
|
+
});
|
1133
|
+
}
|
1134
|
+
});
|
1135
|
+
var sourceEditable = CKEDITOR.tools.createClass({
|
1136
|
+
base: CKEDITOR.editable,
|
1137
|
+
proto: {
|
1138
|
+
setData: function (data) {
|
1139
|
+
|
1140
|
+
this.setValue(data);
|
1141
|
+
|
1142
|
+
if (window["editable_" + this.editor.id] && this.editor.mode === 'source') {
|
1143
|
+
window["codemirror_" + this.editor.id].setValue(data);
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
this.editor.fire('dataReady');
|
1147
|
+
},
|
1148
|
+
getData: function() {
|
1149
|
+
return this.getValue();
|
1150
|
+
},
|
1151
|
+
// Insertions are not supported in source editable.
|
1152
|
+
insertHtml: function() {
|
1153
|
+
},
|
1154
|
+
insertElement: function() {
|
1155
|
+
},
|
1156
|
+
insertText: function() {
|
1157
|
+
},
|
1158
|
+
// Read-only support for textarea.
|
1159
|
+
setReadOnly: function(isReadOnly) {
|
1160
|
+
this[(isReadOnly ? 'set' : 'remove') + 'Attribute']('readOnly', 'readonly');
|
1161
|
+
},
|
1162
|
+
editorID: null,
|
1163
|
+
detach: function() {
|
1164
|
+
window["codemirror_" + this.editorID].toTextArea();
|
1165
|
+
|
1166
|
+
// Free Memory on destroy
|
1167
|
+
window["editable_" + this.editorID] = null;
|
1168
|
+
window["codemirror_" + this.editorID] = null;
|
1169
|
+
|
1170
|
+
sourceEditable.baseProto.detach.call(this);
|
1171
|
+
|
1172
|
+
this.clearCustomData();
|
1173
|
+
this.remove();
|
1174
|
+
}
|
1175
|
+
}
|
1176
|
+
});
|
1177
|
+
})();
|
1178
|
+
CKEDITOR.plugins.sourcearea = {
|
1179
|
+
commands: {
|
1180
|
+
source: {
|
1181
|
+
modes: {
|
1182
|
+
wysiwyg: 1,
|
1183
|
+
source: 1
|
1184
|
+
},
|
1185
|
+
editorFocus: false,
|
1186
|
+
readOnly: 1,
|
1187
|
+
exec: function(editor) {
|
1188
|
+
if (editor.mode === 'wysiwyg') {
|
1189
|
+
editor.fire('saveSnapshot');
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
editor.getCommand('source').setState(CKEDITOR.TRISTATE_DISABLED);
|
1193
|
+
editor.setMode(editor.mode === 'source' ? 'wysiwyg' : 'source');
|
1194
|
+
},
|
1195
|
+
canUndo: false
|
1196
|
+
},
|
1197
|
+
searchCode: {
|
1198
|
+
modes: {
|
1199
|
+
wysiwyg: 0,
|
1200
|
+
source: 1
|
1201
|
+
},
|
1202
|
+
editorFocus: false,
|
1203
|
+
readOnly: 1,
|
1204
|
+
exec: function(editor) {
|
1205
|
+
CodeMirror.commands.find(window["codemirror_" + editor.id]);
|
1206
|
+
},
|
1207
|
+
canUndo: true
|
1208
|
+
},
|
1209
|
+
autoFormat: {
|
1210
|
+
modes: {
|
1211
|
+
wysiwyg: 0,
|
1212
|
+
source: 1
|
1213
|
+
},
|
1214
|
+
editorFocus: false,
|
1215
|
+
readOnly: 0,
|
1216
|
+
exec: function (editor) {
|
1217
|
+
var range = {
|
1218
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
1219
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
1220
|
+
};
|
1221
|
+
window["codemirror_" + editor.id].autoFormatRange(range.from, range.to);
|
1222
|
+
},
|
1223
|
+
canUndo: true
|
1224
|
+
},
|
1225
|
+
commentSelectedRange: {
|
1226
|
+
modes: {
|
1227
|
+
wysiwyg: 0,
|
1228
|
+
source: 1
|
1229
|
+
},
|
1230
|
+
editorFocus: false,
|
1231
|
+
readOnly: 0,
|
1232
|
+
exec: function (editor) {
|
1233
|
+
var range = {
|
1234
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
1235
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
1236
|
+
};
|
1237
|
+
window["codemirror_" + editor.id].commentRange(true, range.from, range.to);
|
1238
|
+
},
|
1239
|
+
canUndo: true
|
1240
|
+
},
|
1241
|
+
uncommentSelectedRange: {
|
1242
|
+
modes: {
|
1243
|
+
wysiwyg: 0,
|
1244
|
+
source: 1
|
1245
|
+
},
|
1246
|
+
editorFocus: false,
|
1247
|
+
readOnly: 0,
|
1248
|
+
exec: function(editor) {
|
1249
|
+
var range = {
|
1250
|
+
from: window["codemirror_" + editor.id].getCursor(true),
|
1251
|
+
to: window["codemirror_" + editor.id].getCursor(false)
|
1252
|
+
};
|
1253
|
+
window["codemirror_" + editor.id].commentRange(false, range.from, range.to);
|
1254
|
+
if (window["codemirror_" + editor.id].config.autoFormatOnUncomment) {
|
1255
|
+
window["codemirror_" + editor.id].autoFormatRange(
|
1256
|
+
range.from,
|
1257
|
+
range.to);
|
1258
|
+
}
|
1259
|
+
},
|
1260
|
+
canUndo: true
|
1261
|
+
},
|
1262
|
+
autoCompleteToggle: {
|
1263
|
+
modes: {
|
1264
|
+
wysiwyg: 0,
|
1265
|
+
source: 1
|
1266
|
+
},
|
1267
|
+
editorFocus: false,
|
1268
|
+
readOnly: 1,
|
1269
|
+
exec: function (editor) {
|
1270
|
+
if (this.state == CKEDITOR.TRISTATE_ON) {
|
1271
|
+
window["codemirror_" + editor.id].setOption("autoCloseTags", false);
|
1272
|
+
} else if (this.state == CKEDITOR.TRISTATE_OFF) {
|
1273
|
+
window["codemirror_" + editor.id].setOption("autoCloseTags", true);
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
this.toggleState();
|
1277
|
+
},
|
1278
|
+
canUndo: true
|
1279
|
+
}
|
1280
|
+
}
|
1281
|
+
};
|
1282
|
+
|
1283
|
+
function LineChannelToOffSet(ed, linech) {
|
1284
|
+
var line = linech.line;
|
1285
|
+
var ch = linech.ch;
|
1286
|
+
var n = (line + ch); //for the \n s & chars in the line
|
1287
|
+
for (i = 0; i < line; i++) {
|
1288
|
+
n += (ed.getLine(i)).length;//for the chars in all preceeding lines
|
1289
|
+
}
|
1290
|
+
return n;
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
function OffSetToLineChannel(ed, n) {
|
1294
|
+
var line = 0, ch = 0, index = 0;
|
1295
|
+
for (i = 0; i < ed.lineCount() ; i++) {
|
1296
|
+
len = (ed.getLine(i)).length;
|
1297
|
+
if (n < index + len) {
|
1298
|
+
|
1299
|
+
line = i;
|
1300
|
+
ch = n - index;
|
1301
|
+
return { line: line, ch: ch };
|
1302
|
+
}
|
1303
|
+
len++;//for \n char
|
1304
|
+
index += len;
|
1305
|
+
}
|
1306
|
+
return { line: line, ch: ch };
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
function IsStyleSheetAlreadyLoaded(href) {
|
1310
|
+
return CKEDITOR.document.getHead().findOne('link[href="' + href + '"]') != null;
|
1311
|
+
}
|