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,45 @@
1
+ // @see http://meyerweb.com/eric/tools/css/reset/index.html
2
+
3
+ html, body, div, span, applet, object, iframe,
4
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
5
+ a, abbr, acronym, address, big, cite, code,
6
+ del, dfn, em, img, ins, kbd, q, s, samp,
7
+ small, strike, strong, sub, sup, tt, var,
8
+ b, u, i, center,
9
+ dl, dt, dd, ol, ul, li,
10
+ fieldset, form, label, legend,
11
+ table, caption, tbody, tfoot, thead, tr, th, td,
12
+ article, aside, canvas, details, embed,
13
+ figure, figcaption, footer, header, hgroup,
14
+ menu, nav, output, ruby, section, summary,
15
+ time, mark, audio, video {
16
+ margin: 0;
17
+ padding: 0;
18
+ border: 0;
19
+ font-size: 100%;
20
+ font: inherit;
21
+ vertical-align: baseline;
22
+ }
23
+ /* HTML5 display-role reset for older browsers */
24
+ article, aside, details, figcaption, figure,
25
+ footer, header, hgroup, menu, nav, section {
26
+ display: block;
27
+ }
28
+ body {
29
+ line-height: 1;
30
+ }
31
+ ol, ul {
32
+ //list-style: none;
33
+ }
34
+ blockquote, q {
35
+ quotes: none;
36
+ }
37
+ blockquote:before, blockquote:after,
38
+ q:before, q:after {
39
+ content: '';
40
+ content: none;
41
+ }
42
+ table {
43
+ border-collapse: collapse;
44
+ border-spacing: 0;
45
+ }
@@ -0,0 +1,156 @@
1
+ /**************************************************************************************************************************
2
+ * BASIC CONFIGURATION
3
+ *************************************************************************************************************************/
4
+
5
+ @base-font-size: 13.6px; /* 20140929: Previously 0.85em, but we don't want user selected sizes because it breaks around */
6
+ @accent-color: #D2CBB1;
7
+ @background-color: #FEFDFC;
8
+ @link-color: #9C010F;
9
+
10
+ @red: #9C010F;
11
+ @green: #94AF4B;
12
+ @green-progress-bar: @status-progress-bar-color-ok; // Progress bars and trust-stars
13
+ @blue: #4BA2AF;
14
+ @yellow: #FFFF90;
15
+
16
+ @mobile-menu: false;
17
+ @button-reversed: false;
18
+
19
+ @local-error-color: #CC0000;
20
+ @local-unsub-color: #404040;
21
+ @local-open-color: #2040B0;
22
+ @local-click-color: #007030;
23
+ @local-abuse-color: #EEEE00;
24
+ @local-delayed-color: #b39601;
25
+ @local-todo-color: #c2b798;
26
+
27
+ @zindex-dialog: 1005;
28
+ @zindex-dialog-modal: 1004;
29
+ @zindex-popup: 1003;
30
+ @zindex-tooltip: 1004;
31
+ @zindex-thead: 1001; // Defined by thead plugin
32
+
33
+ @elysia_nodes_property_label-width: 10em;
34
+ @status-progress-bar-color-ok: #48AF26;
35
+
36
+ /**************************************************************************************************************************
37
+ * COMPUTED CONFIUGRATION
38
+ *************************************************************************************************************************/
39
+
40
+ @sidebar-background-color: @accent-color;
41
+ @highlight-background-color: mix(@accent-color, @background-color, 60%);
42
+ @sidebar-highlight-background-color: mix(@sidebar-background-color, @background-color, 60%);
43
+ @button-text-color: @background-color;
44
+ @button-text-color-disabled: lighten(@button-background-color, 20%);
45
+ @button-background-color: @text-color;
46
+ @button-border-color: @button-background-color;
47
+ @button-border-color-split: contrast(difference(@button-border-color, @button-background-color), @button-border-color, @background-color, 5%);
48
+ @button-primary-text-color: @button-text-color;
49
+ @button-primary-background-color: @link-color;
50
+ @button-primary-border-color: @button-primary-background-color;
51
+ @input-border-color: @button-border-color;
52
+ @input-focus-border-color: #66AFE9; // TODO
53
+ @input-border-size: 0;
54
+ @popup-background-color: lighten(@background-color,8%);
55
+
56
+ // TODO remove unused vars
57
+
58
+ @font-family: "trebuchet ms",arial,sans-serif;
59
+ @standard-border-radius: 5px;
60
+ @info-border-radius: @standard-border-radius;
61
+ @button-border-radius: @standard-border-radius;
62
+ @large-balloon-border-radius: 3em;
63
+
64
+ @admin-menu-background-color: #000066;
65
+ @admin-menu-dev-background-color: #660066;
66
+
67
+ // Vertical margin for standard elements (to preserve alignment when in columns)
68
+ @element-margin-vertical: 1.5em;
69
+
70
+ /**************************************************************************************************************************
71
+ * SERVICE COLORS
72
+ *************************************************************************************************************************/
73
+
74
+ @local-user-failure-row-background-color: mix(saturate(@local-error-color, 20%), @background-color, 25%);
75
+ @local-user-clicker-row-background-color: mix(saturate(@local-click-color, 20%), @background-color, 25%);
76
+ @local-user-opener-row-background-color: mix(saturate(@local-open-color, 20%), @background-color, 25%);
77
+ @local-user-unsubscribe-row-background-color: mix(saturate(@local-unsub-color, 20%), @background-color, 25%);
78
+ @local-user-abuse-row-background-color: mix(saturate(@local-abuse-color, 20%), @background-color, 25%);
79
+
80
+ // TODO delivered should not share the color with clicker
81
+ @local-result-delivered-color: @local-click-color;
82
+ @local-result-error-color: @local-error-color;
83
+ @local-result-delayed-color: @local-delayed-color;
84
+ @local-result-todo-color: @local-todo-color;
85
+
86
+ @local-balloon-error-color: @local-error-color;
87
+ @local-balloon-unsubscribe-color: @local-unsub-color;
88
+ @local-balloon-abuse-color: @local-abuse-color;
89
+ @local-balloon-opener-color: @local-open-color;
90
+ @local-balloon-opener-estimated-color: desaturate(lighten(@local-open-color, 20%), 20%);
91
+ @local-balloon-clicker-color: @local-click-color;
92
+
93
+ // TODO this works only with light background and dark text, only.
94
+ @local-balloon-error-text-color: contrast(@local-balloon-error-color, @background-color, @text-color, 50%);
95
+ @local-balloon-unsubscribe-text-color: contrast(@local-balloon-unsubscribe-color, @background-color, @text-color, 50%);
96
+ @local-balloon-abuse-text-color: contrast(@local-balloon-abuse-color, @background-color, @text-color, 50%);
97
+ @local-balloon-opener-text-color: contrast(@local-balloon-opener-color, @background-color, @text-color, 50%);
98
+ @local-balloon-opener-estimated-text-color: contrast(@local-balloon-opener-estimated-color, @background-color, @text-color, 50%);
99
+ @local-balloon-clicker-text-color: contrast(@local-balloon-clicker-color, @background-color, @text-color, 50%);
100
+
101
+
102
+ /**************************************************************************************************************************
103
+ * COMPUTED VARIABLES
104
+ *************************************************************************************************************************/
105
+
106
+ @text-color: contrast(@background-color, shade(@background-color, 80%), tint(@background-color, 80%), 50%);
107
+
108
+ @error-color: @red;
109
+ @warning-color: lighten(@yellow, 5%);
110
+ @status-color: @green;
111
+
112
+ @status-background-color: mix(@status-color, @background-color, 50%);
113
+ @status-text-color: darken(@status-color, 30%);
114
+ @warning-background-color: @warning-color;
115
+ @warning-text-color: @text-color;
116
+ @error-background-color: mix(@error-color, @background-color, 50%);
117
+ @error-text-color: darken(@error-color, 30%);
118
+
119
+ @link-active-color: darken(@link-color, 20%);
120
+ @link-disabled-color: darken(@link-color, 50%);
121
+ @text-greyed-color: contrast(@text-color, lighten(@text-color, 40%), darken(@text-color, 40%), 50%); // Elementi leggibili ma meno importanti di text-color
122
+ @shadow-color: contrast(@background-color, darken(shade(@background-color, 20%), 30%), lighten(tint(@background-color, 20%), 30%), 50%);
123
+ @img-border-style: 3px solid @background-color;
124
+
125
+ @input-text-color: @text-color;
126
+ @input-background-color: @highlight-background-color;
127
+ @input-placeholder-color: lighten(@text-color, 30%);
128
+ @input-error-border-style: 2px solid @red;
129
+
130
+ @table-border-color: darken(@background-color, 10%);
131
+ @table-border-style: 2px solid @table-border-color;
132
+ @table-rows-separator-style: 1px solid @table-border-color;
133
+ @table-odd-row-background-color: @background-color;
134
+ @table-even-row-background-color: mix(@background-color, @highlight-background-color, 50%);
135
+ @table-header-color: @accent-color;
136
+ @table-row-selected-background-color: @yellow;
137
+
138
+ @object-background-color: @table-even-row-background-color;
139
+ @object-border-style: none; //1px solid @highlight-background-color;
140
+ @object-border-radius: @large-border-radius;
141
+ @object-selectable-border-style: none; //2px solid @background-color;
142
+ @object-selectable-box-shadow: none;
143
+ @object-selected-box-shadow: none; //0px 0px 0px 2px @sidebar-background-color;
144
+
145
+ @dialog-title-background-color: @accent-color;
146
+ @helpwin-background-color: @popup-background-color;
147
+ @helpwin-text-color: @text-color;
148
+ //@helpwin-title-background-color: @dialog-title-background-color;
149
+
150
+ @large-border-radius: @standard-border-radius * 1.4;
151
+ @large-button-border-radius: @button-border-radius * 1.4;
152
+ @tabs-border-width: 1px;
153
+
154
+ @button-hover-background-color: darken(@button-background-color, 10%);
155
+
156
+ @ui-tabs-panel-padding: 4px;
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ /* global global: false */
3
+ /* global XMLHttpRequest: false */
4
+
5
+ var templateLoader = require('./template-loader.js');
6
+ var console = require("console");
7
+ var ko = require("knockout");
8
+ var $ = require("jquery");
9
+ require("./ko-bindings.js");
10
+ var performanceAwareCaller = require("./timed-call.js").timedCall;
11
+
12
+ var addUndoStackExtensionMaker = require("./undomanager/undomain.js");
13
+ var colorPlugin = require("./ext/color.js");
14
+ var inlinerPlugin = require("./ext/inliner.js");
15
+
16
+ var localStorageLoader = require("./ext/localstorage.js");
17
+
18
+ if (typeof ko == 'undefined') throw "Cannot find knockout.js library!";
19
+ if (typeof $ == 'undefined') throw "Cannot find jquery library!";
20
+
21
+ function _canonicalize(url) {
22
+ var div = global.document.createElement('div');
23
+ div.innerHTML = "<a></a>";
24
+ div.firstChild.href = url; // Ensures that the href is properly escaped
25
+ div.innerHTML = div.innerHTML; // Run the current innerHTML back through the parser
26
+ return div.firstChild.href;
27
+ }
28
+
29
+ var applyBindingOptions = function(options, ko) {
30
+ // push "convertedUrl" method to the wysiwygSrc binding
31
+ ko.bindingHandlers.wysiwygSrc.convertedUrl = function(src, method, width, height) {
32
+ var imgProcessorBackend = options.imgProcessorBackend ? options.imgProcessorBackend : './upload';
33
+ var backEndMatch = imgProcessorBackend.match(/^(https?:\/\/[^\/]*\/).*$/);
34
+ var srcMatch = src.match(/^(https?:\/\/[^\/]*\/).*$/);
35
+ if (backEndMatch === null || (srcMatch !== null && backEndMatch[1] == srcMatch[1])) {
36
+ var queryParamSeparator = imgProcessorBackend.indexOf('?') == -1 ? '?' : '&';
37
+ return imgProcessorBackend + queryParamSeparator + "src=" + encodeURIComponent(src) + "&method=" + encodeURIComponent(method) + "&params=" + encodeURIComponent(width + "," + height);
38
+ } else {
39
+ console.log("Cannot apply backend image resizing to non-local resources ", src, method, width, height, backEndMatch, srcMatch);
40
+ return src + "?method=" + method + "&width=" + width + (height !== null ? "&height=" + height : '');
41
+ }
42
+ };
43
+
44
+ ko.bindingHandlers.wysiwygSrc.placeholderUrl = function(width, height, text) {
45
+ return options.imgProcessorBackend + "?method=" + 'placeholder' + "&params=" + width + encodeURIComponent(",") + height;
46
+ };
47
+
48
+ // pushes custom tinymce configurations from options to the binding
49
+ if (options && options.tinymceConfig)
50
+ ko.bindingHandlers.wysiwyg.standardOptions = options.tinymceConfig;
51
+ if (options && options.tinymceConfigFull)
52
+ ko.bindingHandlers.wysiwyg.fullOptions = options.tinymceConfigFull;
53
+ };
54
+
55
+ var start = function(options, templateFile, templateMetadata, jsorjson, customExtensions) {
56
+
57
+
58
+
59
+ templateLoader.fixPageEvents();
60
+
61
+ var fileUploadMessagesExtension = function(vm) {
62
+ var fileuploadConfig = {
63
+ messages: {
64
+ unknownError: vm.t('Unknown error'),
65
+ uploadedBytes: vm.t('Uploaded bytes exceed file size'),
66
+ maxNumberOfFiles: vm.t('Maximum number of files exceeded'),
67
+ acceptFileTypes: vm.t('File type not allowed'),
68
+ maxFileSize: vm.t('File is too large'),
69
+ minFileSize: vm.t('File is too small'),
70
+ post_max_size: vm.t('The uploaded file exceeds the post_max_size directive in php.ini'),
71
+ max_file_size: vm.t('File is too big'),
72
+ min_file_size: vm.t('File is too small'),
73
+ accept_file_types: vm.t('Filetype not allowed'),
74
+ max_number_of_files: vm.t('Maximum number of files exceeded'),
75
+ max_width: vm.t('Image exceeds maximum width'),
76
+ min_width: vm.t('Image requires a minimum width'),
77
+ max_height: vm.t('Image exceeds maximum height'),
78
+ min_height: vm.t('Image requires a minimum height'),
79
+ abort: vm.t('File upload aborted'),
80
+ image_resize: vm.t('Failed to resize image'),
81
+ generic: vm.t('Unexpected upload error')
82
+ }
83
+ };
84
+ // fileUpload options.
85
+ if (options && options.fileuploadConfig)
86
+ fileuploadConfig = $.extend(true, fileuploadConfig, options.fileuploadConfig);
87
+
88
+ ko.bindingHandlers['fileupload'].extendOptions = fileuploadConfig;
89
+
90
+ };
91
+
92
+ var simpleTranslationPlugin = function(vm) {
93
+ if (options && options.strings) {
94
+ vm.t = function(key, objParam) {
95
+ var res = options.strings[key];
96
+ if (typeof res == 'undefined') {
97
+ console.warn("Missing translation string for",key,": using default string");
98
+ res = key;
99
+ }
100
+ return vm.tt(res, objParam);
101
+ };
102
+ }
103
+ };
104
+
105
+ // simpleTranslationPlugin must be before the undoStack to translate undo/redo labels
106
+ var extensions = [simpleTranslationPlugin, addUndoStackExtensionMaker(performanceAwareCaller), colorPlugin, inlinerPlugin];
107
+ if (typeof customExtensions !== 'undefined')
108
+ for (var k = 0; k < customExtensions.length; k++) extensions.push(customExtensions[k]);
109
+ extensions.push(fileUploadMessagesExtension);
110
+
111
+ var galleryUrl = options.fileuploadConfig ? options.fileuploadConfig.url : '/upload/';
112
+ applyBindingOptions(options, ko);
113
+
114
+ // TODO what about appending to another element?
115
+ $("<!-- ko template: 'main' --><!-- /ko -->").appendTo(global.document.body);
116
+
117
+ // templateFile may override the template path in templateMetadata
118
+ if (typeof templateFile == 'undefined' && typeof templateMetadata != 'undefined') {
119
+ templateFile = templateMetadata.template;
120
+ }
121
+ // TODO canonicalize templateFile to absolute or relative depending on "relativeUrlsException" plugin
122
+
123
+ templateLoader.load(performanceAwareCaller, templateFile, templateMetadata, jsorjson, extensions, galleryUrl);
124
+
125
+ };
126
+
127
+ var initFromLocalStorage = function(options, hash_key, customExtensions) {
128
+ try {
129
+ var lsData = localStorageLoader(hash_key, options.emailProcessorBackend);
130
+ var extensions = typeof customExtensions !== 'undefined' ? customExtensions : [];
131
+ extensions.push(lsData.extension);
132
+ var template = _canonicalize(lsData.metadata.template);
133
+ start(options, template, lsData.metadata, lsData.model, extensions);
134
+ } catch (e) {
135
+ console.error("TODO not found ", hash_key, e);
136
+ }
137
+ };
138
+
139
+ var init = function(options, customExtensions) {
140
+
141
+ var hash = global.location.hash ? global.location.href.split("#")[1] : undefined;
142
+
143
+ // Loading from configured template or configured metadata
144
+ if (options && (options.template || options.data)) {
145
+ if (options.data) {
146
+ var data = JSON.parse(options.data);
147
+ start(options, undefined, data.metadata, data.content, customExtensions);
148
+ } else {
149
+ start(options, options.template, undefined, undefined, customExtensions);
150
+ }
151
+ // Loading from LocalStorage (if url hash has a 7chars key)
152
+ } else if (hash && hash.length == 7) {
153
+ initFromLocalStorage(options, hash, customExtensions);
154
+ // Loading from template url as hash (if hash is not a valid localstorage key)
155
+ } else if (hash) {
156
+ start(options, _canonicalize(hash), undefined, undefined, customExtensions);
157
+ } else {
158
+ return false;
159
+ }
160
+ return true;
161
+ };
162
+
163
+ module.exports = {
164
+ isCompatible: templateLoader.isCompatible,
165
+ init: init,
166
+ start: start
167
+ };
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var ko = require("knockout");
4
+ var console = require("console");
5
+
6
+ // @see also script-template.js pushTemplate
7
+ var addScriptTemplate = function(doc, templateName, templateMarkup) {
8
+ var scriptTag = doc.createElement('script');
9
+ scriptTag.setAttribute('type', 'text/html');
10
+ scriptTag.setAttribute('id', templateName);
11
+ scriptTag.text = templateMarkup;
12
+ doc.body.appendChild(scriptTag);
13
+ return scriptTag;
14
+ // $('<script type="text/html"></sc' + 'ript>').text(templateMarkup).attr('id', templateName).appendTo($('body'));
15
+ };
16
+
17
+ // used for live preview in iframe.
18
+ ko.bindingHandlers.bindIframe = {
19
+ // tpl will be overriden with the structure parsed by the input template.
20
+ tpl: "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r\n<body><div data-bind=\"block: content\"></div></body>\r\n</html>\r\n",
21
+ init: function(element, valueAccessor) {
22
+ function bindIframe(local) {
23
+ try {
24
+ var iframe = element.contentDocument;
25
+ iframe.open();
26
+ iframe.write(ko.bindingHandlers.bindIframe.tpl);
27
+ iframe.close();
28
+
29
+ try {
30
+ var iframedoc = iframe.body;
31
+ if (iframedoc) {
32
+ // scripts have to be duplicated (maybe this is not needed anymore since using string-templates)
33
+ var templates = element.contentWindow.parent.document.getElementsByTagName('script');
34
+ for (var i = 0; i < templates.length; i++) {
35
+ if (templates[i].getAttribute('type') == 'text/html' && templates[i].getAttribute('id')) {
36
+ addScriptTemplate(iframe, templates[i].getAttribute('id'), templates[i].innerHTML);
37
+ }
38
+ }
39
+
40
+ var html = iframe.getElementsByTagName("HTML");
41
+
42
+ ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
43
+ ko.cleanNode(html[0] || iframedoc);
44
+ });
45
+
46
+ ko.applyBindings(valueAccessor(), html[0] || iframedoc);
47
+ } else {
48
+ console.log("no iframedoc", local);
49
+ }
50
+ } catch (e) {
51
+ console.log("error reading iframe.body", e, local);
52
+ throw e;
53
+ }
54
+ } catch (e) {
55
+ console.log("error reading iframe contentDocument", e, local);
56
+ throw e;
57
+ // ignored
58
+ }
59
+ }
60
+ bindIframe("first call");
61
+ // older browsers needed this
62
+ // ko.utils.registerEventHandler(element, 'load', bindIframe);
63
+ }
64
+ };
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ /* globals global:false */
3
+
4
+ var ko = require("knockout");
5
+ var console = require("console");
6
+
7
+
8
+ ko.bindingHandlers['withProperties'] = {
9
+ init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
10
+ // Make a modified binding context, with a extra properties, and apply it to descendant elements
11
+ var childBindingContext = bindingContext.createChildContext(
12
+ bindingContext.$rawData,
13
+ null, // Optionally, pass a string here as an alias for the data item in descendant contexts
14
+ function(context) {
15
+ ko.utils.extend(context, valueAccessor());
16
+ }
17
+ );
18
+ ko.applyBindingsToDescendants(childBindingContext, element);
19
+
20
+ // Also tell KO *not* to bind the descendants itself, otherwise they will be bound twice
21
+ return {
22
+ controlsDescendantBindings: true
23
+ };
24
+ }
25
+ };
26
+ ko.virtualElements.allowedBindings['withProperties'] = true;
27
+
28
+ ko.bindingHandlers['log'] = {
29
+ init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
30
+ console.log("log", valueAccessor());
31
+ }
32
+ };
33
+
34
+
35
+ ko.bindingHandlers['block'] = {
36
+
37
+ templateExists: function(id) {
38
+ var el = global.document.getElementById(id);
39
+ if (el) return true;
40
+ else return false;
41
+ },
42
+
43
+ _chooseTemplate: function(isArray, prefix, action, fallback) {
44
+ var id = prefix + '-' + action;
45
+ if (ko.bindingHandlers['block'].templateExists(id)) return id;
46
+ if (typeof fallback != 'undefined' && fallback !== null) return ko.bindingHandlers['block']._chooseTemplate(isArray, prefix, fallback);
47
+ else {
48
+ var fallBackId = isArray ? 'array' : 'object-' + action;
49
+ if (ko.bindingHandlers['block'].templateExists(fallBackId)) return fallBackId;
50
+ else throw "cannot find template for " + id + "/" + fallBackId;
51
+ }
52
+ },
53
+
54
+ // compute displayMode depending on templateMode set using "withProperties" binding.
55
+ _displayMode: function(unwrapped, bindingContext) {
56
+ var prefix = typeof unwrapped.type != 'undefined' ? ko.utils.unwrapObservable(unwrapped.type) : 'notablock-' + typeof(unwrapped);
57
+ var isArray = typeof unwrapped.splice !== 'undefined';
58
+ var templateMode = bindingContext.templateMode ? bindingContext.templateMode : 'show';
59
+ return ko.bindingHandlers['block']._chooseTemplate(isArray, prefix, templateMode, bindingContext.templateModeFallback);
60
+ },
61
+
62
+ _makeTemplateValueAccessor: function(valueAccessor, bindingContext) {
63
+ return function() {
64
+ var value = valueAccessor(),
65
+ unwrappedValue = ko.utils.peekObservable(value); // Unwrap without setting a dependency here
66
+
67
+ // If unwrappedValue.data is the array, preserve all relevant options and unwrap again value so we get updates
68
+ var modelValue;
69
+ var template;
70
+
71
+ if ((!unwrappedValue) || (typeof unwrappedValue.data != 'object' && typeof unwrappedValue.data != 'function')) {
72
+ modelValue = value;
73
+ } else {
74
+ modelValue = unwrappedValue.data;
75
+ if (typeof unwrappedValue.template != 'undefined') {
76
+ var templateParam = ko.utils.unwrapObservable(unwrappedValue.template);
77
+ var templateMode = bindingContext.templateMode ? bindingContext.templateMode : 'show';
78
+ template = ko.bindingHandlers['block']._chooseTemplate(false, templateParam, templateMode, bindingContext.templateModeFallback);
79
+ }
80
+ }
81
+
82
+ var unwrappedModelValue = ko.utils.unwrapObservable(modelValue);
83
+ if (ko.isObservable(unwrappedModelValue)) console.log("doubleObservable", unwrappedModelValue);
84
+
85
+ if (typeof template == 'undefined') {
86
+ // NOTE IE8 used to break here, but we don't support it anymore, so maybe this is not needed.
87
+ if (modelValue === undefined) {
88
+ template = 'empty';
89
+ } else {
90
+ try {
91
+ template = ko.bindingHandlers['block']._displayMode(unwrappedModelValue, bindingContext);
92
+ } catch (e) {
93
+ console.log(e, unwrappedModelValue, bindingContext['$data'], bindingContext.templateMode);
94
+ throw e;
95
+ }
96
+ }
97
+ }
98
+
99
+ return {
100
+ 'name': template,
101
+ 'data': modelValue,
102
+ 'templateEngine': ko.nativeTemplateEngine.instance
103
+ };
104
+ };
105
+ },
106
+
107
+ 'init': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
108
+ if (typeof valueAccessor() === 'undefined') console.log("found a null block: check ending commas in arrays defs in IE");
109
+ var newValueAccessor = ko.bindingHandlers['block']._makeTemplateValueAccessor(valueAccessor, bindingContext);
110
+ return ko.bindingHandlers['template']['init'](element, newValueAccessor);
111
+ },
112
+ 'update': function(element, valueAccessor, allBindings, viewModel, bindingContext) {
113
+ var newValueAccessor = ko.bindingHandlers['block']._makeTemplateValueAccessor(valueAccessor, bindingContext);
114
+ return ko.bindingHandlers['template']['update'](element, newValueAccessor, allBindings, viewModel, bindingContext);
115
+ }
116
+ };
117
+ ko.expressionRewriting.bindingRewriteValidators['block'] = false; // Can't rewrite control flow bindings
118
+ ko.virtualElements.allowedBindings['block'] = true;