kiteditor 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/{lib/generators/mercury/install/images/templates → app/controllers/mercury}/images_controller.rb +0 -0
- data/{lib/generators/mercury/install/images/templates/ar_paperclip_image.rb → app/models/mercury/image.rb} +0 -7
- data/app/views/layouts/mercury.html.erb +20 -10
- data/app/views/mercury/modals/character.html +1 -1
- data/app/views/mercury/modals/htmleditor.html +7 -3
- data/app/views/mercury/modals/link.html +51 -37
- data/app/views/mercury/modals/media.html +0 -102
- data/app/views/mercury/modals/table.html +73 -79
- data/app/views/mercury/panels/snippets.html +1 -6
- data/app/views/mercury/snippets/example/options.html.erb +27 -23
- data/{lib/generators/mercury/install/images/templates/ar_paperclip_image_migration.rb → db/migrate/20110526035601_create_mercury_images.rb} +0 -0
- data/features/loading/loading.feature +2 -5
- data/features/loading/user_interface.feature +7 -9
- data/features/regions/{full → editable}/advanced_editing.feature +0 -0
- data/features/regions/editable/basic_editing.feature +195 -0
- data/features/regions/{full → editable}/inserting_links.feature +19 -20
- data/features/regions/{full → editable}/inserting_media.feature +18 -36
- data/features/regions/{full → editable}/inserting_snippets.feature +18 -28
- data/features/regions/{full → editable}/inserting_special_characters.feature +2 -2
- data/features/regions/editable/inserting_tables.feature +109 -0
- data/features/regions/{full → editable}/pasting.feature +0 -0
- data/features/regions/{full → editable}/uploading_images.feature +0 -0
- data/features/regions/{markdown → markupable}/advanced_editing.feature +0 -0
- data/features/regions/{markdown → markupable}/basic_editing.feature +0 -0
- data/features/regions/{markdown → markupable}/inserting_links.feature +0 -0
- data/features/regions/{markdown → markupable}/inserting_media.feature +0 -0
- data/features/regions/{markdown → markupable}/inserting_snippets.feature +0 -0
- data/features/regions/{markdown → markupable}/inserting_special_characters.feature +0 -0
- data/features/regions/{markdown → markupable}/inserting_tables.feature +0 -0
- data/features/regions/{image → markupable}/uploading_images.feature +0 -0
- data/features/regions/{snippets → snippetable}/advanced_editing.feature +0 -0
- data/features/regions/{snippets → snippetable}/basic_editing.feature +0 -0
- data/features/regions/{snippets → snippetable}/inserting_snippets.feature +0 -0
- data/features/saving/saving.feature +8 -8
- data/features/step_definitions/mercury_steps.rb +438 -1
- data/features/support/env.rb +1 -11
- data/{lib/mercury/cucumber → features}/support/mercury_contents.rb +3 -3
- data/{lib/mercury/cucumber → features}/support/mercury_selectors.rb +20 -0
- data/features/support/selectors.rb +0 -23
- data/lib/generators/mercury/install/install_generator.rb +23 -12
- data/lib/generators/mercury/install/{images/templates → templates}/mongoid_paperclip_image.rb +0 -0
- data/lib/mercury/authentication.rb +0 -1
- data/lib/mercury-rails.rb +2 -1
- data/spec/javascripts/mercury/{dialog_spec.coffee → dialog_spec.js.coffee} +12 -11
- data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +4 -3
- data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/lightview_spec.js.coffee +142 -180
- data/spec/javascripts/mercury/mercury_spec.js.coffee +13 -19
- data/spec/javascripts/mercury/modal_spec.js.coffee +148 -192
- data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +5 -4
- data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +34 -107
- data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +26 -106
- data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +3 -2
- data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +40 -50
- data/spec/javascripts/mercury/page_editor_spec.js.coffee +80 -124
- data/spec/javascripts/mercury/palette_spec.js.coffee +5 -4
- data/spec/javascripts/mercury/panel_spec.js.coffee +12 -9
- data/spec/javascripts/mercury/region_spec.js.coffee +17 -22
- data/spec/javascripts/mercury/regions/{full_spec.js.coffee → editable_spec.js.coffee} +28 -26
- data/spec/javascripts/mercury/regions/{markdown_spec.js.coffee → markupable_spec.js.coffee} +34 -32
- data/spec/javascripts/mercury/regions/{snippets_spec.js.coffee → snippetable_spec.js.coffee} +55 -54
- data/spec/javascripts/mercury/select_spec.js.coffee +5 -4
- data/spec/javascripts/mercury/snippet_spec.js.coffee +16 -92
- data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +16 -31
- data/spec/javascripts/mercury/statusbar_spec.js.coffee +10 -9
- data/spec/javascripts/mercury/table_editor_spec.js.coffee +2 -1
- data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +9 -7
- data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +26 -55
- data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +13 -13
- data/spec/javascripts/mercury/toolbar_spec.js.coffee +14 -43
- data/spec/javascripts/mercury/tooltip_spec.js.coffee +2 -1
- data/spec/javascripts/mercury/uploader_spec.js.coffee +33 -47
- data/spec/javascripts/{support/event_simulation.js → spec_helper.js} +2 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialog.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialogs/backcolor.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialogs/forecolor.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialogs/formatblock.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialogs/snippetpanel.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/dialogs/style.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/lightview.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/modal.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/modals/htmleditor.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/modals/insertcharacter.html +0 -0
- data/spec/javascripts/templates/mercury/modals/insertlink.html +30 -0
- data/spec/javascripts/templates/mercury/modals/insertmedia.html +35 -0
- data/spec/javascripts/{fixtures → templates}/mercury/modals/insertsnippet.html +0 -0
- data/spec/javascripts/templates/mercury/modals/inserttable.html +27 -0
- data/spec/javascripts/{fixtures → templates}/mercury/page_editor.html +4 -4
- data/spec/javascripts/{fixtures → templates}/mercury/palette.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/panel.html +0 -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/{fixtures → templates}/mercury/select.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/snippet.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/snippet_toolbar.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/statusbar.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/table_editor.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/toolbar.button.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/toolbar.button_group.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/toolbar.expander.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/toolbar.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/tooltip.html +0 -0
- data/spec/javascripts/{fixtures → templates}/mercury/uploader.html +0 -0
- data/{app → vendor}/assets/images/mercury/button.png +0 -0
- data/{app → vendor}/assets/images/mercury/close.png +0 -0
- data/{app → vendor}/assets/images/mercury/loading-dark.gif +0 -0
- data/{app → vendor}/assets/images/mercury/loading-light.gif +0 -0
- data/{app → vendor}/assets/images/mercury/missing-image.png +0 -0
- data/{app → vendor}/assets/images/mercury/search-icon.png +0 -0
- data/{app → vendor}/assets/images/mercury/temp-logo.png +0 -0
- data/{app/assets/javascripts → vendor/assets/javascripts/mercury/dependencies}/jquery-1.7.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery.additions.js +13 -103
- data/{app → vendor}/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dependencies/liquidmetal.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dependencies/showdown.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dialog.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
- data/{app → vendor}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
- data/{app → vendor}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/finalize.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/lightview.js.coffee +17 -38
- data/{features/regions/markdown/uploading_images.feature → vendor/assets/javascripts/mercury/locales/da.locale.js.coffee} +0 -0
- data/{app → vendor}/assets/javascripts/mercury/locales/de.locale.js.coffee +10 -4
- data/{app → vendor}/assets/javascripts/mercury/locales/es.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/example.local.js.coffee +5 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/fr.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/it.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/ko.local.js.coffee +10 -4
- data/{app → vendor}/assets/javascripts/mercury/locales/nl.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/pt.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/sv.local.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +9 -3
- data/{app → vendor}/assets/javascripts/mercury/mercury.js.coffee +1 -10
- data/{app → vendor}/assets/javascripts/mercury/modal.js.coffee +40 -62
- data/{app → vendor}/assets/javascripts/mercury/modals/htmleditor.js.coffee +2 -3
- data/{app → vendor}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +0 -1
- data/{app → vendor}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +0 -2
- data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +54 -0
- data/{app → vendor}/assets/javascripts/mercury/native_extensions.js.coffee +6 -0
- data/{app → vendor}/assets/javascripts/mercury/page_editor.js.coffee +50 -84
- data/{app → vendor}/assets/javascripts/mercury/palette.js.coffee +1 -1
- data/{app → vendor}/assets/javascripts/mercury/panel.js.coffee +2 -3
- data/{app → vendor}/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +2 -2
- data/{app → vendor}/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/region.js.coffee +17 -18
- data/{app/assets/javascripts/mercury/regions/full.js.coffee → vendor/assets/javascripts/mercury/regions/editable.js.coffee} +31 -41
- data/{app/assets/javascripts/mercury/regions/markdown.js.coffee → vendor/assets/javascripts/mercury/regions/markupable.js.coffee} +24 -29
- data/{app → vendor}/assets/javascripts/mercury/regions/simple.js.coffee +54 -11
- data/{app/assets/javascripts/mercury/regions/snippets.js.coffee → vendor/assets/javascripts/mercury/regions/snippetable.js.coffee} +9 -10
- data/{app → vendor}/assets/javascripts/mercury/select.js.coffee +1 -1
- data/{app → vendor}/assets/javascripts/mercury/snippet_toolbar.js.coffee +6 -19
- data/{app → vendor}/assets/javascripts/mercury/statusbar.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/support/history.js +0 -0
- data/{app → vendor}/assets/javascripts/mercury/table_editor.js.coffee +0 -16
- data/{app → vendor}/assets/javascripts/mercury/toolbar.button.js.coffee +30 -45
- data/{app → vendor}/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
- data/{app → vendor}/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -4
- data/{app → vendor}/assets/javascripts/mercury/toolbar.js.coffee +6 -10
- data/{app → vendor}/assets/javascripts/mercury/tooltip.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/mercury/uploader.js.coffee +19 -37
- data/{app → vendor}/assets/javascripts/mercury.js +87 -60
- data/vendor/assets/javascripts/mercury_loader.js +193 -0
- data/vendor/assets/javascripts/mercury_overrides.js +6 -0
- data/{app → vendor}/assets/stylesheets/mercury/all_images.css.erb +2 -6
- data/{app → vendor}/assets/stylesheets/mercury/dialog.css +8 -21
- data/{app → vendor}/assets/stylesheets/mercury/lightview.css +56 -6
- data/vendor/assets/stylesheets/mercury/mercury.css +151 -0
- data/{app → vendor}/assets/stylesheets/mercury/modal.css +32 -15
- data/{app → vendor}/assets/stylesheets/mercury/statusbar.css +0 -0
- data/{app → vendor}/assets/stylesheets/mercury/toolbar.css +1 -4
- data/{app → vendor}/assets/stylesheets/mercury/tooltip.css +0 -0
- data/{app → vendor}/assets/stylesheets/mercury/uploader.css +4 -4
- data/{app → vendor}/assets/stylesheets/mercury.css +5 -1
- data/vendor/assets/stylesheets/mercury_overrides.css +17 -0
- metadata +197 -367
- data/POST_INSTALL +0 -21
- data/app/assets/images/mercury/default-snippet.png +0 -0
- data/app/assets/images/mercury/toolbar/editable/buttons.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/_expander.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/action.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/preview.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/redo.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/save.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/snippetpanel.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/tools.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/undo.png +0 -0
- data/app/assets/images/mercury/toolbar/primary/user.png +0 -0
- data/app/assets/images/mercury/toolbar/snippets/buttons.png +0 -0
- data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +0 -201
- data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +0 -208
- data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +0 -209
- data/app/assets/javascripts/mercury/locales/pl.locale.js.coffee +0 -213
- data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +0 -200
- data/app/assets/javascripts/mercury/locales/uk.locale.js.coffee +0 -200
- data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +0 -203
- data/app/assets/javascripts/mercury/mercury-compiled.js +0 -10720
- data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +0 -152
- data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +0 -132
- data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +0 -68
- data/app/assets/javascripts/mercury/regions/image.js.coffee +0 -93
- data/app/assets/javascripts/mercury/snippet.js.coffee +0 -136
- data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +0 -61
- data/app/assets/stylesheets/_mercury-sass.scss +0 -33
- data/app/assets/stylesheets/mercury/bootstrap-ish.css +0 -1367
- data/app/assets/stylesheets/mercury/bootstrap-overrides.css +0 -61
- data/app/assets/stylesheets/mercury/mercury.css +0 -43
- data/app/helpers/mercury_helper.rb +0 -7
- data/app/views/layouts/mercury.html.haml +0 -19
- data/app/views/layouts/mercury.html.slim +0 -19
- data/app/views/mercury/snippets/no_options/preview.html.erb +0 -1
- data/config/routes.rb +0 -9
- data/features/generators/authentication.feature +0 -10
- data/features/generators/images.feature +0 -41
- data/features/generators/install.feature +0 -21
- data/features/regions/full/basic_editing.feature +0 -198
- data/features/regions/full/inserting_tables.feature +0 -109
- data/features/regions/simple/basic_editing.feature +0 -5
- data/features/step_definitions/custom_web_steps.rb +0 -22
- data/features/step_definitions/generator_steps.rb +0 -23
- data/features/support/aruba.rb +0 -28
- data/lib/generators/mercury/install/authentication/authentication_generator.rb +0 -17
- data/lib/generators/mercury/install/images/images_generator.rb +0 -47
- data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +0 -408
- data/lib/mercury/cucumber/step_definitions.rb +0 -13
- data/lib/mercury/engine.rb +0 -19
- data/lib/mercury/rails.rb +0 -5
- data/lib/mercury/version.rb +0 -3
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -0
- data/spec/dummy/app/assets/javascripts/prototype.js +0 -6082
- data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -110
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/app/views/layouts/mercury.html.erb +0 -28
- data/spec/dummy/config/application.rb +0 -58
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -10
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/teabag.rb +0 -9
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -5
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/blank.html +0 -1
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/images/bunny.gif +0 -0
- data/spec/dummy/public/images/bunny2.jpg +0 -0
- data/spec/dummy/public/index.html +0 -279
- data/spec/dummy/script/rails +0 -6
- data/spec/javascripts/fixtures/mercury/modals/insertlink.html +0 -67
- data/spec/javascripts/fixtures/mercury/modals/insertmedia.html +0 -87
- data/spec/javascripts/fixtures/mercury/modals/inserttable.html +0 -73
- data/spec/javascripts/fixtures/mercury/region.html +0 -6
- data/spec/javascripts/fixtures/mercury/regions/full.html +0 -1
- data/spec/javascripts/fixtures/mercury/regions/image.html +0 -1
- data/spec/javascripts/fixtures/mercury/regions/markdown.html +0 -1
- data/spec/javascripts/fixtures/mercury/regions/simple.html +0 -1
- data/spec/javascripts/fixtures/mercury/regions/snippets.html +0 -4
- data/spec/javascripts/mercury/regions/image_spec.js.coffee +0 -33
- data/spec/javascripts/mercury/regions/simple_spec.js.coffee +0 -32
- data/spec/javascripts/spec_helper.coffee +0 -4
- data/spec/teabag_env.rb +0 -32
@@ -1,61 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Bootsrap Overrides (overrides what's in bootstrap-ish)
|
3
|
-
*---------------------------------------------------------------------------*/
|
4
|
-
.btn-group > .btn {
|
5
|
-
margin-right: 0;
|
6
|
-
}
|
7
|
-
form {
|
8
|
-
margin-bottom: 0;
|
9
|
-
}
|
10
|
-
fieldset {
|
11
|
-
margin-bottom: 15px;
|
12
|
-
background: #F6F6F6;
|
13
|
-
border: 1px solid #CCC;
|
14
|
-
border-radius: 7px;
|
15
|
-
padding: 10px;
|
16
|
-
}
|
17
|
-
legend {
|
18
|
-
display: block;
|
19
|
-
position: relative;
|
20
|
-
margin-left: 10px;
|
21
|
-
margin-bottom: 0;
|
22
|
-
font-weight: bold;
|
23
|
-
width: auto;
|
24
|
-
padding: 0;
|
25
|
-
font-size: 12px;
|
26
|
-
color: #333333;
|
27
|
-
border: 0;
|
28
|
-
line-height: 1px;
|
29
|
-
}
|
30
|
-
select {
|
31
|
-
width: auto;
|
32
|
-
}
|
33
|
-
.form-actions {
|
34
|
-
margin-top: 0;
|
35
|
-
margin-bottom: 0;
|
36
|
-
background-color: transparent;
|
37
|
-
}
|
38
|
-
.control-group {
|
39
|
-
margin-bottom: 0;
|
40
|
-
}
|
41
|
-
legend + .control-group {
|
42
|
-
margin-top: 0;
|
43
|
-
-webkit-margin-top-collapse: separate;
|
44
|
-
}
|
45
|
-
.form-horizontal .control-group {
|
46
|
-
margin-bottom: 0;
|
47
|
-
}
|
48
|
-
.form-horizontal .controls {
|
49
|
-
margin-left: 150px;
|
50
|
-
}
|
51
|
-
.form-horizontal hr {
|
52
|
-
margin-left: 150px;
|
53
|
-
border: 0;
|
54
|
-
border-top: 1px solid #ccc;
|
55
|
-
}
|
56
|
-
label input[type=radio] {
|
57
|
-
margin-right: 5px;
|
58
|
-
}
|
59
|
-
.form-actions {
|
60
|
-
padding-bottom: 0;
|
61
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
*= require_self
|
3
|
-
*= require ./bootstrap-overrides
|
4
|
-
*= require ./dialog
|
5
|
-
*= require ./lightview
|
6
|
-
*= require ./modal
|
7
|
-
*= require ./statusbar
|
8
|
-
*= require ./toolbar
|
9
|
-
*= require ./tooltip
|
10
|
-
*= require ./uploader
|
11
|
-
*= require ./all_images
|
12
|
-
*/
|
13
|
-
|
14
|
-
/*
|
15
|
-
* General Layout
|
16
|
-
*---------------------------------------------------------------------------*/
|
17
|
-
|
18
|
-
/* Disable text sizing in webkit (ipad/iphone etc -- should apply to mercury only) */
|
19
|
-
html {
|
20
|
-
-webkit-text-size-adjust: none;
|
21
|
-
}
|
22
|
-
|
23
|
-
html, body {
|
24
|
-
-webkit-transition: -webkit-transform 3s;
|
25
|
-
margin: 0;
|
26
|
-
padding: 0;
|
27
|
-
}
|
28
|
-
|
29
|
-
.mercury-iframe {
|
30
|
-
position: absolute;
|
31
|
-
top: 0;
|
32
|
-
width: 100%;
|
33
|
-
visibility: hidden;
|
34
|
-
}
|
35
|
-
.mercury-focusable {
|
36
|
-
position: absolute;
|
37
|
-
opacity: 0;
|
38
|
-
}
|
39
|
-
|
40
|
-
.filter {
|
41
|
-
margin: 0;
|
42
|
-
padding: 0;
|
43
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%meta{:name => "viewport", :content => "width=device-width, maximum-scale=1.0, initial-scale=1.0"}
|
5
|
-
= csrf_meta_tags
|
6
|
-
%title Mercury Editor
|
7
|
-
= stylesheet_link_tag 'mercury'
|
8
|
-
= javascript_include_tag 'jquery-1.7', 'mercury'
|
9
|
-
%body
|
10
|
-
:javascript
|
11
|
-
// Set to the url that you want to save any given page to, leave null for default handling.
|
12
|
-
var saveUrl = null;
|
13
|
-
|
14
|
-
// Instantiate the PageEditor
|
15
|
-
new Mercury.PageEditor(saveUrl, {
|
16
|
-
saveStyle: null, // 'form', or 'json' (default json)
|
17
|
-
saveMethod: null, // 'PUT', or 'POST', (create, vs. update -- default PUT)
|
18
|
-
visible: true // boolean - if the interface should start visible or not
|
19
|
-
});
|
@@ -1,19 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
html
|
3
|
-
head
|
4
|
-
meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0"
|
5
|
-
= csrf_meta_tags
|
6
|
-
title Mercury Editor
|
7
|
-
= stylesheet_link_tag 'mercury'
|
8
|
-
= javascript_include_tag 'jquery', 'mercury'
|
9
|
-
body
|
10
|
-
javascript:
|
11
|
-
// Set to the url that you want to save any given page to, leave null for default handling.
|
12
|
-
var saveUrl = null;
|
13
|
-
|
14
|
-
// Instantiate the PageEditor
|
15
|
-
new Mercury.PageEditor(saveUrl, {
|
16
|
-
saveStyle: null, // 'form', or 'json' (default json)
|
17
|
-
saveMethod: null, // 'PUT', or 'POST', (create, vs. update -- default PUT)
|
18
|
-
visible: true // boolean - if the interface should start visible or not
|
19
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
<strong>No Option Snippet</strong>
|
data/config/routes.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Mercury::Engine.routes.draw do
|
2
|
-
get '/editor(/*requested_uri)' => "mercury#edit", :as => :mercury_editor
|
3
|
-
|
4
|
-
scope '/mercury' do
|
5
|
-
get ':type/:resource' => "mercury#resource"
|
6
|
-
get 'snippets/:name/options' => "mercury#snippet_options"
|
7
|
-
get 'snippets/:name/preview' => "mercury#snippet_preview"
|
8
|
-
end
|
9
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Feature:
|
2
|
-
As a developer
|
3
|
-
In order to restrict editing using Mercury
|
4
|
-
I should be able to use a generator to setup my application
|
5
|
-
|
6
|
-
Scenario: I can install a basic authentication template
|
7
|
-
Given I have created a new rails application
|
8
|
-
When I successfully run `bundle exec rails generate mercury:install:authentication --trace`
|
9
|
-
Then the following files should exist:
|
10
|
-
| lib/mercury/authentication.rb |
|
@@ -1,41 +0,0 @@
|
|
1
|
-
Feature:
|
2
|
-
As a developer
|
3
|
-
In order to use image processing within Mercury
|
4
|
-
I should be able to use a generator to setup my application
|
5
|
-
|
6
|
-
Scenario: I can install the image processing files required for Mercury
|
7
|
-
Given I have created a new rails application
|
8
|
-
When I successfully run `bundle exec rails generate mercury:install:images --trace`
|
9
|
-
Then the following files should exist:
|
10
|
-
| app/controllers/mercury/images_controller.rb |
|
11
|
-
| app/models/mercury/image.rb |
|
12
|
-
And the file "app/models/mercury/image.rb" should contain "class Mercury::Image < ActiveRecord::Base"
|
13
|
-
And should have the migration "create_mercury_images.rb"
|
14
|
-
And the file "config/routes.rb" should contain:
|
15
|
-
"""
|
16
|
-
namespace :mercury do
|
17
|
-
resources :images
|
18
|
-
end
|
19
|
-
"""
|
20
|
-
And the file "Gemfile" should contain "gem 'paperclip'"
|
21
|
-
|
22
|
-
Scenario: I can install the image processing files required for Mercury using Mongoid
|
23
|
-
Given I have created a new rails application
|
24
|
-
When I successfully run `bundle exec rails generate mercury:install:images --orm mongoid --trace`
|
25
|
-
Then the following files should exist:
|
26
|
-
| app/controllers/mercury/images_controller.rb |
|
27
|
-
| app/models/mercury/image.rb |
|
28
|
-
And the file "app/models/mercury/image.rb" should contain:
|
29
|
-
"""
|
30
|
-
class Mercury::Image
|
31
|
-
include Mongoid::Document
|
32
|
-
include Mongoid::Paperclip
|
33
|
-
"""
|
34
|
-
And should not have the migration "create_mercury_images.rb"
|
35
|
-
And the file "config/routes.rb" should contain:
|
36
|
-
"""
|
37
|
-
namespace :mercury do
|
38
|
-
resources :images
|
39
|
-
end
|
40
|
-
"""
|
41
|
-
And the file "Gemfile" should contain "gem 'paperclip'"
|
@@ -1,21 +0,0 @@
|
|
1
|
-
Feature:
|
2
|
-
As a developer
|
3
|
-
In order to use Mercury
|
4
|
-
I should be able to use a generator to install configuration and overrides into my application
|
5
|
-
|
6
|
-
Scenario: I can install the Mercury configuration file
|
7
|
-
Given I have created a new rails application
|
8
|
-
When I run `bundle exec rails generate mercury:install --trace` interactively
|
9
|
-
And I type "N"
|
10
|
-
Then the following files should exist:
|
11
|
-
| app/assets/javascripts/mercury.js |
|
12
|
-
And the file "config/routes.rb" should contain "mount Mercury::Engine => '/'"
|
13
|
-
|
14
|
-
Scenario: I can install the configuration file and overrides
|
15
|
-
Given I have created a new rails application
|
16
|
-
When I successfully run `bundle exec rails generate mercury:install --full --trace`
|
17
|
-
Then the following files should exist:
|
18
|
-
| app/assets/javascripts/mercury.js |
|
19
|
-
| app/assets/stylesheets/mercury.css |
|
20
|
-
| app/views/layouts/mercury.html.erb |
|
21
|
-
And the file "config/routes.rb" should contain "mount Mercury::Engine => '/'"
|
@@ -1,198 +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 full 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 full 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 full 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 full 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 full 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 full 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 full 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 full 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 full 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 full 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 full region should be "this is <span>simple</span> <b>content</b>"
|
54
|
-
|
55
|
-
|
56
|
-
Scenario: A user can underline content
|
57
|
-
Given the content of the full region is simple content
|
58
|
-
And I make a selection
|
59
|
-
|
60
|
-
When I click on the underline editor button
|
61
|
-
Then the contents of the full region should be "this is <u><span>simple</span></u> <b>content</b>"
|
62
|
-
|
63
|
-
When I click on the underline editor button
|
64
|
-
Then the contents of the full region should be "this is <span>simple</span> <b>content</b>"
|
65
|
-
|
66
|
-
|
67
|
-
Scenario: A user can make content superscript
|
68
|
-
Given the content of the full region is simple content
|
69
|
-
And I make a selection
|
70
|
-
|
71
|
-
When I click on the superscript editor button
|
72
|
-
Then the contents of the full region should be "this is <sup><span>simple</span></sup> <b>content</b>"
|
73
|
-
|
74
|
-
When I click on the superscript editor button
|
75
|
-
Then the contents of the full region should be "this is <span>simple</span> <b>content</b>"
|
76
|
-
|
77
|
-
|
78
|
-
Scenario: A user can make content subscript
|
79
|
-
Given the content of the full region is simple content
|
80
|
-
And I make a selection
|
81
|
-
|
82
|
-
When I click on the subscript editor button
|
83
|
-
Then the contents of the full region should be "this is <sub><span>simple</span></sub> <b>content</b>"
|
84
|
-
|
85
|
-
When I click on the subscript editor button
|
86
|
-
Then the contents of the full region should be "this is <span>simple</span> <b>content</b>"
|
87
|
-
|
88
|
-
|
89
|
-
Scenario: A user can justify content to the left, center, right, or fully justified
|
90
|
-
# firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
|
91
|
-
Given the content of the full region has justifiable content
|
92
|
-
And I make a selection
|
93
|
-
|
94
|
-
When I click on the justify left editor button
|
95
|
-
Then the contents of the full region should be "<div>first line</div><br><div align='left'>this is <span>justifiable</span><b>content</b></div>"
|
96
|
-
|
97
|
-
When I click on the justify center editor button
|
98
|
-
Then the contents of the full region should be "<div>first line</div><br><div align='center'>this is <span>justifiable</span><b>content</b></div>"
|
99
|
-
|
100
|
-
When I click on the justify right editor button
|
101
|
-
Then the contents of the full region should be "<div>first line</div><br><div align='right'>this is <span>justifiable</span><b>content</b></div>"
|
102
|
-
|
103
|
-
When I click on the full justification editor button
|
104
|
-
Then the contents of the full region should be "<div>first line</div><br><div align='justify'>this is <span>justifiable</span><b>content</b></div>"
|
105
|
-
|
106
|
-
|
107
|
-
Scenario: A user can make an unordered list
|
108
|
-
Given the content of the full region is simple content
|
109
|
-
And I make a selection
|
110
|
-
|
111
|
-
When I click on the insert unordered list editor button
|
112
|
-
Then the contents of the full region should be "<ul><li>this is <span>simple</span> <b>content</b></li></ul>"
|
113
|
-
|
114
|
-
# todo: we should test enter and tab, and shift+tab in advanced editing
|
115
|
-
|
116
|
-
|
117
|
-
Scenario: A user can make an ordered list
|
118
|
-
Given the content of the full region is simple content
|
119
|
-
And I make a selection
|
120
|
-
|
121
|
-
When I click on the insert ordered list editor button
|
122
|
-
Then the contents of the full region should be "<ol><li>this is <span>simple</span> <b>content</b></li></ol>"
|
123
|
-
|
124
|
-
# todo: we should test enter and tab, and shift+tab in advanced editing
|
125
|
-
|
126
|
-
|
127
|
-
Scenario: A user can indent and outdent content
|
128
|
-
# firefox: this isn't possible on the first line due to a bug in gecko, so we have special content for it
|
129
|
-
Given the content of the full region has justifiable content
|
130
|
-
And I make a selection
|
131
|
-
|
132
|
-
When I click on the indent editor button
|
133
|
-
Then the contents of the full region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote>"
|
134
|
-
|
135
|
-
When I click on the indent editor button
|
136
|
-
Then the contents of the full region should be "<div>first line</div><br><blockquote><blockquote>this is <span>justifiable</span><b>content</b></blockquote></blockquote>"
|
137
|
-
|
138
|
-
When I click on the outdent editor button
|
139
|
-
Then the contents of the full region should be "<div>first line</div><br><blockquote>this is <span>justifiable</span><b>content</b></blockquote>"
|
140
|
-
|
141
|
-
When I click on the outdent editor button
|
142
|
-
Then the contents of the full region should be "<div>first line</div><br>this is <span>justifiable</span><b>content</b>"
|
143
|
-
|
144
|
-
|
145
|
-
Scenario: A user can insert horizontal rules
|
146
|
-
Given the content of the full region is simple content
|
147
|
-
And I make a selection
|
148
|
-
|
149
|
-
When I click on the insert hr editor button
|
150
|
-
Then the contents of the full region should be "this is <hr> <b>content</b>"
|
151
|
-
|
152
|
-
When I click on the insert hr editor button
|
153
|
-
Then the contents of the full region should be "this is <hr><hr> <b>content</b>"
|
154
|
-
|
155
|
-
|
156
|
-
Scenario: A user can clean/remove formatting on their selection
|
157
|
-
Given the content of the full region has wrapped content
|
158
|
-
And I make a selection
|
159
|
-
|
160
|
-
When I click on the remove formatting editor button
|
161
|
-
Then the contents of the full region should be "this is wrapped content"
|
162
|
-
|
163
|
-
|
164
|
-
Scenario: A user can wrap content within predefined styles
|
165
|
-
Given the content of the full region is simple content
|
166
|
-
And I make a selection
|
167
|
-
|
168
|
-
When I click on the style editor dropdown
|
169
|
-
And select the red style from the dropdown
|
170
|
-
Then the contents of the full region should be "this is <span class='red'><span>simple</span></span> <b>content</b>"
|
171
|
-
|
172
|
-
|
173
|
-
Scenario: A user can wrap content in formatted block tags
|
174
|
-
Given the content of the full region is simple content
|
175
|
-
And I make a selection
|
176
|
-
|
177
|
-
When I click on the block format editor dropdown
|
178
|
-
And select the heading 2 block from the dropdown
|
179
|
-
Then the contents of the full region should be "<h2>this is <span>simple</span> <b>content</b></h2>"
|
180
|
-
|
181
|
-
|
182
|
-
Scenario: A user can set the background color of a selection
|
183
|
-
Given the content of the full region is simple content
|
184
|
-
And I make a selection
|
185
|
-
|
186
|
-
When I click on the background color editor palette
|
187
|
-
And click on the color red
|
188
|
-
Then the contents of the full region should be "this is <span style='background-color:#FF0000'><span>simple</span></span> <b>content</b>"
|
189
|
-
|
190
|
-
|
191
|
-
Scenario: A user can set the foreground color
|
192
|
-
Given the content of the full region is simple content
|
193
|
-
And I make a selection
|
194
|
-
|
195
|
-
When I click on the foreground color editor palette
|
196
|
-
And click on the color red
|
197
|
-
Then the contents of the full region should be "this is <font color='#FF0000'><span>simple</span></font> <b>content</b>"
|
198
|
-
|
@@ -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 full 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 full region should be "this is <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 a full region)
|
61
|
-
Given the content of the full 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 full 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 full 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 full 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 full 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 full 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 full 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 a full region)
|
91
|
-
Given the content of the full 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 full 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 full 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 a full region)
|
102
|
-
Given the content of the full 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 full 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 full 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,22 +0,0 @@
|
|
1
|
-
## Generic web steps
|
2
|
-
#------------------------------------------------------------------------------
|
3
|
-
When /^(?:|I )click on (.+)$/ do |locator|
|
4
|
-
selector = selector_for(locator)
|
5
|
-
find(selector, :message => "Unable to locate the element '#{selector}' to click on").click
|
6
|
-
end
|
7
|
-
|
8
|
-
Then /^(.+) should (not )?be visible$/ do |locator, boolean|
|
9
|
-
selector = selector_for(locator)
|
10
|
-
if boolean == 'not '
|
11
|
-
page.has_no_css?("#{selector}")
|
12
|
-
else
|
13
|
-
page.has_css?("#{selector}", :visible => true)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# scoping step for different windows
|
18
|
-
When /^(.*) in the "([^"]*)" window$/ do |s, window|
|
19
|
-
page.driver.within_window(window) do
|
20
|
-
step(s)
|
21
|
-
end
|
22
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
When /^I add Mercury as a gem dependency$/ do
|
2
|
-
append_to_file('Gemfile', %{\ngem "mercury-rails", :path => "#{File.expand_path('../../../', __FILE__)}"\n})
|
3
|
-
end
|
4
|
-
|
5
|
-
When "I have created a new rails application" do
|
6
|
-
step %{I reset Bundler environment variable}
|
7
|
-
step %{I successfully run `bundle exec rails new testapp --skip-bundle`}
|
8
|
-
step %{I cd to "testapp"}
|
9
|
-
step %{I add Mercury as a gem dependency}
|
10
|
-
step %{I run `bundle install --local`}
|
11
|
-
end
|
12
|
-
|
13
|
-
Then /^should have the migration "([^"]*)"$/ do |migration|
|
14
|
-
in_current_dir do
|
15
|
-
Dir["db/migrate/*_#{migration}"].length.should == 1
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
Then /^should not have the migration "([^"]*)"$/ do |migration|
|
20
|
-
in_current_dir do
|
21
|
-
Dir["db/migrate/*_#{migration}"].length.should == 0
|
22
|
-
end
|
23
|
-
end
|
data/features/support/aruba.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
BUNDLE_ENV_VARS = %w(RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE)
|
2
|
-
ORIGINAL_BUNDLE_VARS = Hash[ENV.select{ |key,value| BUNDLE_ENV_VARS.include?(key) }]
|
3
|
-
|
4
|
-
Before do
|
5
|
-
if ! ENV['BUNDLE_GEMFILE'].include?(Dir.pwd)
|
6
|
-
ENV['BUNDLE_GEMFILE'] = File.join(Dir.pwd, ENV['BUNDLE_GEMFILE'])
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
After do
|
11
|
-
ORIGINAL_BUNDLE_VARS.each_pair do |key, value|
|
12
|
-
ENV[key] = value
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
When /^I reset Bundler environment variable$/ do
|
17
|
-
BUNDLE_ENV_VARS.each do |key|
|
18
|
-
ENV[key] = nil
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
Before do
|
23
|
-
@aruba_timeout_seconds = 20
|
24
|
-
end
|
25
|
-
|
26
|
-
Before('@slow') do
|
27
|
-
@aruba_timeout_seconds = 180
|
28
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require "mercury/engine"
|
2
|
-
|
3
|
-
module Mercury
|
4
|
-
module Generators
|
5
|
-
module Install
|
6
|
-
class AuthenticationGenerator < Rails::Generators::Base
|
7
|
-
source_root Mercury::Engine.root
|
8
|
-
|
9
|
-
desc "Installs an authentication example so you can restrict access to editing."
|
10
|
-
|
11
|
-
def copy_authentication_overrides
|
12
|
-
copy_file 'lib/mercury/authentication.rb'
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|