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,195 +0,0 @@
1
- @javascript
2
- Feature:
3
- As a content editor type person
4
- In order to manage content
5
- I should be able to manipulate it in various ways (eg. bold, add italics, set headers, colors, etc.)
6
-
7
- Background:
8
- Given I am on an editable page
9
- And the editor won't prompt when leaving the page
10
-
11
- Scenario: A user can expect all this!
12
-
13
-
14
- # Scenario: A user can set and unset bold content
15
- Given the content of the editable region is simple content
16
- And I make a selection
17
-
18
- When I click on the bold editor button
19
- Then the contents of the editable region should be "this is <b><span>simple</span></b> <b>content</b>"
20
-
21
- When I click on the bold editor button
22
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
23
-
24
-
25
- # Scenario: A user can italicize content
26
- Given the content of the editable region is simple content
27
- And I make a selection
28
-
29
- When I click on the italicize editor button
30
- Then the contents of the editable region should be "this is <i><span>simple</span></i> <b>content</b>"
31
-
32
- When I click on the italicize editor button
33
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
34
-
35
-
36
- # Scenario: A user can overline content
37
- Given the content of the editable region is simple content
38
- And I make a selection
39
-
40
- When I click on the overline editor button
41
- Then the contents of the editable region should be "this is <span style='text-decoration:overline'><span>simple</span></span> <b>content</b>"
42
- # doesn't remove overlines
43
-
44
-
45
- # Scenario: A user can strikeout content
46
- Given the content of the editable region is simple content
47
- And I make a selection
48
-
49
- When I click on the strikethrough editor button
50
- Then the contents of the editable region should be "this is <strike><span>simple</span></strike> <b>content</b>"
51
-
52
- When I click on the strikethrough editor button
53
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
54
-
55
- # Scenario: A user can underline content
56
- Given the content of the editable region is simple content
57
- And I make a selection
58
-
59
- When I click on the underline editor button
60
- Then the contents of the editable region should be "this is <u><span>simple</span></u> <b>content</b>"
61
-
62
- When I click on the underline editor button
63
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
64
-
65
-
66
- # Scenario: A user can make content superscript
67
- Given the content of the editable region is simple content
68
- And I make a selection
69
-
70
- When I click on the superscript editor button
71
- Then the contents of the editable region should be "this is <sup><span>simple</span></sup> <b>content</b>"
72
-
73
- When I click on the superscript editor button
74
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
75
-
76
-
77
- # Scenario: A user can make content subscript
78
- Given the content of the editable region is simple content
79
- And I make a selection
80
-
81
- When I click on the subscript editor button
82
- Then the contents of the editable region should be "this is <sub><span>simple</span></sub> <b>content</b>"
83
-
84
- When I click on the subscript editor button
85
- Then the contents of the editable region should be "this is <span>simple</span> <b>content</b>"
86
-
87
-
88
- # Scenario: A user can justify content to the left, center, right, or fully justified
89
- # firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
90
- Given the content of the editable region has justifiable content
91
- And I make a selection
92
-
93
- When I click on the justify left editor button
94
- Then the contents of the editable region should be "<div>first line</div><br><div align='left'>this is <span>justifiable</span><b>content</b></div> "
95
-
96
- When I click on the justify center editor button
97
- Then the contents of the editable region should be "<div>first line</div><br><div align='center'>this is <span>justifiable</span><b>content</b></div> "
98
-
99
- When I click on the justify right editor button
100
- Then the contents of the editable region should be "<div>first line</div><br><div align='right'>this is <span>justifiable</span><b>content</b></div> "
101
-
102
- When I click on the full justification editor button
103
- Then the contents of the editable region should be "<div>first line</div><br><div align='justify'>this is <span>justifiable</span><b>content</b></div> "
104
-
105
-
106
- # Scenario: A user can make an unordered list
107
- Given the content of the editable region is simple content
108
- And I make a selection
109
-
110
- When I click on the insert unordered list editor button
111
- Then the contents of the editable region should be "<ul><li>this is <span>simple</span> <b>content</b></li></ul>"
112
-
113
- # todo: we should test enter and tab, and shift+tab in advanced editing
114
-
115
- # Scenario: A user can make an ordered list
116
- Given the content of the editable region is simple content
117
- And I make a selection
118
-
119
- When I click on the insert ordered list editor button
120
- Then the contents of the editable region should be "<ol><li>this is <span>simple</span> <b>content</b></li></ol>"
121
-
122
- # todo: we should test enter and tab, and shift+tab in advanced editing
123
-
124
-
125
- # Scenario: A user can indent and outdent content
126
- # firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
127
- Given the content of the editable region has justifiable content
128
- And I make a selection
129
-
130
- When I click on the indent editor button
131
- Then the contents of the editable region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote> "
132
-
133
- When I click on the indent editor button
134
- Then the contents of the editable region should be "<div>first line</div><br><blockquote><blockquote>this is <span>justifiable</span><b>content</b></blockquote></blockquote> "
135
-
136
- When I click on the outdent editor button
137
- Then the contents of the editable region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote> "
138
-
139
- When I click on the outdent editor button
140
- Then the contents of the editable region should be "<div>first line</div><br>this is <span>justifiable</span><b>content</b> "
141
-
142
-
143
- # Scenario: A user can insert horizontal rules
144
- Given the content of the editable region is simple content
145
- And I make a selection
146
-
147
- When I click on the insert hr editor button
148
- Then the contents of the editable region should be "this is&nbsp;<hr size='2' width='100%'> <b>content</b>"
149
-
150
- When I click on the insert hr editor button
151
- Then the contents of the editable region should be "this is&nbsp;<hr size='2' width='100%'><hr size='2' width='100%'> <b>content</b>"
152
-
153
-
154
- # Scenario: A user can clean/remove formatting on their selection
155
- Given the content of the editable region has wrapped content
156
- And I make a selection
157
-
158
- When I click on the remove formatting editor button
159
- Then the contents of the editable region should be "this is wrapped content"
160
-
161
-
162
- # Scenario: A user can wrap content within predefined styles
163
- Given the content of the editable region is simple content
164
- And I make a selection
165
-
166
- When I click on the style editor dropdown
167
- And select the red style from the dropdown
168
- Then the contents of the editable region should be "this is <span class='red'><span>simple</span></span> <b>content</b>"
169
-
170
-
171
- # Scenario: A user can wrap content in formatted block tags
172
- Given the content of the editable region is simple content
173
- And I make a selection
174
-
175
- When I click on the block format editor dropdown
176
- And select the heading 2 block from the dropdown
177
- Then the contents of the editable region should be "<h2>this is <span>simple</span> <b>content</b></h2>"
178
-
179
-
180
- # Scenario: A user can set the background color of a selection
181
- Given the content of the editable region is simple content
182
- And I make a selection
183
-
184
- When I click on the background color editor palette
185
- And click on the color red
186
- Then the contents of the editable region should be "this is <span style='background-color:#FF0000'><span>simple</span></span> <b>content</b>"
187
-
188
-
189
- # Scenario: A user can set the foreground color
190
- Given the content of the editable region is simple content
191
- And I make a selection
192
-
193
- When I click on the foreground color editor palette
194
- And click on the color red
195
- Then the contents of the editable region should be "this is <font color='rgb(255, 0, 0)'><span>simple</span></font> <b>content</b>"
@@ -1,109 +0,0 @@
1
- @javascript
2
- Feature:
3
- As a content editor type person
4
- In order to manage content
5
- I should be able to insert and edit complex tables
6
-
7
- Background:
8
- Given I am on an editable page
9
- And the editor won't prompt when leaving the page
10
-
11
- Scenario: A user can expect all this!
12
-
13
-
14
- # Scenario: A user can insert a table
15
- Given the content of the editable region is simple content
16
- And I make a selection
17
-
18
- When I click on the "Insert Table" button
19
- Then the modal window should be visible
20
- And I should see "Insert Table" within the modal title
21
-
22
- When I click on the third cell in the first row
23
- And I add a column before it
24
- Then the table column count should be 4
25
- And the selected cell should be the forth cell in the first row
26
-
27
- When I add a column after
28
- Then the table column count should be 5
29
- And the selected cell should be the forth cell in the first row
30
-
31
- When I add a row after
32
- Then the table row count should be 3
33
- And the selected cell should be the forth cell in the first row
34
-
35
- When I add a row before
36
- Then the table row count should be 4
37
- And the selected cell should be the forth cell in the second row
38
-
39
- When I delete the column
40
- Then the table column count should be 4
41
- And a selected cell should not be visible
42
-
43
- When I click on the second cell in the second row
44
- And delete the row
45
- Then the table row count should be 3
46
- And a selected cell should not be visible
47
-
48
- When I click on the second cell in the second row
49
- And increase the colspan
50
- And click on the first cell in the first row
51
- And increase the rowspan
52
- And select "Right" from "Alignment"
53
- And fill in "Border" with "2"
54
- And fill in "Spacing" with "2"
55
- And press "Insert Table"
56
- Then the contents of the editable region should be "this is&nbsp;<table align='right' border='2' cellspacing='2'><tbody><tr><td rowspan='2'><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td colspan='2'><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table> <b>content</b>"
57
- And the modal window should not be visible
58
-
59
-
60
- # Scenario: A user can edit a table after inserting one (in an editable region)
61
- Given the content of the editable region has a table
62
- And I make a selection
63
-
64
- When I click on the add row before editor button
65
- Then the table row count should be 3
66
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td></tr><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
67
-
68
- When I click on the add row after editor button
69
- Then the table row count should be 4
70
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td></tr><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
71
-
72
- When I click on the add column before editor button
73
- Then the column count should be 3
74
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
75
-
76
- When I click on the add column after editor button
77
- Then the column count should be 4
78
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>1</span></td><td><br></td><td><span>2</span></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
79
-
80
- When I click on the delete row editor button
81
- Then the table row count should be 3
82
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><span>3</span></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
83
-
84
- When I make a selection
85
- And click on the delete column editor button
86
- Then the table column count should be 3
87
- And the contents of the editable region should be "this is a <table><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
88
-
89
-
90
- # Scenario: A user can adjust the colspans of a table (in an editable region)
91
- Given the content of the editable region has a table
92
- And I make a selection
93
-
94
- When I click on the increase colspan editor button
95
- Then the contents of the editable region should be "this is a <table><tbody><tr><td colspan='2'><span>1</span></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
96
-
97
- When I click on the decrease colspan editor button
98
- Then the contents of the editable region should be "this is a <table><tbody><tr><td><span>1</span></td><td><br></td></tr><tr><td><span>3</span></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
99
-
100
-
101
- # Scenario: A user can adjust the rowspans of a table (in an editable region)
102
- Given the content of the editable region has a table
103
- And I make a selection
104
-
105
- When I click on the increase rowspan editor button
106
- Then the contents of the editable region should be "this is a <table><tbody><tr><td rowspan='2'><span>1</span></td><td><span>2</span></td></tr><tr><td><span>4</span></td></tr></tbody></table> <b>content</b>"
107
-
108
- When I click on the decrease rowspan editor button
109
- Then the contents of the editable region should be "this is a <table><tbody><tr><td><span>1</span></td><td><span>2</span></td></tr><tr><td><br></td><td><span>4</span></td></tr></tbody></table> <b>content</b>"
@@ -1,30 +0,0 @@
1
- <form>
2
- <fieldset id="link_text_container">
3
- <input id="link_text" name="link[text]" type="text"/>
4
- </fieldset>
5
-
6
- <label for="link_external_url"><input id="checkbox1" name="link_type" type="radio" value="external_url" checked="checked"/>URL</label>
7
- <input class="selectable" id="link_external_url" name="link[external_url]" type="text"/>
8
-
9
- <label for="link_existing_bookmark"><input id="checkbox2" name="link_type" type="radio" value="existing_bookmark"/>Existing Links</label>
10
- <select class="selectable" id="link_existing_bookmark" name="link[existing_bookmark]"></select>
11
-
12
- <label for="link_new_bookmark"><input name="link_type" type="radio" value="new_bookmark"/>Bookmark</label>
13
- <input class="selectable" id="link_new_bookmark" name="link[new_bookmark]" type="text"/>
14
-
15
- <select id="link_target" name="link[target]">
16
- <option value="">Self (the same window or tab)</option>
17
- <option value="_blank">Blank (a new window or tab)</option>
18
- <option value="_top">Top (removes any frames)</option>
19
- <option value="popup">Popup Window (javascript new window popup)</option>
20
- </select>
21
-
22
- <div class="link-target-options" id="popup_options" style="display:none">
23
- <input id="link_popup_width" name="link[popup_width]" type="text"/>
24
- <input id="link_popup_height" name="link[popup_height]" type="text"/>
25
- </div>
26
-
27
- <input id="submit" type="submit"/>
28
- </form>
29
- <a name="link1">Link One</a>
30
- <a name="link2">Link Two</a>
@@ -1,35 +0,0 @@
1
- <form>
2
- <label for="media_image_url"><input id="checkbox1" name="media_type" type="radio" value="image_url" checked="checked"/>URL</label>
3
- <input class="selectable" id="media_image_url" name="media[image_url]" type="text"/>
4
-
5
- <label for="media_youtube_url"><input id="checkbox2" name="media_type" type="radio" value="youtube_url"/>YouTube Share URL</label>
6
- <input class="selectable" id="media_youtube_url" name="media[youtube_url]" type="text"/>
7
-
8
- <label for="media_vimeo_url"><input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL</label>
9
- <input class="selectable" id="media_vimeo_url" name="media[vimeo_url]" type="text"/>
10
-
11
- <div class="media-options" id="image_url">
12
- <select id="media_image_alignment" name="media[image_alignment]">
13
- <option value="">None</option>
14
- <option value="left">Left</option>
15
- <option value="right">Right</option>
16
- <option value="top">Top</option>
17
- <option value="middle">Middle</option>
18
- <option value="bottom">Bottom</option>
19
- <option value="absmiddle">Absolute Middle</option>
20
- <option value="absbottom">Absolute Bottom</option>
21
- </select>
22
- </div>
23
-
24
- <div class="media-options" id="youtube_url" style="display:none">
25
- <input id="media_youtube_width" name="media[youtube_width]" type="text" value="560"/>
26
- <input id="media_youtube_height" name="media[youtube_height]" type="text" value="349"/>
27
- </div>
28
-
29
- <div class="media-options" id="vimeo_url" style="display:none">
30
- <input id="media_vimeo_width" name="media[vimeo_width]" type="text" value="400"/>
31
- <input id="media_vimeo_height" name="media[vimeo_height]" type="text" value="225"/>
32
- </div>
33
-
34
- <input id="submit" type="submit"/>
35
- </form>
@@ -1,27 +0,0 @@
1
- <form>
2
- <div id="table_display">
3
- <table id="table" border="1" cellspacing="0"><tr><td id="cell1"></td></tr><tr><td id="cell2"></td></tr></table>
4
- </div>
5
-
6
- <input class="action" name="insertRowBefore" type="button" value="Add Before">
7
- <input class="action" name="insertRowAfter" type="button" value="Add After">
8
- <input class="action" name="deleteRow" type="button" value="Remove">
9
- <input class="action" name="insertColumnBefore" type="button" value="Add Before">
10
- <input class="action" name="insertColumnAfter" type="button" value="Add After">
11
- <input class="action" name="deleteColumn" type="button" value="Remove">
12
- <input class="action" name="increaseRowspan" type="button" value="+">
13
- <input class="action" name="decreaseRowspan" type="button" value="-">
14
- <input class="action" name="increaseColspan" type="button" value="+">
15
- <input class="action" name="decreaseColspan" type="button" value="-">
16
-
17
- <select id="table_alignment" name="table[alignment]">
18
- <option value="">None</option>
19
- <option value="left">Left</option>
20
- <option value="right" id="right_option">Right</option>
21
- </select>
22
-
23
- <input id="table_border" type="text" value="1"/>
24
- <input id="table_spacing" type="text" value="0"/>
25
-
26
- <input id="submit" type="submit"/>
27
- </form>
@@ -1,2 +0,0 @@
1
- <div id="region" data-scope="scope" data-version="1">contents</div>
2
- <div id="region_with_snippet">contents<div class="mercury-snippet" data-snippet="snippet_1" data-version="1">snippet</div></div>
@@ -1,3 +0,0 @@
1
- <div id="editable_region1">
2
-
3
- </div>
@@ -1,4 +0,0 @@
1
- <div id="snippetable_region1" data-type="snippetable"></div>
2
- <div id="snippetable_region2" data-type="snippetable">
3
- <div class="mercury-snippet" data-snippet="snippet_1">12</div>
4
- </div>
@@ -1,54 +0,0 @@
1
- @Mercury.modalHandlers.insertTable = ->
2
- table = @element.find('#table_display table')
3
-
4
- # make td's selectable
5
- table.on 'click', (event) =>
6
- cell = jQuery(event.target)
7
- table = cell.closest('table')
8
- table.find('.selected').removeAttr('class')
9
- cell.addClass('selected')
10
- Mercury.tableEditor(table, cell, '&nbsp;')
11
-
12
- # select the first td
13
- firstCell = table.find('td, th').first()
14
- firstCell.addClass('selected')
15
- Mercury.tableEditor(table, firstCell, '&nbsp;')
16
-
17
- # make the buttons work
18
- @element.find('input.action').on 'click', (event) =>
19
- action = jQuery(event.target).attr('name')
20
- switch action
21
- when 'insertRowBefore' then Mercury.tableEditor.addRow('before')
22
- when 'insertRowAfter' then Mercury.tableEditor.addRow('after')
23
- when 'deleteRow' then Mercury.tableEditor.removeRow()
24
- when 'insertColumnBefore' then Mercury.tableEditor.addColumn('before')
25
- when 'insertColumnAfter' then Mercury.tableEditor.addColumn('after')
26
- when 'deleteColumn' then Mercury.tableEditor.removeColumn()
27
- when 'increaseColspan' then Mercury.tableEditor.increaseColspan()
28
- when 'decreaseColspan' then Mercury.tableEditor.decreaseColspan()
29
- when 'increaseRowspan' then Mercury.tableEditor.increaseRowspan()
30
- when 'decreaseRowspan' then Mercury.tableEditor.decreaseRowspan()
31
-
32
- # set the alignment
33
- @element.find('#table_alignment').on 'change', =>
34
- table.attr({align: @element.find('#table_alignment').val()})
35
-
36
- # set the border
37
- @element.find('#table_border').on 'keyup', =>
38
- table.attr({border: parseInt(@element.find('#table_border').val())})
39
-
40
- # set the cellspacing
41
- @element.find('#table_spacing').on 'keyup', =>
42
- table.attr({cellspacing: parseInt(@element.find('#table_spacing').val())})
43
-
44
- # build the table on form submission
45
- @element.find('form').on 'submit', (event) =>
46
- event.preventDefault()
47
- table.find('.selected').removeAttr('class')
48
- table.find('td, th').html('<br/>')
49
-
50
- html = jQuery('<div>').html(table).html()
51
- value = html.replace(/^\s+|\n/gm, '').replace(/(<\/.*?>|<table.*?>|<tbody>|<tr>)/g, '$1\n')
52
-
53
- Mercury.trigger('action', {action: 'insertTable', value: value})
54
- @hide()