mosaico 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (425) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +680 -0
  5. data/README.md +179 -0
  6. data/Rakefile +5 -0
  7. data/app/assets/images/mosaico/logo_transparent.png +0 -0
  8. data/app/assets/javascripts/mosaico/application.js.erb +51 -0
  9. data/app/assets/javascripts/mosaico/plugins/debug.js.erb +10 -0
  10. data/app/assets/javascripts/mosaico/plugins/logo.js.erb +10 -0
  11. data/app/assets/javascripts/mosaico/plugins/preview.js +85 -0
  12. data/app/assets/javascripts/mosaico/plugins/save.js.erb +72 -0
  13. data/app/assets/javascripts/mosaico/plugins/template_path.js.erb +22 -0
  14. data/app/assets/javascripts/mosaico/plugins/translations.js +10 -0
  15. data/app/assets/javascripts/mosaico/utilities.js +25 -0
  16. data/app/assets/stylesheets/mosaico/application.css +6 -0
  17. data/app/controllers/mosaico/application_controller.rb +17 -0
  18. data/app/controllers/mosaico/images_controller.rb +142 -0
  19. data/app/controllers/mosaico/projects_controller.rb +31 -0
  20. data/app/controllers/mosaico/templates_controller.rb +8 -0
  21. data/app/helpers/mosaico/application_helper.rb +7 -0
  22. data/app/models/mosaico/image.rb +9 -0
  23. data/app/models/mosaico/placeholder_image.rb +9 -0
  24. data/app/models/mosaico/project.rb +13 -0
  25. data/app/models/mosaico/uploaded_image.rb +26 -0
  26. data/app/views/layouts/mosaico/application.html.erb +13 -0
  27. data/app/views/mosaico/projects/new.html.erb +1 -0
  28. data/app/views/mosaico/projects/show.html.erb +1 -0
  29. data/app/views/mosaico/shared/_metadata.html.erb +12 -0
  30. data/config/routes.rb +12 -0
  31. data/db/migrate/20170817202255_add_images.rb +14 -0
  32. data/db/migrate/20170824233755_add_projects.rb +11 -0
  33. data/lib/mosaico.rb +100 -0
  34. data/lib/mosaico/engine.rb +72 -0
  35. data/lib/mosaico/local_backend.rb +23 -0
  36. data/lib/mosaico/local_image_backend.rb +7 -0
  37. data/lib/mosaico/local_placeholder_backend.rb +7 -0
  38. data/lib/mosaico/placeholder.png +0 -0
  39. data/lib/mosaico/template.rb +89 -0
  40. data/lib/mosaico/versafix_template.rb +43 -0
  41. data/lib/mosaico/version.rb +4 -0
  42. data/lib/tasks/makeThumbs.js.erb +57 -0
  43. data/lib/tasks/thumbs.rake +35 -0
  44. data/mosaico.gemspec +22 -0
  45. data/screenshot.png +0 -0
  46. data/vendor/assets/fonts/LiberationSans-Regular.ttf +0 -0
  47. data/vendor/assets/mosaico-0.16.0/mosaico/.jsbeautifyrc +6 -0
  48. data/vendor/assets/mosaico-0.16.0/mosaico/.jshintrc +8 -0
  49. data/vendor/assets/mosaico-0.16.0/mosaico/.travis.yml +6 -0
  50. data/vendor/assets/mosaico-0.16.0/mosaico/CONTRIBUTING.md +37 -0
  51. data/vendor/assets/mosaico-0.16.0/mosaico/Dockerfile +21 -0
  52. data/vendor/assets/mosaico-0.16.0/mosaico/Gruntfile.js +241 -0
  53. data/vendor/assets/mosaico-0.16.0/mosaico/LICENSE +680 -0
  54. data/vendor/assets/mosaico-0.16.0/mosaico/NOTICE.txt +87 -0
  55. data/vendor/assets/mosaico-0.16.0/mosaico/README.md +73 -0
  56. data/vendor/assets/mosaico-0.16.0/mosaico/backend/README.txt +23 -0
  57. data/vendor/assets/mosaico-0.16.0/mosaico/backend/main.js +162 -0
  58. data/vendor/assets/mosaico-0.16.0/mosaico/bower.json +76 -0
  59. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico-material.css +7425 -0
  60. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.css +7133 -0
  61. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.debug.js +1517 -0
  62. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.js +12828 -0
  63. data/vendor/assets/mosaico-0.16.0/mosaico/build/templates.js +15 -0
  64. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.eot +0 -0
  65. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.svg +685 -0
  66. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.ttf +0 -0
  67. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff +0 -0
  68. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff2 +0 -0
  69. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/byvoxmail.png +0 -0
  70. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-badge.gif +0 -0
  71. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-v.gif +0 -0
  72. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico32.png +0 -0
  73. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaicologo.png +0 -0
  74. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot-orig.png +0 -0
  75. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot.png +0 -0
  76. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/README.md +26 -0
  77. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-de.json +88 -0
  78. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-en.json +88 -0
  79. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-es.json +88 -0
  80. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-fr.json +88 -0
  81. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-it.json +88 -0
  82. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-nl.json +88 -0
  83. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-sv.json +88 -0
  84. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css +5 -0
  85. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css.map +1 -0
  86. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css +5 -0
  87. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css.map +1 -0
  88. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js +1517 -0
  89. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js.map +147 -0
  90. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/canvas-to-blob.min.js +2 -0
  91. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.css +7 -0
  92. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.js +13 -0
  93. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-image.js +324 -0
  94. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-process.js +175 -0
  95. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-validate.js +122 -0
  96. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload.js +1482 -0
  97. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.iframe-transport.js +217 -0
  98. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.js +5 -0
  99. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.map +1 -0
  100. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.ui.touch-punch.min.js +11 -0
  101. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout-jqueryui.min.js +1 -0
  102. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout.js +123 -0
  103. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/load-image.all.min.js +2 -0
  104. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.eot +0 -0
  105. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.ttf +0 -0
  106. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.woff +0 -0
  107. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/stylesheet.css +9 -0
  108. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.js +101 -0
  109. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.min.js +1 -0
  110. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.js +55 -0
  111. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.min.js +1 -0
  112. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.js +204 -0
  113. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.min.js +1 -0
  114. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.js +162 -0
  115. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.min.js +1 -0
  116. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.js +165 -0
  117. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.min.js +1 -0
  118. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.js +123 -0
  119. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.min.js +1 -0
  120. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.js +462 -0
  121. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.min.js +1 -0
  122. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.js +60 -0
  123. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.min.js +1 -0
  124. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/css/prism.css +138 -0
  125. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.js +1319 -0
  126. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.min.js +1 -0
  127. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.js +112 -0
  128. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.min.js +1 -0
  129. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.js +100 -0
  130. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.min.js +1 -0
  131. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.js +64 -0
  132. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.min.js +1 -0
  133. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cool.gif +0 -0
  134. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cry.gif +0 -0
  135. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  136. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  137. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-frown.gif +0 -0
  138. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-innocent.gif +0 -0
  139. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-kiss.gif +0 -0
  140. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-laughing.gif +0 -0
  141. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  142. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-sealed.gif +0 -0
  143. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-smile.gif +0 -0
  144. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-surprised.gif +0 -0
  145. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  146. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-undecided.gif +0 -0
  147. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-wink.gif +0 -0
  148. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-yell.gif +0 -0
  149. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.js +65 -0
  150. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.min.js +1 -0
  151. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.js +490 -0
  152. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.min.js +1 -0
  153. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.js +154 -0
  154. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.min.js +1 -0
  155. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.js +30 -0
  156. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.min.js +1 -0
  157. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.js +630 -0
  158. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.min.js +1 -0
  159. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.js +2944 -0
  160. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.min.js +1 -0
  161. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.js +273 -0
  162. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.min.js +1 -0
  163. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.js +121 -0
  164. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.min.js +1 -0
  165. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.js +225 -0
  166. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.min.js +1 -0
  167. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.js +208 -0
  168. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.min.js +1 -0
  169. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.js +403 -0
  170. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.min.js +1 -0
  171. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.js +965 -0
  172. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.min.js +1 -0
  173. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/moxieplayer.swf +0 -0
  174. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.js +879 -0
  175. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.min.js +1 -0
  176. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.js +53 -0
  177. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.min.js +1 -0
  178. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.js +101 -0
  179. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.min.js +1 -0
  180. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.js +88 -0
  181. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.min.js +1 -0
  182. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.js +1844 -0
  183. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.min.js +1 -0
  184. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.js +101 -0
  185. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.min.js +1 -0
  186. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.js +32 -0
  187. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.min.js +1 -0
  188. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.js +98 -0
  189. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.min.js +1 -0
  190. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.js +609 -0
  191. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.min.js +1 -0
  192. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.js +1031 -0
  193. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.min.js +1 -0
  194. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.js +120 -0
  195. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.min.js +1 -0
  196. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.js +4400 -0
  197. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.min.js +2 -0
  198. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.js +276 -0
  199. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.min.js +1 -0
  200. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.js +297 -0
  201. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.min.js +1 -0
  202. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.js +268 -0
  203. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.min.js +1 -0
  204. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/css/visualblocks.css +135 -0
  205. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.js +86 -0
  206. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.min.js +1 -0
  207. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.js +123 -0
  208. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.min.js +1 -0
  209. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.js +69 -0
  210. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.min.js +1 -0
  211. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/Variables.less +196 -0
  212. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.inline.min.css +1 -0
  213. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.min.css +1 -0
  214. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/readme.md +1 -0
  215. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
  216. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
  217. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
  218. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
  219. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
  220. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
  221. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
  222. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
  223. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
  224. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
  225. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/anchor.gif +0 -0
  226. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/loader.gif +0 -0
  227. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/object.gif +0 -0
  228. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/trans.gif +0 -0
  229. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
  230. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.json +79 -0
  231. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.min.css +1 -0
  232. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.inline.min.css +1 -0
  233. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.min.css +1 -0
  234. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.eot +0 -0
  235. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.svg +63 -0
  236. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  237. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.woff +0 -0
  238. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.eot +0 -0
  239. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.svg +129 -0
  240. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.ttf +0 -0
  241. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.woff +0 -0
  242. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/anchor.gif +0 -0
  243. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/loader.gif +0 -0
  244. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/object.gif +0 -0
  245. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/trans.gif +0 -0
  246. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.ie7.min.css +1 -0
  247. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.min.css +1 -0
  248. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.js +1828 -0
  249. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.min.js +1 -0
  250. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.js +934 -0
  251. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.min.js +1 -0
  252. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/tinymce.min.js +14 -0
  253. data/vendor/assets/mosaico-0.16.0/mosaico/editor.html +63 -0
  254. data/vendor/assets/mosaico-0.16.0/mosaico/favicon.ico +0 -0
  255. data/vendor/assets/mosaico-0.16.0/mosaico/index.html +368 -0
  256. data/vendor/assets/mosaico-0.16.0/mosaico/package.json +92 -0
  257. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/byvoxmail.png +0 -0
  258. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-badge.gif +0 -0
  259. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-v.gif +0 -0
  260. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico32.png +0 -0
  261. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaicologo.png +0 -0
  262. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot-orig.png +0 -0
  263. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot.png +0 -0
  264. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/README.md +26 -0
  265. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-de.json +88 -0
  266. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-en.json +88 -0
  267. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-es.json +88 -0
  268. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-fr.json +88 -0
  269. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-it.json +88 -0
  270. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-nl.json +88 -0
  271. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-sv.json +88 -0
  272. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/Variables.less +196 -0
  273. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.inline.min.css +1 -0
  274. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.min.css +1 -0
  275. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/readme.md +1 -0
  276. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
  277. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
  278. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
  279. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
  280. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
  281. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
  282. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
  283. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
  284. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
  285. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
  286. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/anchor.gif +0 -0
  287. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/loader.gif +0 -0
  288. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/object.gif +0 -0
  289. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/trans.gif +0 -0
  290. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
  291. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.json +79 -0
  292. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.min.css +1 -0
  293. data/vendor/assets/mosaico-0.16.0/mosaico/server-config.js +12 -0
  294. data/vendor/assets/mosaico-0.16.0/mosaico/spec/converter-spec.js +115 -0
  295. data/vendor/assets/mosaico-0.16.0/mosaico/spec/data/template-versafix-1.model.json +137 -0
  296. data/vendor/assets/mosaico-0.16.0/mosaico/spec/declarations-spec.js +282 -0
  297. data/vendor/assets/mosaico-0.16.0/mosaico/spec/mensch-spec.js +114 -0
  298. data/vendor/assets/mosaico-0.16.0/mosaico/spec/model-spec.js +88 -0
  299. data/vendor/assets/mosaico-0.16.0/mosaico/spec/stylesheet-spec.js +177 -0
  300. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone.less +7 -0
  301. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone_material.less +350 -0
  302. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/safarihack.css +17 -0
  303. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements.less +497 -0
  304. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_jquery.less +344 -0
  305. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_mixins.less +406 -0
  306. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_moxie.less +130 -0
  307. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico.less +529 -0
  308. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_content.less +391 -0
  309. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_tools.less +1043 -0
  310. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_reset.less +45 -0
  311. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_variables.less +156 -0
  312. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/app.js +167 -0
  313. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/bind-iframe.js +64 -0
  314. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/blocks.js +118 -0
  315. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/choose-template.js +7 -0
  316. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/colorpicker.js +58 -0
  317. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js +16 -0
  318. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/droppable.js +87 -0
  319. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/eventable.js +33 -0
  320. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extender-pagination.js +60 -0
  321. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extsortables.js +103 -0
  322. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/fileupload.js +373 -0
  323. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/if-subs.js +110 -0
  324. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-spinner.js +31 -0
  325. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-tabs.js +17 -0
  326. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/script-template.js +30 -0
  327. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollfix.js +48 -0
  328. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollintoview.js +83 -0
  329. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/string-template.js +76 -0
  330. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/tooltips.js +36 -0
  331. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/validated-value.js +40 -0
  332. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/virtuals.js +102 -0
  333. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/wysiwygs.js +304 -0
  334. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/checkmodel.js +114 -0
  335. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/declarations.js +279 -0
  336. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/domutils.js +93 -0
  337. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/editor.js +411 -0
  338. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/main.js +42 -0
  339. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/model.js +536 -0
  340. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/parser.js +485 -0
  341. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/stylesheet.js +205 -0
  342. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/utils.js +156 -0
  343. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/wrapper.js +308 -0
  344. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/color.js +53 -0
  345. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/inliner.js +35 -0
  346. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/localstorage.js +100 -0
  347. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ko-bindings.js +22 -0
  348. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/template-loader.js +446 -0
  349. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/timed-call.js +31 -0
  350. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undomain.js +49 -0
  351. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undoserializer.js +120 -0
  352. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/viewmodel.js +595 -0
  353. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/array.tmpl.html +1 -0
  354. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-show.tmpl.html +1 -0
  355. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-wysiwyg.tmpl.html +18 -0
  356. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-show.tmpl.html +1 -0
  357. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-wysiwyg.tmpl.html +2 -0
  358. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/customstyle.tmpl.html +3 -0
  359. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/empty.tmpl.html +0 -0
  360. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/error.tmpl.html +1 -0
  361. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/gallery-images.tmpl.html +16 -0
  362. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/img-wysiwyg.tmpl.html +43 -0
  363. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/main.tmpl.html +102 -0
  364. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/toolbox.tmpl.html +111 -0
  365. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/combineKOTemplates.js +24 -0
  366. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/lib/phantom-thumbnailer-editor.js +168 -0
  367. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/makeThumbs.js +79 -0
  368. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/README.md +1 -0
  369. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/_full.png +0 -0
  370. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/footerBlock.png +0 -0
  371. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/headerBlock.png +0 -0
  372. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/heroBlock.png +0 -0
  373. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/socialBlock.png +0 -0
  374. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/threetwoBlock.png +0 -0
  375. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/twoColumnBlock.png +0 -0
  376. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/template-tedc15.html +567 -0
  377. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/HeaderAndText.png +0 -0
  378. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/_full.png +0 -0
  379. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/fixedlist.png +0 -0
  380. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.md +335 -0
  381. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.pdf +0 -0
  382. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_384.jpg +0 -0
  383. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_385.jpg +0 -0
  384. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_386.jpg +0 -0
  385. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_387.jpg +0 -0
  386. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_407.jpg +0 -0
  387. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_408.jpg +0 -0
  388. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/template-tutorial.html +68 -0
  389. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/_full.png +0 -0
  390. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/buttonBlock.png +0 -0
  391. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleArticleBlock.png +0 -0
  392. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleImageBlock.png +0 -0
  393. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/hrBlock.png +0 -0
  394. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/imageBlock.png +0 -0
  395. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/logoBlock.png +0 -0
  396. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/sideArticleBlock.png +0 -0
  397. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/singleArticleBlock.png +0 -0
  398. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/socialBlock.png +0 -0
  399. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/spacerBlock.png +0 -0
  400. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/textBlock.png +0 -0
  401. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/titleBlock.png +0 -0
  402. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleArticleBlock.png +0 -0
  403. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleImageBlock.png +0 -0
  404. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_bw_ok.png +0 -0
  405. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_ok.png +0 -0
  406. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_bw_ok.png +0 -0
  407. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_ok.png +0 -0
  408. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_bw_ok.png +0 -0
  409. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_ok.png +0 -0
  410. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_bw_ok.png +0 -0
  411. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_ok.png +0 -0
  412. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_bw_ok.png +0 -0
  413. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_ok.png +0 -0
  414. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_bw_ok.png +0 -0
  415. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_ok.png +0 -0
  416. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_bw_ok.png +0 -0
  417. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_ok.png +0 -0
  418. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_bw_ok.png +0 -0
  419. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_ok.png +0 -0
  420. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_bw_ok.png +0 -0
  421. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_ok.png +0 -0
  422. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/sponsor.gif +0 -0
  423. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/template-versafix-1.html +1531 -0
  424. data/vendor/assets/mosaico-0.16.0/mosaico/uploads/README.md +1 -0
  425. metadata +536 -0
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("lists",function(e){function t(t){return e.$.contains(e.getBody(),t)}function n(e){return e&&"BR"==e.nodeName}function r(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)&&t(e)}function i(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)}function o(e){return e.parentNode.firstChild==e}function a(e){return e.parentNode.lastChild==e}function s(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function l(t){return t===e.getBody()}function c(e){return e&&3===e.nodeType}function u(e,t){var n=tinymce.dom.RangeUtils.getNode(e,t);if(i(e)&&c(n)){var r=t>=e.childNodes.length?n.data.length:0;return{container:n,offset:r}}return{container:e,offset:t}}function d(e){var t=e.cloneRange(),n=u(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=u(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t}var f=this;e.on("init",function(){function c(e,t){var n=L.isEmpty(e);return!(t&&L.select("span[data-mce-type=bookmark]").length>0)&&n}function u(e){function t(t){var r,i,o;i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],1==i.nodeType&&(r=L.create("span",{"data-mce-type":"bookmark"}),i.hasChildNodes()?(o=Math.min(o,i.childNodes.length-1),t?i.insertBefore(r,i.childNodes[o]):L.insertAfter(r,i.childNodes[o])):i.appendChild(r),i=r,o=0),n[t?"startContainer":"endContainer"]=i,n[t?"startOffset":"endOffset"]=o}var n={};return t(!0),e.collapsed||t(),n}function h(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;1==t.nodeType&&"bookmark"==t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}var r,i,o;r=o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],r&&(1==r.nodeType&&(i=n(r),r=r.parentNode,L.remove(o)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=i)}t(!0),t();var n=L.createRng();n.setStart(e.startContainer,e.startOffset),e.endContainer&&n.setEnd(e.endContainer,e.endOffset),M.setRng(d(n))}function p(t,n){var r,i,o,a=L.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&(i=L.create(n),i.tagName===e.settings.forced_root_block&&L.setAttribs(i,e.settings.forced_root_block_attrs),a.appendChild(i)),t)for(;r=t.firstChild;){var l=r.nodeName;o||"SPAN"==l&&"bookmark"==r.getAttribute("data-mce-type")||(o=!0),s[l]?(a.appendChild(r),i=null):n?(i||(i=L.create(n),a.appendChild(i)),i.appendChild(r)):a.appendChild(r)}return e.settings.forced_root_block?o||tinymce.Env.ie&&!(tinymce.Env.ie>10)||i.appendChild(L.create("br",{"data-mce-bogus":"1"})):a.appendChild(L.create("br")),a}function m(){return tinymce.grep(M.getSelectedBlocks(),function(e){return i(e)})}function g(e,t,n){function r(e){tinymce.each(a,function(n){e.parentNode.insertBefore(n,t.parentNode)}),L.remove(e)}var i,o,a,s;for(a=L.select('span[data-mce-type="bookmark"]',e),n=n||p(t),i=L.createRng(),i.setStartAfter(t),i.setEndAfter(e),o=i.extractContents(),s=o.firstChild;s;s=s.firstChild)if("LI"==s.nodeName&&L.isEmpty(s)){L.remove(s);break}L.isEmpty(o)||L.insertAfter(o,e),L.insertAfter(n,e),c(t.parentNode)&&r(t.parentNode),L.remove(t),c(e)&&L.remove(e)}function v(e){var t,n;if(t=e.nextSibling,t&&r(t)&&t.nodeName==e.nodeName&&P(e,t)){for(;n=t.firstChild;)e.appendChild(n);L.remove(t)}if(t=e.previousSibling,t&&r(t)&&t.nodeName==e.nodeName&&P(e,t)){for(;n=t.firstChild;)e.insertBefore(n,e.firstChild);L.remove(t)}}function y(e){tinymce.each(tinymce.grep(L.select("ol,ul",e)),b)}function b(e){var t,n=e.parentNode;"LI"==n.nodeName&&n.firstChild==e&&(t=n.previousSibling,t&&"LI"==t.nodeName?(t.appendChild(e),c(n)&&L.remove(n)):L.setStyle(n,"listStyleType","none")),r(n)&&(t=n.previousSibling,t&&"LI"==t.nodeName&&t.appendChild(e))}function C(e){function t(e){c(e)&&L.remove(e)}var n,i=e.parentNode,s=i.parentNode;return!!l(i)||("DD"==e.nodeName?(L.rename(e,"DT"),!0):o(e)&&a(e)?("LI"==s.nodeName?(L.insertAfter(e,s),t(s),L.remove(i)):r(s)?L.remove(i,!0):(s.insertBefore(p(e),i),L.remove(i)),!0):o(e)?("LI"==s.nodeName?(L.insertAfter(e,s),e.appendChild(i),t(s)):r(s)?s.insertBefore(e,i):(s.insertBefore(p(e),i),L.remove(e)),!0):a(e)?("LI"==s.nodeName?L.insertAfter(e,s):r(s)?L.insertAfter(e,i):(L.insertAfter(p(e),i),L.remove(e)),!0):("LI"==s.nodeName?(i=s,n=p(e,"LI")):n=r(s)?p(e,"LI"):p(e),g(i,e,n),y(i.parentNode),!0))}function x(e){function t(t,n){var i;if(r(t)){for(;i=e.lastChild.firstChild;)n.appendChild(i);L.remove(t)}}var n,i,o;return"DT"==e.nodeName?(L.rename(e,"DD"),!0):(n=e.previousSibling,n&&r(n)?(n.appendChild(e),!0):n&&"LI"==n.nodeName&&r(n.lastChild)?(n.lastChild.appendChild(e),t(e.lastChild,n.lastChild),!0):(n=e.nextSibling,n&&r(n)?(n.insertBefore(e,n.firstChild),!0):(n=e.previousSibling,!(!n||"LI"!=n.nodeName)&&(i=L.create(e.parentNode.nodeName),o=L.getStyle(e.parentNode,"listStyleType"),o&&L.setStyle(i,"listStyleType",o),n.appendChild(i),i.appendChild(e),t(e.lastChild,i),!0))))}function w(){var t=m();if(t.length){for(var n=u(M.getRng(!0)),r=0;r<t.length&&(x(t[r])||0!==r);r++);return h(n),e.nodeChanged(),!0}}function N(){var t=m();if(t.length){var n,r,i=u(M.getRng(!0)),o=e.getBody();for(n=t.length;n--;)for(var a=t[n].parentNode;a&&a!=o;){for(r=t.length;r--;)if(t[r]===a){t.splice(n,1);break}a=a.parentNode}for(n=0;n<t.length&&(C(t[n])||0!==n);n++);return h(i),e.nodeChanged(),!0}}function E(t,i){function o(){function t(e){var t,n;for(t=l[e?"startContainer":"endContainer"],n=l[e?"startOffset":"endOffset"],1==t.nodeType&&(t=t.childNodes[Math.min(n,t.childNodes.length-1)]||t);t.parentNode!=o;){if(s(t))return t;if(/^(TD|TH)$/.test(t.parentNode.nodeName))return t;t=t.parentNode}return t}for(var r,i=[],o=e.getBody(),a=t(!0),c=t(),u=[],d=a;d&&(u.push(d),d!=c);d=d.nextSibling);return tinymce.each(u,function(e){if(s(e))return i.push(e),void(r=null);if(L.isBlock(e)||n(e))return n(e)&&L.remove(e),void(r=null);var t=e.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(e)&&(s(t)||!t&&e.parentNode==o)?void(r=null):(r||(r=L.create("p"),e.parentNode.insertBefore(r,e),i.push(r)),void r.appendChild(e))}),i}var a,l=M.getRng(!0),c="LI";"false"!==L.getContentEditable(M.getNode())&&(t=t.toUpperCase(),"DL"==t&&(c="DT"),a=u(l),tinymce.each(o(),function(e){var n,o,a=function(e){var t=L.getStyle(e,"list-style-type"),n=i?i["list-style-type"]:"";return n=null===n?"":n,t===n};o=e.previousSibling,o&&r(o)&&o.nodeName==t&&a(o)?(n=o,e=L.rename(e,c),o.appendChild(e)):(n=L.create(t),e.parentNode.insertBefore(n,e),n.appendChild(e),e=L.rename(e,c)),O(n,i),v(n)}),h(a))}function _(){var t=u(M.getRng(!0)),n=e.getBody();tinymce.each(m(),function(e){var t,i;if(!l(e.parentNode)){if(c(e))return void C(e);for(t=e;t&&t!=n;t=t.parentNode)r(t)&&(i=t);g(i,e),y(i.parentNode)}}),h(t)}function S(e,t){var n=L.getParent(M.getStart(),"OL,UL,DL");if(!l(n))if(n)if(n.nodeName==e)_(e);else{var r=u(M.getRng(!0));O(n,t),v(L.rename(n,e)),h(r)}else E(e,t)}function k(t){return function(){var n=L.getParent(e.selection.getStart(),"UL,OL,DL");return n&&n.nodeName==t}}function T(e){return!!n(e)&&!(!L.isBlock(e.nextSibling)||n(e.previousSibling))}function R(t,n){var r,i,o=t.startContainer,a=t.startOffset;if(3==o.nodeType&&(n?a<o.data.length:a>0))return o;for(r=e.schema.getNonEmptyElements(),1==o.nodeType&&(o=tinymce.dom.RangeUtils.getNode(o,a)),i=new tinymce.dom.TreeWalker(o,e.getBody()),n&&T(o)&&i.next();o=i[n?"next":"prev2"]();){if("LI"==o.nodeName&&!o.hasChildNodes())return o;if(r[o.nodeName])return o;if(3==o.nodeType&&o.data.length>0)return o}}function A(e,i){var o,a,s=e.parentNode;if(t(e)&&t(i)){if(r(i.lastChild)&&(a=i.lastChild),s==i.lastChild&&n(s.previousSibling)&&L.remove(s.previousSibling),o=i.lastChild,o&&n(o)&&e.hasChildNodes()&&L.remove(o),c(i,!0)&&L.$(i).empty(),!c(e,!0))for(;o=e.firstChild;)i.appendChild(o);a&&i.appendChild(a),L.remove(e),c(s)&&!l(s)&&L.remove(s)}}function B(e){var t,n,r,i=L.getParent(M.getStart(),"LI");if(i){if(t=i.parentNode,l(t)&&L.isEmpty(t))return!0;if(n=d(M.getRng(!0)),r=L.getParent(R(n,e),"LI"),r&&r!=i){var o=u(n);return e?A(r,i):A(i,r),h(o),!0}if(!r&&!e&&_(t.nodeName))return!0}}function D(){var t=e.dom.getParent(e.selection.getStart(),"LI,DT,DD");return!!(t||m().length>0)&&(e.undoManager.transact(function(){e.execCommand("Delete"),y(e.getBody())}),!0)}var L=e.dom,M=e.selection,P=function(t,n){var r=e.dom.getStyle(t,"list-style-type",!0),i=e.dom.getStyle(n,"list-style-type",!0);return r===i},O=function(e,t){L.setStyle(e,"list-style-type",t?t["list-style-type"]:null)};f.backspaceDelete=function(e){return M.isCollapsed()?B(e):D()},e.on("BeforeExecCommand",function(t){var n,r=t.command.toLowerCase();if("indent"==r?w()&&(n=!0):"outdent"==r&&N()&&(n=!0),n)return e.fire("ExecCommand",{command:t.command}),t.preventDefault(),!0}),e.addCommand("InsertUnorderedList",function(e,t){S("UL",t)}),e.addCommand("InsertOrderedList",function(e,t){S("OL",t)}),e.addCommand("InsertDefinitionList",function(e,t){S("DL",t)}),e.addQueryStateHandler("InsertUnorderedList",k("UL")),e.addQueryStateHandler("InsertOrderedList",k("OL")),e.addQueryStateHandler("InsertDefinitionList",k("DL")),e.on("keydown",function(t){9!=t.keyCode||tinymce.util.VK.metaKeyPressed(t)||e.dom.getParent(e.selection.getStart(),"LI,DT,DD")&&(t.preventDefault(),t.shiftKey?N():w())})}),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var t=this;e.on("nodechange",function(){for(var n=e.selection.getSelectedBlocks(),r=!1,i=0,a=n.length;!r&&i<a;i++){var s=n[i].nodeName;r="LI"==s&&o(n[i])||"UL"==s||"OL"==s||"DD"==s}t.disabled(r)})}}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?f.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&f.backspaceDelete(!0)&&e.preventDefault()})});
@@ -0,0 +1,879 @@
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
+ /*jshint maxlen:255 */
12
+ /*eslint max-len:0 */
13
+ /*global tinymce:true */
14
+
15
+ tinymce.PluginManager.add('media', function(editor, url) {
16
+ var urlPatterns = [
17
+ {regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
18
+ {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$2', allowFullscreen: true},
19
+ {regex: /youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
20
+ {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
21
+ {regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&amp;byline=0", allowfullscreen: true},
22
+ {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false},
23
+ {regex: /dailymotion\.com\/video\/([^_]+)/, type: 'iframe', w: 480, h: 270, url: '//www.dailymotion.com/embed/video/$1', allowFullscreen: true}
24
+ ];
25
+
26
+ var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
27
+
28
+ function guessMime(url) {
29
+ url = url.toLowerCase();
30
+
31
+ if (url.indexOf('.mp3') != -1) {
32
+ return 'audio/mpeg';
33
+ }
34
+
35
+ if (url.indexOf('.wav') != -1) {
36
+ return 'audio/wav';
37
+ }
38
+
39
+ if (url.indexOf('.mp4') != -1) {
40
+ return 'video/mp4';
41
+ }
42
+
43
+ if (url.indexOf('.webm') != -1) {
44
+ return 'video/webm';
45
+ }
46
+
47
+ if (url.indexOf('.ogg') != -1) {
48
+ return 'video/ogg';
49
+ }
50
+
51
+ if (url.indexOf('.swf') != -1) {
52
+ return 'application/x-shockwave-flash';
53
+ }
54
+
55
+ return '';
56
+ }
57
+
58
+ function getVideoScriptMatch(src) {
59
+ var prefixes = editor.settings.media_scripts;
60
+
61
+ if (prefixes) {
62
+ for (var i = 0; i < prefixes.length; i++) {
63
+ if (src.indexOf(prefixes[i].filter) !== -1) {
64
+ return prefixes[i];
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ function showDialog() {
71
+ var win, width, height, data;
72
+
73
+ var generalFormItems = [
74
+ {
75
+ name: 'source1',
76
+ type: 'filepicker',
77
+ filetype: 'media',
78
+ size: 40,
79
+ autofocus: true,
80
+ label: 'Source',
81
+ onchange: function(e) {
82
+ tinymce.each(e.meta, function(value, key) {
83
+ win.find('#' + key).value(value);
84
+ });
85
+ }
86
+ }
87
+ ];
88
+
89
+ function recalcSize(e) {
90
+ var widthCtrl, heightCtrl, newWidth, newHeight;
91
+
92
+ widthCtrl = win.find('#width')[0];
93
+ heightCtrl = win.find('#height')[0];
94
+
95
+ newWidth = widthCtrl.value();
96
+ newHeight = heightCtrl.value();
97
+
98
+ if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
99
+ if (e.control == widthCtrl) {
100
+ newHeight = Math.round((newWidth / width) * newHeight);
101
+
102
+ if (!isNaN(newHeight)) {
103
+ heightCtrl.value(newHeight);
104
+ }
105
+ } else {
106
+ newWidth = Math.round((newHeight / height) * newWidth);
107
+
108
+ if (!isNaN(newWidth)) {
109
+ widthCtrl.value(newWidth);
110
+ }
111
+ }
112
+ }
113
+
114
+ width = newWidth;
115
+ height = newHeight;
116
+ }
117
+
118
+ if (editor.settings.media_alt_source !== false) {
119
+ generalFormItems.push({name: 'source2', type: 'filepicker', filetype: 'media', size: 40, label: 'Alternative source'});
120
+ }
121
+
122
+ if (editor.settings.media_poster !== false) {
123
+ generalFormItems.push({name: 'poster', type: 'filepicker', filetype: 'image', size: 40, label: 'Poster'});
124
+ }
125
+
126
+ if (editor.settings.media_dimensions !== false) {
127
+ generalFormItems.push({
128
+ type: 'container',
129
+ label: 'Dimensions',
130
+ layout: 'flex',
131
+ align: 'center',
132
+ spacing: 5,
133
+ items: [
134
+ {name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width'},
135
+ {type: 'label', text: 'x'},
136
+ {name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height'},
137
+ {name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
138
+ ]
139
+ });
140
+ }
141
+
142
+ data = getData(editor.selection.getNode());
143
+ width = data.width;
144
+ height = data.height;
145
+
146
+ var embedTextBox = {
147
+ id: 'mcemediasource',
148
+ type: 'textbox',
149
+ flex: 1,
150
+ name: 'embed',
151
+ value: getSource(),
152
+ multiline: true,
153
+ label: 'Source'
154
+ };
155
+
156
+ function updateValueOnChange() {
157
+ data = htmlToData(this.value());
158
+ this.parent().parent().fromJSON(data);
159
+ }
160
+
161
+ embedTextBox[embedChange] = updateValueOnChange;
162
+
163
+ win = editor.windowManager.open({
164
+ title: 'Insert/edit video',
165
+ data: data,
166
+ bodyType: 'tabpanel',
167
+ body: [
168
+ {
169
+ title: 'General',
170
+ type: "form",
171
+ onShowTab: function() {
172
+ data = htmlToData(this.next().find('#embed').value());
173
+ this.fromJSON(data);
174
+ },
175
+ items: generalFormItems
176
+ },
177
+
178
+ {
179
+ title: 'Embed',
180
+ type: "container",
181
+ layout: 'flex',
182
+ direction: 'column',
183
+ align: 'stretch',
184
+ padding: 10,
185
+ spacing: 10,
186
+ onShowTab: function() {
187
+ this.find('#embed').value(dataToHtml(this.parent().toJSON()));
188
+ },
189
+ items: [
190
+ {
191
+ type: 'label',
192
+ text: 'Paste your embed code below:',
193
+ forId: 'mcemediasource'
194
+ },
195
+ embedTextBox
196
+ ]
197
+ }
198
+ ],
199
+ onSubmit: function() {
200
+ var beforeObjects, afterObjects, i, y;
201
+
202
+ beforeObjects = editor.dom.select('img[data-mce-object]');
203
+ editor.insertContent(dataToHtml(this.toJSON()));
204
+ afterObjects = editor.dom.select('img[data-mce-object]');
205
+
206
+ // Find new image placeholder so we can select it
207
+ for (i = 0; i < beforeObjects.length; i++) {
208
+ for (y = afterObjects.length - 1; y >= 0; y--) {
209
+ if (beforeObjects[i] == afterObjects[y]) {
210
+ afterObjects.splice(y, 1);
211
+ }
212
+ }
213
+ }
214
+
215
+ editor.selection.select(afterObjects[0]);
216
+ editor.nodeChanged();
217
+ }
218
+ });
219
+ }
220
+
221
+ function getSource() {
222
+ var elm = editor.selection.getNode();
223
+
224
+ if (elm.getAttribute('data-mce-object')) {
225
+ return editor.selection.getContent();
226
+ }
227
+ }
228
+
229
+ function dataToHtml(data) {
230
+ var html = '';
231
+
232
+ if (!data.source1) {
233
+ tinymce.extend(data, htmlToData(data.embed));
234
+ if (!data.source1) {
235
+ return '';
236
+ }
237
+ }
238
+
239
+ if (!data.source2) {
240
+ data.source2 = '';
241
+ }
242
+
243
+ if (!data.poster) {
244
+ data.poster = '';
245
+ }
246
+
247
+ data.source1 = editor.convertURL(data.source1, "source");
248
+ data.source2 = editor.convertURL(data.source2, "source");
249
+ data.source1mime = guessMime(data.source1);
250
+ data.source2mime = guessMime(data.source2);
251
+ data.poster = editor.convertURL(data.poster, "poster");
252
+ data.flashPlayerUrl = editor.convertURL(url + '/moxieplayer.swf', "movie");
253
+
254
+ tinymce.each(urlPatterns, function(pattern) {
255
+ var match, i, url;
256
+
257
+ if ((match = pattern.regex.exec(data.source1))) {
258
+ url = pattern.url;
259
+
260
+ for (i = 0; match[i]; i++) {
261
+ /*jshint loopfunc:true*/
262
+ /*eslint no-loop-func:0 */
263
+ url = url.replace('$' + i, function() {
264
+ return match[i];
265
+ });
266
+ }
267
+
268
+ data.source1 = url;
269
+ data.type = pattern.type;
270
+ data.allowFullscreen = pattern.allowFullscreen;
271
+ data.width = data.width || pattern.w;
272
+ data.height = data.height || pattern.h;
273
+ }
274
+ });
275
+
276
+ if (data.embed) {
277
+ html = updateHtml(data.embed, data, true);
278
+ } else {
279
+ var videoScript = getVideoScriptMatch(data.source1);
280
+ if (videoScript) {
281
+ data.type = 'script';
282
+ data.width = videoScript.width;
283
+ data.height = videoScript.height;
284
+ }
285
+
286
+ data.width = data.width || 300;
287
+ data.height = data.height || 150;
288
+
289
+ tinymce.each(data, function(value, key) {
290
+ data[key] = editor.dom.encode(value);
291
+ });
292
+
293
+ if (data.type == "iframe") {
294
+ var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
295
+ html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
296
+ } else if (data.source1mime == "application/x-shockwave-flash") {
297
+ html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
298
+
299
+ if (data.poster) {
300
+ html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
301
+ }
302
+
303
+ html += '</object>';
304
+ } else if (data.source1mime.indexOf('audio') != -1) {
305
+ if (editor.settings.audio_template_callback) {
306
+ html = editor.settings.audio_template_callback(data);
307
+ } else {
308
+ html += (
309
+ '<audio controls="controls" src="' + data.source1 + '">' +
310
+ (data.source2 ? '\n<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') +
311
+ '</audio>'
312
+ );
313
+ }
314
+ } else if (data.type == "script") {
315
+ html += '<script src="' + data.source1 + '"></script>';
316
+ } else {
317
+ if (editor.settings.video_template_callback) {
318
+ html = editor.settings.video_template_callback(data);
319
+ } else {
320
+ html = (
321
+ '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' +
322
+ '<source src="' + data.source1 + '"' + (data.source1mime ? ' type="' + data.source1mime + '"' : '') + ' />\n' +
323
+ (data.source2 ? '<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') +
324
+ '</video>'
325
+ );
326
+ }
327
+ }
328
+ }
329
+
330
+ return html;
331
+ }
332
+
333
+ function htmlToData(html) {
334
+ var data = {};
335
+
336
+ new tinymce.html.SaxParser({
337
+ validate: false,
338
+ allow_conditional_comments: true,
339
+ special: 'script,noscript',
340
+ start: function(name, attrs) {
341
+ if (!data.source1 && name == "param") {
342
+ data.source1 = attrs.map.movie;
343
+ }
344
+
345
+ if (name == "iframe" || name == "object" || name == "embed" || name == "video" || name == "audio") {
346
+ if (!data.type) {
347
+ data.type = name;
348
+ }
349
+
350
+ data = tinymce.extend(attrs.map, data);
351
+ }
352
+
353
+ if (name == "script") {
354
+ var videoScript = getVideoScriptMatch(attrs.map.src);
355
+ if (!videoScript) {
356
+ return;
357
+ }
358
+
359
+ data = {
360
+ type: "script",
361
+ source1: attrs.map.src,
362
+ width: videoScript.width,
363
+ height: videoScript.height
364
+ };
365
+ }
366
+
367
+ if (name == "source") {
368
+ if (!data.source1) {
369
+ data.source1 = attrs.map.src;
370
+ } else if (!data.source2) {
371
+ data.source2 = attrs.map.src;
372
+ }
373
+ }
374
+
375
+ if (name == "img" && !data.poster) {
376
+ data.poster = attrs.map.src;
377
+ }
378
+ }
379
+ }).parse(html);
380
+
381
+ data.source1 = data.source1 || data.src || data.data;
382
+ data.source2 = data.source2 || '';
383
+ data.poster = data.poster || '';
384
+
385
+ return data;
386
+ }
387
+
388
+ function getData(element) {
389
+ if (element.getAttribute('data-mce-object')) {
390
+ return htmlToData(editor.serializer.serialize(element, {selection: true}));
391
+ }
392
+
393
+ return {};
394
+ }
395
+
396
+ function sanitize(html) {
397
+ if (editor.settings.media_filter_html === false) {
398
+ return html;
399
+ }
400
+
401
+ var writer = new tinymce.html.Writer(), blocked;
402
+
403
+ new tinymce.html.SaxParser({
404
+ validate: false,
405
+ allow_conditional_comments: false,
406
+ special: 'script,noscript',
407
+
408
+ comment: function(text) {
409
+ writer.comment(text);
410
+ },
411
+
412
+ cdata: function(text) {
413
+ writer.cdata(text);
414
+ },
415
+
416
+ text: function(text, raw) {
417
+ writer.text(text, raw);
418
+ },
419
+
420
+ start: function(name, attrs, empty) {
421
+ blocked = true;
422
+
423
+ if (name == 'script' || name == 'noscript') {
424
+ return;
425
+ }
426
+
427
+ for (var i = 0; i < attrs.length; i++) {
428
+ if (attrs[i].name.indexOf('on') === 0) {
429
+ return;
430
+ }
431
+
432
+ if (attrs[i].name == 'style') {
433
+ attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
434
+ }
435
+ }
436
+
437
+ writer.start(name, attrs, empty);
438
+ blocked = false;
439
+ },
440
+
441
+ end: function(name) {
442
+ if (blocked) {
443
+ return;
444
+ }
445
+
446
+ writer.end(name);
447
+ }
448
+ }, new tinymce.html.Schema({})).parse(html);
449
+
450
+ return writer.getContent();
451
+ }
452
+
453
+ function updateHtml(html, data, updateAll) {
454
+ var writer = new tinymce.html.Writer();
455
+ var sourceCount = 0, hasImage;
456
+
457
+ function setAttributes(attrs, updatedAttrs) {
458
+ var name, i, value, attr;
459
+
460
+ for (name in updatedAttrs) {
461
+ value = "" + updatedAttrs[name];
462
+
463
+ if (attrs.map[name]) {
464
+ i = attrs.length;
465
+ while (i--) {
466
+ attr = attrs[i];
467
+
468
+ if (attr.name == name) {
469
+ if (value) {
470
+ attrs.map[name] = value;
471
+ attr.value = value;
472
+ } else {
473
+ delete attrs.map[name];
474
+ attrs.splice(i, 1);
475
+ }
476
+ }
477
+ }
478
+ } else if (value) {
479
+ attrs.push({
480
+ name: name,
481
+ value: value
482
+ });
483
+
484
+ attrs.map[name] = value;
485
+ }
486
+ }
487
+ }
488
+
489
+ new tinymce.html.SaxParser({
490
+ validate: false,
491
+ allow_conditional_comments: true,
492
+ special: 'script,noscript',
493
+
494
+ comment: function(text) {
495
+ writer.comment(text);
496
+ },
497
+
498
+ cdata: function(text) {
499
+ writer.cdata(text);
500
+ },
501
+
502
+ text: function(text, raw) {
503
+ writer.text(text, raw);
504
+ },
505
+
506
+ start: function(name, attrs, empty) {
507
+ switch (name) {
508
+ case "video":
509
+ case "object":
510
+ case "embed":
511
+ case "img":
512
+ case "iframe":
513
+ setAttributes(attrs, {
514
+ width: data.width,
515
+ height: data.height
516
+ });
517
+ break;
518
+ }
519
+
520
+ if (updateAll) {
521
+ switch (name) {
522
+ case "video":
523
+ setAttributes(attrs, {
524
+ poster: data.poster,
525
+ src: ""
526
+ });
527
+
528
+ if (data.source2) {
529
+ setAttributes(attrs, {
530
+ src: ""
531
+ });
532
+ }
533
+ break;
534
+
535
+ case "iframe":
536
+ setAttributes(attrs, {
537
+ src: data.source1
538
+ });
539
+ break;
540
+
541
+ case "source":
542
+ sourceCount++;
543
+
544
+ if (sourceCount <= 2) {
545
+ setAttributes(attrs, {
546
+ src: data["source" + sourceCount],
547
+ type: data["source" + sourceCount + "mime"]
548
+ });
549
+
550
+ if (!data["source" + sourceCount]) {
551
+ return;
552
+ }
553
+ }
554
+ break;
555
+
556
+ case "img":
557
+ if (!data.poster) {
558
+ return;
559
+ }
560
+
561
+ hasImage = true;
562
+ break;
563
+ }
564
+ }
565
+
566
+ writer.start(name, attrs, empty);
567
+ },
568
+
569
+ end: function(name) {
570
+ if (name == "video" && updateAll) {
571
+ for (var index = 1; index <= 2; index++) {
572
+ if (data["source" + index]) {
573
+ var attrs = [];
574
+ attrs.map = {};
575
+
576
+ if (sourceCount < index) {
577
+ setAttributes(attrs, {
578
+ src: data["source" + index],
579
+ type: data["source" + index + "mime"]
580
+ });
581
+
582
+ writer.start("source", attrs, true);
583
+ }
584
+ }
585
+ }
586
+ }
587
+
588
+ if (data.poster && name == "object" && updateAll && !hasImage) {
589
+ var imgAttrs = [];
590
+ imgAttrs.map = {};
591
+
592
+ setAttributes(imgAttrs, {
593
+ src: data.poster,
594
+ width: data.width,
595
+ height: data.height
596
+ });
597
+
598
+ writer.start("img", imgAttrs, true);
599
+ }
600
+
601
+ writer.end(name);
602
+ }
603
+ }, new tinymce.html.Schema({})).parse(html);
604
+
605
+ return writer.getContent();
606
+ }
607
+
608
+ editor.on('ResolveName', function(e) {
609
+ var name;
610
+
611
+ if (e.target.nodeType == 1 && (name = e.target.getAttribute("data-mce-object"))) {
612
+ e.name = name;
613
+ }
614
+ });
615
+
616
+ function retainAttributesAndInnerHtml(sourceNode, targetNode) {
617
+ var attrName, attrValue, attribs, ai, innerHtml;
618
+
619
+ // Prefix all attributes except width, height and style since we
620
+ // will add these to the placeholder
621
+ attribs = sourceNode.attributes;
622
+ ai = attribs.length;
623
+ while (ai--) {
624
+ attrName = attribs[ai].name;
625
+ attrValue = attribs[ai].value;
626
+
627
+ if (attrName !== "width" && attrName !== "height" && attrName !== "style") {
628
+ if (attrName == "data" || attrName == "src") {
629
+ attrValue = editor.convertURL(attrValue, attrName);
630
+ }
631
+
632
+ targetNode.attr('data-mce-p-' + attrName, attrValue);
633
+ }
634
+ }
635
+
636
+ // Place the inner HTML contents inside an escaped attribute
637
+ // This enables us to copy/paste the fake object
638
+ innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
639
+ if (innerHtml) {
640
+ targetNode.attr("data-mce-html", escape(innerHtml));
641
+ targetNode.firstChild = null;
642
+ }
643
+ }
644
+
645
+ function createPlaceholderNode(node) {
646
+ var placeHolder, name = node.name;
647
+
648
+ placeHolder = new tinymce.html.Node('img', 1);
649
+ placeHolder.shortEnded = true;
650
+
651
+ retainAttributesAndInnerHtml(node, placeHolder);
652
+
653
+ placeHolder.attr({
654
+ width: node.attr('width') || "300",
655
+ height: node.attr('height') || (name == "audio" ? "30" : "150"),
656
+ style: node.attr('style'),
657
+ src: tinymce.Env.transparentSrc,
658
+ "data-mce-object": name,
659
+ "class": "mce-object mce-object-" + name
660
+ });
661
+
662
+ return placeHolder;
663
+ }
664
+
665
+ function createPreviewNode(node) {
666
+ var previewWrapper, previewNode, shimNode, name = node.name;
667
+
668
+ previewWrapper = new tinymce.html.Node('span', 1);
669
+ previewWrapper.attr({
670
+ contentEditable: 'false',
671
+ style: node.attr('style'),
672
+ "data-mce-object": name,
673
+ "class": "mce-preview-object mce-object-" + name
674
+ });
675
+
676
+ retainAttributesAndInnerHtml(node, previewWrapper);
677
+
678
+ previewNode = new tinymce.html.Node(name, 1);
679
+ previewNode.attr({
680
+ src: node.attr('src'),
681
+ allowfullscreen: node.attr('allowfullscreen'),
682
+ width: node.attr('width') || "300",
683
+ height: node.attr('height') || (name == "audio" ? "30" : "150"),
684
+ frameborder: '0'
685
+ });
686
+
687
+ shimNode = new tinymce.html.Node('span', 1);
688
+ shimNode.attr('class', 'mce-shim');
689
+
690
+ previewWrapper.append(previewNode);
691
+ previewWrapper.append(shimNode);
692
+
693
+ return previewWrapper;
694
+ }
695
+
696
+ editor.on('preInit', function() {
697
+ // Make sure that any messy HTML is retained inside these
698
+ var specialElements = editor.schema.getSpecialElements();
699
+ tinymce.each('video audio iframe object'.split(' '), function(name) {
700
+ specialElements[name] = new RegExp('<\/' + name + '[^>]*>', 'gi');
701
+ });
702
+
703
+ // Allow elements
704
+ //editor.schema.addValidElements('object[id|style|width|height|classid|codebase|*],embed[id|style|width|height|type|src|*],video[*],audio[*]');
705
+
706
+ // Set allowFullscreen attribs as boolean
707
+ var boolAttrs = editor.schema.getBoolAttrs();
708
+ tinymce.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function(name) {
709
+ boolAttrs[name] = {};
710
+ });
711
+
712
+ // Converts iframe, video etc into placeholder images
713
+ editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', function(nodes) {
714
+ var i = nodes.length, node, placeHolder, videoScript;
715
+
716
+ while (i--) {
717
+ node = nodes[i];
718
+ if (!node.parent) {
719
+ continue;
720
+ }
721
+
722
+ if (node.parent.attr('data-mce-object')) {
723
+ continue;
724
+ }
725
+
726
+ if (node.name == 'script') {
727
+ videoScript = getVideoScriptMatch(node.attr('src'));
728
+ if (!videoScript) {
729
+ continue;
730
+ }
731
+ }
732
+
733
+ if (videoScript) {
734
+ if (videoScript.width) {
735
+ node.attr('width', videoScript.width.toString());
736
+ }
737
+
738
+ if (videoScript.height) {
739
+ node.attr('height', videoScript.height.toString());
740
+ }
741
+ }
742
+
743
+ if (node.name == 'iframe' && editor.settings.media_live_embeds !== false && tinymce.Env.ceFalse) {
744
+ placeHolder = createPreviewNode(node);
745
+ } else {
746
+ placeHolder = createPlaceholderNode(node);
747
+ }
748
+
749
+ node.replace(placeHolder);
750
+ }
751
+ });
752
+
753
+ // Replaces placeholder images with real elements for video, object, iframe etc
754
+ editor.serializer.addAttributeFilter('data-mce-object', function(nodes, name) {
755
+ var i = nodes.length, node, realElm, ai, attribs, innerHtml, innerNode, realElmName, className;
756
+
757
+ while (i--) {
758
+ node = nodes[i];
759
+ if (!node.parent) {
760
+ continue;
761
+ }
762
+
763
+ realElmName = node.attr(name);
764
+ realElm = new tinymce.html.Node(realElmName, 1);
765
+
766
+ // Add width/height to everything but audio
767
+ if (realElmName != "audio" && realElmName != "script") {
768
+ className = node.attr('class');
769
+ if (className && className.indexOf('mce-preview-object') !== -1) {
770
+ realElm.attr({
771
+ width: node.firstChild.attr('width'),
772
+ height: node.firstChild.attr('height')
773
+ });
774
+ } else {
775
+ realElm.attr({
776
+ width: node.attr('width'),
777
+ height: node.attr('height')
778
+ });
779
+ }
780
+ }
781
+
782
+ realElm.attr({
783
+ style: node.attr('style')
784
+ });
785
+
786
+ // Unprefix all placeholder attributes
787
+ attribs = node.attributes;
788
+ ai = attribs.length;
789
+ while (ai--) {
790
+ var attrName = attribs[ai].name;
791
+
792
+ if (attrName.indexOf('data-mce-p-') === 0) {
793
+ realElm.attr(attrName.substr(11), attribs[ai].value);
794
+ }
795
+ }
796
+
797
+ if (realElmName == "script") {
798
+ realElm.attr('type', 'text/javascript');
799
+ }
800
+
801
+ // Inject innerhtml
802
+ innerHtml = node.attr('data-mce-html');
803
+ if (innerHtml) {
804
+ innerNode = new tinymce.html.Node('#text', 3);
805
+ innerNode.raw = true;
806
+ innerNode.value = sanitize(unescape(innerHtml));
807
+ realElm.append(innerNode);
808
+ }
809
+
810
+ node.replace(realElm);
811
+ }
812
+ });
813
+ });
814
+
815
+ editor.on('click keyup', function() {
816
+ var selectedNode = editor.selection.getNode();
817
+
818
+ if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
819
+ if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
820
+ selectedNode.setAttribute('data-mce-selected', '2');
821
+ }
822
+ }
823
+ });
824
+
825
+ editor.on('ObjectSelected', function(e) {
826
+ var objectType = e.target.getAttribute('data-mce-object');
827
+
828
+ if (objectType == "audio" || objectType == "script") {
829
+ e.preventDefault();
830
+ }
831
+ });
832
+
833
+ editor.on('objectResized', function(e) {
834
+ var target = e.target, html;
835
+
836
+ if (target.getAttribute('data-mce-object')) {
837
+ html = target.getAttribute('data-mce-html');
838
+ if (html) {
839
+ html = unescape(html);
840
+ target.setAttribute('data-mce-html', escape(
841
+ updateHtml(html, {
842
+ width: e.width,
843
+ height: e.height
844
+ })
845
+ ));
846
+ }
847
+ }
848
+ });
849
+
850
+ editor.addButton('media', {
851
+ tooltip: 'Insert/edit video',
852
+ onclick: showDialog,
853
+ stateSelector: ['img[data-mce-object]', 'span[data-mce-object]']
854
+ });
855
+
856
+ editor.addMenuItem('media', {
857
+ icon: 'media',
858
+ text: 'Insert/edit video',
859
+ onclick: showDialog,
860
+ context: 'insert',
861
+ prependToContext: true
862
+ });
863
+
864
+ editor.on('setContent', function() {
865
+ // TODO: This shouldn't be needed there should be a way to mark bogus
866
+ // elements so they are never removed except external save
867
+ editor.$('span.mce-preview-object').each(function(index, elm) {
868
+ var $elm = editor.$(elm);
869
+
870
+ if ($elm.find('span.mce-shim', elm).length === 0) {
871
+ $elm.append('<span class="mce-shim"></span>');
872
+ }
873
+ });
874
+ });
875
+
876
+ editor.addCommand('mceMedia', showDialog);
877
+
878
+ this.showDialog = showDialog;
879
+ });