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
+ !function(){function e(e){return e&&1==e.nodeType&&"false"===e.contentEditable}function t(t,n,r,i,o){function a(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var r=e[t];if(!r)throw"Invalid capture group";n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}function s(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!h[t.nodeName])return"";if(n="",e(t))return"\n";if((h[t.nodeName]||m[t.nodeName])&&(n+="\n"),t=t.firstChild)do n+=s(t);while(t=t.nextSibling);return n}function l(t,n,r){var i,o,a,s,l=[],c=0,u=t,d=n.shift(),f=0;e:for(;;){if((h[u.nodeName]||m[u.nodeName]||e(u))&&c++,3===u.nodeType&&(!o&&u.length+c>=d[1]?(o=u,s=d[1]-c):i&&l.push(u),!i&&u.length+c>d[0]&&(i=u,a=d[0]-c),c+=u.length),i&&o){if(u=r({startNode:i,startNodeIndex:a,endNode:o,endNodeIndex:s,innerNodes:l,match:d[2],matchIndex:f}),c-=o.length-s,i=null,o=null,l=[],d=n.shift(),f++,!d)break}else if(p[u.nodeName]&&!h[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!e(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===t)break e;u=u.parentNode}}}function c(e){var t;if("function"!=typeof e){var n=e.nodeType?e:f.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(f.createTextNode(e)),r}}else t=e;return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;i=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),i.insertBefore(n,l));var c=t(e.match[0],s);return i.insertBefore(c,l),e.endNodeIndex<l.length&&(r=f.createTextNode(l.data.substring(e.endNodeIndex)),i.insertBefore(r,l)),l.parentNode.removeChild(l),c}n=f.createTextNode(o.data.substring(0,e.startNodeIndex)),r=f.createTextNode(a.data.substring(e.endNodeIndex));for(var u=t(o.data.substring(e.startNodeIndex),s),d=[],h=0,p=e.innerNodes.length;h<p;++h){var m=e.innerNodes[h],g=t(m.data,s);m.parentNode.replaceChild(g,m),d.push(g)}var v=t(a.data.substring(0,e.endNodeIndex),s);return i=o.parentNode,i.insertBefore(n,o),i.insertBefore(u,o),i.removeChild(o),i=a.parentNode,i.insertBefore(v,a),i.insertBefore(r,a),i.removeChild(a),v}}var u,d,f,h,p,m,g=[],v=0;if(f=n.ownerDocument,h=o.getBlockElements(),p=o.getWhiteSpaceElements(),m=o.getShortEndedElements(),d=s(n)){if(t.global)for(;u=t.exec(d);)g.push(a(u,i));else u=d.match(t),g.push(a(u,i));return g.length&&(v=g.length,l(n,g,c(r))),v}}function n(e){function n(){function t(){o.statusbar.find("#next").disabled(!a(d+1).length),o.statusbar.find("#prev").disabled(!a(d-1).length)}function n(){e.windowManager.alert("Could not find the specified string.",function(){o.find("#find")[0].focus()})}var r,i={};r=tinymce.trim(e.selection.getContent({format:"text"}));var o=e.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){e.focus(),u.done()},onSubmit:function(e){var r,s,l,c;return e.preventDefault(),s=o.find("#case").checked(),c=o.find("#words").checked(),l=o.find("#find").value(),l.length?i.text==l&&i.caseState==s&&i.wholeWord==c?0===a(d+1).length?void n():(u.next(),void t()):(r=u.find(l,s,c),r||n(),o.statusbar.items().slice(1).disabled(0===r),t(),void(i={text:l,caseState:s,wholeWord:c})):(u.done(!1),void o.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){o.submit()}},{text:"Replace",disabled:!0,onclick:function(){u.replace(o.find("#replace").value())||(o.statusbar.items().slice(1).disabled(!0),d=-1,i={})}},{text:"Replace all",disabled:!0,onclick:function(){u.replace(o.find("#replace").value(),!0,!0),o.statusbar.items().slice(1).disabled(!0),i={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){u.prev(),t()}},{text:"Next",name:"next",disabled:!0,onclick:function(){u.next(),t()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:r},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})}function r(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function i(n){var r,i;return i=e.dom.create("span",{"data-mce-bogus":1}),i.className="mce-match-marker",r=e.getBody(),u.done(!1),t(n,r,i,!1,e.schema)}function o(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function a(t){var n,i=[];if(n=tinymce.toArray(e.getBody().getElementsByTagName("span")),n.length)for(var o=0;o<n.length;o++){var a=r(n[o]);null!==a&&a.length&&a===t.toString()&&i.push(n[o])}return i}function s(t){var n=d,r=e.dom;t=t!==!1,t?n++:n--,r.removeClass(a(d),"mce-match-marker-selected");var i=a(n);return i.length?(r.addClass(a(n),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),n):-1}function l(t){var n=e.dom,r=t.parentNode;n.remove(t),n.isEmpty(r)&&n.remove(r)}function c(e){var t=r(e);return null!==t&&t.length>0}var u=this,d=-1;u.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:n}),e.addCommand("SearchReplace",n),e.shortcuts.add("Meta+F","",n)},u.find=function(e,t,n){e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e=n?"\\b"+e+"\\b":e;var r=i(new RegExp(e,t?"g":"gi"));return r&&(d=-1,d=s(!0)),r},u.next=function(){var e=s(!0);e!==-1&&(d=e)},u.prev=function(){var e=s(!1);e!==-1&&(d=e)},u.replace=function(t,n,i){var s,f,h,p,m,g,v=d;for(n=n!==!1,h=e.getBody(),f=tinymce.grep(tinymce.toArray(h.getElementsByTagName("span")),c),s=0;s<f.length;s++){var y=r(f[s]);if(p=m=parseInt(y,10),i||p===d){for(t.length?(f[s].firstChild.nodeValue=t,o(f[s])):l(f[s]);f[++s];){if(p=parseInt(r(f[s]),10),p!==m){s--;break}l(f[s])}n&&v--}else m>d&&f[s].setAttribute("data-mce-index",m-1)}return e.undoManager.add(),d=v,n?(g=a(v+1).length>0,u.next()):(g=a(v-1).length>0,u.prev()),!i&&g},u.done=function(t){var n,i,a,s;for(i=tinymce.toArray(e.getBody().getElementsByTagName("span")),n=0;n<i.length;n++){var l=r(i[n]);null!==l&&l.length&&(l===d.toString()&&(a||(a=i[n].firstChild),s=i[n].firstChild),o(i[n]))}if(a&&s){var c=e.dom.createRng();return c.setStart(a,0),c.setEnd(s,s.data.length),t!==!1&&e.selection.setRng(c),c}}}tinymce.PluginManager.add("searchreplace",n)}();
@@ -0,0 +1,1031 @@
1
+ /**
2
+ * Compiled inline version. (Library mode)
3
+ */
4
+
5
+ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
6
+ /*globals $code */
7
+
8
+ (function(exports, undefined) {
9
+ "use strict";
10
+
11
+ var modules = {};
12
+
13
+ function require(ids, callback) {
14
+ var module, defs = [];
15
+
16
+ for (var i = 0; i < ids.length; ++i) {
17
+ module = modules[ids[i]] || resolve(ids[i]);
18
+ if (!module) {
19
+ throw 'module definition dependecy not found: ' + ids[i];
20
+ }
21
+
22
+ defs.push(module);
23
+ }
24
+
25
+ callback.apply(null, defs);
26
+ }
27
+
28
+ function define(id, dependencies, definition) {
29
+ if (typeof id !== 'string') {
30
+ throw 'invalid module definition, module id must be defined and be a string';
31
+ }
32
+
33
+ if (dependencies === undefined) {
34
+ throw 'invalid module definition, dependencies must be specified';
35
+ }
36
+
37
+ if (definition === undefined) {
38
+ throw 'invalid module definition, definition function must be specified';
39
+ }
40
+
41
+ require(dependencies, function() {
42
+ modules[id] = definition.apply(null, arguments);
43
+ });
44
+ }
45
+
46
+ function defined(id) {
47
+ return !!modules[id];
48
+ }
49
+
50
+ function resolve(id) {
51
+ var target = exports;
52
+ var fragments = id.split(/[.\/]/);
53
+
54
+ for (var fi = 0; fi < fragments.length; ++fi) {
55
+ if (!target[fragments[fi]]) {
56
+ return;
57
+ }
58
+
59
+ target = target[fragments[fi]];
60
+ }
61
+
62
+ return target;
63
+ }
64
+
65
+ function expose(ids) {
66
+ var i, target, id, fragments, privateModules;
67
+
68
+ for (i = 0; i < ids.length; i++) {
69
+ target = exports;
70
+ id = ids[i];
71
+ fragments = id.split(/[.\/]/);
72
+
73
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
74
+ if (target[fragments[fi]] === undefined) {
75
+ target[fragments[fi]] = {};
76
+ }
77
+
78
+ target = target[fragments[fi]];
79
+ }
80
+
81
+ target[fragments[fragments.length - 1]] = modules[id];
82
+ }
83
+
84
+ // Expose private modules for unit tests
85
+ if (exports.AMDLC_TESTS) {
86
+ privateModules = exports.privateModules || {};
87
+
88
+ for (id in modules) {
89
+ privateModules[id] = modules[id];
90
+ }
91
+
92
+ for (i = 0; i < ids.length; i++) {
93
+ delete privateModules[ids[i]];
94
+ }
95
+
96
+ exports.privateModules = privateModules;
97
+ }
98
+ }
99
+
100
+ // Included from: js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js
101
+
102
+ /**
103
+ * DomTextMatcher.js
104
+ *
105
+ * Released under LGPL License.
106
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
107
+ *
108
+ * License: http://www.tinymce.com/license
109
+ * Contributing: http://www.tinymce.com/contributing
110
+ */
111
+
112
+ /*eslint no-labels:0, no-constant-condition: 0 */
113
+
114
+ /**
115
+ * This class logic for filtering text and matching words.
116
+ *
117
+ * @class tinymce.spellcheckerplugin.TextFilter
118
+ * @private
119
+ */
120
+ define("tinymce/spellcheckerplugin/DomTextMatcher", [], function() {
121
+ function isContentEditableFalse(node) {
122
+ return node && node.nodeType == 1 && node.contentEditable === "false";
123
+ }
124
+
125
+ // Based on work developed by: James Padolsey http://james.padolsey.com
126
+ // released under UNLICENSE that is compatible with LGPL
127
+ // TODO: Handle contentEditable edgecase:
128
+ // <p>text<span contentEditable="false">text<span contentEditable="true">text</span>text</span>text</p>
129
+ return function(node, editor) {
130
+ var m, matches = [], text, dom = editor.dom;
131
+ var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
132
+
133
+ blockElementsMap = editor.schema.getBlockElements(); // H1-H6, P, TD etc
134
+ hiddenTextElementsMap = editor.schema.getWhiteSpaceElements(); // TEXTAREA, PRE, STYLE, SCRIPT
135
+ shortEndedElementsMap = editor.schema.getShortEndedElements(); // BR, IMG, INPUT
136
+
137
+ function createMatch(m, data) {
138
+ if (!m[0]) {
139
+ throw 'findAndReplaceDOMText cannot handle zero-length matches';
140
+ }
141
+
142
+ return {
143
+ start: m.index,
144
+ end: m.index + m[0].length,
145
+ text: m[0],
146
+ data: data
147
+ };
148
+ }
149
+
150
+ function getText(node) {
151
+ var txt;
152
+
153
+ if (node.nodeType === 3) {
154
+ return node.data;
155
+ }
156
+
157
+ if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
158
+ return '';
159
+ }
160
+
161
+ if (isContentEditableFalse(node)) {
162
+ return '\n';
163
+ }
164
+
165
+ txt = '';
166
+
167
+ if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
168
+ txt += '\n';
169
+ }
170
+
171
+ if ((node = node.firstChild)) {
172
+ do {
173
+ txt += getText(node);
174
+ } while ((node = node.nextSibling));
175
+ }
176
+
177
+ return txt;
178
+ }
179
+
180
+ function stepThroughMatches(node, matches, replaceFn) {
181
+ var startNode, endNode, startNodeIndex,
182
+ endNodeIndex, innerNodes = [], atIndex = 0, curNode = node,
183
+ matchLocation, matchIndex = 0;
184
+
185
+ matches = matches.slice(0);
186
+ matches.sort(function(a, b) {
187
+ return a.start - b.start;
188
+ });
189
+
190
+ matchLocation = matches.shift();
191
+
192
+ out: while (true) {
193
+ if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
194
+ atIndex++;
195
+ }
196
+
197
+ if (curNode.nodeType === 3) {
198
+ if (!endNode && curNode.length + atIndex >= matchLocation.end) {
199
+ // We've found the ending
200
+ endNode = curNode;
201
+ endNodeIndex = matchLocation.end - atIndex;
202
+ } else if (startNode) {
203
+ // Intersecting node
204
+ innerNodes.push(curNode);
205
+ }
206
+
207
+ if (!startNode && curNode.length + atIndex > matchLocation.start) {
208
+ // We've found the match start
209
+ startNode = curNode;
210
+ startNodeIndex = matchLocation.start - atIndex;
211
+ }
212
+
213
+ atIndex += curNode.length;
214
+ }
215
+
216
+ if (startNode && endNode) {
217
+ curNode = replaceFn({
218
+ startNode: startNode,
219
+ startNodeIndex: startNodeIndex,
220
+ endNode: endNode,
221
+ endNodeIndex: endNodeIndex,
222
+ innerNodes: innerNodes,
223
+ match: matchLocation.text,
224
+ matchIndex: matchIndex
225
+ });
226
+
227
+ // replaceFn has to return the node that replaced the endNode
228
+ // and then we step back so we can continue from the end of the
229
+ // match:
230
+ atIndex -= (endNode.length - endNodeIndex);
231
+ startNode = null;
232
+ endNode = null;
233
+ innerNodes = [];
234
+ matchLocation = matches.shift();
235
+ matchIndex++;
236
+
237
+ if (!matchLocation) {
238
+ break; // no more matches
239
+ }
240
+ } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
241
+ if (!isContentEditableFalse(curNode)) {
242
+ // Move down
243
+ curNode = curNode.firstChild;
244
+ continue;
245
+ }
246
+ } else if (curNode.nextSibling) {
247
+ // Move forward:
248
+ curNode = curNode.nextSibling;
249
+ continue;
250
+ }
251
+
252
+ // Move forward or up:
253
+ while (true) {
254
+ if (curNode.nextSibling) {
255
+ curNode = curNode.nextSibling;
256
+ break;
257
+ } else if (curNode.parentNode !== node) {
258
+ curNode = curNode.parentNode;
259
+ } else {
260
+ break out;
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ /**
267
+ * Generates the actual replaceFn which splits up text nodes
268
+ * and inserts the replacement element.
269
+ */
270
+ function genReplacer(callback) {
271
+ function makeReplacementNode(fill, matchIndex) {
272
+ var match = matches[matchIndex];
273
+
274
+ if (!match.stencil) {
275
+ match.stencil = callback(match);
276
+ }
277
+
278
+ var clone = match.stencil.cloneNode(false);
279
+ clone.setAttribute('data-mce-index', matchIndex);
280
+
281
+ if (fill) {
282
+ clone.appendChild(dom.doc.createTextNode(fill));
283
+ }
284
+
285
+ return clone;
286
+ }
287
+
288
+ return function(range) {
289
+ var before, after, parentNode, startNode = range.startNode,
290
+ endNode = range.endNode, matchIndex = range.matchIndex,
291
+ doc = dom.doc;
292
+
293
+ if (startNode === endNode) {
294
+ var node = startNode;
295
+
296
+ parentNode = node.parentNode;
297
+ if (range.startNodeIndex > 0) {
298
+ // Add "before" text node (before the match)
299
+ before = doc.createTextNode(node.data.substring(0, range.startNodeIndex));
300
+ parentNode.insertBefore(before, node);
301
+ }
302
+
303
+ // Create the replacement node:
304
+ var el = makeReplacementNode(range.match, matchIndex);
305
+ parentNode.insertBefore(el, node);
306
+ if (range.endNodeIndex < node.length) {
307
+ // Add "after" text node (after the match)
308
+ after = doc.createTextNode(node.data.substring(range.endNodeIndex));
309
+ parentNode.insertBefore(after, node);
310
+ }
311
+
312
+ node.parentNode.removeChild(node);
313
+
314
+ return el;
315
+ }
316
+
317
+ // Replace startNode -> [innerNodes...] -> endNode (in that order)
318
+ before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
319
+ after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
320
+ var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
321
+ var innerEls = [];
322
+
323
+ for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
324
+ var innerNode = range.innerNodes[i];
325
+ var innerEl = makeReplacementNode(innerNode.data, matchIndex);
326
+ innerNode.parentNode.replaceChild(innerEl, innerNode);
327
+ innerEls.push(innerEl);
328
+ }
329
+
330
+ var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
331
+
332
+ parentNode = startNode.parentNode;
333
+ parentNode.insertBefore(before, startNode);
334
+ parentNode.insertBefore(elA, startNode);
335
+ parentNode.removeChild(startNode);
336
+
337
+ parentNode = endNode.parentNode;
338
+ parentNode.insertBefore(elB, endNode);
339
+ parentNode.insertBefore(after, endNode);
340
+ parentNode.removeChild(endNode);
341
+
342
+ return elB;
343
+ };
344
+ }
345
+
346
+ function unwrapElement(element) {
347
+ var parentNode = element.parentNode;
348
+ parentNode.insertBefore(element.firstChild, element);
349
+ element.parentNode.removeChild(element);
350
+ }
351
+
352
+ function getWrappersByIndex(index) {
353
+ var elements = node.getElementsByTagName('*'), wrappers = [];
354
+
355
+ index = typeof index == "number" ? "" + index : null;
356
+
357
+ for (var i = 0; i < elements.length; i++) {
358
+ var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
359
+
360
+ if (dataIndex !== null && dataIndex.length) {
361
+ if (dataIndex === index || index === null) {
362
+ wrappers.push(element);
363
+ }
364
+ }
365
+ }
366
+
367
+ return wrappers;
368
+ }
369
+
370
+ /**
371
+ * Returns the index of a specific match object or -1 if it isn't found.
372
+ *
373
+ * @param {Match} match Text match object.
374
+ * @return {Number} Index of match or -1 if it isn't found.
375
+ */
376
+ function indexOf(match) {
377
+ var i = matches.length;
378
+ while (i--) {
379
+ if (matches[i] === match) {
380
+ return i;
381
+ }
382
+ }
383
+
384
+ return -1;
385
+ }
386
+
387
+ /**
388
+ * Filters the matches. If the callback returns true it stays if not it gets removed.
389
+ *
390
+ * @param {Function} callback Callback to execute for each match.
391
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
392
+ */
393
+ function filter(callback) {
394
+ var filteredMatches = [];
395
+
396
+ each(function(match, i) {
397
+ if (callback(match, i)) {
398
+ filteredMatches.push(match);
399
+ }
400
+ });
401
+
402
+ matches = filteredMatches;
403
+
404
+ /*jshint validthis:true*/
405
+ return this;
406
+ }
407
+
408
+ /**
409
+ * Executes the specified callback for each match.
410
+ *
411
+ * @param {Function} callback Callback to execute for each match.
412
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
413
+ */
414
+ function each(callback) {
415
+ for (var i = 0, l = matches.length; i < l; i++) {
416
+ if (callback(matches[i], i) === false) {
417
+ break;
418
+ }
419
+ }
420
+
421
+ /*jshint validthis:true*/
422
+ return this;
423
+ }
424
+
425
+ /**
426
+ * Wraps the current matches with nodes created by the specified callback.
427
+ * Multiple clones of these matches might occur on matches that are on multiple nodex.
428
+ *
429
+ * @param {Function} callback Callback to execute in order to create elements for matches.
430
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
431
+ */
432
+ function wrap(callback) {
433
+ if (matches.length) {
434
+ stepThroughMatches(node, matches, genReplacer(callback));
435
+ }
436
+
437
+ /*jshint validthis:true*/
438
+ return this;
439
+ }
440
+
441
+ /**
442
+ * Finds the specified regexp and adds them to the matches collection.
443
+ *
444
+ * @param {RegExp} regex Global regexp to search the current node by.
445
+ * @param {Object} [data] Optional custom data element for the match.
446
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
447
+ */
448
+ function find(regex, data) {
449
+ if (text && regex.global) {
450
+ while ((m = regex.exec(text))) {
451
+ matches.push(createMatch(m, data));
452
+ }
453
+ }
454
+
455
+ return this;
456
+ }
457
+
458
+ /**
459
+ * Unwraps the specified match object or all matches if unspecified.
460
+ *
461
+ * @param {Object} [match] Optional match object.
462
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
463
+ */
464
+ function unwrap(match) {
465
+ var i, elements = getWrappersByIndex(match ? indexOf(match) : null);
466
+
467
+ i = elements.length;
468
+ while (i--) {
469
+ unwrapElement(elements[i]);
470
+ }
471
+
472
+ return this;
473
+ }
474
+
475
+ /**
476
+ * Returns a match object by the specified DOM element.
477
+ *
478
+ * @param {DOMElement} element Element to return match object for.
479
+ * @return {Object} Match object for the specified element.
480
+ */
481
+ function matchFromElement(element) {
482
+ return matches[element.getAttribute('data-mce-index')];
483
+ }
484
+
485
+ /**
486
+ * Returns a DOM element from the specified match element. This will be the first element if it's split
487
+ * on multiple nodes.
488
+ *
489
+ * @param {Object} match Match element to get first element of.
490
+ * @return {DOMElement} DOM element for the specified match object.
491
+ */
492
+ function elementFromMatch(match) {
493
+ return getWrappersByIndex(indexOf(match))[0];
494
+ }
495
+
496
+ /**
497
+ * Adds match the specified range for example a grammar line.
498
+ *
499
+ * @param {Number} start Start offset.
500
+ * @param {Number} length Length of the text.
501
+ * @param {Object} data Custom data object for match.
502
+ * @return {DomTextMatcher} Current DomTextMatcher instance.
503
+ */
504
+ function add(start, length, data) {
505
+ matches.push({
506
+ start: start,
507
+ end: start + length,
508
+ text: text.substr(start, length),
509
+ data: data
510
+ });
511
+
512
+ return this;
513
+ }
514
+
515
+ /**
516
+ * Returns a DOM range for the specified match.
517
+ *
518
+ * @param {Object} match Match object to get range for.
519
+ * @return {DOMRange} DOM Range for the specified match.
520
+ */
521
+ function rangeFromMatch(match) {
522
+ var wrappers = getWrappersByIndex(indexOf(match));
523
+
524
+ var rng = editor.dom.createRng();
525
+ rng.setStartBefore(wrappers[0]);
526
+ rng.setEndAfter(wrappers[wrappers.length - 1]);
527
+
528
+ return rng;
529
+ }
530
+
531
+ /**
532
+ * Replaces the specified match with the specified text.
533
+ *
534
+ * @param {Object} match Match object to replace.
535
+ * @param {String} text Text to replace the match with.
536
+ * @return {DOMRange} DOM range produced after the replace.
537
+ */
538
+ function replace(match, text) {
539
+ var rng = rangeFromMatch(match);
540
+
541
+ rng.deleteContents();
542
+
543
+ if (text.length > 0) {
544
+ rng.insertNode(editor.dom.doc.createTextNode(text));
545
+ }
546
+
547
+ return rng;
548
+ }
549
+
550
+ /**
551
+ * Resets the DomTextMatcher instance. This will remove any wrapped nodes and remove any matches.
552
+ *
553
+ * @return {[type]} [description]
554
+ */
555
+ function reset() {
556
+ matches.splice(0, matches.length);
557
+ unwrap();
558
+
559
+ return this;
560
+ }
561
+
562
+ text = getText(node);
563
+
564
+ return {
565
+ text: text,
566
+ matches: matches,
567
+ each: each,
568
+ filter: filter,
569
+ reset: reset,
570
+ matchFromElement: matchFromElement,
571
+ elementFromMatch: elementFromMatch,
572
+ find: find,
573
+ add: add,
574
+ wrap: wrap,
575
+ unwrap: unwrap,
576
+ replace: replace,
577
+ rangeFromMatch: rangeFromMatch,
578
+ indexOf: indexOf
579
+ };
580
+ };
581
+ });
582
+
583
+ // Included from: js/tinymce/plugins/spellchecker/classes/Plugin.js
584
+
585
+ /**
586
+ * Plugin.js
587
+ *
588
+ * Released under LGPL License.
589
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
590
+ *
591
+ * License: http://www.tinymce.com/license
592
+ * Contributing: http://www.tinymce.com/contributing
593
+ */
594
+
595
+ /*jshint camelcase:false */
596
+
597
+ /**
598
+ * This class contains all core logic for the spellchecker plugin.
599
+ *
600
+ * @class tinymce.spellcheckerplugin.Plugin
601
+ * @private
602
+ */
603
+ define("tinymce/spellcheckerplugin/Plugin", [
604
+ "tinymce/spellcheckerplugin/DomTextMatcher",
605
+ "tinymce/PluginManager",
606
+ "tinymce/util/Tools",
607
+ "tinymce/ui/Menu",
608
+ "tinymce/dom/DOMUtils",
609
+ "tinymce/util/XHR",
610
+ "tinymce/util/URI",
611
+ "tinymce/util/JSON"
612
+ ], function(DomTextMatcher, PluginManager, Tools, Menu, DOMUtils, XHR, URI, JSON) {
613
+ PluginManager.add('spellchecker', function(editor, url) {
614
+ var languageMenuItems, self = this, lastSuggestions, started, suggestionsMenu, settings = editor.settings;
615
+ var hasDictionarySupport;
616
+
617
+ function getTextMatcher() {
618
+ if (!self.textMatcher) {
619
+ self.textMatcher = new DomTextMatcher(editor.getBody(), editor);
620
+ }
621
+
622
+ return self.textMatcher;
623
+ }
624
+
625
+ function buildMenuItems(listName, languageValues) {
626
+ var items = [];
627
+
628
+ Tools.each(languageValues, function(languageValue) {
629
+ items.push({
630
+ selectable: true,
631
+ text: languageValue.name,
632
+ data: languageValue.value
633
+ });
634
+ });
635
+
636
+ return items;
637
+ }
638
+
639
+ // draw back if power version is requested and registered
640
+ if (/(^|[ ,])tinymcespellchecker([, ]|$)/.test(settings.plugins) && PluginManager.get('tinymcespellchecker')) {
641
+ /*eslint no-console:0 */
642
+ if (typeof console !== "undefined" && console.log) {
643
+ console.log(
644
+ "Spell Checker Pro is incompatible with Spell Checker plugin! " +
645
+ "Remove 'spellchecker' from the 'plugins' option."
646
+ );
647
+ }
648
+ return;
649
+ }
650
+
651
+ var languagesString = settings.spellchecker_languages ||
652
+ 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,' +
653
+ 'German=de,Italian=it,Polish=pl,Portuguese=pt_BR,' +
654
+ 'Spanish=es,Swedish=sv';
655
+
656
+ languageMenuItems = buildMenuItems('Language',
657
+ Tools.map(languagesString.split(','), function(langPair) {
658
+ langPair = langPair.split('=');
659
+
660
+ return {
661
+ name: langPair[0],
662
+ value: langPair[1]
663
+ };
664
+ })
665
+ );
666
+
667
+ function isEmpty(obj) {
668
+ /*jshint unused:false*/
669
+ /*eslint no-unused-vars:0 */
670
+ for (var name in obj) {
671
+ return false;
672
+ }
673
+
674
+ return true;
675
+ }
676
+
677
+ function showSuggestions(word, spans) {
678
+ var items = [], suggestions = lastSuggestions[word];
679
+
680
+ Tools.each(suggestions, function(suggestion) {
681
+ items.push({
682
+ text: suggestion,
683
+ onclick: function() {
684
+ editor.insertContent(editor.dom.encode(suggestion));
685
+ editor.dom.remove(spans);
686
+ checkIfFinished();
687
+ }
688
+ });
689
+ });
690
+
691
+ items.push({text: '-'});
692
+
693
+ if (hasDictionarySupport) {
694
+ items.push({text: 'Add to Dictionary', onclick: function() {
695
+ addToDictionary(word, spans);
696
+ }});
697
+ }
698
+
699
+ items.push.apply(items, [
700
+ {text: 'Ignore', onclick: function() {
701
+ ignoreWord(word, spans);
702
+ }},
703
+
704
+ {text: 'Ignore all', onclick: function() {
705
+ ignoreWord(word, spans, true);
706
+ }}
707
+ ]);
708
+
709
+ // Render menu
710
+ suggestionsMenu = new Menu({
711
+ items: items,
712
+ context: 'contextmenu',
713
+ onautohide: function(e) {
714
+ if (e.target.className.indexOf('spellchecker') != -1) {
715
+ e.preventDefault();
716
+ }
717
+ },
718
+ onhide: function() {
719
+ suggestionsMenu.remove();
720
+ suggestionsMenu = null;
721
+ }
722
+ });
723
+
724
+ suggestionsMenu.renderTo(document.body);
725
+
726
+ // Position menu
727
+ var pos = DOMUtils.DOM.getPos(editor.getContentAreaContainer());
728
+ var targetPos = editor.dom.getPos(spans[0]);
729
+ var root = editor.dom.getRoot();
730
+
731
+ // Adjust targetPos for scrolling in the editor
732
+ if (root.nodeName == 'BODY') {
733
+ targetPos.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
734
+ targetPos.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
735
+ } else {
736
+ targetPos.x -= root.scrollLeft;
737
+ targetPos.y -= root.scrollTop;
738
+ }
739
+
740
+ pos.x += targetPos.x;
741
+ pos.y += targetPos.y;
742
+
743
+ suggestionsMenu.moveTo(pos.x, pos.y + spans[0].offsetHeight);
744
+ }
745
+
746
+ function getWordCharPattern() {
747
+ // Regexp for finding word specific characters this will split words by
748
+ // spaces, quotes, copy right characters etc. It's escaped with unicode characters
749
+ // to make it easier to output scripts on servers using different encodings
750
+ // so if you add any characters outside the 128 byte range make sure to escape it
751
+ return editor.getParam('spellchecker_wordchar_pattern') || new RegExp("[^" +
752
+ "\\s!\"#$%&()*+,-./:;<=>?@[\\]^_{|}`" +
753
+ "\u00a7\u00a9\u00ab\u00ae\u00b1\u00b6\u00b7\u00b8\u00bb" +
754
+ "\u00bc\u00bd\u00be\u00bf\u00d7\u00f7\u00a4\u201d\u201c\u201e\u00a0\u2002\u2003\u2009" +
755
+ "]+", "g");
756
+ }
757
+
758
+ function defaultSpellcheckCallback(method, text, doneCallback, errorCallback) {
759
+ var data = {method: method, lang: settings.spellchecker_language}, postData = '';
760
+
761
+ data[method == "addToDictionary" ? "word" : "text"] = text;
762
+
763
+ Tools.each(data, function(value, key) {
764
+ if (postData) {
765
+ postData += '&';
766
+ }
767
+
768
+ postData += key + '=' + encodeURIComponent(value);
769
+ });
770
+
771
+ XHR.send({
772
+ url: new URI(url).toAbsolute(settings.spellchecker_rpc_url),
773
+ type: "post",
774
+ content_type: 'application/x-www-form-urlencoded',
775
+ data: postData,
776
+ success: function(result) {
777
+ result = JSON.parse(result);
778
+
779
+ if (!result) {
780
+ var message = editor.translate("Server response wasn't proper JSON.");
781
+ errorCallback(message);
782
+ } else if (result.error) {
783
+ errorCallback(result.error);
784
+ } else {
785
+ doneCallback(result);
786
+ }
787
+ },
788
+ error: function() {
789
+ var message = editor.translate("The spelling service was not found: (") +
790
+ settings.spellchecker_rpc_url +
791
+ editor.translate(")");
792
+ errorCallback(message);
793
+ }
794
+ });
795
+ }
796
+
797
+ function sendRpcCall(name, data, successCallback, errorCallback) {
798
+ var spellCheckCallback = settings.spellchecker_callback || defaultSpellcheckCallback;
799
+ spellCheckCallback.call(self, name, data, successCallback, errorCallback);
800
+ }
801
+
802
+ function spellcheck() {
803
+ if (finish()) {
804
+ return;
805
+ }
806
+
807
+ function errorCallback(message) {
808
+ editor.notificationManager.open({text: message, type: 'error'});
809
+ editor.setProgressState(false);
810
+ finish();
811
+ }
812
+
813
+ editor.setProgressState(true);
814
+ sendRpcCall("spellcheck", getTextMatcher().text, markErrors, errorCallback);
815
+ editor.focus();
816
+ }
817
+
818
+ function checkIfFinished() {
819
+ if (!editor.dom.select('span.mce-spellchecker-word').length) {
820
+ finish();
821
+ }
822
+ }
823
+
824
+ function addToDictionary(word, spans) {
825
+ editor.setProgressState(true);
826
+
827
+ sendRpcCall("addToDictionary", word, function() {
828
+ editor.setProgressState(false);
829
+ editor.dom.remove(spans, true);
830
+ checkIfFinished();
831
+ }, function(message) {
832
+ editor.notificationManager.open({text: message, type: 'error'});
833
+ editor.setProgressState(false);
834
+ });
835
+ }
836
+
837
+ function ignoreWord(word, spans, all) {
838
+ editor.selection.collapse();
839
+
840
+ if (all) {
841
+ Tools.each(editor.dom.select('span.mce-spellchecker-word'), function(span) {
842
+ if (span.getAttribute('data-mce-word') == word) {
843
+ editor.dom.remove(span, true);
844
+ }
845
+ });
846
+ } else {
847
+ editor.dom.remove(spans, true);
848
+ }
849
+
850
+ checkIfFinished();
851
+ }
852
+
853
+ function finish() {
854
+ getTextMatcher().reset();
855
+ self.textMatcher = null;
856
+
857
+ if (started) {
858
+ started = false;
859
+ editor.fire('SpellcheckEnd');
860
+ return true;
861
+ }
862
+ }
863
+
864
+ function getElmIndex(elm) {
865
+ var value = elm.getAttribute('data-mce-index');
866
+
867
+ if (typeof value == "number") {
868
+ return "" + value;
869
+ }
870
+
871
+ return value;
872
+ }
873
+
874
+ function findSpansByIndex(index) {
875
+ var nodes, spans = [];
876
+
877
+ nodes = Tools.toArray(editor.getBody().getElementsByTagName('span'));
878
+ if (nodes.length) {
879
+ for (var i = 0; i < nodes.length; i++) {
880
+ var nodeIndex = getElmIndex(nodes[i]);
881
+
882
+ if (nodeIndex === null || !nodeIndex.length) {
883
+ continue;
884
+ }
885
+
886
+ if (nodeIndex === index.toString()) {
887
+ spans.push(nodes[i]);
888
+ }
889
+ }
890
+ }
891
+
892
+ return spans;
893
+ }
894
+
895
+ editor.on('click', function(e) {
896
+ var target = e.target;
897
+
898
+ if (target.className == "mce-spellchecker-word") {
899
+ e.preventDefault();
900
+
901
+ var spans = findSpansByIndex(getElmIndex(target));
902
+
903
+ if (spans.length > 0) {
904
+ var rng = editor.dom.createRng();
905
+ rng.setStartBefore(spans[0]);
906
+ rng.setEndAfter(spans[spans.length - 1]);
907
+ editor.selection.setRng(rng);
908
+ showSuggestions(target.getAttribute('data-mce-word'), spans);
909
+ }
910
+ }
911
+ });
912
+
913
+ editor.addMenuItem('spellchecker', {
914
+ text: 'Spellcheck',
915
+ context: 'tools',
916
+ onclick: spellcheck,
917
+ selectable: true,
918
+ onPostRender: function() {
919
+ var self = this;
920
+
921
+ self.active(started);
922
+
923
+ editor.on('SpellcheckStart SpellcheckEnd', function() {
924
+ self.active(started);
925
+ });
926
+ }
927
+ });
928
+
929
+ function updateSelection(e) {
930
+ var selectedLanguage = settings.spellchecker_language;
931
+
932
+ e.control.items().each(function(ctrl) {
933
+ ctrl.active(ctrl.settings.data === selectedLanguage);
934
+ });
935
+ }
936
+
937
+ /**
938
+ * Find the specified words and marks them. It will also show suggestions for those words.
939
+ *
940
+ * @example
941
+ * editor.plugins.spellchecker.markErrors({
942
+ * dictionary: true,
943
+ * words: {
944
+ * "word1": ["suggestion 1", "Suggestion 2"]
945
+ * }
946
+ * });
947
+ * @param {Object} data Data object containing the words with suggestions.
948
+ */
949
+ function markErrors(data) {
950
+ var suggestions;
951
+
952
+ if (data.words) {
953
+ hasDictionarySupport = !!data.dictionary;
954
+ suggestions = data.words;
955
+ } else {
956
+ // Fallback to old format
957
+ suggestions = data;
958
+ }
959
+
960
+ editor.setProgressState(false);
961
+
962
+ if (isEmpty(suggestions)) {
963
+ var message = editor.translate('No misspellings found.');
964
+ editor.notificationManager.open({text: message, type: 'info'});
965
+ started = false;
966
+ return;
967
+ }
968
+
969
+ lastSuggestions = suggestions;
970
+
971
+ getTextMatcher().find(getWordCharPattern()).filter(function(match) {
972
+ return !!suggestions[match.text];
973
+ }).wrap(function(match) {
974
+ return editor.dom.create('span', {
975
+ "class": 'mce-spellchecker-word',
976
+ "data-mce-bogus": 1,
977
+ "data-mce-word": match.text
978
+ });
979
+ });
980
+
981
+ started = true;
982
+ editor.fire('SpellcheckStart');
983
+ }
984
+
985
+ var buttonArgs = {
986
+ tooltip: 'Spellcheck',
987
+ onclick: spellcheck,
988
+ onPostRender: function() {
989
+ var self = this;
990
+
991
+ editor.on('SpellcheckStart SpellcheckEnd', function() {
992
+ self.active(started);
993
+ });
994
+ }
995
+ };
996
+
997
+ if (languageMenuItems.length > 1) {
998
+ buttonArgs.type = 'splitbutton';
999
+ buttonArgs.menu = languageMenuItems;
1000
+ buttonArgs.onshow = updateSelection;
1001
+ buttonArgs.onselect = function(e) {
1002
+ settings.spellchecker_language = e.control.settings.data;
1003
+ };
1004
+ }
1005
+
1006
+ editor.addButton('spellchecker', buttonArgs);
1007
+ editor.addCommand('mceSpellCheck', spellcheck);
1008
+
1009
+ editor.on('remove', function() {
1010
+ if (suggestionsMenu) {
1011
+ suggestionsMenu.remove();
1012
+ suggestionsMenu = null;
1013
+ }
1014
+ });
1015
+
1016
+ editor.on('change', checkIfFinished);
1017
+
1018
+ this.getTextMatcher = getTextMatcher;
1019
+ this.getWordCharPattern = getWordCharPattern;
1020
+ this.markErrors = markErrors;
1021
+ this.getLanguage = function() {
1022
+ return settings.spellchecker_language;
1023
+ };
1024
+
1025
+ // Set default spellchecker language if it's not specified
1026
+ settings.spellchecker_language = settings.spellchecker_language || settings.language || 'en';
1027
+ });
1028
+ });
1029
+
1030
+ expose(["tinymce/spellcheckerplugin/DomTextMatcher"]);
1031
+ })(this);