kiteditor 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. data/POST_INSTALL +21 -0
  2. data/{vendor → app}/assets/images/mercury/button.png +0 -0
  3. data/{vendor → app}/assets/images/mercury/close.png +0 -0
  4. data/app/assets/images/mercury/default-snippet.png +0 -0
  5. data/{vendor → app}/assets/images/mercury/loading-dark.gif +0 -0
  6. data/{vendor → app}/assets/images/mercury/loading-light.gif +0 -0
  7. data/{vendor → app}/assets/images/mercury/missing-image.png +0 -0
  8. data/{vendor → app}/assets/images/mercury/search-icon.png +0 -0
  9. data/{vendor → app}/assets/images/mercury/temp-logo.png +0 -0
  10. data/app/assets/images/mercury/toolbar/editable/buttons.png +0 -0
  11. data/app/assets/images/mercury/toolbar/primary/_expander.png +0 -0
  12. data/app/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
  13. data/app/assets/images/mercury/toolbar/primary/action.png +0 -0
  14. data/app/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
  15. data/app/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
  16. data/app/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
  17. data/app/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
  18. data/app/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
  19. data/app/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
  20. data/app/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
  21. data/app/assets/images/mercury/toolbar/primary/preview.png +0 -0
  22. data/app/assets/images/mercury/toolbar/primary/redo.png +0 -0
  23. data/app/assets/images/mercury/toolbar/primary/save.png +0 -0
  24. data/app/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
  25. data/app/assets/images/mercury/toolbar/primary/tools.png +0 -0
  26. data/app/assets/images/mercury/toolbar/primary/undo.png +0 -0
  27. data/app/assets/images/mercury/toolbar/primary/user.png +0 -0
  28. data/app/assets/images/mercury/toolbar/snippets/buttons.png +0 -0
  29. data/{vendor/assets/javascripts/mercury/dependencies → app/assets/javascripts}/jquery-1.7.js +0 -0
  30. data/{vendor → app}/assets/javascripts/mercury.js +60 -87
  31. data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +0 -0
  32. data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.additions.js +103 -13
  33. data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +0 -0
  34. data/{vendor → app}/assets/javascripts/mercury/dependencies/liquidmetal.js +0 -0
  35. data/{vendor → app}/assets/javascripts/mercury/dependencies/showdown.js +0 -0
  36. data/{vendor → app}/assets/javascripts/mercury/dialog.js.coffee +0 -0
  37. data/{vendor → app}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
  38. data/{vendor → app}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
  39. data/{vendor → app}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
  40. data/{vendor → app}/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
  41. data/{vendor → app}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
  42. data/{vendor → app}/assets/javascripts/mercury/finalize.js.coffee +0 -0
  43. data/{vendor → app}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
  44. data/{vendor → app}/assets/javascripts/mercury/lightview.js.coffee +38 -17
  45. data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +201 -0
  46. data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +208 -0
  47. data/{vendor → app}/assets/javascripts/mercury/locales/de.locale.js.coffee +4 -10
  48. data/{vendor → app}/assets/javascripts/mercury/locales/es.locale.js.coffee +3 -9
  49. data/{vendor → app}/assets/javascripts/mercury/locales/example.local.js.coffee +3 -5
  50. data/{vendor → app}/assets/javascripts/mercury/locales/fr.locale.js.coffee +3 -9
  51. data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +209 -0
  52. data/{vendor → app}/assets/javascripts/mercury/locales/it.locale.js.coffee +3 -9
  53. data/{vendor → app}/assets/javascripts/mercury/locales/ko.local.js.coffee +4 -10
  54. data/{vendor → app}/assets/javascripts/mercury/locales/nl.locale.js.coffee +3 -9
  55. data/app/assets/javascripts/mercury/locales/pl.locale.js.coffee +213 -0
  56. data/{vendor → app}/assets/javascripts/mercury/locales/pt.locale.js.coffee +3 -9
  57. data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +200 -0
  58. data/{vendor → app}/assets/javascripts/mercury/locales/sv.local.js.coffee +3 -9
  59. data/{vendor → app}/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +3 -9
  60. data/app/assets/javascripts/mercury/locales/uk.locale.js.coffee +200 -0
  61. data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +203 -0
  62. data/app/assets/javascripts/mercury/mercury-compiled.js +10720 -0
  63. data/{vendor → app}/assets/javascripts/mercury/mercury.js.coffee +10 -1
  64. data/{vendor → app}/assets/javascripts/mercury/modal.js.coffee +62 -40
  65. data/{vendor → app}/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -0
  66. data/{vendor → app}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +1 -0
  67. data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +152 -0
  68. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +132 -0
  69. data/{vendor → app}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +2 -0
  70. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +68 -0
  71. data/{vendor → app}/assets/javascripts/mercury/native_extensions.js.coffee +0 -6
  72. data/{vendor → app}/assets/javascripts/mercury/page_editor.js.coffee +84 -50
  73. data/{vendor → app}/assets/javascripts/mercury/palette.js.coffee +1 -1
  74. data/{vendor → app}/assets/javascripts/mercury/panel.js.coffee +3 -2
  75. data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +2 -2
  76. data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +0 -0
  77. data/{vendor → app}/assets/javascripts/mercury/region.js.coffee +18 -17
  78. data/{vendor/assets/javascripts/mercury/regions/editable.js.coffee → app/assets/javascripts/mercury/regions/full.js.coffee} +41 -31
  79. data/app/assets/javascripts/mercury/regions/image.js.coffee +93 -0
  80. data/{vendor/assets/javascripts/mercury/regions/markupable.js.coffee → app/assets/javascripts/mercury/regions/markdown.js.coffee} +29 -24
  81. data/{vendor → app}/assets/javascripts/mercury/regions/simple.js.coffee +11 -54
  82. data/{vendor/assets/javascripts/mercury/regions/snippetable.js.coffee → app/assets/javascripts/mercury/regions/snippets.js.coffee} +10 -9
  83. data/{vendor → app}/assets/javascripts/mercury/select.js.coffee +1 -1
  84. data/app/assets/javascripts/mercury/snippet.js.coffee +136 -0
  85. data/{vendor → app}/assets/javascripts/mercury/snippet_toolbar.js.coffee +19 -6
  86. data/{vendor → app}/assets/javascripts/mercury/statusbar.js.coffee +0 -0
  87. data/{vendor → app}/assets/javascripts/mercury/support/history.js +0 -0
  88. data/{vendor → app}/assets/javascripts/mercury/table_editor.js.coffee +16 -0
  89. data/{vendor → app}/assets/javascripts/mercury/toolbar.button.js.coffee +45 -30
  90. data/{vendor → app}/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
  91. data/{vendor → app}/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -4
  92. data/{vendor → app}/assets/javascripts/mercury/toolbar.js.coffee +10 -6
  93. data/{vendor → app}/assets/javascripts/mercury/tooltip.js.coffee +0 -0
  94. data/{vendor → app}/assets/javascripts/mercury/uploader.js.coffee +37 -19
  95. data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +61 -0
  96. data/app/assets/stylesheets/_mercury-sass.scss +33 -0
  97. data/{vendor → app}/assets/stylesheets/mercury.css +1 -5
  98. data/{vendor → app}/assets/stylesheets/mercury/all_images.css.erb +6 -2
  99. data/app/assets/stylesheets/mercury/bootstrap-ish.css +1367 -0
  100. data/app/assets/stylesheets/mercury/bootstrap-overrides.css +61 -0
  101. data/{vendor → app}/assets/stylesheets/mercury/dialog.css +21 -8
  102. data/{vendor → app}/assets/stylesheets/mercury/lightview.css +6 -56
  103. data/app/assets/stylesheets/mercury/mercury.css +43 -0
  104. data/{vendor → app}/assets/stylesheets/mercury/modal.css +15 -32
  105. data/{vendor → app}/assets/stylesheets/mercury/statusbar.css +0 -0
  106. data/{vendor → app}/assets/stylesheets/mercury/toolbar.css +4 -1
  107. data/{vendor → app}/assets/stylesheets/mercury/tooltip.css +0 -0
  108. data/{vendor → app}/assets/stylesheets/mercury/uploader.css +4 -4
  109. data/app/helpers/mercury_helper.rb +7 -0
  110. data/app/views/layouts/mercury.html.erb +10 -20
  111. data/app/views/layouts/mercury.html.haml +19 -0
  112. data/app/views/layouts/mercury.html.slim +19 -0
  113. data/app/views/mercury/modals/character.html +1 -1
  114. data/app/views/mercury/modals/htmleditor.html +3 -7
  115. data/app/views/mercury/modals/link.html +37 -51
  116. data/app/views/mercury/modals/media.html +102 -0
  117. data/app/views/mercury/modals/table.html +79 -73
  118. data/app/views/mercury/panels/snippets.html +6 -1
  119. data/app/views/mercury/snippets/example/options.html.erb +23 -27
  120. data/app/views/mercury/snippets/no_options/preview.html.erb +1 -0
  121. data/config/routes.rb +9 -0
  122. data/features/generators/authentication.feature +10 -0
  123. data/features/generators/images.feature +41 -0
  124. data/features/generators/install.feature +21 -0
  125. data/features/loading/loading.feature +5 -2
  126. data/features/loading/user_interface.feature +9 -7
  127. data/features/regions/{editable → full}/advanced_editing.feature +0 -0
  128. data/features/regions/full/basic_editing.feature +198 -0
  129. data/features/regions/{editable → full}/inserting_links.feature +20 -19
  130. data/features/regions/{editable → full}/inserting_media.feature +36 -18
  131. data/features/regions/{editable → full}/inserting_snippets.feature +28 -18
  132. data/features/regions/{editable → full}/inserting_special_characters.feature +2 -2
  133. data/features/regions/full/inserting_tables.feature +109 -0
  134. data/features/regions/{editable → full}/pasting.feature +0 -0
  135. data/features/regions/{editable → full}/uploading_images.feature +0 -0
  136. data/features/regions/{markupable → image}/uploading_images.feature +0 -0
  137. data/features/regions/{markupable → markdown}/advanced_editing.feature +0 -0
  138. data/features/regions/{markupable → markdown}/basic_editing.feature +0 -0
  139. data/features/regions/{markupable → markdown}/inserting_links.feature +0 -0
  140. data/features/regions/{markupable → markdown}/inserting_media.feature +0 -0
  141. data/features/regions/{markupable → markdown}/inserting_snippets.feature +0 -0
  142. data/features/regions/{markupable → markdown}/inserting_special_characters.feature +0 -0
  143. data/features/regions/{markupable → markdown}/inserting_tables.feature +0 -0
  144. data/features/regions/{snippetable/advanced_editing.feature → markdown/uploading_images.feature} +0 -0
  145. data/features/regions/simple/basic_editing.feature +5 -0
  146. data/features/regions/{snippetable/basic_editing.feature → snippets/advanced_editing.feature} +0 -0
  147. data/features/regions/{snippetable/inserting_snippets.feature → snippets/basic_editing.feature} +0 -0
  148. data/{vendor/assets/javascripts/mercury/locales/da.locale.js.coffee → features/regions/snippets/inserting_snippets.feature} +0 -0
  149. data/features/saving/saving.feature +8 -8
  150. data/features/step_definitions/custom_web_steps.rb +22 -0
  151. data/features/step_definitions/generator_steps.rb +23 -0
  152. data/features/step_definitions/mercury_steps.rb +1 -438
  153. data/features/support/aruba.rb +28 -0
  154. data/features/support/env.rb +11 -1
  155. data/features/support/selectors.rb +23 -0
  156. data/lib/generators/mercury/install/authentication/authentication_generator.rb +17 -0
  157. data/lib/generators/mercury/install/images/images_generator.rb +47 -0
  158. data/{app/models/mercury/image.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image.rb} +7 -0
  159. data/{db/migrate/20110526035601_create_mercury_images.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image_migration.rb} +0 -0
  160. data/{app/controllers/mercury → lib/generators/mercury/install/images/templates}/images_controller.rb +0 -0
  161. data/lib/generators/mercury/install/{templates → images/templates}/mongoid_paperclip_image.rb +0 -0
  162. data/lib/generators/mercury/install/install_generator.rb +12 -23
  163. data/lib/mercury-rails.rb +1 -2
  164. data/lib/mercury/authentication.rb +1 -0
  165. data/lib/mercury/cucumber/step_definitions.rb +13 -0
  166. data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +408 -0
  167. data/{features → lib/mercury/cucumber}/support/mercury_contents.rb +3 -3
  168. data/{features → lib/mercury/cucumber}/support/mercury_selectors.rb +0 -20
  169. data/lib/mercury/engine.rb +19 -0
  170. data/lib/mercury/rails.rb +5 -0
  171. data/lib/mercury/version.rb +3 -0
  172. data/spec/dummy/Rakefile +7 -0
  173. data/spec/dummy/app/assets/javascripts/application.js +0 -0
  174. data/spec/dummy/app/assets/javascripts/prototype.js +6082 -0
  175. data/spec/dummy/app/assets/stylesheets/application.css.scss +110 -0
  176. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  177. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  178. data/spec/dummy/app/views/layouts/mercury.html.erb +28 -0
  179. data/spec/dummy/config.ru +4 -0
  180. data/spec/dummy/config/application.rb +58 -0
  181. data/spec/dummy/config/boot.rb +10 -0
  182. data/spec/dummy/config/database.yml +10 -0
  183. data/spec/dummy/config/environment.rb +5 -0
  184. data/spec/dummy/config/environments/development.rb +37 -0
  185. data/spec/dummy/config/environments/production.rb +67 -0
  186. data/spec/dummy/config/environments/test.rb +37 -0
  187. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  188. data/spec/dummy/config/initializers/inflections.rb +15 -0
  189. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  190. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  191. data/spec/dummy/config/initializers/session_store.rb +8 -0
  192. data/spec/dummy/config/initializers/teabag.rb +9 -0
  193. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  194. data/spec/dummy/config/locales/en.yml +5 -0
  195. data/spec/dummy/config/routes.rb +5 -0
  196. data/spec/dummy/db/.gitkeep +0 -0
  197. data/spec/dummy/public/500.html +25 -0
  198. data/spec/dummy/public/blank.html +1 -0
  199. data/spec/dummy/public/favicon.ico +0 -0
  200. data/spec/dummy/public/images/bunny.gif +0 -0
  201. data/spec/dummy/public/images/bunny2.jpg +0 -0
  202. data/spec/dummy/public/index.html +279 -0
  203. data/spec/dummy/script/rails +6 -0
  204. data/spec/javascripts/{templates → fixtures}/mercury/dialog.html +0 -0
  205. data/spec/javascripts/{templates → fixtures}/mercury/dialogs/backcolor.html +0 -0
  206. data/spec/javascripts/{templates → fixtures}/mercury/dialogs/forecolor.html +0 -0
  207. data/spec/javascripts/{templates → fixtures}/mercury/dialogs/formatblock.html +0 -0
  208. data/spec/javascripts/{templates → fixtures}/mercury/dialogs/snippetpanel.html +0 -0
  209. data/spec/javascripts/{templates → fixtures}/mercury/dialogs/style.html +0 -0
  210. data/spec/javascripts/{templates → fixtures}/mercury/lightview.html +0 -0
  211. data/spec/javascripts/{templates → fixtures}/mercury/modal.html +0 -0
  212. data/spec/javascripts/{templates → fixtures}/mercury/modals/htmleditor.html +0 -0
  213. data/spec/javascripts/{templates → fixtures}/mercury/modals/insertcharacter.html +0 -0
  214. data/spec/javascripts/fixtures/mercury/modals/insertlink.html +67 -0
  215. data/spec/javascripts/fixtures/mercury/modals/insertmedia.html +87 -0
  216. data/spec/javascripts/{templates → fixtures}/mercury/modals/insertsnippet.html +0 -0
  217. data/spec/javascripts/fixtures/mercury/modals/inserttable.html +73 -0
  218. data/spec/javascripts/{templates → fixtures}/mercury/page_editor.html +4 -4
  219. data/spec/javascripts/{templates → fixtures}/mercury/palette.html +0 -0
  220. data/spec/javascripts/{templates → fixtures}/mercury/panel.html +0 -0
  221. data/spec/javascripts/fixtures/mercury/region.html +6 -0
  222. data/spec/javascripts/fixtures/mercury/regions/full.html +1 -0
  223. data/spec/javascripts/fixtures/mercury/regions/image.html +1 -0
  224. data/spec/javascripts/fixtures/mercury/regions/markdown.html +1 -0
  225. data/spec/javascripts/fixtures/mercury/regions/simple.html +1 -0
  226. data/spec/javascripts/fixtures/mercury/regions/snippets.html +4 -0
  227. data/spec/javascripts/{templates → fixtures}/mercury/select.html +0 -0
  228. data/spec/javascripts/{templates → fixtures}/mercury/snippet.html +0 -0
  229. data/spec/javascripts/{templates → fixtures}/mercury/snippet_toolbar.html +0 -0
  230. data/spec/javascripts/{templates → fixtures}/mercury/statusbar.html +0 -0
  231. data/spec/javascripts/{templates → fixtures}/mercury/table_editor.html +0 -0
  232. data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button.html +0 -0
  233. data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button_group.html +0 -0
  234. data/spec/javascripts/{templates → fixtures}/mercury/toolbar.expander.html +0 -0
  235. data/spec/javascripts/{templates → fixtures}/mercury/toolbar.html +0 -0
  236. data/spec/javascripts/{templates → fixtures}/mercury/tooltip.html +0 -0
  237. data/spec/javascripts/{templates → fixtures}/mercury/uploader.html +0 -0
  238. data/spec/javascripts/mercury/{dialog_spec.js.coffee → dialog_spec.coffee} +11 -12
  239. data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +2 -3
  240. data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +3 -4
  241. data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +2 -3
  242. data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +2 -3
  243. data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +2 -3
  244. data/spec/javascripts/mercury/lightview_spec.js.coffee +180 -142
  245. data/spec/javascripts/mercury/mercury_spec.js.coffee +19 -13
  246. data/spec/javascripts/mercury/modal_spec.js.coffee +192 -148
  247. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +4 -5
  248. data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +2 -3
  249. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +107 -34
  250. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +106 -26
  251. data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +2 -3
  252. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +50 -40
  253. data/spec/javascripts/mercury/page_editor_spec.js.coffee +124 -80
  254. data/spec/javascripts/mercury/palette_spec.js.coffee +4 -5
  255. data/spec/javascripts/mercury/panel_spec.js.coffee +9 -12
  256. data/spec/javascripts/mercury/region_spec.js.coffee +22 -17
  257. data/spec/javascripts/mercury/regions/{editable_spec.js.coffee → full_spec.js.coffee} +26 -28
  258. data/spec/javascripts/mercury/regions/image_spec.js.coffee +33 -0
  259. data/spec/javascripts/mercury/regions/{markupable_spec.js.coffee → markdown_spec.js.coffee} +32 -34
  260. data/spec/javascripts/mercury/regions/simple_spec.js.coffee +32 -0
  261. data/spec/javascripts/mercury/regions/{snippetable_spec.js.coffee → snippets_spec.js.coffee} +54 -55
  262. data/spec/javascripts/mercury/select_spec.js.coffee +4 -5
  263. data/spec/javascripts/mercury/snippet_spec.js.coffee +92 -16
  264. data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +31 -16
  265. data/spec/javascripts/mercury/statusbar_spec.js.coffee +9 -10
  266. data/spec/javascripts/mercury/table_editor_spec.js.coffee +1 -2
  267. data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +7 -9
  268. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +55 -26
  269. data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +13 -13
  270. data/spec/javascripts/mercury/toolbar_spec.js.coffee +43 -14
  271. data/spec/javascripts/mercury/tooltip_spec.js.coffee +1 -2
  272. data/spec/javascripts/mercury/uploader_spec.js.coffee +47 -33
  273. data/spec/javascripts/spec_helper.coffee +4 -0
  274. data/spec/javascripts/{spec_helper.js → support/event_simulation.js} +0 -2
  275. data/spec/teabag_env.rb +32 -0
  276. metadata +366 -196
  277. data/features/regions/editable/basic_editing.feature +0 -195
  278. data/features/regions/editable/inserting_tables.feature +0 -109
  279. data/spec/javascripts/templates/mercury/modals/insertlink.html +0 -30
  280. data/spec/javascripts/templates/mercury/modals/insertmedia.html +0 -35
  281. data/spec/javascripts/templates/mercury/modals/inserttable.html +0 -27
  282. data/spec/javascripts/templates/mercury/region.html +0 -2
  283. data/spec/javascripts/templates/mercury/regions/editable.html +0 -3
  284. data/spec/javascripts/templates/mercury/regions/snippetable.html +0 -4
  285. data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +0 -54
  286. data/vendor/assets/javascripts/mercury_loader.js +0 -193
  287. data/vendor/assets/javascripts/mercury_overrides.js +0 -6
  288. data/vendor/assets/stylesheets/mercury/mercury.css +0 -151
  289. data/vendor/assets/stylesheets/mercury_overrides.css +0 -17
@@ -1,193 +0,0 @@
1
- /*!
2
- * Mercury Editor is a CoffeeScript and jQuery based WYSIWYG editor. Documentation and other useful information can be
3
- * found at https://github.com/jejacks0n/mercury
4
- *
5
- * Supported browsers:
6
- * - Firefox 4+
7
- * - Chrome 10+
8
- * - Safari 5+
9
- *
10
- * Copyright (c) 2011 Jeremy Jackson
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
13
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
14
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
15
- * persons to whom the Software is furnished to do so, subject to the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
18
- * Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
21
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
- *
25
- */
26
-
27
- // ## Default Packages
28
- //
29
- // Some default packages are provided for you. If you want to define your own, feel free to do so before including this
30
- // script. These, or your own packages can be specified to the loader in query params (read below for details).
31
- if (!window.mercuryPackages) window.mercuryPackages = {
32
- development: {javascripts: 'mercury.js', stylesheets: 'mercury.css'},
33
- bundled: {javascripts: 'javascripts/mercury.min.js,javascripts/mercury_dialogs.js', stylesheets: 'stylesheets/mercury.bundle.css'}
34
- };
35
-
36
-
37
- // ## Mercury Loader
38
- (function() {
39
- // Useragent detection, which we use to determine if the client is supported. We do this method instead of checking
40
- // features because many of the features are supported in IE, but aren't implemented to the W3C spec.
41
- var browser = {
42
- webkit: /(webkit)[ \/]([\w.]+)/,
43
- opera: /(opera)(?:.*version)?[ \/]([\w.]+)/,
44
- msie: /(msie) ([\w.]+)/,
45
- mozilla: /(mozilla)(?:.*? rv:([\w.]+))?/
46
- };
47
-
48
- var ua = navigator.userAgent.toLowerCase();
49
- var match = browser.webkit.exec(ua) || browser.opera.exec(ua) || browser.msie.exec(ua) || ua.indexOf("compatible") < 0 && browser.mozilla.exec(ua) || [];
50
- browser = {version: match[2] || "0" };
51
- browser[match[1] || ""] = true;
52
-
53
- // If the browser isn't supported, we don't try to do anything more. We do direct userAgent detection here because IE
54
- // thinks it's supported but isn't -- in part because it has it's own implementation of the contentEditable spec.
55
- if (document.getElementsByTagName && document.getElementById && document.designMode && !browser.konqueror && !browser.msie) {
56
- // supported
57
- } else {
58
- return;
59
- }
60
-
61
- // Default options, which can be overridden by specifying them in query params to the loader script.
62
- // You can provide any additional options to the loader, and they will be passed to the PageEditor instance when it's
63
- // created, so for instance you could put `visible=false`, and the editor be hidden after it's created.
64
- var options = {
65
- // A path or url from which the javascripts and css should be loaded.
66
- src: '/assets',
67
- // A value defined in the packages above. Development is used by default. If you want to provide your own package
68
- // you can just define one before including this script.
69
- pack: 'development'
70
- };
71
-
72
- // Hide the document during loading so there isn't a flicker while mercury is being loaded.
73
- var head = document.getElementsByTagName("head")[0];
74
- if (window == top) {
75
- var style = document.createElement('style');
76
- var rules = document.createTextNode('body{visibility:hidden;display:none}');
77
- style.type = 'text/css';
78
- if (style.styleSheet) style.styleSheet.cssText = rules.nodeValue;
79
- else style.appendChild(rules);
80
- head.appendChild(style);
81
- }
82
-
83
- // Because Mercury loads the document it's going to edit into an iframe we do some tweaks to the current document to
84
- // make that feel more seamless.
85
- function loadMercury() {
86
- if (document.mercuryLoaded) return;
87
- if (timer) window.clearTimeout(timer);
88
- document.mercuryLoaded = true;
89
-
90
- // If the current window is the top window, it means that Mercury hasn't been loaded yet. So we load it.
91
- if (window == top) {
92
- var i;
93
-
94
- // Find the loader script and determine what options were provided so the defaults can be overridden. To provide
95
- // options just pass them in as query params (eg. `mercury_loader.js?src=/asset_path&pack=bundled`)
96
- var scripts = document.getElementsByTagName('script');
97
- for (i = 0; i <= scripts.length - 1; i += 1) {
98
- var match = scripts[i].src.match(/mercury_loader\.js\??(.*)?$/);
99
- if (!match || !match[1]) continue;
100
-
101
- match[1].replace(/([^&=]*)=([^&=]*)/g, function (m, attr, value) {
102
- if (['true', 'false'].indexOf(value) >= 0) value = JSON.parse(value);
103
- options[attr] = value;
104
- });
105
- }
106
-
107
- var pack = window.mercuryPackages[options.pack];
108
- setTimeout(function() {
109
- // Once we're ready to load Mercury we clear the document contents, and add in the css and javascript tags.
110
- // Once the script has loaded we display the body again, and instantiate a new instance of Mercury.PageEditor.
111
- document.body.innerHTML = '<div style="height:0;overflow:hidden;">Mercury</div>';
112
- for (i = 0; i <= document.styleSheets.length - 1; i += 1) {
113
- document.styleSheets[i].disabled = true;
114
- }
115
-
116
- // Load all the stylesheets.
117
- var stylesheets = pack.stylesheets.split(',');
118
- for (i = 0; i <= stylesheets.length - 1; i += 1) {
119
- var link = document.createElement('link');
120
- link.href = options.src + '/' + stylesheets[i];
121
- link.media = 'screen';
122
- link.rel = 'stylesheet';
123
- link.type = 'text/css';
124
- head.appendChild(link);
125
- }
126
-
127
- // Load all the javascripts.
128
- var javascripts = pack.javascripts.split(',');
129
- var loaded = 0;
130
- function loadScript(src) {
131
- var script = document.createElement('script');
132
- script.src = options.src + '/' + src;
133
- script.type = 'text/javascript';
134
- script.charset = 'utf-8';
135
- head.appendChild(script);
136
- script.onload = function() {
137
- loaded += 1;
138
- if (loaded >= javascripts.length) {
139
- document.body.style.visibility = 'visible';
140
- document.body.style.display = 'block';
141
- // Instantiate the PageEditor, passing in the options that were provided to the loader.
142
- new Mercury.PageEditor(null, options);
143
- // If there's a mercuryLoaded function available, call it. You can provide one before the loading script
144
- // and it will be called after everything is loaded, but before everything is initialized. You can bind
145
- // to the mercury:ready event or use Mercury.bind('ready', function() {}).
146
- if (typeof(window.mercuryLoaded) == 'function') {
147
- window.mercuryLoaded();
148
- }
149
- } else {
150
- loadScript(javascripts[loaded]);
151
- }
152
- };
153
- }
154
- loadScript(javascripts[loaded]);
155
- }, 1);
156
- } else if (top.Mercury) {
157
- // Since this file will be included in the iframe as well, we use it to tell Mercury that the document is ready to
158
- // be worked on. By firing this event we're able to build the regions and get everything ready without having to
159
- // wait for assets and slow javascripts to load or complete.
160
- window.Mercury = top.Mercury;
161
- Mercury.trigger('initialize:frame');
162
- }
163
- }
164
-
165
- // This is a common technique for determining if the document has loaded yet, and is based on the methods used in
166
- // Prototype.js. The following portions just call loadMercury once it's appropriate to do so.
167
- //
168
- // Support for the DOMContentLoaded event is based on work by Dan Webb, Matthias Miller, Dean Edwards, John Resig,
169
- // and Diego Perini.
170
- var timer;
171
- function checkReadyState() {
172
- if (document.readyState === 'complete') {
173
- document.stopObserving('readystatechange', checkReadyState);
174
- loadMercury();
175
- }
176
- }
177
-
178
- function pollDoScroll() {
179
- try { document.documentElement.doScroll('left'); }
180
- catch(e) {
181
- timer = pollDoScroll.defer();
182
- return;
183
- }
184
- loadMercury();
185
- }
186
-
187
- if (document.addEventListener) {
188
- document.addEventListener('DOMContentLoaded', loadMercury, false);
189
- } else {
190
- document.observe('readystatechange', checkReadyState);
191
- if (window == top) { timer = pollDoScroll.defer(); }
192
- }
193
- })();
@@ -1,6 +0,0 @@
1
- /*!
2
- * Mercury Editor is a Coffeescript and jQuery based WYSIWYG editor. Documentation and other useful information can be
3
- * found at https://github.com/jejacks0n/mercury
4
- *
5
- * This file is intended to provide a standard way to override or add JS that comes default with Mercury Editor.
6
- */
@@ -1,151 +0,0 @@
1
- /*
2
- *= require_self
3
- *= require ./dialog
4
- *= require ./lightview
5
- *= require ./modal
6
- *= require ./statusbar
7
- *= require ./toolbar
8
- *= require ./tooltip
9
- *= require ./uploader
10
- *= require ./all_images
11
- */
12
-
13
- /*
14
- * General Layout
15
- *---------------------------------------------------------------------------*/
16
- html, body {
17
- -webkit-transition: -webkit-transform 3s;
18
- margin: 0;
19
- padding: 0;
20
- overflow: hidden;
21
- }
22
- .mercury-iframe {
23
- position: absolute;
24
- top: 0;
25
- width: 100%;
26
- visibility: hidden;
27
- }
28
- .mercury-focusable {
29
- position: absolute;
30
- opacity: 0;
31
- }
32
-
33
- /*
34
- * Forms
35
- *---------------------------------------------------------------------------*/
36
- form,
37
- form ul,
38
- form ol,
39
- form li,
40
- form fieldset,
41
- form p,
42
- .filter {
43
- margin: 0;
44
- padding: 0;
45
- }
46
- form abbr {
47
- border: 0;
48
- font-variant: normal;
49
- }
50
- form fieldset {
51
- margin-bottom: 10px;
52
- background: #F6F6F6;
53
- border: 1px solid #CCC;
54
- border-radius: 7px;
55
- -moz-border-radius: 7px;
56
- }
57
- form fieldset:last-child {
58
- margin-bottom: 0;
59
- }
60
- form fieldset legend {
61
- font-weight: bold;
62
- margin-left: 10px;
63
- margin-bottom: -4px;
64
- }
65
- form ol {
66
- margin: 12px 9px;
67
- }
68
- form ol li {
69
- display: block;
70
- margin-bottom: 10px;
71
- }
72
- form label {
73
- display: block;
74
- float: left;
75
- width: 23%;
76
- margin-right: 9px;
77
- text-align: right;
78
- line-height: 27px;
79
- font-size: 1.1em;
80
- overflow: hidden;
81
- text-overflow: ellipsis;
82
- white-space: nowrap;
83
- }
84
- form label input {
85
- width: auto !important;
86
- margin: 0 5px 0 2px !important;
87
- }
88
- form select,
89
- form input[type=text],
90
- form input[type=password],
91
- form textarea,
92
- form input.text {
93
- margin: 0;
94
- border: 2px solid #CCC;
95
- padding: 2px 4px;
96
- font-family: Arial, Geneva, sans-serif;
97
- font-size: 1.5em;
98
- width: 74%;
99
- box-sizing: border-box;
100
- -moz-box-sizing: border-box;
101
- -webkit-box-sizing: border-box;
102
- }
103
- form li.boolean {
104
- margin-left: 23%;
105
- padding-left: 9px;
106
- }
107
- form li.boolean label {
108
- width: auto;
109
- }
110
- form fieldset.buttons {
111
- clear: both;
112
- padding: 0;
113
- background: none;
114
- border: none;
115
- text-align: left;
116
- }
117
- form fieldset.buttons ol {
118
- margin: 0 -2px 0 0;
119
- float: right;
120
- }
121
- form fieldset.buttons ol li {
122
- float: left;
123
- padding-left: 0.5em;
124
- padding-right: 0;
125
- }
126
- form fieldset.buttons .commit {
127
- margin: 0;
128
- }
129
- form fieldset.buttons .commit input {
130
- padding: 8px 14px 9px !important;
131
- font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
132
- font-size: 1.3em;
133
- background-color: #222;
134
- background-repeat: repeat-x;
135
- display: inline-block;
136
- color: #FFF;
137
- text-decoration: none;
138
- -moz-border-radius: 5px;
139
- -webkit-border-radius: 5px;
140
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
141
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
142
- text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
143
- border: 0;
144
- border-bottom: 1px solid rgba(0, 0, 0, 0.25);
145
- position: relative;
146
- cursor: pointer;
147
- line-height: normal;
148
- }
149
- form fieldset.buttons .commit input:hover {
150
- background-color: #000;
151
- }
@@ -1,17 +0,0 @@
1
- /*!
2
- * Mercury Editor is a Coffeescript and jQuery based WYSIWYG editor. Documentation and other useful information can be
3
- * found at https://github.com/jejacks0n/mercury
4
- *
5
- * This file is intended to provide a standard way to override the CSS that comes default with Mercury Editor, and
6
- * includes an example button style, should you ever need to add new ones yourself. Read the toolbar configuration in
7
- * mercury.js for more on how to add your own buttons to the toolbar.
8
- */
9
-
10
- /* Disable text sizing in webkit (ipad/iphone etc -- should apply to mercury only) */
11
- html { -webkit-text-size-adjust: none; }
12
-
13
- /* Button example */
14
- .mercury-primary-toolbar .mercury-inspector-button em,
15
- .mercury-expander-button[data-button="inspector"] em {
16
- background-image: url(/assets/mercury/toolbar/primary/inspectorpanel.png);
17
- }