lady_josephine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/fonts/lady_josephine/icons/icons.eot +0 -0
  5. data/app/assets/fonts/lady_josephine/icons/icons.svg +215 -0
  6. data/app/assets/fonts/lady_josephine/icons/icons.ttf +0 -0
  7. data/app/assets/fonts/lady_josephine/icons/icons.woff +0 -0
  8. data/app/assets/javascripts/lady_josephine/blocks/facebook.js +25 -0
  9. data/app/assets/javascripts/lady_josephine/blocks/instagram.js +22 -0
  10. data/app/assets/javascripts/lady_josephine/blocks/soundcloud.js +24 -0
  11. data/app/assets/javascripts/lady_josephine/blocks/twitter.js +25 -0
  12. data/app/assets/javascripts/lady_josephine/blocks/vimeo.js +55 -0
  13. data/app/assets/javascripts/lady_josephine/blocks/youtube.js +64 -0
  14. data/app/assets/javascripts/lady_josephine/editor.js +40 -0
  15. data/app/assets/javascripts/lady_josephine/lady_josephine.js +4 -0
  16. data/app/assets/javascripts/lady_josephine/lady_josephine_view.js +6 -0
  17. data/app/assets/stylesheets/lady_josephine/content.sass +33 -0
  18. data/app/assets/stylesheets/lady_josephine/icons.sass +175 -0
  19. data/app/assets/stylesheets/lady_josephine/lady_josephine.sass +6 -0
  20. data/app/assets/stylesheets/lady_josephine/sir_trevor.sass +619 -0
  21. data/app/assets/stylesheets/lady_josephine/vars.sass +36 -0
  22. data/app/controllers/lady_josephine/application_controller.rb +4 -0
  23. data/app/controllers/lady_josephine/editor_controller.rb +40 -0
  24. data/app/controllers/lady_josephine/images_controller.rb +26 -0
  25. data/app/helpers/lady_josephine/helper.rb +25 -0
  26. data/app/helpers/lady_josephine/sir_trevor_helper.rb +172 -0
  27. data/app/models/lady_josephine/concerns/model.rb +29 -0
  28. data/app/models/lady_josephine/concerns/pingable.rb +28 -0
  29. data/app/models/lady_josephine/concerns/server_uuid.rb +24 -0
  30. data/app/models/lady_josephine/concerns/sir_trevor_images.rb +38 -0
  31. data/app/models/lady_josephine/image.rb +41 -0
  32. data/app/uploader/lady_josephine/base_uploader.rb +47 -0
  33. data/app/uploader/lady_josephine/image_uploader.rb +149 -0
  34. data/app/views/lady_josephine/blocks/_audio_block.haml +2 -0
  35. data/app/views/lady_josephine/blocks/_definition_block.haml +4 -0
  36. data/app/views/lady_josephine/blocks/_divider_block.haml +2 -0
  37. data/app/views/lady_josephine/blocks/_extended_image_block.haml +63 -0
  38. data/app/views/lady_josephine/blocks/_extended_quote_block.haml +5 -0
  39. data/app/views/lady_josephine/blocks/_extended_tweet_block.haml +2 -0
  40. data/app/views/lady_josephine/blocks/_facebook_post_block.haml +2 -0
  41. data/app/views/lady_josephine/blocks/_heading_block.haml +2 -0
  42. data/app/views/lady_josephine/blocks/_html_block.haml +1 -0
  43. data/app/views/lady_josephine/blocks/_instagram_block.haml +2 -0
  44. data/app/views/lady_josephine/blocks/_list_block.haml +3 -0
  45. data/app/views/lady_josephine/blocks/_quote_block.haml +5 -0
  46. data/app/views/lady_josephine/blocks/_text_block.html.haml +2 -0
  47. data/app/views/lady_josephine/blocks/_video_block.haml +9 -0
  48. data/config/routes.rb +9 -0
  49. data/db/migrate/20160222151500_lady_josephine_image.rb +18 -0
  50. data/lib/generators/lady_josephine_migration/USAGE +9 -0
  51. data/lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb +17 -0
  52. data/lib/generators/lady_josephine_migration/templates/migration.rb +9 -0
  53. data/lib/lady_josephine.rb +18 -0
  54. data/lib/lady_josephine/engine.rb +18 -0
  55. data/lib/lady_josephine/redcarpet/custom_markdown_formatter.rb +63 -0
  56. data/lib/lady_josephine/renderer/sir_trevor_renderer.rb +16 -0
  57. data/lib/lady_josephine/version.rb +3 -0
  58. data/lib/lady_josephine/whitelist.rb +26 -0
  59. data/lib/tasks/lady_josephine_tasks.rake +4 -0
  60. data/spec/controllers/lady_josephine/editor_controller_spec.rb +58 -0
  61. data/spec/dummy/README.rdoc +28 -0
  62. data/spec/dummy/Rakefile +6 -0
  63. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  64. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  65. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  66. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  67. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  68. data/spec/dummy/bin/bundle +3 -0
  69. data/spec/dummy/bin/rails +4 -0
  70. data/spec/dummy/bin/rake +4 -0
  71. data/spec/dummy/bin/setup +29 -0
  72. data/spec/dummy/config.ru +4 -0
  73. data/spec/dummy/config/application.rb +26 -0
  74. data/spec/dummy/config/boot.rb +5 -0
  75. data/spec/dummy/config/database.yml +25 -0
  76. data/spec/dummy/config/environment.rb +5 -0
  77. data/spec/dummy/config/environments/development.rb +41 -0
  78. data/spec/dummy/config/environments/production.rb +79 -0
  79. data/spec/dummy/config/environments/test.rb +42 -0
  80. data/spec/dummy/config/initializers/assets.rb +11 -0
  81. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  82. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  83. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  84. data/spec/dummy/config/initializers/inflections.rb +16 -0
  85. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  86. data/spec/dummy/config/initializers/session_store.rb +3 -0
  87. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  88. data/spec/dummy/config/locales/en.yml +23 -0
  89. data/spec/dummy/config/routes.rb +4 -0
  90. data/spec/dummy/config/secrets.yml +22 -0
  91. data/spec/dummy/db/development.sqlite3 +0 -0
  92. data/spec/dummy/db/schema.rb +16 -0
  93. data/spec/dummy/db/test.sqlite3 +0 -0
  94. data/spec/dummy/log/bla +0 -0
  95. data/spec/dummy/public/404.html +67 -0
  96. data/spec/dummy/public/422.html +67 -0
  97. data/spec/dummy/public/500.html +66 -0
  98. data/spec/dummy/public/favicon.ico +0 -0
  99. data/spec/spec_helper.rb +17 -0
  100. data/vendor/assets/components/Eventable/README.md +12 -0
  101. data/vendor/assets/components/Eventable/bower.json +10 -0
  102. data/vendor/assets/components/Eventable/component.json +11 -0
  103. data/vendor/assets/components/Eventable/eventable.js +207 -0
  104. data/vendor/assets/components/Eventable/package.json +15 -0
  105. data/vendor/assets/components/jquery-autosize/bower.json +30 -0
  106. data/vendor/assets/components/jquery-autosize/demo.html +36 -0
  107. data/vendor/assets/components/jquery-autosize/jquery.autosize.js +273 -0
  108. data/vendor/assets/components/jquery-autosize/jquery.autosize.min.js +6 -0
  109. data/vendor/assets/components/jquery-autosize/package.json +32 -0
  110. data/vendor/assets/components/jquery-autosize/readme.md +216 -0
  111. data/vendor/assets/components/jquery/AUTHORS.txt +163 -0
  112. data/vendor/assets/components/jquery/CONTRIBUTING.md +216 -0
  113. data/vendor/assets/components/jquery/Gruntfile.js +496 -0
  114. data/vendor/assets/components/jquery/MIT-LICENSE.txt +21 -0
  115. data/vendor/assets/components/jquery/README.md +415 -0
  116. data/vendor/assets/components/jquery/build/release-notes.js +59 -0
  117. data/vendor/assets/components/jquery/build/release.js +246 -0
  118. data/vendor/assets/components/jquery/component.json +13 -0
  119. data/vendor/assets/components/jquery/composer.json +35 -0
  120. data/vendor/assets/components/jquery/jquery-migrate.js +496 -0
  121. data/vendor/assets/components/jquery/jquery-migrate.min.js +3 -0
  122. data/vendor/assets/components/jquery/jquery.js +9597 -0
  123. data/vendor/assets/components/jquery/jquery.min.js +5 -0
  124. data/vendor/assets/components/jquery/jquery.min.map +1 -0
  125. data/vendor/assets/components/jquery/package.json +39 -0
  126. data/vendor/assets/components/jquery/speed/benchmark.js +15 -0
  127. data/vendor/assets/components/jquery/speed/benchmarker.css +65 -0
  128. data/vendor/assets/components/jquery/speed/benchmarker.js +181 -0
  129. data/vendor/assets/components/jquery/speed/closest.html +39 -0
  130. data/vendor/assets/components/jquery/speed/css.html +82 -0
  131. data/vendor/assets/components/jquery/speed/event.html +58 -0
  132. data/vendor/assets/components/jquery/speed/filter.html +183 -0
  133. data/vendor/assets/components/jquery/speed/find.html +179 -0
  134. data/vendor/assets/components/jquery/speed/index.html +72 -0
  135. data/vendor/assets/components/jquery/speed/jquery-basis.js +6238 -0
  136. data/vendor/assets/components/jquery/speed/slice.vs.concat.html +47 -0
  137. data/vendor/assets/components/jquery/src/ajax.js +851 -0
  138. data/vendor/assets/components/jquery/src/ajax/jsonp.js +80 -0
  139. data/vendor/assets/components/jquery/src/ajax/script.js +86 -0
  140. data/vendor/assets/components/jquery/src/ajax/xhr.js +207 -0
  141. data/vendor/assets/components/jquery/src/attributes.js +661 -0
  142. data/vendor/assets/components/jquery/src/callbacks.js +196 -0
  143. data/vendor/assets/components/jquery/src/core.js +949 -0
  144. data/vendor/assets/components/jquery/src/css.js +679 -0
  145. data/vendor/assets/components/jquery/src/data.js +340 -0
  146. data/vendor/assets/components/jquery/src/deferred.js +141 -0
  147. data/vendor/assets/components/jquery/src/deprecated.js +4 -0
  148. data/vendor/assets/components/jquery/src/dimensions.js +41 -0
  149. data/vendor/assets/components/jquery/src/effects.js +730 -0
  150. data/vendor/assets/components/jquery/src/event-alias.js +15 -0
  151. data/vendor/assets/components/jquery/src/event.js +991 -0
  152. data/vendor/assets/components/jquery/src/exports.js +18 -0
  153. data/vendor/assets/components/jquery/src/intro.js +20 -0
  154. data/vendor/assets/components/jquery/src/manipulation.js +796 -0
  155. data/vendor/assets/components/jquery/src/offset.js +169 -0
  156. data/vendor/assets/components/jquery/src/outro.js +2 -0
  157. data/vendor/assets/components/jquery/src/queue.js +147 -0
  158. data/vendor/assets/components/jquery/src/serialize.js +99 -0
  159. data/vendor/assets/components/jquery/src/sizzle-jquery.js +9 -0
  160. data/vendor/assets/components/jquery/src/support.js +241 -0
  161. data/vendor/assets/components/jquery/src/traversing.js +275 -0
  162. data/vendor/assets/components/jquery/test/csp.php +16 -0
  163. data/vendor/assets/components/jquery/test/data/1x1.jpg +0 -0
  164. data/vendor/assets/components/jquery/test/data/ajax/unreleasedXHR.html +25 -0
  165. data/vendor/assets/components/jquery/test/data/atom+xml.php +4 -0
  166. data/vendor/assets/components/jquery/test/data/badcall.js +1 -0
  167. data/vendor/assets/components/jquery/test/data/badjson.js +1 -0
  168. data/vendor/assets/components/jquery/test/data/cleanScript.html +10 -0
  169. data/vendor/assets/components/jquery/test/data/core/cc_on.html +22 -0
  170. data/vendor/assets/components/jquery/test/data/dashboard.xml +11 -0
  171. data/vendor/assets/components/jquery/test/data/dimensions/documentLarge.html +17 -0
  172. data/vendor/assets/components/jquery/test/data/dimensions/documentSmall.html +21 -0
  173. data/vendor/assets/components/jquery/test/data/echoData.php +1 -0
  174. data/vendor/assets/components/jquery/test/data/echoQuery.php +1 -0
  175. data/vendor/assets/components/jquery/test/data/errorWithText.php +5 -0
  176. data/vendor/assets/components/jquery/test/data/etag.php +21 -0
  177. data/vendor/assets/components/jquery/test/data/evalScript.php +1 -0
  178. data/vendor/assets/components/jquery/test/data/event/longLoadScript.php +4 -0
  179. data/vendor/assets/components/jquery/test/data/event/promiseReady.html +17 -0
  180. data/vendor/assets/components/jquery/test/data/event/syncReady.html +23 -0
  181. data/vendor/assets/components/jquery/test/data/headers.php +18 -0
  182. data/vendor/assets/components/jquery/test/data/if_modified_since.php +20 -0
  183. data/vendor/assets/components/jquery/test/data/iframe.html +8 -0
  184. data/vendor/assets/components/jquery/test/data/jquery-1.8.2.ajax_xhr.min.js +2 -0
  185. data/vendor/assets/components/jquery/test/data/json.php +13 -0
  186. data/vendor/assets/components/jquery/test/data/json_obj.js +1 -0
  187. data/vendor/assets/components/jquery/test/data/jsonp.php +14 -0
  188. data/vendor/assets/components/jquery/test/data/manipulation/iframe-denied.html +36 -0
  189. data/vendor/assets/components/jquery/test/data/name.html +1 -0
  190. data/vendor/assets/components/jquery/test/data/name.php +24 -0
  191. data/vendor/assets/components/jquery/test/data/nocontent.php +5 -0
  192. data/vendor/assets/components/jquery/test/data/offset/absolute.html +41 -0
  193. data/vendor/assets/components/jquery/test/data/offset/body.html +26 -0
  194. data/vendor/assets/components/jquery/test/data/offset/fixed.html +34 -0
  195. data/vendor/assets/components/jquery/test/data/offset/relative.html +31 -0
  196. data/vendor/assets/components/jquery/test/data/offset/scroll.html +39 -0
  197. data/vendor/assets/components/jquery/test/data/offset/static.html +31 -0
  198. data/vendor/assets/components/jquery/test/data/offset/table.html +43 -0
  199. data/vendor/assets/components/jquery/test/data/params_html.php +12 -0
  200. data/vendor/assets/components/jquery/test/data/readywaitasset.js +1 -0
  201. data/vendor/assets/components/jquery/test/data/readywaitloader.js +25 -0
  202. data/vendor/assets/components/jquery/test/data/script.php +11 -0
  203. data/vendor/assets/components/jquery/test/data/selector/html5_selector.html +114 -0
  204. data/vendor/assets/components/jquery/test/data/selector/sizzle_cache.html +21 -0
  205. data/vendor/assets/components/jquery/test/data/statusText.php +5 -0
  206. data/vendor/assets/components/jquery/test/data/support/bodyBackground.html +28 -0
  207. data/vendor/assets/components/jquery/test/data/support/shrinkWrapBlocks.html +23 -0
  208. data/vendor/assets/components/jquery/test/data/support/testElementCrash.html +17 -0
  209. data/vendor/assets/components/jquery/test/data/test.html +7 -0
  210. data/vendor/assets/components/jquery/test/data/test.js +3 -0
  211. data/vendor/assets/components/jquery/test/data/test.php +7 -0
  212. data/vendor/assets/components/jquery/test/data/test2.html +5 -0
  213. data/vendor/assets/components/jquery/test/data/test3.html +3 -0
  214. data/vendor/assets/components/jquery/test/data/testinit.js +269 -0
  215. data/vendor/assets/components/jquery/test/data/testrunner.js +368 -0
  216. data/vendor/assets/components/jquery/test/data/testsuite.css +155 -0
  217. data/vendor/assets/components/jquery/test/data/text.php +12 -0
  218. data/vendor/assets/components/jquery/test/data/ua.txt +272 -0
  219. data/vendor/assets/components/jquery/test/data/with_fries.xml +25 -0
  220. data/vendor/assets/components/jquery/test/data/with_fries_over_jsonp.php +7 -0
  221. data/vendor/assets/components/jquery/test/delegatetest.html +228 -0
  222. data/vendor/assets/components/jquery/test/hovertest.html +158 -0
  223. data/vendor/assets/components/jquery/test/index.html +330 -0
  224. data/vendor/assets/components/jquery/test/localfile.html +75 -0
  225. data/vendor/assets/components/jquery/test/networkerror.html +84 -0
  226. data/vendor/assets/components/jquery/test/polluted.php +110 -0
  227. data/vendor/assets/components/jquery/test/readywait.html +70 -0
  228. data/vendor/assets/components/jquery/test/unit/ajax.js +1971 -0
  229. data/vendor/assets/components/jquery/test/unit/attributes.js +1332 -0
  230. data/vendor/assets/components/jquery/test/unit/callbacks.js +326 -0
  231. data/vendor/assets/components/jquery/test/unit/core.js +1332 -0
  232. data/vendor/assets/components/jquery/test/unit/css.js +1036 -0
  233. data/vendor/assets/components/jquery/test/unit/data.js +636 -0
  234. data/vendor/assets/components/jquery/test/unit/deferred.js +440 -0
  235. data/vendor/assets/components/jquery/test/unit/deprecated.js +1 -0
  236. data/vendor/assets/components/jquery/test/unit/dimensions.js +461 -0
  237. data/vendor/assets/components/jquery/test/unit/effects.js +2050 -0
  238. data/vendor/assets/components/jquery/test/unit/event.js +2690 -0
  239. data/vendor/assets/components/jquery/test/unit/exports.js +7 -0
  240. data/vendor/assets/components/jquery/test/unit/manipulation.js +2242 -0
  241. data/vendor/assets/components/jquery/test/unit/offset.js +549 -0
  242. data/vendor/assets/components/jquery/test/unit/queue.js +316 -0
  243. data/vendor/assets/components/jquery/test/unit/selector.js +185 -0
  244. data/vendor/assets/components/jquery/test/unit/serialize.js +146 -0
  245. data/vendor/assets/components/jquery/test/unit/support.js +384 -0
  246. data/vendor/assets/components/jquery/test/unit/traversing.js +667 -0
  247. data/vendor/assets/components/jquery/test/xhtml.php +5 -0
  248. data/vendor/assets/components/sir-trevor-js/CHANGELOG.md +44 -0
  249. data/vendor/assets/components/sir-trevor-js/Gemfile +3 -0
  250. data/vendor/assets/components/sir-trevor-js/Gemfile.lock +10 -0
  251. data/vendor/assets/components/sir-trevor-js/Gruntfile.js +109 -0
  252. data/vendor/assets/components/sir-trevor-js/MIT-LICENCE +20 -0
  253. data/vendor/assets/components/sir-trevor-js/Readme.md +84 -0
  254. data/vendor/assets/components/sir-trevor-js/bower.json +21 -0
  255. data/vendor/assets/components/sir-trevor-js/component.json +42 -0
  256. data/vendor/assets/components/sir-trevor-js/contributing.md +74 -0
  257. data/vendor/assets/components/sir-trevor-js/examples-component/component.json +14 -0
  258. data/vendor/assets/components/sir-trevor-js/examples-component/index.html +33 -0
  259. data/vendor/assets/components/sir-trevor-js/examples-component/index.js +29 -0
  260. data/vendor/assets/components/sir-trevor-js/examples-component/javascript/example_block.js +203 -0
  261. data/vendor/assets/components/sir-trevor-js/examples-component/javascript/limit_chars.js +46 -0
  262. data/vendor/assets/components/sir-trevor-js/examples-component/sir-trevor.gif +0 -0
  263. data/vendor/assets/components/sir-trevor-js/locales/cn.js +51 -0
  264. data/vendor/assets/components/sir-trevor-js/locales/de.js +51 -0
  265. data/vendor/assets/components/sir-trevor-js/locales/es.js +51 -0
  266. data/vendor/assets/components/sir-trevor-js/locales/fi.js +51 -0
  267. data/vendor/assets/components/sir-trevor-js/locales/fr.js +51 -0
  268. data/vendor/assets/components/sir-trevor-js/locales/pt.js +52 -0
  269. data/vendor/assets/components/sir-trevor-js/package.json +23 -0
  270. data/vendor/assets/components/sir-trevor-js/sir-trevor-icons.css +6 -0
  271. data/vendor/assets/components/sir-trevor-js/sir-trevor.css +393 -0
  272. data/vendor/assets/components/sir-trevor-js/sir-trevor.css.map +7 -0
  273. data/vendor/assets/components/sir-trevor-js/sir-trevor.js +5481 -0
  274. data/vendor/assets/components/sir-trevor-js/sir-trevor.min.js +13 -0
  275. data/vendor/assets/components/underscore/CNAME +1 -0
  276. data/vendor/assets/components/underscore/CONTRIBUTING.md +9 -0
  277. data/vendor/assets/components/underscore/LICENSE +22 -0
  278. data/vendor/assets/components/underscore/README.md +19 -0
  279. data/vendor/assets/components/underscore/Rakefile +10 -0
  280. data/vendor/assets/components/underscore/docs/docco.css +192 -0
  281. data/vendor/assets/components/underscore/docs/favicon.ico +0 -0
  282. data/vendor/assets/components/underscore/docs/images/background.png +0 -0
  283. data/vendor/assets/components/underscore/docs/images/underscore.png +0 -0
  284. data/vendor/assets/components/underscore/docs/underscore.html +823 -0
  285. data/vendor/assets/components/underscore/favicon.ico +0 -0
  286. data/vendor/assets/components/underscore/index.html +2467 -0
  287. data/vendor/assets/components/underscore/index.js +1 -0
  288. data/vendor/assets/components/underscore/package.json +16 -0
  289. data/vendor/assets/components/underscore/test/arrays.js +200 -0
  290. data/vendor/assets/components/underscore/test/chaining.js +59 -0
  291. data/vendor/assets/components/underscore/test/collections.js +453 -0
  292. data/vendor/assets/components/underscore/test/functions.js +265 -0
  293. data/vendor/assets/components/underscore/test/index.html +44 -0
  294. data/vendor/assets/components/underscore/test/objects.js +570 -0
  295. data/vendor/assets/components/underscore/test/speed.js +75 -0
  296. data/vendor/assets/components/underscore/test/utility.js +266 -0
  297. data/vendor/assets/components/underscore/test/vendor/jquery.js +9404 -0
  298. data/vendor/assets/components/underscore/test/vendor/jslitmus.js +670 -0
  299. data/vendor/assets/components/underscore/test/vendor/qunit.css +235 -0
  300. data/vendor/assets/components/underscore/test/vendor/qunit.js +1977 -0
  301. data/vendor/assets/components/underscore/test/vendor/runner.js +98 -0
  302. data/vendor/assets/components/underscore/underscore-min.js +1 -0
  303. data/vendor/assets/components/underscore/underscore.js +1226 -0
  304. metadata +473 -0
@@ -0,0 +1,5 @@
1
+ <?php
2
+ # Load and run the test suite as a proper XHTML page
3
+ header("Content-type: application/xhtml+xml");
4
+ readfile("index.html");
5
+ ?>
@@ -0,0 +1,44 @@
1
+ # Changelog
2
+
3
+ ## 0.3.3
4
+
5
+ * Refactored upload triggers, now handled by Ajaxable mixin
6
+ * Slight change to the `Image` block – no longer sets the button title to 'Please wait...' on upload
7
+ * Escaped `class` names and other minor fixes so including ST doesn't blow up IE 7 / 8
8
+ * Added `toMarkdown` `aggresiveHTMLStrip` default to not strip tags that have whitespace after the opening `<` character (#168)
9
+ * Pass the block to the `block:remove` trigger
10
+ * Add the block ID to all other block triggers
11
+
12
+ ## 0.3.2
13
+
14
+ * Added new controllable mixin for adding new functionality to blocks (https://github.com/madebymany/sir-trevor-js/pull/118)
15
+ * Removed Source Sans from the CSS file
16
+ * Added a dataType: 'json' to the uploader
17
+ * Added a `getInstance` method to retrieve editor instances
18
+ * Fixed `.st-text-block--heading` class to have `min-height: 0` not `auto`.
19
+ * Added mailto support to the link regex
20
+
21
+ ## 0.3.1
22
+
23
+ * Localise titles of the tweet & heading blocks
24
+ * Defer the execution of internationalising the delete text, drop text, upload text and list block cite text until Sir Trevor has intialised.
25
+ * Add the heading title to the locales files
26
+ * Swap the onBlockRender method to be executed *after* the block $el is appended onto the DOM by emitting an event
27
+ * Added a `destroy` method for all Renderable views
28
+ * Added a `destroy` and `reinitialize` method for a `SirTrevor.Editor` instance
29
+ * Modified the Video block to allow for more providers to be added.
30
+
31
+ ## 0.3.0
32
+
33
+ * I18n support (in EN / DE) using the new `i18n.t` helper
34
+ * Support for the I18next library (optional dependency)
35
+ * Add support for Underscore >= 1.5.0
36
+ * Support for multi-worded block types like OrderedList through snake casing on the block type
37
+ * Better markdown support for italics and bolds, fixes issue with markdown hating on spaces.
38
+ * Improved paste support, stripping out comments and other nasties
39
+ * Improved the format bar positioning
40
+ * Moved the Eventable block into it's own repository
41
+ * Remove blocks instantly if they are empty
42
+ * Add method to define if a block is empty (`isEmpty`)
43
+ * Fix the formatters not being called in `to-html.js` and `to-markdown.js`
44
+ * Use all inputs in `toData` not just `text` inputs. Note inputs must have a `name` attribute to be included in the serialized content.
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'sass', '~> 3.3.0'
@@ -0,0 +1,10 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ sass (3.3.14)
5
+
6
+ PLATFORMS
7
+ ruby
8
+
9
+ DEPENDENCIES
10
+ sass (~> 3.3.0)
@@ -0,0 +1,109 @@
1
+ /*global module:false*/
2
+ module.exports = function(grunt) {
3
+
4
+ var banner = ['/*!',
5
+ ' * Sir Trevor JS v<%= pkg.version %>',
6
+ ' *',
7
+ ' * Released under the MIT license',
8
+ ' * www.opensource.org/licenses/MIT',
9
+ ' *',
10
+ ' * <%= grunt.template.today("yyyy-mm-dd") %>',
11
+ ' */\n\n'
12
+ ].join("\n");
13
+
14
+ grunt.loadNpmTasks('grunt-rigger');
15
+ grunt.loadNpmTasks('grunt-contrib-jshint');
16
+ grunt.loadNpmTasks('grunt-contrib-uglify');
17
+ grunt.loadNpmTasks('grunt-contrib-watch');
18
+ grunt.loadNpmTasks('grunt-contrib-sass');
19
+
20
+ grunt.initConfig({
21
+
22
+ pkg: grunt.file.readJSON('package.json'),
23
+
24
+ 'jasmine' : {
25
+ 'sir-trevor': {
26
+ src : 'sir-trevor.js',
27
+ options: {
28
+ vendor: ['bower_components/jquery/jquery.js',
29
+ 'bower_components/underscore/underscore.js',
30
+ 'bower_components/Eventable/eventable.js'],
31
+ specs : 'spec/javascripts/**/*.spec.js',
32
+ helpers : 'spec/javascripts/helpers/*.js'
33
+ }
34
+ }
35
+ },
36
+
37
+ rig: {
38
+ build: {
39
+ options: {
40
+ banner: banner
41
+ },
42
+ files: {
43
+ 'sir-trevor.js': ['src/sir-trevor.js']
44
+ }
45
+ }
46
+ },
47
+
48
+ uglify: {
49
+ options: {
50
+ mangle: false,
51
+ banner: banner
52
+ },
53
+ standard: {
54
+ files: {
55
+ 'sir-trevor.min.js': ['sir-trevor.js']
56
+ }
57
+ }
58
+ },
59
+
60
+ watch: {
61
+ scripts: {
62
+ files: ['src/*.js', 'src/**/*.js', 'src/sass/*.scss'],
63
+ tasks: ['sass', 'rig']
64
+ }
65
+ },
66
+
67
+ jshint: {
68
+ all: ['sir-trevor.js'],
69
+
70
+ options: {
71
+ curly: true,
72
+ eqeqeq: true,
73
+ immed: false,
74
+ latedef: true,
75
+ newcap: true,
76
+ noarg: true,
77
+ sub: true,
78
+ undef: true,
79
+ boss: true,
80
+ eqnull: true,
81
+ browser: true
82
+ },
83
+ globals: {
84
+ jQuery: true,
85
+ _: true,
86
+ console: true
87
+ }
88
+ },
89
+
90
+ sass: {
91
+ dist: {
92
+ files: {
93
+ 'sir-trevor.css': 'src/sass/main.scss'
94
+ }
95
+ }
96
+ }
97
+
98
+ });
99
+
100
+ // Default task.
101
+ grunt.loadNpmTasks('grunt-contrib-jasmine');
102
+
103
+ grunt.registerTask('travis', ['rig', 'jasmine']);
104
+
105
+ grunt.registerTask('default', ['sass', 'rig', 'uglify', 'jasmine']);
106
+
107
+ grunt.registerTask('jasmine-browser', ['server','watch']);
108
+
109
+ };
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011-2012 by ITV plc - http://www.itv.com
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,84 @@
1
+ # Sir Trevor
2
+
3
+ [![Build Status](https://travis-ci.org/madebymany/sir-trevor-js.png?branch=master)](https://travis-ci.org/madebymany/sir-trevor-js/)
4
+
5
+ ![Sir Trevor in action](https://raw.github.com/madebymany/sir-trevor-js/master/examples/sir-trevor.gif)
6
+
7
+ Conceived by [Andrew Sprinz](http://github.com/andrewsprinz). Maintained by [Chris Bell](http://github.com/cjbell88) & [Andrew Walker](http://github.com/ninjabiscuit).
8
+
9
+ ## Quick start
10
+
11
+ Full documentation can be found [here](http://madebymany.github.io/sir-trevor-js/docs.html).
12
+
13
+ ### Plain JS
14
+
15
+ - [Download the latest release](https://github.com/madebymany/sir-trevor-js/zipball/master)
16
+ - ...or clone the repo: `git clone git://github.com/madebymany/sir-trevor-js.git`
17
+ - ...or install with [Bower](http://bower.io/) ``bower install sir-trevor-js``
18
+
19
+ ### Implementations
20
+
21
+ 1. [Sir Trevor Rails](http://github.com/madebymany/sir-trevor-rails)
22
+ 2. [Umbraco 7](https://github.com/mindrevolution/SirTrevor-for-Umbraco), [Umbraco 6](http://our.umbraco.org/projects/backoffice-extensions/skybrud-sir-trevor-editor)
23
+ 3. [CakePHP](http://github.com/martinbean/cakephp-sir-trevor-plugin)
24
+ 4. [Wordpress](https://github.com/raffij/sir-trevor-wordpress)
25
+ 5. [Laravel](https://github.com/caouecs/Laravel4-SirTrevorJS)
26
+ 6. [Django](https://github.com/philippbosch/django-sirtrevor)
27
+ 7. [Yii Framework](https://github.com/DrMabuse23/yii2-sir-trevor-js)
28
+
29
+
30
+ ## Custom blocks
31
+
32
+ We are keeping a list of [custom block repos here](https://github.com/madebymany/sir-trevor-js/wiki/Custom-blocks). See the documentation to find out more about [adding your own block types](http://madebymany.github.io/sir-trevor-js/docs.html#4).
33
+
34
+ ## Browser support
35
+
36
+ Sir Trevor is only tested on the following modern browsers:
37
+
38
+ - IE10+
39
+ - Chrome 25+
40
+ - Safari 5+
41
+ - Firefox 16+
42
+
43
+ ## Dependencies
44
+
45
+ Sir Trevor requires [Underscore](http://underscorejs.org/) (or LoDash), [jQuery](http://jquery.com) (or Zepto) and [Eventable](https://github.com/madebymany/eventable).
46
+
47
+ ## Contributing
48
+
49
+ See the [roadmap](https://github.com/madebymany/sir-trevor-js/wiki/Roadmap) and read a little about [the philosophy](https://github.com/madebymany/sir-trevor-js/wiki/Philosophy) guiding development.
50
+
51
+ ### Customising the way it looks
52
+
53
+ We use [Sass](http://sass-lang.com/) for our styles, if you'd like to change the default styling please fork the repository and make changes to the Sass before recompiling.
54
+
55
+ ### Customising blocks
56
+
57
+ Block Types can also easily be added to the ``SirTrevor.Blocks`` object. You can also override the default block types (Text, Image, Tweet, Video, Quote, Heading & List) at any time. See the documentation to find out more about [adding your own block types](http://madebymany.github.io/sir-trevor-js/docs.html#4).
58
+
59
+ ### Compiling
60
+
61
+ We use the awesome [Grunt](http://gruntjs.com/) for our build process. Before getting started please be sure to install the necessary dependencies via npm:
62
+
63
+ ``$ npm install``
64
+
65
+ Make sure install the dependecies of bower. As you need jQuery, Eventable and Underscore while you are testing with Jasmine:
66
+
67
+ ``$ bower install``
68
+
69
+ When completed you'll be able to run the various grunt commands provided:
70
+
71
+ ``$ grunt``
72
+
73
+ Concatenates scripts, compiles the Sass, runs the Jasmine tests and minifies the project.
74
+
75
+ ``$ grunt watch``
76
+
77
+ Convenience method while developing to compile the Sass files and concatenate the Javascript on save of a file in the ``/src`` directory.
78
+
79
+ Please ensure any pull requests have relevant Jasmine tests (where applicable).
80
+
81
+ ## License
82
+
83
+ Sir Trevor is released under the MIT license:
84
+ [opensource.org/licenses/MIT](http://opensource.org/licenses/MIT)
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "sir-trevor-js",
3
+ "version": "0.3.2",
4
+ "main": "sir-trevor.js",
5
+ "ignore": [
6
+ "**/.*",
7
+ "node_modules",
8
+ "components",
9
+ "src",
10
+ "spec",
11
+ "examples",
12
+ "website",
13
+ "BrowserRunner.html"
14
+ ],
15
+ "dependencies": {
16
+ "underscore": "~1.4.4",
17
+ "Eventable": "~1.0.1",
18
+ "jquery": "~1.9.1",
19
+ "jquery-autosize": "~1.18.14"
20
+ }
21
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "sir-trevor-js",
3
+ "version": "0.3.2",
4
+ "description": "",
5
+ "keywords": [],
6
+ "repo": "https://github.com/madebymany/sir-trevor-js",
7
+ "local": [],
8
+ "main": "sir-trevor.js",
9
+ "scripts": [
10
+ "sir-trevor.js"
11
+ ],
12
+ "styles": [
13
+ "sir-trevor.css",
14
+ "sir-trevor-icons.css"
15
+ ],
16
+ "files": [
17
+ "public/images/icons/src/Add.svg",
18
+ "public/images/icons/src/Bin-open.svg",
19
+ "public/images/icons/src/Bin.svg",
20
+ "public/images/icons/src/Competition.svg",
21
+ "public/images/icons/src/Embed.svg",
22
+ "public/images/icons/src/Header.svg",
23
+ "public/images/icons/src/iFrame.svg",
24
+ "public/images/icons/src/Image.svg",
25
+ "public/images/icons/src/link.svg",
26
+ "public/images/icons/src/List.svg",
27
+ "public/images/icons/src/Move.svg",
28
+ "public/images/icons/src/Poll.svg",
29
+ "public/images/icons/src/Quote.svg",
30
+ "public/images/icons/src/SirTrev.json",
31
+ "public/images/icons/src/Text.svg",
32
+ "public/images/icons/src/Tweet.svg",
33
+ "public/images/icons/src/Video.svg"
34
+ ],
35
+ "license": "MIT",
36
+ "remotes": [],
37
+ "dependencies": {
38
+ "components/underscore": "*",
39
+ "components/jquery": "*",
40
+ "thinkerous/eventable": "*"
41
+ }
42
+ }
@@ -0,0 +1,74 @@
1
+ Here are a few ways you can help make SirTrevor better!
2
+
3
+ # Contributing to SirTrevor
4
+
5
+ ## Team members
6
+
7
+ [Chris Bell](https://github.com/cjbell88),
8
+ [Andy Walker](https://github.com/ninjabiscuit),
9
+ [Andrew Sprinz](https://github.com/andrewsprinz),
10
+ [Ilya Poropudas](https://github.com/ilyaporopudas)
11
+
12
+
13
+ ## Using GitHub to report issues
14
+
15
+ To file a bug report, please visit the GitHub issues page. It's great if you can attach code (test cases and fixes for bugs, and test cases and a proposed implementation for features), but reproducible bug reports are also welcome.
16
+
17
+ ## Feature requests
18
+
19
+ Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
20
+
21
+ ## Cloning master and running the test suite
22
+
23
+ To get started contributing to SirTrevor, first clone the repository and make sure you can run the test suite.
24
+
25
+ If you're not familiar with Git, visit the Git homepage to download Git for your platform. You'll also need [npm](https://github.com/npm/npm) installed with [grunt](https://github.com/gruntjs/grunt) installed globally.
26
+
27
+ First, clone the repository:
28
+
29
+ $ git clone git@github.com:madebymany/sir-trevor-js.git
30
+ $ cd sir-trevor-js
31
+
32
+ Next, run ``npm install`` to grab all of the development dependencies.
33
+
34
+ To run the test suite and build SirTrevor run ``grunt`` in the terminal.
35
+
36
+ When making changes to the source code, run ``grunt watch`` to concatenate the Sass and JS files and run the tests on the fly.
37
+
38
+ Source code lives in the ``/src`` directory and edits should be made here rather than on the top level sir-trevor.js file.
39
+
40
+ ## Documentation
41
+
42
+ You can find documentation on how to get started with SirTrevor and how to write custom blocks [here](http://madebymany.github.io/sir-trevor-js/).
43
+
44
+ The docs could always do with fleshing out with more detail and more examples so please feel free to dive in and help us make them better. The docs are located in the ``/website/source`` directory of the GitHub repository.
45
+
46
+ ## Contributing to the SirTrevor code
47
+
48
+ Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
49
+
50
+ Please ask first before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. Check the [latest milestone](https://github.com/madebymany/sir-trevor-js/issues?milestone=2&state=open) for the most pressing issues that we'd like to address before the next version.
51
+
52
+ This contribution process is based on the Ruby on Rails contribution guide. In general, include tests with new features or bugfixes, work in a feature branch until you're ready to submit or discuss your code, then fork the repository, push to your fork, and issue a pull request.
53
+
54
+ Note: When submitting a pull request for code, please don't add documentation, rebuild the annotated source code, or rebuild the minified production file -- all of those tasks are done when cutting a new release.
55
+
56
+ Don’t get discouraged! We value all contributions and just because we didn't get back to you about your pull request straight away doesn't mean we don't care.
57
+
58
+ # Blocks
59
+
60
+ There is an ever growing collection of community created Sirtrevor blocks and we'd love to expand that even further. However it is unlikely that we'll be adding more blocks to the SirTrevor core. If you would like to create a block and open source it for the community, please create a separate repository for it. By all means let us know about it (we love hearing about new blocks) and we'll include it in the [list of custom blocks](https://github.com/madebymany/sir-trevor-js/wiki/Custom-blocks) in the wiki.
61
+
62
+ See the documentation to find out more about [adding your own block types](http://madebymany.github.io/sir-trevor-js/docs.html#4).
63
+
64
+ # Implementations
65
+
66
+ SirTrevor saves json and relies on markdown parsers and third party image upload integrations. It was designed for use with Ruby on Rails and has an accompanying sir-trevor-rails project that eases the integration with that framework. If you'd like to work on integrating SirTrevor with your framework of choice we'd love to hear about it. The current list of integrations is listed in the [readme](https://github.com/madebymany/sir-trevor-js#implementations). Take a look at the sir-trevor-rails implementation for a starting point.
67
+
68
+ # Translations
69
+
70
+ We'd love SirTrevor to be available in as many languages as possible. If you would like to add a translations file it would be most welcome. Translations can be found in the ``/locales`` directory. Simply copy one of the existing translation files and replace the copy appropriately.
71
+
72
+ # Thats it
73
+
74
+ If you have further questions, contact one of the core team members or file an issue.
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "sir-trevor-js-example",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "local": [],
6
+ "scripts": [
7
+ "index.js"
8
+ ],
9
+ "license": "MIT",
10
+ "dependencies": {
11
+ "thinkerous/sir-trevor-js": "feature/addComponent",
12
+ "components/jquery": "*"
13
+ }
14
+ }
@@ -0,0 +1,33 @@
1
+ <!doctype html>
2
+ <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
3
+ <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
4
+ <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
5
+ <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9
+ <title></title>
10
+ <meta name="description" content="">
11
+ <meta name="viewport" content="width=device-width">
12
+ <link rel="stylesheet" href="./build/build.css" type="text/css" media="screen" title="no title" charset="utf-8">
13
+ <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
14
+ <style>
15
+ body {
16
+ font-family: 'Source Sans Pro', sans-serif;
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <form>
22
+ <div class="errors"></div>
23
+ <textarea class="sir-trevor" name="content"></textarea>
24
+ <input type="submit" value="Submit">
25
+ </form>
26
+
27
+ <script src="./build/build.js"></script>
28
+ <script>
29
+ require('sir-trevor-js-example');
30
+ </script>
31
+
32
+ </body>
33
+ </html>