mosaico 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/.gitignore +8 -0
- data/Gemfile +7 -0
- data/LICENSE +680 -0
- data/README.md +179 -0
- data/Rakefile +5 -0
- data/app/assets/images/mosaico/logo_transparent.png +0 -0
- data/app/assets/javascripts/mosaico/application.js.erb +51 -0
- data/app/assets/javascripts/mosaico/plugins/debug.js.erb +10 -0
- data/app/assets/javascripts/mosaico/plugins/logo.js.erb +10 -0
- data/app/assets/javascripts/mosaico/plugins/preview.js +85 -0
- data/app/assets/javascripts/mosaico/plugins/save.js.erb +72 -0
- data/app/assets/javascripts/mosaico/plugins/template_path.js.erb +22 -0
- data/app/assets/javascripts/mosaico/plugins/translations.js +10 -0
- data/app/assets/javascripts/mosaico/utilities.js +25 -0
- data/app/assets/stylesheets/mosaico/application.css +6 -0
- data/app/controllers/mosaico/application_controller.rb +17 -0
- data/app/controllers/mosaico/images_controller.rb +142 -0
- data/app/controllers/mosaico/projects_controller.rb +31 -0
- data/app/controllers/mosaico/templates_controller.rb +8 -0
- data/app/helpers/mosaico/application_helper.rb +7 -0
- data/app/models/mosaico/image.rb +9 -0
- data/app/models/mosaico/placeholder_image.rb +9 -0
- data/app/models/mosaico/project.rb +13 -0
- data/app/models/mosaico/uploaded_image.rb +26 -0
- data/app/views/layouts/mosaico/application.html.erb +13 -0
- data/app/views/mosaico/projects/new.html.erb +1 -0
- data/app/views/mosaico/projects/show.html.erb +1 -0
- data/app/views/mosaico/shared/_metadata.html.erb +12 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20170817202255_add_images.rb +14 -0
- data/db/migrate/20170824233755_add_projects.rb +11 -0
- data/lib/mosaico.rb +100 -0
- data/lib/mosaico/engine.rb +72 -0
- data/lib/mosaico/local_backend.rb +23 -0
- data/lib/mosaico/local_image_backend.rb +7 -0
- data/lib/mosaico/local_placeholder_backend.rb +7 -0
- data/lib/mosaico/placeholder.png +0 -0
- data/lib/mosaico/template.rb +89 -0
- data/lib/mosaico/versafix_template.rb +43 -0
- data/lib/mosaico/version.rb +4 -0
- data/lib/tasks/makeThumbs.js.erb +57 -0
- data/lib/tasks/thumbs.rake +35 -0
- data/mosaico.gemspec +22 -0
- data/screenshot.png +0 -0
- data/vendor/assets/fonts/LiberationSans-Regular.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.jsbeautifyrc +6 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.jshintrc +8 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.travis.yml +6 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/CONTRIBUTING.md +37 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/Dockerfile +21 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/Gruntfile.js +241 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/LICENSE +680 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/NOTICE.txt +87 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/README.md +73 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/backend/README.txt +23 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/backend/main.js +162 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/bower.json +76 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico-material.css +7425 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.css +7133 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.debug.js +1517 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.js +12828 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/templates.js +15 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.svg +685 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/byvoxmail.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-badge.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-v.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico32.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaicologo.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot-orig.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/README.md +26 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-de.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-en.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-es.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-fr.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-it.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-nl.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-sv.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js +1517 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js.map +147 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/canvas-to-blob.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.css +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.js +13 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-image.js +324 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-process.js +175 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-validate.js +122 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload.js +1482 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.iframe-transport.js +217 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.js +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.ui.touch-punch.min.js +11 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout-jqueryui.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/load-image.all.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/stylesheet.css +9 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.js +55 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.js +204 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.js +162 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.js +165 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.js +462 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.js +60 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/css/prism.css +138 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.js +1319 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.js +112 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.js +100 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.js +64 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.js +65 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.js +490 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.js +154 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.js +30 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.js +630 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.js +2944 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.js +273 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.js +121 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.js +225 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.js +208 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.js +403 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.js +965 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/moxieplayer.swf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.js +879 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.js +53 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.js +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.js +1844 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.js +32 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.js +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.js +609 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.js +1031 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.js +120 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.js +4400 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.js +276 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.js +297 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.js +268 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/css/visualblocks.css +135 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.js +86 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.js +69 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/Variables.less +196 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/readme.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.json +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.svg +129 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.js +1828 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.js +934 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/tinymce.min.js +14 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/editor.html +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/favicon.ico +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/index.html +368 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/package.json +92 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/byvoxmail.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-badge.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-v.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico32.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaicologo.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot-orig.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/README.md +26 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-de.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-en.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-es.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-fr.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-it.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-nl.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-sv.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/Variables.less +196 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/readme.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.json +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/server-config.js +12 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/converter-spec.js +115 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/data/template-versafix-1.model.json +137 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/declarations-spec.js +282 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/mensch-spec.js +114 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/model-spec.js +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/stylesheet-spec.js +177 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone.less +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone_material.less +350 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/safarihack.css +17 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements.less +497 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_jquery.less +344 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_mixins.less +406 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_moxie.less +130 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico.less +529 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_content.less +391 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_tools.less +1043 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_reset.less +45 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_variables.less +156 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/app.js +167 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/bind-iframe.js +64 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/blocks.js +118 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/choose-template.js +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/colorpicker.js +58 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js +16 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/droppable.js +87 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/eventable.js +33 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extender-pagination.js +60 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extsortables.js +103 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/fileupload.js +373 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/if-subs.js +110 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-spinner.js +31 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-tabs.js +17 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/script-template.js +30 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollfix.js +48 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollintoview.js +83 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/string-template.js +76 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/tooltips.js +36 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/validated-value.js +40 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/virtuals.js +102 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/wysiwygs.js +304 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/checkmodel.js +114 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/declarations.js +279 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/domutils.js +93 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/editor.js +411 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/main.js +42 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/model.js +536 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/parser.js +485 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/stylesheet.js +205 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/utils.js +156 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/wrapper.js +308 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/color.js +53 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/inliner.js +35 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/localstorage.js +100 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ko-bindings.js +22 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/template-loader.js +446 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/timed-call.js +31 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undomain.js +49 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undoserializer.js +120 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/viewmodel.js +595 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/array.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-show.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-wysiwyg.tmpl.html +18 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-show.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-wysiwyg.tmpl.html +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/customstyle.tmpl.html +3 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/empty.tmpl.html +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/error.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/gallery-images.tmpl.html +16 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/img-wysiwyg.tmpl.html +43 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/main.tmpl.html +102 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/toolbox.tmpl.html +111 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/combineKOTemplates.js +24 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/lib/phantom-thumbnailer-editor.js +168 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/makeThumbs.js +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/README.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/footerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/headerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/heroBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/socialBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/threetwoBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/twoColumnBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/template-tedc15.html +567 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/HeaderAndText.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/fixedlist.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.md +335 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.pdf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_384.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_385.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_386.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_387.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_407.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_408.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/template-tutorial.html +68 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/buttonBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleImageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/hrBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/imageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/logoBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/sideArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/singleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/socialBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/spacerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/textBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/titleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleImageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/sponsor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/template-versafix-1.html +1531 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/uploads/README.md +1 -0
- metadata +536 -0
@@ -0,0 +1 @@
|
|
1
|
+
!function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l<a;++l)s[l]=r(i[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,r){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void 0}},r=function(n){var r=e[n];if(void 0===r)throw"module ["+n+"] was undefined";return void 0===r.instance&&t(n),r.instance},i=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};var a=n,s=function(e,t){a(e,[],function(){return t})};s("1",tinymce.PluginManager),s("2",tinymce.Env),s("3",tinymce.util.Promise),s("4",tinymce.util.URI),s("5",tinymce.util.Tools),s("6",tinymce.util.Delay),a("m",[],function(){function e(e,t){return r(document.createElement("canvas"),e,t)}function t(e){return e.getContext("2d")}function n(e){var t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t}function r(e,t,n){return e.width=t,e.height=n,e}return{create:e,resize:r,get2dContext:t,get3dContext:n}}),a("n",[],function(){function e(e){return e.naturalWidth||e.width}function t(e){return e.naturalHeight||e.height}return{getWidth:e,getHeight:t}}),a("o",[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(t){return void e.reject(t)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(e){i.call(this,e)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;e<t;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(e){n(e)}}if(0===e.length)return t([]);for(var i=e.length,o=0;o<e.length;o++)r(o,e[o])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},t}),a("p",[],function(){function e(e){var t=document.createElement("a");return t.href=e,t.pathname}function t(t){var n=e(t).split("."),r=n[n.length-1],i={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png"};return r&&(r=r.toLowerCase()),i[r]}return{guessMimeType:t}}),a("e",["o","m","p","n"],function(e,t,n,r){function i(t){return new e(function(e){function n(){t.removeEventListener("load",n),e(t)}t.complete?e(t):t.addEventListener("load",n)})}function o(e){return i(e).then(function(e){var n,i;return i=t.create(r.getWidth(e),r.getHeight(e)),n=t.get2dContext(i),n.drawImage(e,0,0),i})}function a(e){return i(e).then(function(e){var t=e.src;return 0===t.indexOf("blob:")?l(t):0===t.indexOf("data:")?c(t):o(e).then(function(e){return c(e.toDataURL(n.guessMimeType(t)))})})}function s(t){return new e(function(e){function n(){r.removeEventListener("load",n),e(r)}var r=new Image;r.addEventListener("load",n),r.src=URL.createObjectURL(t),r.complete&&n()})}function l(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function c(t){return new e(function(e){var n,r,i,o,a,s;if(t=t.split(","),o=/data:([^;]+)/.exec(t[0]),o&&(a=o[1]),n=atob(t[1]),window.WebKitBlobBuilder){for(s=new WebKitBlobBuilder,r=new ArrayBuffer(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);return s.append(r),void e(s.getBlob(a))}for(r=new Uint8Array(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);e(new Blob([r],{type:a}))})}function u(e){return 0===e.indexOf("blob:")?l(e):0===e.indexOf("data:")?c(e):null}function d(e,t){return c(e.toDataURL(t))}function f(t){return new e(function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}function h(e){return f(e).then(function(e){return e.split(",")[1]})}function p(e){URL.revokeObjectURL(e.src)}return{blobToImage:s,imageToBlob:a,blobToDataUri:f,blobToBase64:h,imageToCanvas:o,canvasToBlob:d,revokeImageUrl:p,uriToBlob:u}}),a("q",[],function(){function e(e,t,n){return e=parseFloat(e),e>n?e=n:e<t&&(e=t),e}function t(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]}function n(e,t){var n,r,i,o,a=[],s=new Array(10);for(n=0;n<5;n++){for(r=0;r<5;r++)a[r]=t[r+5*n];for(r=0;r<5;r++){for(o=0,i=0;i<5;i++)o+=e[r+5*i]*a[i];s[r+5*n]=o}}return s}function r(t,n){return n=e(n,0,1),t.map(function(t,r){return r%6===0?t=1-(1-t)*n:t*=n,e(t,0,1)})}function i(t,r){var i;return r=e(r,-1,1),r*=100,r<0?i=127+r/100*127:(i=r%1,i=0===i?d[r]:d[Math.floor(r)]*(1-i)+d[Math.floor(r)+1]*i,i=127*i+127),n(t,[i/127,0,0,0,.5*(127-i),0,i/127,0,0,.5*(127-i),0,0,i/127,0,.5*(127-i),0,0,0,1,0,0,0,0,0,1])}function o(t,r){var i,o,a,s;return r=e(r,-1,1),i=1+(r>0?3*r:r),o=.3086,a=.6094,s=.082,n(t,[o*(1-i)+i,a*(1-i),s*(1-i),0,0,o*(1-i),a*(1-i)+i,s*(1-i),0,0,o*(1-i),a*(1-i),s*(1-i)+i,0,0,0,0,0,1,0,0,0,0,0,1])}function a(t,r){var i,o,a,s,l;return r=e(r,-180,180)/180*Math.PI,i=Math.cos(r),o=Math.sin(r),a=.213,s=.715,l=.072,n(t,[a+i*(1-a)+o*-a,s+i*-s+o*-s,l+i*-l+o*(1-l),0,0,a+i*-a+.143*o,s+i*(1-s)+.14*o,l+i*-l+o*-.283,0,0,a+i*-a+o*-(1-a),s+i*-s+o*s,l+i*(1-l)+o*l,0,0,0,0,0,1,0,0,0,0,0,1])}function s(t,r){return r=e(255*r,-255,255),n(t,[1,0,0,0,r,0,1,0,0,r,0,0,1,0,r,0,0,0,1,0,0,0,0,0,1])}function l(t,r,i,o){return r=e(r,0,2),i=e(i,0,2),o=e(o,0,2),n(t,[r,0,0,0,0,0,i,0,0,0,0,0,o,0,0,0,0,0,1,0,0,0,0,0,1])}function c(t,i){return i=e(i,0,1),n(t,r([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],i))}function u(t,i){return i=e(i,0,1),n(t,r([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],i))}var d=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];return{identity:t,adjust:r,multiply:n,adjustContrast:i,adjustBrightness:s,adjustSaturation:o,adjustHue:a,adjustColors:l,adjustSepia:c,adjustGrayscale:u}}),a("c",["m","n","e","q"],function(e,t,n,r){function i(r,i){return n.blobToImage(r).then(function(r){function o(e,t){var n,r,i,o,a,s=e.data,l=t[0],c=t[1],u=t[2],d=t[3],f=t[4],h=t[5],p=t[6],m=t[7],g=t[8],v=t[9],y=t[10],b=t[11],C=t[12],x=t[13],w=t[14],N=t[15],E=t[16],_=t[17],S=t[18],k=t[19];for(a=0;a<s.length;a+=4)n=s[a],r=s[a+1],i=s[a+2],o=s[a+3],s[a]=n*l+r*c+i*u+o*d+f,s[a+1]=n*h+r*p+i*m+o*g+v,s[a+2]=n*y+r*b+i*C+o*x+w,s[a+3]=n*N+r*E+i*_+o*S+k;return e}var a,s=e.create(t.getWidth(r),t.getHeight(r)),l=e.get2dContext(s);return l.drawImage(r,0,0),u(r),a=o(l.getImageData(0,0,s.width,s.height),i),l.putImageData(a,0,0),n.canvasToBlob(s)})}function o(r,i){return n.blobToImage(r).then(function(r){function o(e,t,n){function r(e,t,n){return e>n?e=n:e<t&&(e=t),e}var i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C;for(a=Math.round(Math.sqrt(n.length)),s=Math.floor(a/2),i=e.data,o=t.data,b=e.width,C=e.height,c=0;c<C;c++)for(l=0;l<b;l++){for(u=d=f=0,p=0;p<a;p++)for(h=0;h<a;h++)m=r(l+h-s,0,b-1),g=r(c+p-s,0,C-1),v=4*(g*b+m),y=n[p*a+h],u+=i[v]*y,d+=i[v+1]*y,f+=i[v+2]*y;v=4*(c*b+l),o[v]=r(u,0,255),o[v+1]=r(d,0,255),o[v+2]=r(f,0,255)}return t}var a,s,l=e.create(t.getWidth(r),t.getHeight(r)),c=e.get2dContext(l);return c.drawImage(r,0,0),u(r),a=c.getImageData(0,0,l.width,l.height),s=c.getImageData(0,0,l.width,l.height),s=o(a,s,i),c.putImageData(s,0,0),n.canvasToBlob(l)})}function a(r){return function(i,o){return n.blobToImage(i).then(function(i){function a(e,t){var n,r=e.data;for(n=0;n<r.length;n+=4)r[n]=t[r[n]],r[n+1]=t[r[n+1]],r[n+2]=t[r[n+2]];return e}var s,l,c=e.create(t.getWidth(i),t.getHeight(i)),d=e.get2dContext(c),f=new Array(256);for(l=0;l<f.length;l++)f[l]=r(l,o);return d.drawImage(i,0,0),u(i),s=a(d.getImageData(0,0,c.width,c.height),f),d.putImageData(s,0,0),n.canvasToBlob(c)})}}function s(e){return function(t,n){return i(t,e(r.identity(),n))}}function l(e){return function(t){return i(t,e)}}function c(e){return function(t){return o(t,e)}}var u=n.revokeImageUrl;return{invert:l([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0]),brightness:s(r.adjustBrightness),hue:s(r.adjustHue),saturate:s(r.adjustSaturation),contrast:s(r.adjustContrast),grayscale:s(r.adjustGrayscale),sepia:s(r.adjustSepia),colorize:function(e,t,n,o){return i(e,r.adjustColors(r.identity(),t,n,o))},sharpen:c([0,-1,0,-1,5,-1,0,-1,0]),emboss:c([-2,-1,0,-1,1,1,0,1,2]),gamma:a(function(e,t){return 255*Math.pow(e/255,1-t)}),exposure:a(function(e,t){return 255*(1-Math.exp(-(e/255)*t))}),colorFilter:i,convoluteFilter:o}}),a("r",["o","e","m","n"],function(e,t,n,r){function i(e,t,n){var a=r.getWidth(e),s=r.getHeight(e),l=t/a,c=n/s,u=!1;(l<.5||l>2)&&(l=l<.5?.5:2,u=!0),(c<.5||c>2)&&(c=c<.5?.5:2,u=!0);var d=o(e,l,c);return u?d.then(function(e){return i(e,t,n)}):d}function o(t,i,o){return new e(function(e){var a=r.getWidth(t),s=r.getHeight(t),l=Math.floor(a*i),c=Math.floor(s*o),u=n.create(l,c),d=n.get2dContext(u);d.drawImage(t,0,0,a,s,0,0,l,c),e(u)})}return{scale:i}}),a("d",["e","m","n","r"],function(e,t,n,r){function i(r,i){return e.blobToImage(r).then(function(o){var a=t.create(n.getWidth(o),n.getHeight(o)),s=t.get2dContext(a),c=0,u=0;return i=i<0?360+i:i,90!=i&&270!=i||t.resize(a,a.height,a.width),90!=i&&180!=i||(c=a.width),270!=i&&180!=i||(u=a.height),s.translate(c,u),s.rotate(i*Math.PI/180),s.drawImage(o,0,0),l(o),e.canvasToBlob(a,r.type)})}function o(r,i){return e.blobToImage(r).then(function(r){var o=t.create(n.getWidth(r),n.getHeight(r)),a=t.get2dContext(o);return"v"==i?(a.scale(1,-1),a.drawImage(r,0,-o.height)):(a.scale(-1,1),a.drawImage(r,-o.width,0)),l(r),e.canvasToBlob(o)})}function a(n,r,i,o,a){return e.blobToImage(n).then(function(n){var s=t.create(o,a),c=t.get2dContext(s);return c.drawImage(n,-r,-i),l(n),e.canvasToBlob(s)})}function s(t,n,i){return e.blobToImage(t).then(function(o){var a;return a=r.scale(o,n,i).then(function(n){return e.canvasToBlob(n,t.type)}).then(c(o)).catch(c(o))})}var l=e.revokeImageUrl,c=function(e){return function(t){return l(e),t}};return{rotate:i,flip:o,crop:a,resize:s}}),a("7",["c","d"],function(e,t){var n=function(t){return e.invert(t)},r=function(t){return e.sharpen(t)},i=function(t){return e.emboss(t)},o=function(t,n){return e.gamma(t,n)},a=function(t,n){return e.exposure(t,n)},s=function(t,n,r,i){return e.colorize(t,n,r,i)},l=function(t,n){return e.brightness(t,n)},c=function(t,n){return e.hue(t,n)},u=function(t,n){return e.saturate(t,n)},d=function(t,n){return e.contrast(t,n)},f=function(t,n){return e.grayscale(t,n)},h=function(t,n){return e.sepia(t,n)},p=function(e,n){return t.flip(e,n)},m=function(e,n,r,i,o){return t.crop(e,n,r,i,o)},g=function(e,n,r){return t.resize(e,n,r)},v=function(e,n){return t.rotate(e,n)};return{invert:n,sharpen:r,emboss:i,brightness:l,hue:c,saturate:u,contrast:d,grayscale:f,sepia:h,colorize:s,gamma:o,exposure:a,flip:p,crop:m,resize:g,rotate:v}}),a("8",["e"],function(e){var t=function(t){return e.blobToImage(t)},n=function(t){return e.imageToBlob(t)},r=function(t){return e.blobToDataUri(t)},i=function(t){return e.blobToBase64(t)};return{blobToImage:t,imageToBlob:n,blobToDataUri:r,blobToBase64:i}}),s("f",tinymce.dom.DOMUtils),s("g",tinymce.ui.Factory),s("h",tinymce.ui.Form),s("i",tinymce.ui.Container),s("s",tinymce.ui.Control),s("t",tinymce.ui.DragHelper),s("u",tinymce.geom.Rect),s("w",tinymce.dom.DomQuery),s("x",tinymce.util.Observable),s("y",tinymce.util.VK),a("v",["w","t","u","5","x","y"],function(e,t,n,r,i,o){var a=0;return function(s,l,c,u,d){function f(e,t){return{x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}}function h(e,t){return{x:t.x-e.x,y:t.y-e.y,w:t.w,h:t.h}}function p(){return h(c,s)}function m(e,t,r,i){var o,a,l,u,d;o=t.x,a=t.y,l=t.w,u=t.h,o+=r*e.deltaX,a+=i*e.deltaY,l+=r*e.deltaW,u+=i*e.deltaH,l<20&&(l=20),u<20&&(u=20),d=s=n.clamp({x:o,y:a,w:l,h:u},c,"move"==e.name),d=h(c,d),E.fire("updateRect",{rect:d}),x(d)}function g(){function n(e){var n;return new t(R,{document:u.ownerDocument,handle:R+"-"+e.name,start:function(){n=s},drag:function(t){m(e,n,t.deltaX,t.deltaY)}})}e('<div id="'+R+'" class="'+T+'croprect-container" role="grid" aria-dropeffect="execute">').appendTo(u),r.each(k,function(t){e("#"+R,u).append('<div id="'+R+"-"+t+'"class="'+T+'croprect-block" style="display: none" data-mce-bogus="all">')}),r.each(_,function(t){e("#"+R,u).append('<div id="'+R+"-"+t.name+'" class="'+T+"croprect-handle "+T+"croprect-handle-"+t.name+'"style="display: none" data-mce-bogus="all" role="gridcell" tabindex="-1" aria-label="'+t.label+'" aria-grabbed="false">')}),S=r.map(_,n),y(s),e(u).on("focusin focusout",function(t){e(t.target).attr("aria-grabbed","focus"===t.type)}),e(u).on("keydown",function(e){function t(e,t,r,i,o){e.stopPropagation(),e.preventDefault(),m(n,r,i,o)}var n;switch(r.each(_,function(t){if(e.target.id==R+"-"+t.name)return n=t,!1}),e.keyCode){case o.LEFT:t(e,n,s,-10,0);break;case o.RIGHT:t(e,n,s,10,0);break;case o.UP:t(e,n,s,0,-10);break;case o.DOWN:t(e,n,s,0,10);break;case o.ENTER:case o.SPACEBAR:e.preventDefault(),d()}})}function v(t){var n;n=r.map(_,function(e){return"#"+R+"-"+e.name}).concat(r.map(k,function(e){return"#"+R+"-"+e})).join(","),t?e(n,u).show():e(n,u).hide()}function y(t){function n(t,n){n.h<0&&(n.h=0),n.w<0&&(n.w=0),e("#"+R+"-"+t,u).css({left:n.x,top:n.y,width:n.w,height:n.h})}r.each(_,function(n){e("#"+R+"-"+n.name,u).css({left:t.w*n.xMul+t.x,top:t.h*n.yMul+t.y})}),n("top",{x:l.x,y:l.y,w:l.w,h:t.y-l.y}),n("right",{x:t.x+t.w,y:t.y,w:l.w-t.x-t.w+l.x,h:t.h}),n("bottom",{x:l.x,y:t.y+t.h,w:l.w,h:l.h-t.y-t.h+l.y}),n("left",{x:l.x,y:t.y,w:t.x-l.x,h:t.h}),n("move",t)}function b(e){s=e,y(s)}function C(e){l=e,y(s)}function x(e){b(f(c,e))}function w(e){c=e,y(s)}function N(){r.each(S,function(e){e.destroy()}),S=[]}var E,_,S,k,T="mce-",R=T+"crid-"+a++;return _=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],k=["top","right","bottom","left"],g(u),E=r.extend({toggleVisibility:v,setClampRect:w,setRect:b,getInnerRect:p,setInnerRect:x,setViewPortRect:C,destroy:N},i)}}),a("j",["s","t","u","5","3","v"],function(e,t,n,r,i,o){function a(e){return new i(function(t){function n(){e.removeEventListener("load",n),t(e)}e.complete?t(e):e.addEventListener("load",n)})}return e.extend({Defaults:{classes:"imagepanel"},selection:function(e){return arguments.length?(this.state.set("rect",e),this):this.state.get("rect")},imageSize:function(){var e=this.state.get("viewRect");return{w:e.w,h:e.h}},toggleCropRect:function(e){this.state.set("cropEnabled",e)},imageSrc:function(e){var t=this,r=new Image;r.src=e,a(r).then(function(){var e,i,o=t.state.get("viewRect");i=t.$el.find("img"),i[0]?i.replaceWith(r):t.getEl().appendChild(r),e={x:0,y:0,w:r.naturalWidth,h:r.naturalHeight},t.state.set("viewRect",e),t.state.set("rect",n.inflate(e,-20,-20)),o&&o.w==e.w&&o.h==e.h||t.zoomFit(),t.repaintImage(),t.fire("load")})},zoom:function(e){return arguments.length?(this.state.set("zoom",e),this):this.state.get("zoom")},postRender:function(){return this.imageSrc(this.settings.imageSrc),this._super()},zoomFit:function(){var e,t,n,r,i,o,a,s=this;a=10,e=s.$el.find("img"),t=s.getEl().clientWidth,n=s.getEl().clientHeight,r=e[0].naturalWidth,i=e[0].naturalHeight,o=Math.min((t-a)/r,(n-a)/i),o>=1&&(o=1),s.zoom(o)},repaintImage:function(){var e,t,n,r,i,o,a,s,l,c;c=this.getEl(),s=this.zoom(),l=this.state.get("rect"),a=this.$el.find("img"),i=c.offsetWidth,o=c.offsetHeight,n=a[0].naturalWidth*s,r=a[0].naturalHeight*s,e=Math.max(0,i/2-n/2),t=Math.max(0,o/2-r/2),a.css({left:e,top:t,width:n,height:r}),this.cropRect&&(this.cropRect.setRect({x:l.x*s+e,y:l.y*s+t,w:l.w*s,h:l.h*s}),this.cropRect.setClampRect({x:e,y:t,w:n,h:r}),this.cropRect.setViewPortRect({x:0,y:0,w:i,h:o}))},bindStates:function(){function e(e){t.cropRect=new o(e,t.state.get("viewRect"),t.state.get("viewRect"),t.getEl(),function(){t.fire("crop")}),t.cropRect.on("updateRect",function(e){var n=e.rect,r=t.zoom();n={x:Math.round(n.x/r),y:Math.round(n.y/r),w:Math.round(n.w/r),h:Math.round(n.h/r)},t.state.set("rect",n)}),t.on("remove",t.cropRect.destroy)}var t=this;t.state.on("change:cropEnabled",function(e){t.cropRect.toggleVisibility(e.value),t.repaintImage()}),t.state.on("change:zoom",function(){t.repaintImage()}),t.state.on("change:rect",function(n){var r=n.value;t.cropRect||e(r),t.cropRect.setRect(r)})}})}),a("k",[],function(){return function(){function e(e){var t;return t=o.splice(++a),o.push(e),{state:e,removed:t}}function t(){if(r())return o[--a]}function n(){if(i())return o[++a]}function r(){return a>0}function i(){return a!=-1&&a<o.length-1}var o=[],a=-1;return{data:o,add:e,undo:t,redo:n,canUndo:r,canRedo:i}}}),a("9",["f","5","3","g","h","i","j","7","8","k"],function(e,t,n,r,i,o,a,s,l,c){function u(e){return{blob:e,url:URL.createObjectURL(e)}}function d(e){e&&URL.revokeObjectURL(e.url)}function f(e){t.each(e,d)}function h(n,l,h){function p(e){var t,n,r,i;t=H.find("#w")[0],n=H.find("#h")[0],r=parseInt(t.value(),10),i=parseInt(n.value(),10),H.find("#constrain")[0].checked()&&ae&&se&&r&&i&&("w"==e.control.settings.name?(i=Math.round(r*le),n.value(i)):(r=Math.round(i*ce),t.value(r))),ae=r,se=i}function m(e){return Math.round(100*e)+"%"}function g(){H.find("#undo").disabled(!ue.canUndo()),H.find("#redo").disabled(!ue.canRedo()),H.statusbar.find("#save").disabled(!ue.canUndo())}function v(){H.find("#undo").disabled(!0),H.find("#redo").disabled(!0)}function y(e){e&&$.imageSrc(e.url)}function b(e){return function(){var n=t.grep(oe,function(t){return t.settings.name!=e});t.each(n,function(e){e.hide()}),e.show(),e.focus()}}function C(e){z=u(e),y(z)}function x(e){n=u(e),y(n),f(ue.add(n).removed),g()}function w(){var e=$.selection();s.crop(n.blob,e.x,e.y,e.w,e.h).then(function(e){x(e),_()})}function N(e){var t=[].slice.call(arguments,1);return function(){var r=z||n;e.apply(this,[r.blob].concat(t)).then(C)}}function E(e){var t=[].slice.call(arguments,1);return function(){e.apply(this,[n.blob].concat(t)).then(x)}}function _(){y(n),d(z),b(I)(),g()}function S(){z&&(x(z.blob),_())}function k(){var e=$.zoom();e<2&&(e+=.1),$.zoom(e)}function T(){var e=$.zoom();e>.1&&(e-=.1),$.zoom(e)}function R(){n=ue.undo(),y(n),g()}function A(){n=ue.redo(),y(n),g()}function B(){l(n.blob),H.close()}function D(e){return new i({layout:"flex",direction:"row",labelGap:5,border:"0 0 1 0",align:"center",pack:"center",padding:"0 10 0 10",spacing:5,flex:0,minHeight:60,defaults:{classes:"imagetool",type:"button"},items:e})}function L(e,t){return D([{text:"Back",onclick:_},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:S}]).hide().on("show",function(){v(),t(n.blob).then(function(e){var t=u(e);y(t),d(z),z=t})})}function M(e,t,r,i,o){function a(e){t(n.blob,e).then(function(e){var t=u(e);y(t),d(z),z=t})}return D([{text:"Back",onclick:_},{type:"spacer",flex:1},{type:"slider",flex:1,ondragend:function(e){a(e.value)},minValue:i,maxValue:o,value:r,previewFilter:m},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:S}]).hide().on("show",function(){this.find("slider").value(r),v()})}function P(e,t){function r(){var e,r,i;e=H.find("#r")[0].value(),r=H.find("#g")[0].value(),i=H.find("#b")[0].value(),t(n.blob,e,r,i).then(function(e){var t=u(e);y(t),d(z),z=t})}return D([{text:"Back",onclick:_},{type:"spacer",flex:1},{type:"slider",label:"R",name:"r",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:m},{type:"slider",label:"G",name:"g",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:m},{type:"slider",label:"B",name:"b",minValue:0,value:1,maxValue:2,ondragend:r,previewFilter:m},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:S}]).hide().on("show",function(){H.find("#r,#g,#b").value(1),v()})}function O(e){e.control.value()===!0&&(le=se/ae,ce=ae/se)}var H,I,F,z,U,W,V,$,q,j,Y,X,K,G,J,Q,Z,ee,te,ne,re,ie,oe,ae,se,le,ce,ue=new c;U=D([{text:"Back",onclick:_},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:w}]).hide().on("show hide",function(e){$.toggleCropRect("show"==e.type)}).on("show",v),W=D([{text:"Back",onclick:_},{type:"spacer",flex:1},{type:"textbox",name:"w",label:"Width",size:4,onkeyup:p},{type:"textbox",name:"h",label:"Height",size:4,onkeyup:p},{type:"checkbox",name:"constrain",text:"Constrain proportions",checked:!0,onchange:O},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:"submit"}]).hide().on("submit",function(e){var t=parseInt(H.find("#w").value(),10),n=parseInt(H.find("#h").value(),10);e.preventDefault(),E(s.resize,t,n)(),_()}).on("show",v),V=D([{text:"Back",onclick:_},{type:"spacer",flex:1},{icon:"fliph",tooltip:"Flip horizontally",onclick:N(s.flip,"h")},{icon:"flipv",tooltip:"Flip vertically",onclick:N(s.flip,"v")},{icon:"rotateleft",tooltip:"Rotate counterclockwise",onclick:N(s.rotate,-90)},{icon:"rotateright",tooltip:"Rotate clockwise",onclick:N(s.rotate,90)},{type:"spacer",flex:1},{text:"Apply",subtype:"primary",onclick:S}]).hide().on("show",v),Y=L("Invert",s.invert),te=L("Sharpen",s.sharpen),ne=L("Emboss",s.emboss),X=M("Brightness",s.brightness,0,-1,1),K=M("Hue",s.hue,180,0,360),G=M("Saturate",s.saturate,0,-1,1),J=M("Contrast",s.contrast,0,-1,1),Q=M("Grayscale",s.grayscale,0,0,1),Z=M("Sepia",s.sepia,0,0,1),ee=P("Colorize",s.colorize),re=M("Gamma",s.gamma,0,-1,1),ie=M("Exposure",s.exposure,1,0,2),F=D([{text:"Back",onclick:_},{type:"spacer",flex:1},{text:"hue",icon:"hue",onclick:b(K)},{text:"saturate",icon:"saturate",onclick:b(G)},{text:"sepia",icon:"sepia",onclick:b(Z)},{text:"emboss",icon:"emboss",onclick:b(ne)},{text:"exposure",icon:"exposure",onclick:b(ie)},{type:"spacer",flex:1}]).hide(),I=D([{tooltip:"Crop",icon:"crop",onclick:b(U)},{tooltip:"Resize",icon:"resize2",onclick:b(W)},{tooltip:"Orientation",icon:"orientation",onclick:b(V)},{tooltip:"Brightness",icon:"sun",onclick:b(X)},{tooltip:"Sharpen",icon:"sharpen",onclick:b(te)},{tooltip:"Contrast",icon:"contrast",onclick:b(J)},{tooltip:"Color levels",icon:"drop",onclick:b(ee)},{tooltip:"Gamma",icon:"gamma",onclick:b(re)},{tooltip:"Invert",icon:"invert",onclick:b(Y)}]),$=new a({flex:1,imageSrc:n.url}),q=new o({layout:"flex",direction:"column",border:"0 1 0 0",padding:5,spacing:5,items:[{type:"button",icon:"undo",tooltip:"Undo",name:"undo",onclick:R},{type:"button",icon:"redo",tooltip:"Redo",name:"redo",onclick:A},{type:"button",icon:"zoomin",tooltip:"Zoom in",onclick:k},{type:"button",icon:"zoomout",tooltip:"Zoom out",onclick:T}]}),j=new o({type:"container",layout:"flex",direction:"row",align:"stretch",flex:1,items:[q,$]}),oe=[I,U,W,V,F,Y,X,K,G,J,Q,Z,ee,te,ne,re,ie],H=r.create("window",{layout:"flex",direction:"column",align:"stretch",minWidth:Math.min(e.DOM.getViewPort().w,800),minHeight:Math.min(e.DOM.getViewPort().h,650),title:"Edit image",items:oe.concat([j]),buttons:[{text:"Save",name:"save",subtype:"primary",onclick:B},{text:"Cancel",onclick:"close"}]}),H.renderTo(document.body).reflow(),H.on("close",function(){h(),f(ue.data),ue=null,z=null}),ue.add(n),g(),$.on("load",function(){ae=$.imageSize().w,se=$.imageSize().h,le=se/ae,ce=ae/se,H.find("#w").value(ae),H.find("#h").value(se)}),$.on("crop",w)}function p(e){return new n(function(t,n){h(u(e),t,n)})}return{edit:p}}),a("a",[],function(){function e(e){function t(e){return/^[0-9\.]+px$/.test(e)}var n,r;return n=e.style.width,r=e.style.height,n||r?t(n)&&t(r)?{w:parseInt(n,10),h:parseInt(r,10)}:null:(n=e.width,r=e.height,n&&r?{w:parseInt(n,10),h:parseInt(r,10)}:null)}function t(e,t){var n,r;t&&(n=e.style.width,r=e.style.height,(n||r)&&(e.style.width=t.w+"px",e.style.height=t.h+"px",e.removeAttribute("data-mce-style")),n=e.width,r=e.height,(n||r)&&(e.setAttribute("width",t.w),e.setAttribute("height",t.h)))}function n(e){return{w:e.naturalWidth,h:e.naturalHeight}}return{getImageSize:e,setImageSize:t,getNaturalImageSize:n}}),a("l",["3","5"],function(e,t){var n=function(e){return null!==e&&void 0!==e},r=function(e,t){var r;return r=t.reduce(function(e,t){return n(e)?e[t]:void 0},e),n(r)?r:null},i=function(n,r){return new e(function(e){var i;i=new XMLHttpRequest,i.onreadystatechange=function(){4===i.readyState&&e({status:i.status,blob:this.response})},i.open("GET",n,!0),t.each(r,function(e,t){i.setRequestHeader(t,e)}),i.responseType="blob",i.send()})},o=function(t){return new e(function(e){var n=new FileReader;n.onload=function(t){var n=t.target;e(n.result)},n.readAsText(t)})},a=function(e){var t;try{t=JSON.parse(e)}catch(e){}return t};return{traverse:r,readBlob:o,requestUrlAsBlob:i,parseJson:a}}),a("b",["3","5","l"],function(e,t,n){function r(t){return n.requestUrlAsBlob(t,{}).then(function(t){return t.status>=400?o(t.status):e.resolve(t.blob)})}var i=function(e){return 400===e||403===e||500===e},o=function(t){return e.reject("ImageProxy HTTP error: "+t)},a=function(t){e.reject("ImageProxy Service error: "+t)},s=function(e,t){return n.readBlob(t).then(function(e){var t=n.parseJson(e),r=n.traverse(t,["error","type"]);return a(r?r:"Invalid JSON")})},l=function(e,t){return i(e)?s(e,t):o(e)},c=function(t,r){return n.requestUrlAsBlob(t,{"Content-Type":"application/json;charset=UTF-8","tiny-api-key":r}).then(function(t){return t.status>=400?l(t.status,t.blob):e.resolve(t.blob)})},u=function(e,t){return t?c(e,t):r(e)};return{getUrl:u}}),a("0",["1","2","3","4","5","6","7","8","9","a","b"],function(e,t,n,r,i,o,a,s,l,c,u){var d=function(e){function d(t){e.notificationManager.open({text:t,type:"error"})}function f(){return e.selection.getNode()}function h(){return"imagetools"+D++}function p(t){var n=t.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new r(n).host===e.documentBaseURI.host}function m(t){return i.inArray(e.settings.imagetools_cors_hosts,new r(t.src).host)!==-1}function g(){return e.settings.api_key||e.settings.imagetools_api_key}function v(t){var n,r=t.src;return m(t)?u.getUrl(t.src,null):p(t)?s.imageToBlob(t):(r=e.settings.imagetools_proxy,r+=(r.indexOf("?")===-1?"?":"&")+"url="+encodeURIComponent(t.src),n=g(),u.getUrl(r,n))}function y(){var t;return t=e.editorUpload.blobCache.getByUri(f().src),t?t.blob():v(f())}function b(){A=o.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},3e4)}function C(){clearTimeout(A)}function x(t,n){return s.blobToDataUri(t).then(function(i){var o,a,s,l,c;return c=f(),o=h(),s=e.editorUpload.blobCache,a=r.parseDataUri(i).data,l=s.create(o,t,a),s.add(l),e.undoManager.transact(function(){function t(){e.$(c).off("load",t),e.nodeChanged(),n?e.editorUpload.uploadImagesAuto():(C(),b())}e.$(c).on("load",t),e.$(c).attr({src:l.blobUri()}).removeAttr("data-mce-src")}),l})}function w(t){return function(){return e._scanForImages().then(y).then(t).then(x,d)}}function N(e){return function(){return w(function(t){var n=c.getImageSize(f());return n&&c.setImageSize(f(),{w:n.h,h:n.w}),a.rotate(t,e)})()}}function E(e){return function(){return w(function(t){return a.flip(t,e)})()}}function _(){var e=f(),t=c.getNaturalImageSize(e),r=function(r){return new n(function(n){s.blobToImage(r).then(function(i){var o=c.getNaturalImageSize(i);t.w==o.w&&t.h==o.h||c.getImageSize(e)&&c.setImageSize(e,o),URL.revokeObjectURL(i.src),n(r)})})},i=function(e){return l.edit(e).then(r).then(function(e){x(e,!0)},function(){})};e&&v(e).then(i,d)}function S(){e.addButton("rotateleft",{title:"Rotate counterclockwise",onclick:N(-90)}),e.addButton("rotateright",{title:"Rotate clockwise",onclick:N(90)}),e.addButton("flipv",{title:"Flip vertically",onclick:E("v")}),e.addButton("fliph",{title:"Flip horizontally",onclick:E("h")}),e.addButton("editimage",{title:"Edit image",onclick:_}),e.addButton("imageoptions",{title:"Image options",icon:"options",cmd:"mceImage"})}function k(){e.on("NodeChange",function(t){B&&B.src!=t.element.src&&(C(),e.editorUpload.uploadImagesAuto(),B=void 0),T(t.element)&&(B=t.element)})}function T(t){var n=e.dom.is(t,"img:not([data-mce-object],[data-mce-placeholder])");return n&&(p(t)||m(t)||e.settings.imagetools_proxy)}function R(){var t=e.settings.imagetools_toolbar;t||(t="rotateleft rotateright | flipv fliph | crop editimage imageoptions"),e.addContextToolbar(T,t)}var A,B,D=0;t.fileApi&&(S(),R(),k(),e.addCommand("mceEditImage",_))};return e.add("imagetools",d),function(){}}),r("0")()}();
|
@@ -0,0 +1,273 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
tinymce.PluginManager.add('importcss', function(editor) {
|
14
|
+
var self = this, each = tinymce.each;
|
15
|
+
|
16
|
+
function removeCacheSuffix(url) {
|
17
|
+
var cacheSuffix = tinymce.Env.cacheSuffix;
|
18
|
+
|
19
|
+
if (typeof url == 'string') {
|
20
|
+
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
21
|
+
}
|
22
|
+
|
23
|
+
return url;
|
24
|
+
}
|
25
|
+
|
26
|
+
function isSkinContentCss(href) {
|
27
|
+
var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
|
28
|
+
|
29
|
+
if (skin) {
|
30
|
+
var skinUrl = settings.skin_url;
|
31
|
+
|
32
|
+
if (skinUrl) {
|
33
|
+
skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
|
34
|
+
} else {
|
35
|
+
skinUrl = tinymce.baseURL + '/skins/' + skin;
|
36
|
+
}
|
37
|
+
|
38
|
+
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css';
|
39
|
+
}
|
40
|
+
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
|
44
|
+
function compileFilter(filter) {
|
45
|
+
if (typeof filter == "string") {
|
46
|
+
return function(value) {
|
47
|
+
return value.indexOf(filter) !== -1;
|
48
|
+
};
|
49
|
+
} else if (filter instanceof RegExp) {
|
50
|
+
return function(value) {
|
51
|
+
return filter.test(value);
|
52
|
+
};
|
53
|
+
}
|
54
|
+
|
55
|
+
return filter;
|
56
|
+
}
|
57
|
+
|
58
|
+
function getSelectors(doc, fileFilter) {
|
59
|
+
var selectors = [], contentCSSUrls = {};
|
60
|
+
|
61
|
+
function append(styleSheet, imported) {
|
62
|
+
var href = styleSheet.href, rules;
|
63
|
+
|
64
|
+
href = removeCacheSuffix(href);
|
65
|
+
|
66
|
+
if (!href || !fileFilter(href, imported) || isSkinContentCss(href)) {
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
|
70
|
+
each(styleSheet.imports, function(styleSheet) {
|
71
|
+
append(styleSheet, true);
|
72
|
+
});
|
73
|
+
|
74
|
+
try {
|
75
|
+
rules = styleSheet.cssRules || styleSheet.rules;
|
76
|
+
} catch (e) {
|
77
|
+
// Firefox fails on rules to remote domain for example:
|
78
|
+
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
79
|
+
}
|
80
|
+
|
81
|
+
each(rules, function(cssRule) {
|
82
|
+
if (cssRule.styleSheet) {
|
83
|
+
append(cssRule.styleSheet, true);
|
84
|
+
} else if (cssRule.selectorText) {
|
85
|
+
each(cssRule.selectorText.split(','), function(selector) {
|
86
|
+
selectors.push(tinymce.trim(selector));
|
87
|
+
});
|
88
|
+
}
|
89
|
+
});
|
90
|
+
}
|
91
|
+
|
92
|
+
each(editor.contentCSS, function(url) {
|
93
|
+
contentCSSUrls[url] = true;
|
94
|
+
});
|
95
|
+
|
96
|
+
if (!fileFilter) {
|
97
|
+
fileFilter = function(href, imported) {
|
98
|
+
return imported || contentCSSUrls[href];
|
99
|
+
};
|
100
|
+
}
|
101
|
+
|
102
|
+
try {
|
103
|
+
each(doc.styleSheets, function(styleSheet) {
|
104
|
+
append(styleSheet);
|
105
|
+
});
|
106
|
+
} catch (e) {
|
107
|
+
// Ignore
|
108
|
+
}
|
109
|
+
|
110
|
+
return selectors;
|
111
|
+
}
|
112
|
+
|
113
|
+
function defaultConvertSelectorToFormat(selectorText) {
|
114
|
+
var format;
|
115
|
+
|
116
|
+
// Parse simple element.class1, .class1
|
117
|
+
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
118
|
+
if (!selector) {
|
119
|
+
return;
|
120
|
+
}
|
121
|
+
|
122
|
+
var elementName = selector[1];
|
123
|
+
var classes = selector[2].substr(1).split('.').join(' ');
|
124
|
+
var inlineSelectorElements = tinymce.makeMap('a,img');
|
125
|
+
|
126
|
+
// element.class - Produce block formats
|
127
|
+
if (selector[1]) {
|
128
|
+
format = {
|
129
|
+
title: selectorText
|
130
|
+
};
|
131
|
+
|
132
|
+
if (editor.schema.getTextBlockElements()[elementName]) {
|
133
|
+
// Text block format ex: h1.class1
|
134
|
+
format.block = elementName;
|
135
|
+
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
136
|
+
// Block elements such as table.class and special inline elements such as a.class or img.class
|
137
|
+
format.selector = elementName;
|
138
|
+
} else {
|
139
|
+
// Inline format strong.class1
|
140
|
+
format.inline = elementName;
|
141
|
+
}
|
142
|
+
} else if (selector[2]) {
|
143
|
+
// .class - Produce inline span with classes
|
144
|
+
format = {
|
145
|
+
inline: 'span',
|
146
|
+
title: selectorText.substr(1),
|
147
|
+
classes: classes
|
148
|
+
};
|
149
|
+
}
|
150
|
+
|
151
|
+
// Append to or override class attribute
|
152
|
+
if (editor.settings.importcss_merge_classes !== false) {
|
153
|
+
format.classes = classes;
|
154
|
+
} else {
|
155
|
+
format.attributes = {"class": classes};
|
156
|
+
}
|
157
|
+
|
158
|
+
return format;
|
159
|
+
}
|
160
|
+
|
161
|
+
function getGroupsBySelector(groups, selector) {
|
162
|
+
return tinymce.util.Tools.grep(groups, function (group) {
|
163
|
+
return !group.filter || group.filter(selector);
|
164
|
+
});
|
165
|
+
}
|
166
|
+
|
167
|
+
function compileUserDefinedGroups(groups) {
|
168
|
+
return tinymce.util.Tools.map(groups, function(group) {
|
169
|
+
return tinymce.util.Tools.extend({}, group, {
|
170
|
+
original: group,
|
171
|
+
selectors: {},
|
172
|
+
filter: compileFilter(group.filter),
|
173
|
+
item: {
|
174
|
+
text: group.title,
|
175
|
+
menu: []
|
176
|
+
}
|
177
|
+
});
|
178
|
+
});
|
179
|
+
}
|
180
|
+
|
181
|
+
function isExclusiveMode(editor, group) {
|
182
|
+
// Exclusive mode can only be disabled when there are groups allowing the same style to be present in multiple groups
|
183
|
+
return group === null || editor.settings.importcss_exclusive !== false;
|
184
|
+
}
|
185
|
+
|
186
|
+
function isUniqueSelector(selector, group, globallyUniqueSelectors) {
|
187
|
+
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
188
|
+
}
|
189
|
+
|
190
|
+
function markUniqueSelector(selector, group, globallyUniqueSelectors) {
|
191
|
+
if (isExclusiveMode(editor, group)) {
|
192
|
+
globallyUniqueSelectors[selector] = true;
|
193
|
+
} else {
|
194
|
+
group.selectors[selector] = true;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
function convertSelectorToFormat(plugin, selector, group) {
|
199
|
+
var selectorConverter, settings = editor.settings;
|
200
|
+
|
201
|
+
if (group && group.selector_converter) {
|
202
|
+
selectorConverter = group.selector_converter;
|
203
|
+
} else if (settings.importcss_selector_converter) {
|
204
|
+
selectorConverter = settings.importcss_selector_converter;
|
205
|
+
} else {
|
206
|
+
selectorConverter = defaultConvertSelectorToFormat;
|
207
|
+
}
|
208
|
+
|
209
|
+
return selectorConverter.call(plugin, selector, group);
|
210
|
+
}
|
211
|
+
|
212
|
+
editor.on('renderFormatsMenu', function(e) {
|
213
|
+
var settings = editor.settings, globallyUniqueSelectors = {};
|
214
|
+
var selectorFilter = compileFilter(settings.importcss_selector_filter), ctrl = e.control;
|
215
|
+
var groups = compileUserDefinedGroups(settings.importcss_groups);
|
216
|
+
|
217
|
+
var processSelector = function (selector, group) {
|
218
|
+
if (isUniqueSelector(selector, group, globallyUniqueSelectors)) {
|
219
|
+
markUniqueSelector(selector, group, globallyUniqueSelectors);
|
220
|
+
|
221
|
+
var format = convertSelectorToFormat(self, selector, group);
|
222
|
+
if (format) {
|
223
|
+
var formatName = format.name || tinymce.DOM.uniqueId();
|
224
|
+
editor.formatter.register(formatName, format);
|
225
|
+
|
226
|
+
return tinymce.extend({}, ctrl.settings.itemDefaults, {
|
227
|
+
text: format.title,
|
228
|
+
format: formatName
|
229
|
+
});
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
return null;
|
234
|
+
};
|
235
|
+
|
236
|
+
if (!editor.settings.importcss_append) {
|
237
|
+
ctrl.items().remove();
|
238
|
+
}
|
239
|
+
|
240
|
+
each(getSelectors(e.doc || editor.getDoc(), compileFilter(settings.importcss_file_filter)), function(selector) {
|
241
|
+
if (selector.indexOf('.mce-') === -1) {
|
242
|
+
if (!selectorFilter || selectorFilter(selector)) {
|
243
|
+
var selectorGroups = getGroupsBySelector(groups, selector);
|
244
|
+
|
245
|
+
if (selectorGroups.length > 0) {
|
246
|
+
tinymce.util.Tools.each(selectorGroups, function (group) {
|
247
|
+
var menuItem = processSelector(selector, group);
|
248
|
+
if (menuItem) {
|
249
|
+
group.item.menu.push(menuItem);
|
250
|
+
}
|
251
|
+
});
|
252
|
+
} else {
|
253
|
+
var menuItem = processSelector(selector, null);
|
254
|
+
if (menuItem) {
|
255
|
+
ctrl.add(menuItem);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}
|
259
|
+
}
|
260
|
+
});
|
261
|
+
|
262
|
+
each(groups, function(group) {
|
263
|
+
if (group.item.menu.length > 0) {
|
264
|
+
ctrl.add(group.item);
|
265
|
+
}
|
266
|
+
});
|
267
|
+
|
268
|
+
e.control.renderNew();
|
269
|
+
});
|
270
|
+
|
271
|
+
// Expose default convertSelectorToFormat implementation
|
272
|
+
self.convertSelectorToFormat = defaultConvertSelectorToFormat;
|
273
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("importcss",function(e){function t(e){var t=tinymce.Env.cacheSuffix;return"string"==typeof e&&(e=e.replace("?"+t,"").replace("&"+t,"")),e}function n(t){var n=e.settings,r=n.skin!==!1&&(n.skin||"lightgray");if(r){var i=n.skin_url;return i=i?e.documentBaseURI.toAbsolute(i):tinymce.baseURL+"/skins/"+r,t===i+"/content"+(e.inline?".inline":"")+".min.css"}return!1}function r(e){return"string"==typeof e?function(t){return t.indexOf(e)!==-1}:e instanceof RegExp?function(t){return e.test(t)}:e}function i(r,i){function o(e,r){var s,l=e.href;if(l=t(l),l&&i(l,r)&&!n(l)){h(e.imports,function(e){o(e,!0)});try{s=e.cssRules||e.rules}catch(e){}h(s,function(e){e.styleSheet?o(e.styleSheet,!0):e.selectorText&&h(e.selectorText.split(","),function(e){a.push(tinymce.trim(e))})})}}var a=[],s={};h(e.contentCSS,function(e){s[e]=!0}),i||(i=function(e,t){return t||s[e]});try{h(r.styleSheets,function(e){o(e)})}catch(e){}return a}function o(t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],o=r[2].substr(1).split(".").join(" "),a=tinymce.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||a[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:o}),e.settings.importcss_merge_classes!==!1?n.classes=o:n.attributes={class:o},n}}function a(e,t){return tinymce.util.Tools.grep(e,function(e){return!e.filter||e.filter(t)})}function s(e){return tinymce.util.Tools.map(e,function(e){return tinymce.util.Tools.extend({},e,{original:e,selectors:{},filter:r(e.filter),item:{text:e.title,menu:[]}})})}function l(e,t){return null===t||e.settings.importcss_exclusive!==!1}function c(t,n,r){return!(l(e,n)?t in r:t in n.selectors)}function u(t,n,r){l(e,n)?r[t]=!0:n.selectors[t]=!0}function d(t,n,r){var i,a=e.settings;return i=r&&r.selector_converter?r.selector_converter:a.importcss_selector_converter?a.importcss_selector_converter:o,i.call(t,n,r)}var f=this,h=tinymce.each;e.on("renderFormatsMenu",function(t){var n=e.settings,o={},l=r(n.importcss_selector_filter),p=t.control,m=s(n.importcss_groups),g=function(t,n){if(c(t,n,o)){u(t,n,o);var r=d(f,t,n);if(r){var i=r.name||tinymce.DOM.uniqueId();return e.formatter.register(i,r),tinymce.extend({},p.settings.itemDefaults,{text:r.title,format:i})}}return null};e.settings.importcss_append||p.items().remove(),h(i(t.doc||e.getDoc(),r(n.importcss_file_filter)),function(e){if(e.indexOf(".mce-")===-1&&(!l||l(e))){var t=a(m,e);if(t.length>0)tinymce.util.Tools.each(t,function(t){var n=g(e,t);n&&t.item.menu.push(n)});else{var n=g(e,null);n&&p.add(n)}}}),h(m,function(e){e.item.menu.length>0&&p.add(e.item)}),t.control.renderNew()}),f.convertSelectorToFormat=o});
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
tinymce.PluginManager.add('insertdatetime', function(editor) {
|
14
|
+
var daysShort = "Sun Mon Tue Wed Thu Fri Sat Sun".split(' ');
|
15
|
+
var daysLong = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(' ');
|
16
|
+
var monthsShort = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(' ');
|
17
|
+
var monthsLong = "January February March April May June July August September October November December".split(' ');
|
18
|
+
var menuItems = [], lastFormat, defaultButtonTimeFormat;
|
19
|
+
|
20
|
+
function getDateTime(fmt, date) {
|
21
|
+
function addZeros(value, len) {
|
22
|
+
value = "" + value;
|
23
|
+
|
24
|
+
if (value.length < len) {
|
25
|
+
for (var i = 0; i < (len - value.length); i++) {
|
26
|
+
value = "0" + value;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
return value;
|
31
|
+
}
|
32
|
+
|
33
|
+
date = date || new Date();
|
34
|
+
|
35
|
+
fmt = fmt.replace("%D", "%m/%d/%Y");
|
36
|
+
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
37
|
+
fmt = fmt.replace("%Y", "" + date.getFullYear());
|
38
|
+
fmt = fmt.replace("%y", "" + date.getYear());
|
39
|
+
fmt = fmt.replace("%m", addZeros(date.getMonth() + 1, 2));
|
40
|
+
fmt = fmt.replace("%d", addZeros(date.getDate(), 2));
|
41
|
+
fmt = fmt.replace("%H", "" + addZeros(date.getHours(), 2));
|
42
|
+
fmt = fmt.replace("%M", "" + addZeros(date.getMinutes(), 2));
|
43
|
+
fmt = fmt.replace("%S", "" + addZeros(date.getSeconds(), 2));
|
44
|
+
fmt = fmt.replace("%I", "" + ((date.getHours() + 11) % 12 + 1));
|
45
|
+
fmt = fmt.replace("%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
46
|
+
fmt = fmt.replace("%B", "" + editor.translate(monthsLong[date.getMonth()]));
|
47
|
+
fmt = fmt.replace("%b", "" + editor.translate(monthsShort[date.getMonth()]));
|
48
|
+
fmt = fmt.replace("%A", "" + editor.translate(daysLong[date.getDay()]));
|
49
|
+
fmt = fmt.replace("%a", "" + editor.translate(daysShort[date.getDay()]));
|
50
|
+
fmt = fmt.replace("%%", "%");
|
51
|
+
|
52
|
+
return fmt;
|
53
|
+
}
|
54
|
+
|
55
|
+
function insertDateTime(format) {
|
56
|
+
var html = getDateTime(format);
|
57
|
+
|
58
|
+
if (editor.settings.insertdatetime_element) {
|
59
|
+
var computerTime;
|
60
|
+
|
61
|
+
if (/%[HMSIp]/.test(format)) {
|
62
|
+
computerTime = getDateTime("%Y-%m-%dT%H:%M");
|
63
|
+
} else {
|
64
|
+
computerTime = getDateTime("%Y-%m-%d");
|
65
|
+
}
|
66
|
+
|
67
|
+
html = '<time datetime="' + computerTime + '">' + html + '</time>';
|
68
|
+
|
69
|
+
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
70
|
+
if (timeElm) {
|
71
|
+
editor.dom.setOuterHTML(timeElm, html);
|
72
|
+
return;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
editor.insertContent(html);
|
77
|
+
}
|
78
|
+
|
79
|
+
editor.addCommand('mceInsertDate', function() {
|
80
|
+
insertDateTime(editor.getParam("insertdatetime_dateformat", editor.translate("%Y-%m-%d")));
|
81
|
+
});
|
82
|
+
|
83
|
+
editor.addCommand('mceInsertTime', function() {
|
84
|
+
insertDateTime(editor.getParam("insertdatetime_timeformat", editor.translate('%H:%M:%S')));
|
85
|
+
});
|
86
|
+
|
87
|
+
editor.addButton('insertdatetime', {
|
88
|
+
type: 'splitbutton',
|
89
|
+
title: 'Insert date/time',
|
90
|
+
onclick: function() {
|
91
|
+
insertDateTime(lastFormat || defaultButtonTimeFormat);
|
92
|
+
},
|
93
|
+
menu: menuItems
|
94
|
+
});
|
95
|
+
|
96
|
+
tinymce.each(editor.settings.insertdatetime_formats || [
|
97
|
+
"%H:%M:%S",
|
98
|
+
"%Y-%m-%d",
|
99
|
+
"%I:%M:%S %p",
|
100
|
+
"%D"
|
101
|
+
], function(fmt) {
|
102
|
+
if (!defaultButtonTimeFormat) {
|
103
|
+
defaultButtonTimeFormat = fmt;
|
104
|
+
}
|
105
|
+
|
106
|
+
menuItems.push({
|
107
|
+
text: getDateTime(fmt),
|
108
|
+
onclick: function() {
|
109
|
+
lastFormat = fmt;
|
110
|
+
insertDateTime(fmt);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
});
|
114
|
+
|
115
|
+
editor.addMenuItem('insertdatetime', {
|
116
|
+
icon: 'date',
|
117
|
+
text: 'Insert date/time',
|
118
|
+
menu: menuItems,
|
119
|
+
context: 'insert'
|
120
|
+
});
|
121
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function r(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",r(n.getMonth()+1,2)),t=t.replace("%d",r(n.getDate(),2)),t=t.replace("%H",""+r(n.getHours(),2)),t=t.replace("%M",""+r(n.getMinutes(),2)),t=t.replace("%S",""+r(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(l[n.getMonth()])),t=t.replace("%b",""+e.translate(s[n.getMonth()])),t=t.replace("%A",""+e.translate(a[n.getDay()])),t=t.replace("%a",""+e.translate(o[n.getDay()])),t=t.replace("%%","%")}function n(n){var r=t(n);if(e.settings.insertdatetime_element){var i;i=t(/%[HMSIp]/.test(n)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),r='<time datetime="'+i+'">'+r+"</time>";var o=e.dom.getParent(e.selection.getStart(),"time");if(o)return void e.dom.setOuterHTML(o,r)}e.insertContent(r)}var r,i,o="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" "),c=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){n(r||i)},menu:c}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){i||(i=e),c.push({text:t(e),onclick:function(){r=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:c,context:"insert"})});
|
@@ -0,0 +1,225 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
tinymce.PluginManager.add('layer', function(editor) {
|
14
|
+
function getParentLayer(node) {
|
15
|
+
do {
|
16
|
+
if (node.className && node.className.indexOf('mceItemLayer') != -1) {
|
17
|
+
return node;
|
18
|
+
}
|
19
|
+
} while ((node = node.parentNode));
|
20
|
+
}
|
21
|
+
|
22
|
+
function visualAid(e) {
|
23
|
+
var dom = editor.dom;
|
24
|
+
|
25
|
+
tinymce.each(dom.select('div,p', e), function(e) {
|
26
|
+
if (/^(absolute|relative|fixed)$/i.test(e.style.position)) {
|
27
|
+
if (e.hasVisual) {
|
28
|
+
dom.addClass(e, 'mceItemVisualAid');
|
29
|
+
} else {
|
30
|
+
dom.removeClass(e, 'mceItemVisualAid');
|
31
|
+
}
|
32
|
+
|
33
|
+
dom.addClass(e, 'mceItemLayer');
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
function move(d) {
|
39
|
+
var i, z = [], le = getParentLayer(editor.selection.getNode()), ci = -1, fi = -1, nl;
|
40
|
+
|
41
|
+
nl = [];
|
42
|
+
tinymce.walk(editor.getBody(), function(n) {
|
43
|
+
if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) {
|
44
|
+
nl.push(n);
|
45
|
+
}
|
46
|
+
}, 'childNodes');
|
47
|
+
|
48
|
+
// Find z-indexes
|
49
|
+
for (i = 0; i < nl.length; i++) {
|
50
|
+
z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex, 10) : 0;
|
51
|
+
|
52
|
+
if (ci < 0 && nl[i] == le) {
|
53
|
+
ci = i;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
if (d < 0) {
|
58
|
+
// Move back
|
59
|
+
|
60
|
+
// Try find a lower one
|
61
|
+
for (i = 0; i < z.length; i++) {
|
62
|
+
if (z[i] < z[ci]) {
|
63
|
+
fi = i;
|
64
|
+
break;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
if (fi > -1) {
|
69
|
+
nl[ci].style.zIndex = z[fi];
|
70
|
+
nl[fi].style.zIndex = z[ci];
|
71
|
+
} else {
|
72
|
+
if (z[ci] > 0) {
|
73
|
+
nl[ci].style.zIndex = z[ci] - 1;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
} else {
|
77
|
+
// Move forward
|
78
|
+
|
79
|
+
// Try find a higher one
|
80
|
+
for (i = 0; i < z.length; i++) {
|
81
|
+
if (z[i] > z[ci]) {
|
82
|
+
fi = i;
|
83
|
+
break;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
if (fi > -1) {
|
88
|
+
nl[ci].style.zIndex = z[fi];
|
89
|
+
nl[fi].style.zIndex = z[ci];
|
90
|
+
} else {
|
91
|
+
nl[ci].style.zIndex = z[ci] + 1;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
editor.execCommand('mceRepaint');
|
96
|
+
}
|
97
|
+
|
98
|
+
function insertLayer() {
|
99
|
+
var dom = editor.dom, p = dom.getPos(dom.getParent(editor.selection.getNode(), '*'));
|
100
|
+
var body = editor.getBody();
|
101
|
+
|
102
|
+
editor.dom.add(body, 'div', {
|
103
|
+
style: {
|
104
|
+
position: 'absolute',
|
105
|
+
left: p.x,
|
106
|
+
top: (p.y > 20 ? p.y : 20),
|
107
|
+
width: 100,
|
108
|
+
height: 100
|
109
|
+
},
|
110
|
+
'class': 'mceItemVisualAid mceItemLayer'
|
111
|
+
}, editor.selection.getContent() || editor.getLang('layer.content'));
|
112
|
+
|
113
|
+
// Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7
|
114
|
+
if (tinymce.Env.ie) {
|
115
|
+
dom.setHTML(body, body.innerHTML);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
function toggleAbsolute() {
|
120
|
+
var le = getParentLayer(editor.selection.getNode());
|
121
|
+
|
122
|
+
if (!le) {
|
123
|
+
le = editor.dom.getParent(editor.selection.getNode(), 'DIV,P,IMG');
|
124
|
+
}
|
125
|
+
|
126
|
+
if (le) {
|
127
|
+
if (le.style.position.toLowerCase() == "absolute") {
|
128
|
+
editor.dom.setStyles(le, {
|
129
|
+
position: '',
|
130
|
+
left: '',
|
131
|
+
top: '',
|
132
|
+
width: '',
|
133
|
+
height: ''
|
134
|
+
});
|
135
|
+
|
136
|
+
editor.dom.removeClass(le, 'mceItemVisualAid');
|
137
|
+
editor.dom.removeClass(le, 'mceItemLayer');
|
138
|
+
} else {
|
139
|
+
if (!le.style.left) {
|
140
|
+
le.style.left = 20 + 'px';
|
141
|
+
}
|
142
|
+
|
143
|
+
if (!le.style.top) {
|
144
|
+
le.style.top = 20 + 'px';
|
145
|
+
}
|
146
|
+
|
147
|
+
if (!le.style.width) {
|
148
|
+
le.style.width = le.width ? (le.width + 'px') : '100px';
|
149
|
+
}
|
150
|
+
|
151
|
+
if (!le.style.height) {
|
152
|
+
le.style.height = le.height ? (le.height + 'px') : '100px';
|
153
|
+
}
|
154
|
+
|
155
|
+
le.style.position = "absolute";
|
156
|
+
|
157
|
+
editor.dom.setAttrib(le, 'data-mce-style', '');
|
158
|
+
editor.addVisual(editor.getBody());
|
159
|
+
}
|
160
|
+
|
161
|
+
editor.execCommand('mceRepaint');
|
162
|
+
editor.nodeChanged();
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
// Register commands
|
167
|
+
editor.addCommand('mceInsertLayer', insertLayer);
|
168
|
+
|
169
|
+
editor.addCommand('mceMoveForward', function() {
|
170
|
+
move(1);
|
171
|
+
});
|
172
|
+
|
173
|
+
editor.addCommand('mceMoveBackward', function() {
|
174
|
+
move(-1);
|
175
|
+
});
|
176
|
+
|
177
|
+
editor.addCommand('mceMakeAbsolute', function() {
|
178
|
+
toggleAbsolute();
|
179
|
+
});
|
180
|
+
|
181
|
+
// Register buttons
|
182
|
+
editor.addButton('moveforward', {title: 'layer.forward_desc', cmd: 'mceMoveForward'});
|
183
|
+
editor.addButton('movebackward', {title: 'layer.backward_desc', cmd: 'mceMoveBackward'});
|
184
|
+
editor.addButton('absolute', {title: 'layer.absolute_desc', cmd: 'mceMakeAbsolute'});
|
185
|
+
editor.addButton('insertlayer', {title: 'layer.insertlayer_desc', cmd: 'mceInsertLayer'});
|
186
|
+
|
187
|
+
editor.on('init', function() {
|
188
|
+
if (tinymce.Env.ie) {
|
189
|
+
editor.getDoc().execCommand('2D-Position', false, true);
|
190
|
+
}
|
191
|
+
});
|
192
|
+
|
193
|
+
// Remove serialized styles when selecting a layer since it might be changed by a drag operation
|
194
|
+
editor.on('mouseup', function(e) {
|
195
|
+
var layer = getParentLayer(e.target);
|
196
|
+
|
197
|
+
if (layer) {
|
198
|
+
editor.dom.setAttrib(layer, 'data-mce-style', '');
|
199
|
+
}
|
200
|
+
});
|
201
|
+
|
202
|
+
// Fixes edit focus issues with layers on Gecko
|
203
|
+
// This will enable designMode while inside a layer and disable it when outside
|
204
|
+
editor.on('mousedown', function(e) {
|
205
|
+
var node = e.target, doc = editor.getDoc(), parent;
|
206
|
+
|
207
|
+
if (tinymce.Env.gecko) {
|
208
|
+
if (getParentLayer(node)) {
|
209
|
+
if (doc.designMode !== 'on') {
|
210
|
+
doc.designMode = 'on';
|
211
|
+
|
212
|
+
// Repaint caret
|
213
|
+
node = doc.body;
|
214
|
+
parent = node.parentNode;
|
215
|
+
parent.removeChild(node);
|
216
|
+
parent.appendChild(node);
|
217
|
+
}
|
218
|
+
} else if (doc.designMode == 'on') {
|
219
|
+
doc.designMode = 'off';
|
220
|
+
}
|
221
|
+
}
|
222
|
+
});
|
223
|
+
|
224
|
+
editor.on('NodeChange', visualAid);
|
225
|
+
});
|