integral 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/logo.png +0 -0
- data/app/assets/javascripts/ckeditor/my_config.js.erb +26 -18
- data/app/assets/javascripts/ckeditor/plugins/autoembed/lang/lv.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/autoembed/plugin.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +14 -14
- data/app/assets/javascripts/ckeditor/plugins/autogrow/samples/autogrow.html +8 -8
- data/app/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.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/images/autocomplete.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/images/autoformat.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/images/commentselectedrange.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/images/searchcode.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/images/uncommentselectedrange.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -6
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.handlebars.min.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +7 -7
- data/app/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +231 -217
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/darcula.css +46 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/gruvbox-dark.css +34 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/idea.css +42 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/lucario.css +37 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/oceanic-next.css +44 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/shadowfox.css +52 -0
- data/app/assets/javascripts/ckeditor/plugins/codemirror/theme/ssms.css +16 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/ar.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/lang/lv.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/embedbase/plugin.js +1 -1
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/hidpi/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/icons/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/foundation-callout/plugin.js +86 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/dev/contents.css +35 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/dev/image2.html +339 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/dialogs/image2.js +553 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/icons/image.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/af.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ar.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/az.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/bg.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/bn.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/bs.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ca.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/cs.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/cy.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/da.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/de-ch.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/de.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/el.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-au.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-ca.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/en-gb.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/en.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/eo.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/es-mx.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/es.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/et.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/eu.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/fa.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/fi.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/fo.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr-ca.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/fr.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/gl.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/gu.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/he.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/hi.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/hr.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/hu.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/id.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/is.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/it.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ja.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ka.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/km.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ko.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ku.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/lt.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/lv.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/mk.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/mn.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ms.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/nb.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/nl.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/no.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/oc.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/pl.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt-br.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/pt.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ro.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ru.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/si.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sk.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sl.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sq.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr-latn.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sr.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/sv.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/th.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/tr.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/tt.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/ug.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/uk.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/vi.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh-cn.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/lang/zh.js +21 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/plugin.js +1720 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
- data/app/assets/javascripts/ckeditor/plugins/image2/samples/image2.html +68 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/plugin.js +86 -0
- data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/dialogs/integralrecentposts.js +40 -0
- data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/plugin.js +32 -0
- data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/dnd.html +4 -4
- data/app/assets/javascripts/ckeditor/plugins/lineutils/dev/magicfinger.html +4 -4
- data/app/assets/javascripts/ckeditor/plugins/lineutils/plugin.js +7 -7
- data/app/assets/javascripts/ckeditor/plugins/linkballoon/README.md +5 -0
- data/app/assets/javascripts/ckeditor/plugins/linkballoon/assets/demo.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/linkballoon/plugin.js +25 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/az.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/bg.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ca.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/cs.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/da.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/de-ch.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/de.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/en-au.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/en.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/eo.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/es-mx.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/es.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/et.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/eu.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/fa.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/fr.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/gl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/hr.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/hu.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/id.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/it.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ja.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/km.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ko.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ku.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/lv.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/nb.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/nl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/oc.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt-br.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/pt.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ro.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/sk.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/sq.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/sv.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/tr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/ug.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/uk.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh-cn.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/notification/lang/zh.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/notification/plugin.js +794 -784
- data/app/assets/javascripts/ckeditor/plugins/numericinput/LICENSE.md +363 -0
- data/app/assets/javascripts/ckeditor/plugins/numericinput/README.md +16 -0
- data/app/assets/javascripts/ckeditor/plugins/numericinput/plugin.js +354 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/README.md +50 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/icons/hidpi/openLink.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/icons/openLink.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/bg.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/de.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/en.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/pl.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/ru.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/lang/uk.js +7 -0
- data/app/assets/javascripts/ckeditor/plugins/openlink/plugin.js +178 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/dev/placeholder.html +5 -5
- data/app/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/af.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ar.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/az.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/bg.js +5 -5
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ca.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cs.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/cy.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/da.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de-ch.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/de.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/el.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-au.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en-gb.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eo.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es-mx.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/es.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/et.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/eu.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fa.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fi.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr-ca.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/fr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/gl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/hu.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/id.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/it.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ja.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/km.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ko.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ku.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/lv.js +5 -5
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nb.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/nl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/no.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/oc.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt-br.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/pt.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ro.js +12 -0
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ru.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/si.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sk.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sq.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/sv.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/th.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/tt.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/ug.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/uk.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/vi.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh-cn.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/lang/zh.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/placeholder/samples/placeholder.html +6 -6
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/dialogs/simplebox.js +4 -4
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/assets/simplebox/plugin.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/console.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/nestedwidgets.html +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/dev/widgetstyles.html +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/af.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ar.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/az.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/bg.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ca.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/cs.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/cy.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/da.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/de-ch.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/de.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/el.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-au.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/en-gb.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/en.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/eo.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/es-mx.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/es.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/et.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/eu.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fa.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fi.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/fr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/gl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/he.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/hr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/hu.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/id.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/it.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ja.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/km.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ko.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ku.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/lv.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/nb.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/nl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/no.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/oc.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt-br.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/pt.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ro.js +8 -0
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ru.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sk.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sl.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sq.js +3 -3
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/sv.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/tr.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/tt.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/ug.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/uk.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/vi.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh-cn.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/lang/zh.js +2 -2
- data/app/assets/javascripts/ckeditor/plugins/widget/plugin.js +235 -64
- data/app/assets/javascripts/ckeditor/plugins/widgetselection/plugin.js +6 -11
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ar.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/bg.js +17 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ca.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/cs.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/da.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/de.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/el.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +5 -1
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/es.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/eu.js +17 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fa.js +13 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fi.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/fr.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/he.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hr.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/hu.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/it.js +4 -3
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ja.js +5 -5
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ko.js +16 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/nl.js +3 -2
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/no.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pl.js +4 -3
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt-br.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/pt.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ro.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +2 -1
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sk.js +15 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/sv.js +5 -3
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/tr.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/uk.js +17 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh-cn.js +1 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/zh.js +14 -0
- data/app/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +485 -302
- data/app/assets/javascripts/ckeditor/plugins/wordcount/samples/maxParagraphs.html +26 -0
- data/app/assets/javascripts/integral/backend.js +10 -14
- data/app/assets/javascripts/integral/frontend.js +0 -2
- data/app/assets/javascripts/integral/support/date_picker.coffee +54 -59
- data/app/assets/javascripts/integral/support/grid.coffee +11 -4
- data/app/assets/javascripts/integral/support/remote_form.coffee +13 -9
- data/app/assets/stylesheets/integral/frontend.sass +0 -1
- data/app/controllers/integral/application_controller.rb +3 -2
- data/app/controllers/integral/backend/activities_controller.rb +1 -1
- data/app/controllers/integral/backend/base_controller.rb +160 -24
- data/app/controllers/integral/backend/images_controller.rb +16 -49
- data/app/controllers/integral/backend/lists_controller.rb +15 -85
- data/app/controllers/integral/backend/pages_controller.rb +13 -116
- data/app/controllers/integral/backend/posts_controller.rb +21 -108
- data/app/controllers/integral/backend/settings_controller.rb +5 -10
- data/app/controllers/integral/backend/static_pages_controller.rb +4 -0
- data/app/controllers/integral/backend/users_controller.rb +23 -66
- data/app/controllers/integral/pages_controller.rb +2 -2
- data/app/controllers/integral/posts_controller.rb +2 -6
- data/app/decorators/integral/image_decorator.rb +1 -1
- data/app/decorators/integral/list_decorator.rb +1 -1
- data/app/decorators/integral/page_decorator.rb +1 -1
- data/app/decorators/integral/paginating_decorator.rb +6 -0
- data/app/decorators/integral/post_decorator.rb +34 -1
- data/app/decorators/integral/user_decorator.rb +1 -1
- data/app/decorators/integral/version_decorator.rb +1 -1
- data/app/helpers/integral/application_helper.rb +7 -0
- data/app/helpers/integral/blog_helper.rb +29 -0
- data/app/helpers/integral/social_helper.rb +0 -23
- data/app/models/integral/list.rb +1 -2
- data/app/models/integral/page.rb +1 -1
- data/app/models/integral/post.rb +1 -1
- data/app/models/integral/user.rb +6 -0
- data/app/policies/integral/base_policy.rb +1 -1
- data/app/views/devise/sessions/new.haml +2 -2
- data/app/views/integral/backend/images/_form.haml +8 -8
- data/app/views/integral/backend/images/edit.haml +10 -2
- data/app/views/integral/backend/lists/_child_fields.haml +1 -1
- data/app/views/integral/backend/lists/_form.haml +1 -1
- data/app/views/integral/backend/lists/_item_container.haml +2 -2
- data/app/views/integral/backend/lists/_item_modal.haml +1 -1
- data/app/views/integral/backend/lists/_list_item_fields.haml +4 -3
- data/app/views/integral/backend/lists/edit.haml +15 -1
- data/app/views/integral/backend/pages/_form.haml +3 -3
- data/app/views/integral/backend/pages/activities.haml +2 -2
- data/app/views/integral/backend/pages/activity.haml +1 -1
- data/app/views/integral/backend/pages/edit.haml +20 -0
- data/app/views/integral/backend/posts/_form.haml +9 -5
- data/app/views/integral/backend/posts/activities.haml +2 -2
- data/app/views/integral/backend/posts/activity.haml +1 -1
- data/app/views/integral/backend/posts/edit.haml +8 -3
- data/app/views/integral/backend/settings/sections/_social.haml +1 -3
- data/app/views/integral/backend/users/_form.haml +4 -4
- data/app/views/integral/backend/users/edit.haml +1 -1
- data/app/views/integral/backend/users/show.haml +7 -7
- data/app/views/integral/posts/index.haml +2 -1
- data/app/views/integral/posts/templates/default.haml +1 -2
- data/app/views/integral/shared/_share_modal.haml +0 -3
- data/app/views/integral/shared/_social_list_items.haml +6 -12
- data/config/locales/en.yml +23 -12
- data/lib/generators/templates/app.yml +0 -1
- data/lib/integral/engine.rb +1 -0
- data/lib/integral/router.rb +3 -1
- data/lib/integral/version.rb +1 -1
- data/public/integral/ckeditor_demo_content.html +0 -13
- metadata +186 -12
- data/app/assets/javascripts/ckeditor/plugins/wordcount/lang/jp.js +0 -13
- data/app/assets/javascripts/integral/support/date_picker/picker.date.js +0 -1435
- data/app/assets/javascripts/integral/support/date_picker/picker.js +0 -1132
- data/app/assets/stylesheets/integral/support/date-picker.scss +0 -16
- data/app/assets/stylesheets/integral/support/date_picker/_default.date.scss +0 -452
- data/app/assets/stylesheets/integral/support/date_picker/_default.scss +0 -201
- data/app/assets/stylesheets/integral/support/date_picker/materialize_clockpicker.sass +0 -220
- data/app/views/integral/backend/pages/edit.html.haml +0 -15
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CKEditor</title>
|
6
|
+
<script src="../../../ckeditor.js"></script>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<textarea name="editor1"></textarea>
|
10
|
+
<script>
|
11
|
+
var config = {
|
12
|
+
extraPlugins: 'wordcount',
|
13
|
+
wordcount: {
|
14
|
+
maxParagraphs: 5,
|
15
|
+
showParagraphs: true,
|
16
|
+
showWordCount: false,
|
17
|
+
showRemaining: true
|
18
|
+
},
|
19
|
+
language: 'en'
|
20
|
+
}
|
21
|
+
</script>
|
22
|
+
<script>
|
23
|
+
CKEDITOR.replace( 'editor1' , config);
|
24
|
+
</script>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -92,24 +92,20 @@ function ready() {
|
|
92
92
|
var dialogName = ev.data.name;
|
93
93
|
var dialogDefinition = ev.data.definition;
|
94
94
|
|
95
|
-
|
96
|
-
if ( dialogName == 'image' ) {
|
95
|
+
if ( dialogName == 'image2' ) {
|
97
96
|
var infoTab = dialogDefinition.getContents('info');
|
98
|
-
var advancedTab = dialogDefinition.getContents('advanced');
|
99
97
|
|
100
|
-
// Remove
|
101
|
-
infoTab.remove('
|
102
|
-
infoTab.remove('
|
103
|
-
|
104
|
-
|
105
|
-
infoTab.
|
106
|
-
|
107
|
-
|
108
|
-
advancedTab.remove('cmbLangDir');
|
109
|
-
advancedTab.remove('txtLangCode');
|
110
|
-
advancedTab.remove('txtGenLongDescr');
|
98
|
+
// Remove unused inputs
|
99
|
+
infoTab.remove('height');
|
100
|
+
infoTab.remove('lock');
|
101
|
+
|
102
|
+
// Do not validate width input
|
103
|
+
infoTab.get('width').validate = function() {
|
104
|
+
return true;
|
105
|
+
}
|
111
106
|
}
|
112
107
|
|
108
|
+
// Remove unused inputs for link
|
113
109
|
if ( dialogName == 'link' ) {
|
114
110
|
var advancedTab = dialogDefinition.getContents('advanced');
|
115
111
|
var targetTab = dialogDefinition.getContents('target');
|
@@ -9,8 +9,6 @@
|
|
9
9
|
//= require toastr
|
10
10
|
//= require rails.validations
|
11
11
|
//= require rails.validations.simple_form
|
12
|
-
//= require integral/support/date_picker/picker
|
13
|
-
//= require integral/support/date_picker/picker.date
|
14
12
|
//= require integral/support/date_picker
|
15
13
|
//= require integral/support/click_to_copy
|
16
14
|
//= require integral/support/google_analytics
|
@@ -1,38 +1,44 @@
|
|
1
|
-
# Represents Date Picker
|
1
|
+
# Represents Date Picker - requires jQuery UI Datepicker - https://jqueryui.com/datepicker/
|
2
2
|
class this.DatePicker
|
3
|
+
@getCurrentDate: (element, dateFormat='yy-mm-dd') ->
|
4
|
+
date = null
|
5
|
+
try
|
6
|
+
date = $.datepicker.parseDate( dateFormat, element.value )
|
7
|
+
catch error
|
8
|
+
date
|
9
|
+
|
3
10
|
@initDateRanges: ->
|
4
11
|
$('[data-date-picker-end-element]').each (index, dpStartElement) ->
|
5
12
|
$dpStartElement = $(dpStartElement)
|
6
|
-
|
7
|
-
$dpEndElement = $(
|
8
|
-
dpEnd = $dpEndElement.pickadate('picker')
|
9
|
-
|
10
|
-
# Check if there’s a “from” or “to” date to start with.
|
11
|
-
if dpStart.get('value')
|
12
|
-
minimumDate = new Date(dpStart.get('select').obj.valueOf() + 86400000)
|
13
|
-
dpEnd.set('min', minimumDate)
|
14
|
-
if dpEnd.get('value')
|
15
|
-
maximumDate = new Date(dpEnd.get('select').obj.valueOf() - 86400000)
|
16
|
-
dpStart.set('max', maximumDate)
|
17
|
-
|
18
|
-
# When something is selected, update the “from” and “to” limits.
|
19
|
-
dpStart.on 'set', (event) =>
|
20
|
-
if event.select
|
21
|
-
minimumDate = new Date(dpStart.get('select').obj.valueOf() + 86400000)
|
22
|
-
dpEnd.set('min', minimumDate)
|
13
|
+
endSelector = "[id='" + $dpStartElement.data().datePickerEndElement + "']"
|
14
|
+
$dpEndElement = $(endSelector)
|
23
15
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
16
|
+
# Passing these options is doesn't seem to be working?
|
17
|
+
dpStart = $dpStartElement.datepicker(
|
18
|
+
firstDay: 1
|
19
|
+
showAnim: ""
|
20
|
+
)
|
21
|
+
dpEnd = $dpEndElement.datepicker(
|
22
|
+
firstDay: 1
|
23
|
+
showAnim: ""
|
24
|
+
)
|
25
|
+
dpStart.datepicker("option", "firstDay", 1)
|
26
|
+
dpEnd.datepicker("option", "firstDay", 1)
|
27
|
+
dpStart.datepicker("option", "showAnim", '')
|
28
|
+
dpEnd.datepicker("option", "showAnim", '')
|
29
|
+
dpStart.on "change", (ev) =>
|
30
|
+
dateMinimum = DatePicker.getCurrentDate(ev.currentTarget)
|
31
|
+
dateMinimum.setDate(dateMinimum.getDate() + 1)
|
32
|
+
dpEnd.datepicker("option", "minDate", dateMinimum)
|
33
|
+
dpEnd.on "change", (ev) =>
|
34
|
+
dateMaximum = DatePicker.getCurrentDate(ev.currentTarget)
|
35
|
+
dateMaximum.setDate(dateMaximum.getDate() - 1)
|
36
|
+
dpStart.datepicker("option", "maxDate", dateMaximum)
|
30
37
|
|
31
38
|
constructor: (selector, opts={}) ->
|
32
39
|
@selector = selector
|
33
40
|
@opts = opts
|
34
41
|
|
35
|
-
@_setLanguage()
|
36
42
|
@_initializeDatePicker()
|
37
43
|
|
38
44
|
_initializeDatePicker: ->
|
@@ -43,41 +49,30 @@ class this.DatePicker
|
|
43
49
|
maxRaw = dp[0].max
|
44
50
|
minDate = new Date minRaw if minRaw
|
45
51
|
maxDate = new Date maxRaw if maxRaw
|
52
|
+
disabledDates = dp.data('disabled-dates')
|
53
|
+
showButtonPanel = if dp.data('date-picker-button-panel') == true then true else false
|
54
|
+
closeText = if dp.data('date-picker-close-text') then dp.data('date-picker-close-text') else 'Close'
|
46
55
|
|
47
|
-
dp.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
dates = []
|
65
|
-
for date in data.split(',')
|
66
|
-
dates.push new Date(date)
|
56
|
+
dp.datepicker
|
57
|
+
dateFormat: "yy-mm-dd"
|
58
|
+
minDate: minDate
|
59
|
+
maxDate: maxDate
|
60
|
+
beforeShow: @opts.onOpen
|
61
|
+
onClose: (dateText, inst) =>
|
62
|
+
if dp.data('date-picker-clear') == true && inst.dpDiv.find('button.clicked').length > 0
|
63
|
+
inst.input.val('')
|
64
|
+
inst.input.change()
|
65
|
+
else
|
66
|
+
@opts.onClose() if @opts.close
|
67
|
+
showButtonPanel: showButtonPanel
|
68
|
+
closeText: closeText
|
69
|
+
# Return false to disable a specific date
|
70
|
+
beforeShowDay: (currentDate) =>
|
71
|
+
return [true] if not disabledDates
|
67
72
|
|
68
|
-
|
73
|
+
for dateStr in disabledDates.split(',')
|
74
|
+
parsedDate = new Date(dateStr)
|
69
75
|
|
70
|
-
|
71
|
-
_setLanguage: ->
|
72
|
-
$.extend($.fn.pickadate.defaults, {
|
73
|
-
monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ],
|
74
|
-
monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
|
75
|
-
weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
|
76
|
-
weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],
|
77
|
-
weekdaysLetter: [ 'S', 'M', 'T', 'W', 'T', 'F', 'S' ],
|
78
|
-
today: 'Today',
|
79
|
-
clear: 'Clear',
|
80
|
-
close: 'Close',
|
81
|
-
firstDay: 1,
|
82
|
-
})
|
76
|
+
return [false] if (parsedDate.getFullYear() == currentDate.getFullYear() and parsedDate.getDate() == currentDate.getDate() and parsedDate.getMonth() == currentDate.getMonth())
|
83
77
|
|
78
|
+
[true]
|
@@ -26,6 +26,13 @@ class this.Grid
|
|
26
26
|
@container.on 'change', 'input[type=checkbox][data-filter]', (ev) =>
|
27
27
|
@_toggleFilterValue(ev.target.dataset.filter, ev.target.dataset.value)
|
28
28
|
|
29
|
+
@container.on 'change', 'select[data-filter], input[type=text][data-filter]', (ev) =>
|
30
|
+
filterName = ev.target.dataset.filter
|
31
|
+
filter = @form.find("input[name='#{filterName}']")
|
32
|
+
filter.val(ev.target.value)
|
33
|
+
|
34
|
+
@_redrawGrid()
|
35
|
+
|
29
36
|
@form.on 'change', 'select[data-filter]', (ev) =>
|
30
37
|
@_redrawGrid()
|
31
38
|
|
@@ -52,13 +59,13 @@ class this.Grid
|
|
52
59
|
@container.html(data.content)
|
53
60
|
|
54
61
|
@gridCount.text(data.count)
|
62
|
+
|
63
|
+
@form.on "ajax:complete", (event, data, status, xhr) =>
|
55
64
|
@container.removeClass('loading')
|
56
65
|
@container.find('[data-grid-container]').removeClass('loading')
|
57
66
|
|
58
|
-
|
59
|
-
|
60
|
-
# @form.on "ajax:error", (event, data, status, xhr) =>
|
61
|
-
# console.log 'Error!'
|
67
|
+
@form.on "ajax:error", (event, data, status, xhr) =>
|
68
|
+
toastr['error']('Unfortunately an error took place. Please try again later.')
|
62
69
|
|
63
70
|
_updateSort: (order, desc)->
|
64
71
|
@orderField.val(order)
|
@@ -6,26 +6,26 @@ class this.RemoteForm
|
|
6
6
|
constructor: (forms, opts={}) ->
|
7
7
|
# 'forms' refers to one or more jquery objects whose target is a 'form' tag
|
8
8
|
@forms = forms
|
9
|
-
|
9
|
+
@opts = @_mergeDefaultOpts(opts)
|
10
10
|
@_setupEvents()
|
11
11
|
|
12
12
|
# Create listeners and handlers for form events
|
13
13
|
_setupEvents: =>
|
14
14
|
# Handle form start
|
15
|
-
@forms.on "ajax:beforeSend", (
|
16
|
-
@
|
15
|
+
@forms.on "ajax:beforeSend", (xhr, opts) =>
|
16
|
+
@opts.handleBeforeSend(xhr, opts)
|
17
17
|
|
18
18
|
# Handle form success
|
19
19
|
@forms.on "ajax:success", (event, data, status, xhr) =>
|
20
|
-
@
|
20
|
+
@opts.handleSuccess(event, data)
|
21
21
|
|
22
22
|
# Handle form error
|
23
23
|
@forms.on "ajax:error", (event, data, status, xhr) =>
|
24
|
-
@
|
24
|
+
@opts.handleError(event, data)
|
25
25
|
|
26
26
|
# Handle form complete
|
27
27
|
@forms.on "ajax:complete", (event, data, status, xhr) =>
|
28
|
-
@
|
28
|
+
@opts.handleComplete(event, data)
|
29
29
|
|
30
30
|
# What happens before AJAX request is sent
|
31
31
|
_handleBeforeSend: (event, data) =>
|
@@ -81,7 +81,11 @@ class this.RemoteForm
|
|
81
81
|
window.dataLayer.push
|
82
82
|
'event' : event
|
83
83
|
|
84
|
+
_mergeDefaultOpts: (opts) =>
|
85
|
+
default_opts =
|
86
|
+
handleBeforeSend: @_handleBeforeSend
|
87
|
+
handleSuccess: @_handleSuccess
|
88
|
+
handleError: @_handleError
|
89
|
+
handleComplete: @_handleComplete
|
84
90
|
|
85
|
-
|
86
|
-
# # Some fancy reverse merge goes here
|
87
|
-
# options =
|
91
|
+
$.extend({}, default_opts, opts)
|
@@ -11,7 +11,6 @@ $nprogress-height: 5px
|
|
11
11
|
@import 'nprogress-turbolinks5'
|
12
12
|
|
13
13
|
@import 'integral/support/mixins'
|
14
|
-
@import 'integral/support/date-picker'
|
15
14
|
@import 'integral/support/scroll-to-top'
|
16
15
|
@import 'integral/support/media-query-indicator'
|
17
16
|
@import 'integral/support/gallery'
|
@@ -11,14 +11,15 @@ module Integral
|
|
11
11
|
# Search Engine Optimization
|
12
12
|
# before_render :load_meta_tags
|
13
13
|
|
14
|
-
private
|
15
14
|
|
16
15
|
# Override added as workaround for before_render Rails 5 incompatibility
|
17
|
-
def render(*args, &
|
16
|
+
def render(*args, &block)
|
18
17
|
before_render
|
19
18
|
super
|
20
19
|
end
|
21
20
|
|
21
|
+
private
|
22
|
+
|
22
23
|
# Actions that should be carried out before rendering
|
23
24
|
def before_render
|
24
25
|
load_meta_tags
|
@@ -13,28 +13,107 @@ module Integral
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
# Prevent CSRF attacks by raising an exception.
|
17
|
-
protect_from_forgery with: :exception
|
16
|
+
protect_from_forgery with: :exception # Prevent CSRF attacks by raising an exception.
|
18
17
|
|
19
|
-
layout :layout_by_resource
|
18
|
+
layout :layout_by_resource # Set layout
|
20
19
|
|
21
20
|
before_action :authenticate_user! # User Auth
|
22
21
|
before_action :set_locale # User custom locale
|
23
22
|
before_action :set_breadcrumbs # Breadcrumbs
|
24
|
-
|
25
|
-
# Track user activity via paper_trail
|
26
|
-
before_action :set_paper_trail_whodunnit
|
23
|
+
before_action :set_paper_trail_whodunnit # Track user activity via paper_trail
|
27
24
|
|
28
25
|
# User authorization
|
29
26
|
include Pundit
|
30
27
|
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
|
31
28
|
|
32
|
-
|
29
|
+
# GET /
|
30
|
+
# Lists all resources
|
31
|
+
def index
|
32
|
+
respond_to do |format|
|
33
|
+
format.html do
|
34
|
+
set_grid
|
35
|
+
end
|
36
|
+
|
37
|
+
format.json do
|
38
|
+
if params[:gridview].present?
|
39
|
+
set_grid
|
40
|
+
render json: { content: render_to_string(partial: "integral/backend/#{controller_name}/grid", locals: { grid: @grid }) }
|
41
|
+
else
|
42
|
+
respond_to_record_selector
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# GET /new
|
49
|
+
# Resource creation screen
|
50
|
+
def new
|
51
|
+
add_breadcrumb I18n.t('integral.navigation.new'), "new_backend_#{controller_name.singularize}_path".to_sym
|
52
|
+
@resource = resource_klass.new
|
53
|
+
end
|
54
|
+
|
55
|
+
# POST /
|
56
|
+
# Resource creation
|
57
|
+
def create
|
58
|
+
add_breadcrumb I18n.t('integral.navigation.create'), "new_backend_#{controller_name.singularize}_path".to_sym
|
59
|
+
@resource = resource_klass.new(resource_params)
|
33
60
|
|
34
|
-
|
61
|
+
yield if block_given?
|
62
|
+
|
63
|
+
if @resource.save
|
64
|
+
respond_successfully(notification_message('creation_success'), send("edit_backend_#{controller_name.singularize}_path", @resource.id))
|
65
|
+
else
|
66
|
+
respond_failure(notification_message('creation_failure'), :new)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# GET /:id/edit
|
71
|
+
# Resource edit screen
|
72
|
+
def edit
|
73
|
+
add_breadcrumb I18n.t('integral.navigation.edit'), "edit_backend_#{controller_name.singularize}_path".to_sym
|
74
|
+
end
|
75
|
+
|
76
|
+
# PUT /:id
|
77
|
+
# Updating a resource
|
78
|
+
def update
|
79
|
+
if @resource.update(resource_params)
|
80
|
+
respond_successfully(notification_message('edit_success'), send("edit_backend_#{controller_name.singularize}_path", @resource.id))
|
81
|
+
else
|
82
|
+
respond_failure(notification_message('edit_failure'), :edit)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# DELETE /:id
|
87
|
+
def destroy
|
88
|
+
if @resource.destroy
|
89
|
+
respond_successfully(notification_message('delete_success'), send("backend_#{controller_name}_path"))
|
90
|
+
else
|
91
|
+
error_message = @resource.errors.full_messages.to_sentence
|
92
|
+
flash[:error] = "#{notification_message('delete_failure')} - #{error_message}"
|
93
|
+
|
94
|
+
redirect_to send("backend_#{controller_name}_path")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# POST /:id/duplicate
|
99
|
+
# Duplicate a resource
|
100
|
+
def duplicate
|
101
|
+
cloned_resource = @resource.dup
|
102
|
+
|
103
|
+
yield cloned_resource if block_given?
|
104
|
+
|
105
|
+
if cloned_resource.save
|
106
|
+
respond_successfully(notification_message('clone_success'), send("edit_backend_#{controller_name.singularize}_path", cloned_resource.id))
|
107
|
+
else
|
108
|
+
respond_failure(notification_message('clone_failure'), :edit)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# GET /:id/activities
|
113
|
+
def activities
|
35
114
|
authorize Version
|
36
115
|
|
37
|
-
add_breadcrumb I18n.t('integral.navigation.edit'),
|
116
|
+
add_breadcrumb I18n.t('integral.navigation.edit'), "edit_backend_#{controller_name.singularize}_path".to_sym
|
38
117
|
add_breadcrumb I18n.t('integral.navigation.activity')
|
39
118
|
|
40
119
|
@grid = Integral::Grids::ActivitiesGrid.new(activity_grid_options.except('page')) do |scope|
|
@@ -47,6 +126,18 @@ module Integral
|
|
47
126
|
end
|
48
127
|
end
|
49
128
|
|
129
|
+
# GET /:id/activities/:id
|
130
|
+
def activity
|
131
|
+
authorize Version
|
132
|
+
|
133
|
+
add_breadcrumb I18n.t('integral.navigation.activity'), "activities_backend_#{controller_name.singularize}_url".to_sym
|
134
|
+
add_breadcrumb I18n.t('integral.actions.view')
|
135
|
+
|
136
|
+
@activity = resource_version_klass.find(params[:activity_id]).decorate
|
137
|
+
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
50
141
|
# Redirect user to integral dashboard after successful login
|
51
142
|
def after_sign_in_path_for(_resource)
|
52
143
|
integral.backend_dashboard_path
|
@@ -77,31 +168,28 @@ module Integral
|
|
77
168
|
I18n.locale = current_user.locale if current_user.present?
|
78
169
|
end
|
79
170
|
|
80
|
-
def respond_to_record_selector
|
81
|
-
records =
|
171
|
+
def respond_to_record_selector
|
172
|
+
records = resource_klass.search(params[:search]).order('updated_at DESC').paginate(page: params[:page])
|
82
173
|
render json: { content: render_to_string(partial: 'integral/backend/shared/record_selector/collection', locals: { collection: records }) }
|
83
174
|
end
|
84
175
|
|
85
|
-
# def respond_to_record_selector_item(record)
|
86
|
-
# render json: {
|
87
|
-
# html: render_to_string('integral/backend/shared/record_selector/record',
|
88
|
-
# layout: false,
|
89
|
-
# locals: { :list_item => record.to_list_item }) }
|
90
|
-
# end
|
91
|
-
|
92
176
|
def respond_successfully(flash_message, redirect_path)
|
93
177
|
flash[:notice] = flash_message
|
94
178
|
redirect_to redirect_path
|
95
179
|
end
|
96
180
|
|
97
|
-
def respond_failure(message,
|
181
|
+
def respond_failure(message, template, record = nil)
|
182
|
+
record = @resource if record.nil?
|
183
|
+
|
98
184
|
error_message = record.errors.full_messages.to_sentence
|
99
185
|
flash.now[:error] = "#{message} - #{error_message}"
|
100
186
|
render template, status: :unprocessable_entity
|
101
187
|
end
|
102
188
|
|
103
|
-
|
104
|
-
|
189
|
+
def set_breadcrumbs
|
190
|
+
add_breadcrumb I18n.t('integral.navigation.dashboard'), :backend_dashboard_path
|
191
|
+
add_breadcrumb I18n.t("integral.navigation.#{controller_name}"), "backend_#{controller_name}_path".to_sym
|
192
|
+
end
|
105
193
|
|
106
194
|
def stale_record_recovery_action
|
107
195
|
flash.now[:error] = 'Overwrite prevented. Another user has changed this record ' \
|
@@ -109,15 +197,63 @@ module Integral
|
|
109
197
|
render :edit, status: :conflict
|
110
198
|
end
|
111
199
|
|
112
|
-
def notification_message(
|
200
|
+
def notification_message(type_namespace, object_namespace = nil)
|
201
|
+
object_namespace = controller_name if object_namespace.nil?
|
202
|
+
|
113
203
|
I18n.t("integral.backend.#{object_namespace}.notification.#{type_namespace}")
|
114
204
|
end
|
115
205
|
|
116
|
-
def set_grid
|
117
|
-
@grid =
|
206
|
+
def set_grid
|
207
|
+
@grid = resource_grid_klass.new(grid_options.except('page')) do |scope|
|
118
208
|
scope.page(grid_options['page']).per_page(25)
|
119
209
|
end
|
120
210
|
end
|
211
|
+
|
212
|
+
def resource_klass
|
213
|
+
controller_name.classify.constantize
|
214
|
+
end
|
215
|
+
|
216
|
+
def resource_grid_klass
|
217
|
+
"Integral::Grids::#{controller_name.classify.pluralize}Grid".constantize
|
218
|
+
end
|
219
|
+
|
220
|
+
def resource_version_klass
|
221
|
+
"#{resource_klass}Version".constantize
|
222
|
+
end
|
223
|
+
|
224
|
+
def set_resource
|
225
|
+
@resource = resource_klass.find(params[:id])
|
226
|
+
end
|
227
|
+
|
228
|
+
def grid_options
|
229
|
+
default_grid_options = { 'order' => 'updated_at',
|
230
|
+
'page' => 1,
|
231
|
+
'descending' => true }
|
232
|
+
grid_params = params[:grid].present? ? params[:grid].permit(*white_listed_grid_params) : {}
|
233
|
+
grid_params.delete_if { |_k, v| v.empty? }
|
234
|
+
default_grid_options.merge(grid_params)
|
235
|
+
end
|
236
|
+
helper_method :grid_options
|
237
|
+
|
238
|
+
def activity_grid_options
|
239
|
+
default_grid_options = { 'order' => 'date',
|
240
|
+
'page' => 1,
|
241
|
+
'descending' => true,
|
242
|
+
'item_id' => @resource.id,
|
243
|
+
'object' => resource_klass.to_s }
|
244
|
+
grid_params = params[:grid].present? ? params[:grid].permit(*white_listed_grid_params) : {}
|
245
|
+
grid_params.delete_if { |_k, v| v.empty? }
|
246
|
+
default_grid_options.merge(grid_params)
|
247
|
+
end
|
248
|
+
helper_method :activity_grid_options
|
249
|
+
|
250
|
+
def white_listed_grid_params
|
251
|
+
raise NotImplementedError, 'Specify the accepted grid parameters'
|
252
|
+
end
|
253
|
+
|
254
|
+
def authorize_with_klass
|
255
|
+
authorize resource_klass
|
256
|
+
end
|
121
257
|
end
|
122
258
|
end
|
123
259
|
end
|