kiteditor 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +25 -0
- data/app/controllers/mercury/images_controller.rb +5 -0
- data/app/controllers/mercury_controller.rb +34 -0
- data/app/models/mercury/image.rb +17 -0
- data/app/views/layouts/mercury.html.erb +33 -0
- data/app/views/layouts/popup.html.haml +9 -0
- data/app/views/mercury/images/_list.html.haml +22 -0
- data/app/views/mercury/images/index.html.haml +4 -0
- data/app/views/mercury/images/index.js.erb +2 -0
- data/app/views/mercury/lightviews/about.html +11 -0
- data/app/views/mercury/modals/character.html +255 -0
- data/app/views/mercury/modals/htmleditor.html +13 -0
- data/app/views/mercury/modals/link.html +94 -0
- data/app/views/mercury/modals/media.html +1 -0
- data/app/views/mercury/modals/table.html +84 -0
- data/app/views/mercury/palettes/backcolor.html +73 -0
- data/app/views/mercury/palettes/forecolor.html +73 -0
- data/app/views/mercury/panels/history.html +3 -0
- data/app/views/mercury/panels/notes.html +3 -0
- data/app/views/mercury/panels/snippets.html +12 -0
- data/app/views/mercury/selects/formatblock.html +11 -0
- data/app/views/mercury/selects/style.html +5 -0
- data/app/views/mercury/snippets/example/options.html.erb +34 -0
- data/app/views/mercury/snippets/example/preview.html.erb +1 -0
- data/config/engine.rb +44 -0
- data/db/migrate/20110526035601_create_mercury_images.rb +11 -0
- data/features/loading/loading.feature +22 -0
- data/features/loading/navigating.feature +77 -0
- data/features/loading/user_interface.feature +67 -0
- data/features/regions/editable/advanced_editing.feature +0 -0
- data/features/regions/editable/basic_editing.feature +195 -0
- data/features/regions/editable/inserting_links.feature +98 -0
- data/features/regions/editable/inserting_media.feature +110 -0
- data/features/regions/editable/inserting_snippets.feature +102 -0
- data/features/regions/editable/inserting_special_characters.feature +24 -0
- data/features/regions/editable/inserting_tables.feature +109 -0
- data/features/regions/editable/pasting.feature +0 -0
- data/features/regions/editable/uploading_images.feature +0 -0
- data/features/regions/markupable/advanced_editing.feature +0 -0
- data/features/regions/markupable/basic_editing.feature +0 -0
- data/features/regions/markupable/inserting_links.feature +0 -0
- data/features/regions/markupable/inserting_media.feature +0 -0
- data/features/regions/markupable/inserting_snippets.feature +0 -0
- data/features/regions/markupable/inserting_special_characters.feature +0 -0
- data/features/regions/markupable/inserting_tables.feature +0 -0
- data/features/regions/markupable/uploading_images.feature +0 -0
- data/features/regions/snippetable/advanced_editing.feature +0 -0
- data/features/regions/snippetable/basic_editing.feature +0 -0
- data/features/regions/snippetable/inserting_snippets.feature +0 -0
- data/features/saving/saving.feature +33 -0
- data/features/step_definitions/debug_steps.rb +14 -0
- data/features/step_definitions/mercury_steps.rb +438 -0
- data/features/step_definitions/web_steps.rb +211 -0
- data/features/support/env.rb +46 -0
- data/features/support/mercury_contents.rb +25 -0
- data/features/support/mercury_selectors.rb +148 -0
- data/features/support/paths.rb +38 -0
- data/features/support/selectors.rb +44 -0
- data/lib/generators/mercury/install/install_generator.rb +49 -0
- data/lib/generators/mercury/install/templates/mongoid_paperclip_image.rb +17 -0
- data/lib/mercury/authentication.rb +8 -0
- data/lib/mercury-rails.rb +3 -0
- data/spec/javascripts/mercury/dialog_spec.js.coffee +281 -0
- data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +37 -0
- data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +37 -0
- data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +25 -0
- data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +30 -0
- data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +25 -0
- data/spec/javascripts/mercury/history_buffer_spec.js.coffee +76 -0
- data/spec/javascripts/mercury/lightview_spec.js.coffee +497 -0
- data/spec/javascripts/mercury/mercury_spec.js.coffee +132 -0
- data/spec/javascripts/mercury/modal_spec.js.coffee +504 -0
- data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +30 -0
- data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +29 -0
- data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +220 -0
- data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +167 -0
- data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +52 -0
- data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +160 -0
- data/spec/javascripts/mercury/native_extensions_spec.js.coffee +60 -0
- data/spec/javascripts/mercury/page_editor_spec.js.coffee +750 -0
- data/spec/javascripts/mercury/palette_spec.js.coffee +49 -0
- data/spec/javascripts/mercury/panel_spec.js.coffee +185 -0
- data/spec/javascripts/mercury/region_spec.js.coffee +298 -0
- data/spec/javascripts/mercury/regions/editable_spec.js.coffee +561 -0
- data/spec/javascripts/mercury/regions/markupable_spec.js.coffee +367 -0
- data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +370 -0
- data/spec/javascripts/mercury/select_spec.js.coffee +49 -0
- data/spec/javascripts/mercury/snippet_spec.js.coffee +245 -0
- data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +184 -0
- data/spec/javascripts/mercury/statusbar_spec.js.coffee +150 -0
- data/spec/javascripts/mercury/table_editor_spec.js.coffee +194 -0
- data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +90 -0
- data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +360 -0
- data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +118 -0
- data/spec/javascripts/mercury/toolbar_spec.js.coffee +222 -0
- data/spec/javascripts/mercury/tooltip_spec.js.coffee +186 -0
- data/spec/javascripts/mercury/uploader_spec.js.coffee +514 -0
- data/spec/javascripts/spec_helper.js +513 -0
- data/spec/javascripts/templates/mercury/dialog.html +2 -0
- data/spec/javascripts/templates/mercury/dialogs/backcolor.html +5 -0
- data/spec/javascripts/templates/mercury/dialogs/forecolor.html +5 -0
- data/spec/javascripts/templates/mercury/dialogs/formatblock.html +3 -0
- data/spec/javascripts/templates/mercury/dialogs/snippetpanel.html +16 -0
- data/spec/javascripts/templates/mercury/dialogs/style.html +3 -0
- data/spec/javascripts/templates/mercury/lightview.html +13 -0
- data/spec/javascripts/templates/mercury/modal.html +13 -0
- data/spec/javascripts/templates/mercury/modals/htmleditor.html +5 -0
- data/spec/javascripts/templates/mercury/modals/insertcharacter.html +5 -0
- data/spec/javascripts/templates/mercury/modals/insertlink.html +30 -0
- data/spec/javascripts/templates/mercury/modals/insertmedia.html +35 -0
- data/spec/javascripts/templates/mercury/modals/insertsnippet.html +6 -0
- data/spec/javascripts/templates/mercury/modals/inserttable.html +27 -0
- data/spec/javascripts/templates/mercury/page_editor.html +35 -0
- data/spec/javascripts/templates/mercury/palette.html +16 -0
- data/spec/javascripts/templates/mercury/panel.html +16 -0
- data/spec/javascripts/templates/mercury/region.html +2 -0
- data/spec/javascripts/templates/mercury/regions/editable.html +3 -0
- data/spec/javascripts/templates/mercury/regions/snippetable.html +4 -0
- data/spec/javascripts/templates/mercury/select.html +16 -0
- data/spec/javascripts/templates/mercury/snippet.html +1 -0
- data/spec/javascripts/templates/mercury/snippet_toolbar.html +16 -0
- data/spec/javascripts/templates/mercury/statusbar.html +8 -0
- data/spec/javascripts/templates/mercury/table_editor.html +65 -0
- data/spec/javascripts/templates/mercury/toolbar.button.html +64 -0
- data/spec/javascripts/templates/mercury/toolbar.button_group.html +9 -0
- data/spec/javascripts/templates/mercury/toolbar.expander.html +18 -0
- data/spec/javascripts/templates/mercury/toolbar.html +11 -0
- data/spec/javascripts/templates/mercury/tooltip.html +12 -0
- data/spec/javascripts/templates/mercury/uploader.html +11 -0
- data/vendor/assets/images/mercury/button.png +0 -0
- data/vendor/assets/images/mercury/close.png +0 -0
- data/vendor/assets/images/mercury/default-snippet.png +0 -0
- data/vendor/assets/images/mercury/loading-dark.gif +0 -0
- data/vendor/assets/images/mercury/loading-light.gif +0 -0
- data/vendor/assets/images/mercury/missing-image.png +0 -0
- data/vendor/assets/images/mercury/search-icon.png +0 -0
- data/vendor/assets/images/mercury/temp-logo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/editable/buttons.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/_expander.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/preview.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/redo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/save.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
- data/vendor/assets/images/mercury/toolbar/primary/undo.png +0 -0
- data/vendor/assets/images/mercury/toolbar/snippetable/buttons.png +0 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-1.7.js +9300 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +1328 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui-1.8.18.custom.min.js +356 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery-ui.1.8.13.custom.min.js +356 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery.additions.js +206 -0
- data/vendor/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +527 -0
- data/vendor/assets/javascripts/mercury/dependencies/liquidmetal.js +88 -0
- data/vendor/assets/javascripts/mercury/dependencies/showdown.js +1340 -0
- data/vendor/assets/javascripts/mercury/dialog.js.coffee +159 -0
- data/vendor/assets/javascripts/mercury/dialogs/backcolor.js.coffee +6 -0
- data/vendor/assets/javascripts/mercury/dialogs/forecolor.js.coffee +6 -0
- data/vendor/assets/javascripts/mercury/dialogs/formatblock.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +10 -0
- data/vendor/assets/javascripts/mercury/dialogs/style.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/finalize.js.coffee +3 -0
- data/vendor/assets/javascripts/mercury/history_buffer.js.coffee +30 -0
- data/vendor/assets/javascripts/mercury/lightview.js.coffee +205 -0
- data/vendor/assets/javascripts/mercury/locales/da.locale.js.coffee +0 -0
- data/vendor/assets/javascripts/mercury/locales/de.locale.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/es.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/example.local.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/fr.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/it.locale.js.coffee +208 -0
- data/vendor/assets/javascripts/mercury/locales/ko.local.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/nl.locale.js.coffee +206 -0
- data/vendor/assets/javascripts/mercury/locales/pt.locale.js.coffee +211 -0
- data/vendor/assets/javascripts/mercury/locales/sv.local.js.coffee +209 -0
- data/vendor/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +213 -0
- data/vendor/assets/javascripts/mercury/mercury.js.coffee +109 -0
- data/vendor/assets/javascripts/mercury/modal.js.coffee +204 -0
- data/vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee +11 -0
- data/vendor/assets/javascripts/mercury/modals/insertcharacter.js.coffee +4 -0
- data/vendor/assets/javascripts/mercury/modals/insertlink.js.coffee +95 -0
- data/vendor/assets/javascripts/mercury/modals/insertmedia.js.coffee +107 -0
- data/vendor/assets/javascripts/mercury/modals/insertsnippet.js.coffee +12 -0
- data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +54 -0
- data/vendor/assets/javascripts/mercury/native_extensions.js.coffee +55 -0
- data/vendor/assets/javascripts/mercury/page_editor.js.coffee +241 -0
- data/vendor/assets/javascripts/mercury/palette.js.coffee +29 -0
- data/vendor/assets/javascripts/mercury/panel.js.coffee +115 -0
- data/vendor/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +28 -0
- data/vendor/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +9 -0
- data/vendor/assets/javascripts/mercury/region.js.coffee +107 -0
- data/vendor/assets/javascripts/mercury/regions/editable.js.coffee +600 -0
- data/vendor/assets/javascripts/mercury/regions/markupable.js.coffee +398 -0
- data/vendor/assets/javascripts/mercury/regions/simple.js.coffee +339 -0
- data/vendor/assets/javascripts/mercury/regions/snippetable.js.coffee +124 -0
- data/vendor/assets/javascripts/mercury/select.js.coffee +44 -0
- data/vendor/assets/javascripts/mercury/snippet.js.coffee +104 -0
- data/vendor/assets/javascripts/mercury/snippet_toolbar.js.coffee +72 -0
- data/vendor/assets/javascripts/mercury/statusbar.js.coffee +51 -0
- data/vendor/assets/javascripts/mercury/support/history.js +1 -0
- data/vendor/assets/javascripts/mercury/table_editor.js.coffee +265 -0
- data/vendor/assets/javascripts/mercury/toolbar.button.js.coffee +173 -0
- data/vendor/assets/javascripts/mercury/toolbar.button_group.js.coffee +42 -0
- data/vendor/assets/javascripts/mercury/toolbar.expander.js.coffee +56 -0
- data/vendor/assets/javascripts/mercury/toolbar.js.coffee +86 -0
- data/vendor/assets/javascripts/mercury/tooltip.js.coffee +74 -0
- data/vendor/assets/javascripts/mercury/uploader.js.coffee +227 -0
- data/vendor/assets/javascripts/mercury.js +479 -0
- data/vendor/assets/javascripts/mercury_loader.js +193 -0
- data/vendor/assets/javascripts/mercury_overrides.js +6 -0
- data/vendor/assets/javascripts/popup.js +8 -0
- data/vendor/assets/stylesheets/mercury/all_images.css.erb +89 -0
- data/vendor/assets/stylesheets/mercury/dialog.css +208 -0
- data/vendor/assets/stylesheets/mercury/lightview.css +151 -0
- data/vendor/assets/stylesheets/mercury/mercury.css +151 -0
- data/vendor/assets/stylesheets/mercury/modal.css +183 -0
- data/vendor/assets/stylesheets/mercury/statusbar.css +32 -0
- data/vendor/assets/stylesheets/mercury/toolbar.css +304 -0
- data/vendor/assets/stylesheets/mercury/tooltip.css +26 -0
- data/vendor/assets/stylesheets/mercury/uploader.css +111 -0
- data/vendor/assets/stylesheets/mercury.css +28 -0
- data/vendor/assets/stylesheets/mercury_overrides.css +17 -0
- data/vendor/assets/stylesheets/popup.css.erb +37 -0
- metadata +634 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
<form id="mercury_table" style="width:700px">
|
2
|
+
|
3
|
+
<div class="mercury-display-pane-container">
|
4
|
+
<div class="mercury-display-pane">
|
5
|
+
|
6
|
+
<div id="table_display">
|
7
|
+
<table border="1" cellspacing="0">
|
8
|
+
<tr>
|
9
|
+
<td> </td>
|
10
|
+
<td> </td>
|
11
|
+
<td> </td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td> </td>
|
15
|
+
<td> </td>
|
16
|
+
<td> </td>
|
17
|
+
</tr>
|
18
|
+
</table>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div id="table_options">
|
22
|
+
<fieldset class="inputs">
|
23
|
+
<ol>
|
24
|
+
<li id="table_rows_input" class="select input optional">
|
25
|
+
<label for="table_rows">Rows</label>
|
26
|
+
<input type="button" class="action" value="Add Before" name="insertRowBefore"/>
|
27
|
+
<input type="button" class="action" value="Add After" name="insertRowAfter"/>
|
28
|
+
<input type="button" class="action" value="Remove" name="deleteRow"/>
|
29
|
+
</li>
|
30
|
+
<li id="table_columns_input" class="select input optional">
|
31
|
+
<label for="table_columns">Columns</label>
|
32
|
+
<input type="button" class="action" value="Add Before" name="insertColumnBefore"/>
|
33
|
+
<input type="button" class="action" value="Add After" name="insertColumnAfter"/>
|
34
|
+
<input type="button" class="action" value="Remove" name="deleteColumn"/>
|
35
|
+
</li>
|
36
|
+
<hr/>
|
37
|
+
<li id="table_row_adjust_input" class="select input optional">
|
38
|
+
<label for="table_row_adjust">Row Span</label>
|
39
|
+
<input type="button" class="action" value="+" name="increaseRowspan"/>
|
40
|
+
<input type="button" class="action" value="-" name="decreaseRowspan"/>
|
41
|
+
</li>
|
42
|
+
<li id="table_column_adjust_input" class="select input optional">
|
43
|
+
<label for="table_column_adjust">Column Span</label>
|
44
|
+
<input type="button" class="action" value="+" name="increaseColspan"/>
|
45
|
+
<input type="button" class="action" value="-" name="decreaseColspan"/>
|
46
|
+
</li>
|
47
|
+
</ol>
|
48
|
+
</fieldset>
|
49
|
+
|
50
|
+
<fieldset class="inputs">
|
51
|
+
<legend><span>Options</span></legend>
|
52
|
+
<ol>
|
53
|
+
<li id="table_alignment_input" class="select input optional">
|
54
|
+
<label class="label" for="table_alignment">Alignment</label>
|
55
|
+
<select id="table_alignment" name="table[alignment]">
|
56
|
+
<option value="">None</option>
|
57
|
+
<option value="left">Left</option>
|
58
|
+
<option value="right">Right</option>
|
59
|
+
</select>
|
60
|
+
</li>
|
61
|
+
<li id="table_border_input" class="string input optional stringish">
|
62
|
+
<label class="label" for="table_border">Border</label>
|
63
|
+
<input id="table_border" name="table[border]" type="text" value="1"/>
|
64
|
+
</li>
|
65
|
+
<li id="table_spacing_input" class="string input optional stringish">
|
66
|
+
<label class="label" for="table_spacing">Spacing</label>
|
67
|
+
<input id="table_spacing" name="table[spacing]" type="text" value="0"/>
|
68
|
+
</li>
|
69
|
+
</ol>
|
70
|
+
</fieldset>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
<div class="mercury-display-controls">
|
77
|
+
<fieldset class="buttons">
|
78
|
+
<ol>
|
79
|
+
<li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Table" /></li>
|
80
|
+
</ol>
|
81
|
+
</fieldset>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</form>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<div class="mercury-color-picker">
|
2
|
+
<div class="picker" style="background:#FFFFFF"></div>
|
3
|
+
<div class="picker" style="background:#FFCCCC"></div>
|
4
|
+
<div class="picker" style="background:#FFCC99"></div>
|
5
|
+
<div class="picker" style="background:#FFFF99"></div>
|
6
|
+
<div class="picker" style="background:#FFFFCC"></div>
|
7
|
+
<div class="picker" style="background:#99FF99"></div>
|
8
|
+
<div class="picker" style="background:#99FFFF"></div>
|
9
|
+
<div class="picker" style="background:#CCFFFF"></div>
|
10
|
+
<div class="picker" style="background:#CCCCFF"></div>
|
11
|
+
<div class="picker" style="background:#FFCCFF"></div>
|
12
|
+
<div class="picker" style="background:#CCCCCC"></div>
|
13
|
+
<div class="picker" style="background:#FF6666"></div>
|
14
|
+
<div class="picker" style="background:#FF9966"></div>
|
15
|
+
<div class="picker" style="background:#FFFF66"></div>
|
16
|
+
<div class="picker" style="background:#FFFF33"></div>
|
17
|
+
<div class="picker" style="background:#66FF99"></div>
|
18
|
+
<div class="picker" style="background:#33FFFF"></div>
|
19
|
+
<div class="picker" style="background:#66FFFF"></div>
|
20
|
+
<div class="picker" style="background:#9999FF"></div>
|
21
|
+
<div class="picker" style="background:#FF99FF"></div>
|
22
|
+
<div class="picker" style="background:#C0C0C0"></div>
|
23
|
+
<div class="picker" style="background:#FF0000"></div>
|
24
|
+
<div class="picker" style="background:#FF9900"></div>
|
25
|
+
<div class="picker" style="background:#FFCC66"></div>
|
26
|
+
<div class="picker" style="background:#FFFF00"></div>
|
27
|
+
<div class="picker" style="background:#33FF33"></div>
|
28
|
+
<div class="picker" style="background:#66CCCC"></div>
|
29
|
+
<div class="picker" style="background:#33CCFF"></div>
|
30
|
+
<div class="picker" style="background:#6666CC"></div>
|
31
|
+
<div class="picker" style="background:#CC66CC"></div>
|
32
|
+
<div class="picker" style="background:#999999"></div>
|
33
|
+
<div class="picker" style="background:#CC0000"></div>
|
34
|
+
<div class="picker" style="background:#FF6600"></div>
|
35
|
+
<div class="picker" style="background:#FFCC33"></div>
|
36
|
+
<div class="picker" style="background:#FFCC00"></div>
|
37
|
+
<div class="picker" style="background:#33CC00"></div>
|
38
|
+
<div class="picker" style="background:#00CCCC"></div>
|
39
|
+
<div class="picker" style="background:#3366FF"></div>
|
40
|
+
<div class="picker" style="background:#6633FF"></div>
|
41
|
+
<div class="picker" style="background:#CC33CC"></div>
|
42
|
+
<div class="picker" style="background:#666666"></div>
|
43
|
+
<div class="picker" style="background:#990000"></div>
|
44
|
+
<div class="picker" style="background:#CC6600"></div>
|
45
|
+
<div class="picker" style="background:#CC9933"></div>
|
46
|
+
<div class="picker" style="background:#999900"></div>
|
47
|
+
<div class="picker" style="background:#009900"></div>
|
48
|
+
<div class="picker" style="background:#339999"></div>
|
49
|
+
<div class="picker" style="background:#3333FF"></div>
|
50
|
+
<div class="picker" style="background:#6600CC"></div>
|
51
|
+
<div class="picker" style="background:#993399"></div>
|
52
|
+
<div class="picker" style="background:#333333"></div>
|
53
|
+
<div class="picker" style="background:#660000"></div>
|
54
|
+
<div class="picker" style="background:#993300"></div>
|
55
|
+
<div class="picker" style="background:#996633"></div>
|
56
|
+
<div class="picker" style="background:#666600"></div>
|
57
|
+
<div class="picker" style="background:#006600"></div>
|
58
|
+
<div class="picker" style="background:#336666"></div>
|
59
|
+
<div class="picker" style="background:#000099"></div>
|
60
|
+
<div class="picker" style="background:#333399"></div>
|
61
|
+
<div class="picker" style="background:#663366"></div>
|
62
|
+
<div class="picker" style="background:#000000"></div>
|
63
|
+
<div class="picker" style="background:#330000"></div>
|
64
|
+
<div class="picker" style="background:#663300"></div>
|
65
|
+
<div class="picker" style="background:#663333"></div>
|
66
|
+
<div class="picker" style="background:#333300"></div>
|
67
|
+
<div class="picker" style="background:#003300"></div>
|
68
|
+
<div class="picker" style="background:#003333"></div>
|
69
|
+
<div class="picker" style="background:#000066"></div>
|
70
|
+
<div class="picker" style="background:#330099"></div>
|
71
|
+
<div class="picker" style="background:#330033"></div>
|
72
|
+
<div class="last-picked">Last Color Picked</div>
|
73
|
+
</div>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<div class="mercury-color-picker">
|
2
|
+
<div class="picker" style="background:#FFFFFF"></div>
|
3
|
+
<div class="picker" style="background:#FFCCCC"></div>
|
4
|
+
<div class="picker" style="background:#FFCC99"></div>
|
5
|
+
<div class="picker" style="background:#FFFF99"></div>
|
6
|
+
<div class="picker" style="background:#FFFFCC"></div>
|
7
|
+
<div class="picker" style="background:#99FF99"></div>
|
8
|
+
<div class="picker" style="background:#99FFFF"></div>
|
9
|
+
<div class="picker" style="background:#CCFFFF"></div>
|
10
|
+
<div class="picker" style="background:#CCCCFF"></div>
|
11
|
+
<div class="picker" style="background:#FFCCFF"></div>
|
12
|
+
<div class="picker" style="background:#CCCCCC"></div>
|
13
|
+
<div class="picker" style="background:#FF6666"></div>
|
14
|
+
<div class="picker" style="background:#FF9966"></div>
|
15
|
+
<div class="picker" style="background:#FFFF66"></div>
|
16
|
+
<div class="picker" style="background:#FFFF33"></div>
|
17
|
+
<div class="picker" style="background:#66FF99"></div>
|
18
|
+
<div class="picker" style="background:#33FFFF"></div>
|
19
|
+
<div class="picker" style="background:#66FFFF"></div>
|
20
|
+
<div class="picker" style="background:#9999FF"></div>
|
21
|
+
<div class="picker" style="background:#FF99FF"></div>
|
22
|
+
<div class="picker" style="background:#C0C0C0"></div>
|
23
|
+
<div class="picker" style="background:#FF0000"></div>
|
24
|
+
<div class="picker" style="background:#FF9900"></div>
|
25
|
+
<div class="picker" style="background:#FFCC66"></div>
|
26
|
+
<div class="picker" style="background:#FFFF00"></div>
|
27
|
+
<div class="picker" style="background:#33FF33"></div>
|
28
|
+
<div class="picker" style="background:#66CCCC"></div>
|
29
|
+
<div class="picker" style="background:#33CCFF"></div>
|
30
|
+
<div class="picker" style="background:#6666CC"></div>
|
31
|
+
<div class="picker" style="background:#CC66CC"></div>
|
32
|
+
<div class="picker" style="background:#999999"></div>
|
33
|
+
<div class="picker" style="background:#CC0000"></div>
|
34
|
+
<div class="picker" style="background:#FF6600"></div>
|
35
|
+
<div class="picker" style="background:#FFCC33"></div>
|
36
|
+
<div class="picker" style="background:#FFCC00"></div>
|
37
|
+
<div class="picker" style="background:#33CC00"></div>
|
38
|
+
<div class="picker" style="background:#00CCCC"></div>
|
39
|
+
<div class="picker" style="background:#3366FF"></div>
|
40
|
+
<div class="picker" style="background:#6633FF"></div>
|
41
|
+
<div class="picker" style="background:#CC33CC"></div>
|
42
|
+
<div class="picker" style="background:#666666"></div>
|
43
|
+
<div class="picker" style="background:#990000"></div>
|
44
|
+
<div class="picker" style="background:#CC6600"></div>
|
45
|
+
<div class="picker" style="background:#CC9933"></div>
|
46
|
+
<div class="picker" style="background:#999900"></div>
|
47
|
+
<div class="picker" style="background:#009900"></div>
|
48
|
+
<div class="picker" style="background:#339999"></div>
|
49
|
+
<div class="picker" style="background:#3333FF"></div>
|
50
|
+
<div class="picker" style="background:#6600CC"></div>
|
51
|
+
<div class="picker" style="background:#993399"></div>
|
52
|
+
<div class="picker" style="background:#333333"></div>
|
53
|
+
<div class="picker" style="background:#660000"></div>
|
54
|
+
<div class="picker" style="background:#993300"></div>
|
55
|
+
<div class="picker" style="background:#996633"></div>
|
56
|
+
<div class="picker" style="background:#666600"></div>
|
57
|
+
<div class="picker" style="background:#006600"></div>
|
58
|
+
<div class="picker" style="background:#336666"></div>
|
59
|
+
<div class="picker" style="background:#000099"></div>
|
60
|
+
<div class="picker" style="background:#333399"></div>
|
61
|
+
<div class="picker" style="background:#663366"></div>
|
62
|
+
<div class="picker" style="background:#000000"></div>
|
63
|
+
<div class="picker" style="background:#330000"></div>
|
64
|
+
<div class="picker" style="background:#663300"></div>
|
65
|
+
<div class="picker" style="background:#663333"></div>
|
66
|
+
<div class="picker" style="background:#333300"></div>
|
67
|
+
<div class="picker" style="background:#003300"></div>
|
68
|
+
<div class="picker" style="background:#003333"></div>
|
69
|
+
<div class="picker" style="background:#000066"></div>
|
70
|
+
<div class="picker" style="background:#330099"></div>
|
71
|
+
<div class="picker" style="background:#330033"></div>
|
72
|
+
<div class="last-picked">Last Color Picked</div>
|
73
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="mercury-snippet-panel">
|
2
|
+
<div class="filter">
|
3
|
+
<input class="filter" type="text">
|
4
|
+
</div>
|
5
|
+
<ul>
|
6
|
+
<li data-filter="example, snippet, favorite, beer">
|
7
|
+
<img alt="Snippet Name" data-snippet="example" src="/assets/mercury/default-snippet.png"/>
|
8
|
+
<h4>Snippet Name</h4>
|
9
|
+
<div class="description">A one or two line long description of what this snippet does.</div>
|
10
|
+
</li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="mercury-select-options">
|
2
|
+
<h1 data-tag="h1">Heading 1 <span><h1></span></h1>
|
3
|
+
<h2 data-tag="h2">Heading 2 <span><h2></span></h2>
|
4
|
+
<h3 data-tag="h3">Heading 3 <span><h3></span></h3>
|
5
|
+
<h4 data-tag="h4">Heading 4 <span><h4></span></h4>
|
6
|
+
<h5 data-tag="h5">Heading 5 <span><h5></span></h5>
|
7
|
+
<h6 data-tag="h6">Heading 6 <span><h6></span></h6>
|
8
|
+
<div data-tag="p">Paragraph <span><p></span></div>
|
9
|
+
<div data-tag="blockquote">Blockquote <span><blockquote></span></div>
|
10
|
+
<div data-tag="pre">Formatted <span><pre></span></div>
|
11
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= form_for 'options', { :html => { :style => 'width:600px' } } do |f| %>
|
2
|
+
|
3
|
+
<div class="mercury-display-pane-container">
|
4
|
+
<div class="mercury-display-pane">
|
5
|
+
<fieldset class="inputs">
|
6
|
+
<ol>
|
7
|
+
<li class="string input optional stringish" id="options_first_name_input">
|
8
|
+
<label class="label" for="options_first_name">First Name</label>
|
9
|
+
<input id="options_first_name" name="options[first_name]" type="text" value="<%= @options[:first_name] %>"/>
|
10
|
+
</li>
|
11
|
+
</ol>
|
12
|
+
</fieldset>
|
13
|
+
|
14
|
+
<fieldset class="inputs">
|
15
|
+
<legend><span>Options</span></legend>
|
16
|
+
<ol>
|
17
|
+
<li class="string input optional stringish" id="options_favorite_beer_input">
|
18
|
+
<label class="label" for="options_favorite_beer">Favorite Beer</label>
|
19
|
+
<input id="options_favorite_beer" name="options[favorite_beer]" type="text" value="<%= @options[:favorite_beer] %>"/>
|
20
|
+
</li>
|
21
|
+
</ol>
|
22
|
+
</fieldset>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="mercury-display-controls">
|
27
|
+
<fieldset class="buttons">
|
28
|
+
<ol>
|
29
|
+
<li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Snippet"/></li>
|
30
|
+
</ol>
|
31
|
+
</fieldset>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<strong><%= params[:options][:first_name] %></strong> likes <%= params[:options][:favorite_beer] %>
|
data/config/engine.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require "rails"
|
2
|
+
|
3
|
+
module Mercury
|
4
|
+
class Engine < Rails::Engine
|
5
|
+
|
6
|
+
# Additional application configuration to include precompiled assets.
|
7
|
+
initializer :assets do |app|
|
8
|
+
app.config.assets.precompile += %w( mercury.js mercury.css mercury_overrides.css )
|
9
|
+
end
|
10
|
+
|
11
|
+
# Require mercury authentication module and potentially other aspects later (so they can be overridden).
|
12
|
+
initializer 'mercury.add_lib' do |app|
|
13
|
+
require 'mercury/authentication'
|
14
|
+
end
|
15
|
+
|
16
|
+
# To load the routes for this Engine, within your main apps routes.rb file include:
|
17
|
+
#
|
18
|
+
# Mercury::Engine.routes
|
19
|
+
#
|
20
|
+
def self.routes
|
21
|
+
Rails.application.routes.draw do
|
22
|
+
#match '/editor(/*requested_uri)' => "mercury#edit", :as => :mercury_editor
|
23
|
+
|
24
|
+
# images handled by gnric (as assets)
|
25
|
+
#match '/mercury/images/browse' => 'mercury/images#index'
|
26
|
+
#put '/mercury/images/:id' => 'mercury/images#update'
|
27
|
+
#namespace :mercury do
|
28
|
+
# resources :images
|
29
|
+
#end
|
30
|
+
|
31
|
+
scope '/mercury' do
|
32
|
+
match ':type/:resource' => "mercury#resource"
|
33
|
+
match 'snippets/:name/options' => "mercury#snippet_options"
|
34
|
+
match 'snippets/:name/preview' => "mercury#snippet_preview"
|
35
|
+
end
|
36
|
+
|
37
|
+
if defined?(Mercury::Application)
|
38
|
+
match 'mercury/test_page' => "mercury#test_page"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to expect the editor to load properly
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I am on an editable page
|
9
|
+
|
10
|
+
|
11
|
+
Scenario: A user can expect to see the toolbar
|
12
|
+
Then I should see "Save" within the toolbar
|
13
|
+
And I should see "Preview" within the toolbar
|
14
|
+
And I should see "Bold" within the toolbar
|
15
|
+
|
16
|
+
|
17
|
+
Scenario: A user can expect to see the contents of the iframe
|
18
|
+
Then I should see "Editable region" in the content frame
|
19
|
+
|
20
|
+
|
21
|
+
Scenario: A user can expect to see the status bar
|
22
|
+
Then I should see "Mercury Editor v0.3.0" within the statusbar
|
@@ -0,0 +1,77 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to expect the editor to not get in the way when I navigate and submit forms
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I adjust the configuration to have: {"nonHijackableClasses": ["lightview"]}
|
9
|
+
And am on an editable page
|
10
|
+
|
11
|
+
|
12
|
+
Scenario: A user can navigate links targeting _top
|
13
|
+
When I follow "_top" in the content frame
|
14
|
+
Then I should be on the test page
|
15
|
+
|
16
|
+
|
17
|
+
Scenario: A user can navigate links targeting _blank
|
18
|
+
When I follow "_blank" in the content frame
|
19
|
+
Then I should be on the editable page
|
20
|
+
And I should see "test_page" in the "/mercury/test_page" window
|
21
|
+
|
22
|
+
|
23
|
+
Scenario: A user can navigate links targeting _self
|
24
|
+
When I follow "_self" in the content frame
|
25
|
+
Then I should be on the test page
|
26
|
+
|
27
|
+
|
28
|
+
Scenario: A user can navigate links with no target set
|
29
|
+
When I follow "[none]" in the content frame
|
30
|
+
Then I should be on the test page
|
31
|
+
|
32
|
+
|
33
|
+
Scenario: A user can navigate links that are ignored by configuration
|
34
|
+
When I follow "_self .lightview" in the content frame
|
35
|
+
Then I should be on the editable page
|
36
|
+
|
37
|
+
|
38
|
+
Scenario: A user can navigate links targeting random windows
|
39
|
+
When I follow "foo" in the content frame
|
40
|
+
Then I should be on the editable page
|
41
|
+
Then I should see "test_page" in the "foo" window
|
42
|
+
|
43
|
+
|
44
|
+
Scenario: A user can submit forms targeting _top
|
45
|
+
When I press "post _top" in the content frame
|
46
|
+
Then I should be on the test page
|
47
|
+
And I should see "post _top"
|
48
|
+
|
49
|
+
|
50
|
+
# todo: intermittent failure
|
51
|
+
# Scenario: A user can submit forms targeting _blank
|
52
|
+
# When I press "post _blank" in the content frame
|
53
|
+
# Then I should be on the editable page
|
54
|
+
# And I should see "post _blank" in the "/mercury/test_page" window
|
55
|
+
|
56
|
+
|
57
|
+
Scenario: A user can submit forms targeting _self
|
58
|
+
When I press "post _self" in the content frame
|
59
|
+
Then I should be on the test page
|
60
|
+
And I should see "post _self"
|
61
|
+
|
62
|
+
|
63
|
+
Scenario: A user can submit forms with no target set
|
64
|
+
When I press "get [none]" in the content frame
|
65
|
+
Then I should be on the test page
|
66
|
+
And I should see "get [none]"
|
67
|
+
|
68
|
+
|
69
|
+
Scenario: A user can submit forms that are ignored by configuration
|
70
|
+
When I press "post _self .lightview" in the content frame
|
71
|
+
Then I should be on the editable page
|
72
|
+
|
73
|
+
|
74
|
+
Scenario: A user can submit forms targeting random windows
|
75
|
+
When I press "get foo" in the content frame
|
76
|
+
Then I should be on the editable page
|
77
|
+
And I should see "get foo" in the "foo" window
|
@@ -0,0 +1,67 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature:
|
3
|
+
As a content editor type person
|
4
|
+
In order to manage content
|
5
|
+
I should be able to interact with various user interface aspects of the editor
|
6
|
+
|
7
|
+
Background:
|
8
|
+
Given I am on an editable page
|
9
|
+
|
10
|
+
Scenario: A user can expect all this!
|
11
|
+
|
12
|
+
|
13
|
+
# Scenario: A user can view and close the about dialog
|
14
|
+
When I click on the about the editor link
|
15
|
+
Then I should see "Mercury Editor" within the lightview title
|
16
|
+
And I should see "Mercury Editor is an open source HTML5 WYSIWYG editor written in Coffeescript using jQuery. The project has been released under the MIT license." within the lightview window
|
17
|
+
And I should see "Project Home" within the lightview window
|
18
|
+
And I should see "Project Source" within the lightview window
|
19
|
+
|
20
|
+
When I click on the lightview overlay
|
21
|
+
Then the lightview window should not be visible
|
22
|
+
And the lightview overlay should not be visible
|
23
|
+
|
24
|
+
|
25
|
+
# Scenario: A user can open and close select dropdowns
|
26
|
+
When I click on the formatblock editor dropdown
|
27
|
+
Then the formatblock select should be visible
|
28
|
+
And I should see "Heading 1 <h1>" within the formatblock select
|
29
|
+
|
30
|
+
When I click on the style editor dropdown
|
31
|
+
Then the style select should be visible
|
32
|
+
And the formatblock select should not be visible
|
33
|
+
|
34
|
+
|
35
|
+
# Scenario: A user can open and close palette dialogs
|
36
|
+
When I click on the background color editor button
|
37
|
+
Then the background color palette should be visible
|
38
|
+
|
39
|
+
When I click on the foreground color editor button
|
40
|
+
Then the foreground color palette should be visible
|
41
|
+
And the background color palette should not be visible
|
42
|
+
|
43
|
+
|
44
|
+
# Scenario: A user can open and close a panel
|
45
|
+
When I click on the "View History" button
|
46
|
+
Then the history panel should be visible
|
47
|
+
And I should see "Page Version History" within the history panel
|
48
|
+
|
49
|
+
When I click on the "View History" button
|
50
|
+
Then the history panel should not be visible
|
51
|
+
|
52
|
+
|
53
|
+
# Scenario: A user can open and close a modal window
|
54
|
+
When I click on the "Insert Link" button
|
55
|
+
Then the modal window should be visible
|
56
|
+
And the modal overlay should be visible
|
57
|
+
And I should see "Insert Link" within the modal title
|
58
|
+
And I should see "Standard Links" within the insert link modal
|
59
|
+
|
60
|
+
When I click on the modal close button
|
61
|
+
Then the modal window should not be visible
|
62
|
+
And the modal overlay should not be visible
|
63
|
+
|
64
|
+
When I click on the "Insert Link" button
|
65
|
+
And click on the modal overlay
|
66
|
+
Then the modal window should not be visible
|
67
|
+
And the modal overlay should not be visible
|
File without changes
|