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,279 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<!-- add prototype and styles to ensure that libraries don't collide and css doesn't conflict -->
|
4
|
-
<title>Mercury Editor Regression Testing</title>
|
5
|
-
<meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0">
|
6
|
-
<link href="/assets/application.css" media="all" rel="stylesheet" type="text/css" />
|
7
|
-
|
8
|
-
<!-- include prototype so we know we can use any other javascript framework -->
|
9
|
-
<script src="/assets/prototype.js" type="text/javascript"></script>
|
10
|
-
|
11
|
-
<!-- include the loader -->
|
12
|
-
<script src="/assets/prototype.js" type="text/javascript"></script>
|
13
|
-
<script src="/assets/mercury/support/history.js" type="text/javascript"></script>
|
14
|
-
<script src="/mercury/javascripts/mercury_loader.js" type="text/javascript"></script>
|
15
|
-
|
16
|
-
<!-- custom implementation examples -->
|
17
|
-
<script type="text/javascript">
|
18
|
-
History.Adapter.bind(window, 'statechange', function() {
|
19
|
-
var state = History.getState();
|
20
|
-
console.debug(state.data, state.title, state.url);
|
21
|
-
});
|
22
|
-
|
23
|
-
// preload snippets
|
24
|
-
Event.observe(window, "mercury:ready", function() {
|
25
|
-
Mercury.config.regions.dataAttributes = ['information'];
|
26
|
-
|
27
|
-
Mercury.saveURL = '/contents';
|
28
|
-
Mercury.Snippet.load({
|
29
|
-
snippet_0: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "00"}},
|
30
|
-
snippet_1: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "01"}},
|
31
|
-
snippet_2: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "02"}},
|
32
|
-
snippet_3: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "03"}},
|
33
|
-
snippet_4: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "04"}},
|
34
|
-
snippet_5: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "05"}},
|
35
|
-
snippet_6: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "06"}},
|
36
|
-
snippet_7: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "07"}},
|
37
|
-
snippet_8: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "08"}},
|
38
|
-
snippet_9: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "09"}},
|
39
|
-
snippet_10: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "10"}},
|
40
|
-
snippet_11: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "11"}},
|
41
|
-
snippet_12: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "12"}},
|
42
|
-
snippet_13: {name: 'example', options: {'options[favorite_beer]': "Bells Hopslam", 'options[first_name]': "13"}}
|
43
|
-
});
|
44
|
-
|
45
|
-
Mercury.PageEditor.prototype.save = function() {
|
46
|
-
var data = this.serialize();
|
47
|
-
var lightview = Mercury.lightview(null, {title: 'Saving', closeButton: true});
|
48
|
-
setTimeout(function() {
|
49
|
-
var textarea = '<textarea style="width:100%;height:300px" wrap="off">' + top.JSON.stringify(data, null, ' ') + '</textarea>';
|
50
|
-
lightview.loadContent('<div style="width:500px">Saving in the demo is disabled, but you can see what would be sent to the server below.' + textarea + '</div>');
|
51
|
-
}, 500);
|
52
|
-
};
|
53
|
-
});
|
54
|
-
|
55
|
-
var newRegionIndex = 1;
|
56
|
-
var newRegionType = 0;
|
57
|
-
var regionTypes = ['full', 'simple', 'snippets', 'markdown'];
|
58
|
-
function addRegion() {
|
59
|
-
if (newRegionType >= regionTypes.length) newRegionType = 0;
|
60
|
-
var container = new Element('div', {style: 'position:relative;margin-bottom:20px;'});
|
61
|
-
container.update('<div class="remove" onclick="this.up().remove()">×</div><div data-mercury="' + regionTypes[newRegionType] + '" id="new_' + regionTypes[newRegionType] + '_' + newRegionIndex + '">new <b>' + regionTypes[newRegionType] + '</b> region ' + newRegionIndex + '</div>');
|
62
|
-
$('dynamic_regions').insert(container, {position: 'top'});
|
63
|
-
newRegionIndex += 1;
|
64
|
-
newRegionType += 1;
|
65
|
-
Mercury.trigger('reinitialize');
|
66
|
-
}
|
67
|
-
</script>
|
68
|
-
</head>
|
69
|
-
<body>
|
70
|
-
|
71
|
-
<ul id="controls">
|
72
|
-
<li><a href="javascript:Mercury.trigger('toggle:interface')">Toggle Interface</a></li>
|
73
|
-
<li><a href="javascript:var num = 1; History.pushState({state: num}, 'Mercury Editor -- With history.pushState!', '?pushstate=' + num);">history.pushState</a></li>
|
74
|
-
<li><a href="javascript:History.go(-1);">History.go(-1)</a></li>
|
75
|
-
<li><a href="javascript:History.back();">History.back()</a></li>
|
76
|
-
<li><a href="javascript:History.forward();">History.forward()</a></li>
|
77
|
-
</ul>
|
78
|
-
|
79
|
-
<!-- begin forms -->
|
80
|
-
<h1>Forms (with various methods and targets)</h1>
|
81
|
-
<div id="forms">
|
82
|
-
<form id="form1" action="/mercury/test_page" method="post" target="_top">
|
83
|
-
<input type="submit" name="commit" value="post _top">
|
84
|
-
</form>
|
85
|
-
<form id="form2" action="/mercury/test_page" method="get" target="_blank">
|
86
|
-
<input type="submit" name="commit" value="post _blank">
|
87
|
-
</form>
|
88
|
-
<form id="form3" action="/mercury/test_page" method="post" target="_self">
|
89
|
-
<input type="submit" name="commit" value="post _self">
|
90
|
-
</form>
|
91
|
-
<form id="form4" action="/mercury/test_page" method="get">
|
92
|
-
<input type="submit" name="commit" value="get [none]">
|
93
|
-
</form>
|
94
|
-
<form id="form5" action="/mercury/test_page" method="post" class="lightview" target="_self">
|
95
|
-
<input type="submit" name="commit" value="post _self .lightview">
|
96
|
-
</form>
|
97
|
-
<form id="form6" action="/mercury/test_page" method="get" target="foo">
|
98
|
-
<input type="submit" name="commit" value="get foo">
|
99
|
-
</form>
|
100
|
-
</div>
|
101
|
-
<!-- end forms -->
|
102
|
-
|
103
|
-
<!-- begin links -->
|
104
|
-
<h1>Links (With various targets)</h1>
|
105
|
-
<div id="links">
|
106
|
-
<a id="anchor1" href="/mercury/test_page" target="_top">_top</a>
|
107
|
-
<a id="anchor2" href="/mercury/test_page" target="_blank">_blank</a>
|
108
|
-
<a id="anchor3" href="/mercury/test_page" target="_self">_self</a>
|
109
|
-
<a id="anchor4" href="/mercury/test_page">[none]</a>
|
110
|
-
<a id="anchor5" href="/mercury/test_page" class="lightview" target="_self">_self .lightview</a>
|
111
|
-
<a id="anchor6" href="/mercury/test_page" target="foo">foo</a>
|
112
|
-
</div>
|
113
|
-
<!-- end links -->
|
114
|
-
|
115
|
-
<!-- begin dynamic regions -->
|
116
|
-
<h1>Dynamic Regions (<a href="javascript:addRegion()">Add a Region</a>)</h1>
|
117
|
-
<div id="dynamic_regions">
|
118
|
-
</div>
|
119
|
-
<!-- end dynamic -->
|
120
|
-
|
121
|
-
<!-- begin full region 1 -->
|
122
|
-
<h1>Full region</h1>
|
123
|
-
<div id="full_1" data-mercury="full" data-information="foo">
|
124
|
-
If the first line of content isn't wrapped in an element you can't set justification (mozilla only bug).
|
125
|
-
|
126
|
-
<h2>text with a meta tag (that will be removed)</h2>
|
127
|
-
123<meta>editable content
|
128
|
-
|
129
|
-
<h2>anchor with a div inside</h2>
|
130
|
-
<a href="/foo1">l<div>ink with a div in</div> it</a>
|
131
|
-
|
132
|
-
<h2>image wrapped in an anchor</h2>
|
133
|
-
<a href="/foo2"><img alt="logo" src="/assets/mercury/temp-logo.png"></a>123
|
134
|
-
|
135
|
-
<h2>table with header and definition cells</h2>
|
136
|
-
<table border="1">
|
137
|
-
<tbody>
|
138
|
-
<tr><th>R1C1</th><th colspan="5">R1C2</th></tr>
|
139
|
-
<tr><th colspan="2">R2C1</th><th rowspan="2">R2C2</th><th>R2C3</th><th rowspan="5">R2C4</th><th>R2C5</th></tr>
|
140
|
-
<tr><td colspan="2">R3C1</td><td>R3C2</td><td>R3C3</td></tr>
|
141
|
-
<tr><td>R4C1</td><td>R4C2</td><td rowspan="4">R4C3</td><td>R4C4</td><td>R4C5</td></tr>
|
142
|
-
<tr><td>R5C1</td><td>R5C2</td><td>R5C3</td><td>R5C4</td></tr>
|
143
|
-
<tr><th rowspan="2">R6C1</th><th rowspan="2">R6C2</th><th>R6C3</th><th>R6C4</th></tr>
|
144
|
-
<tr><td>R7C1</td><td>R7C2</td><td>R7C3</td></tr>
|
145
|
-
<tr><td colspan="2">R8C1</td><td colspan="4">R7C2</td></tr>
|
146
|
-
</tbody>
|
147
|
-
</table>
|
148
|
-
|
149
|
-
<h2>table without tbody or border</h2>
|
150
|
-
<table>
|
151
|
-
<tr><th>R1C1</th><th colspan="2">R1C2</th></tr>
|
152
|
-
<tr><td rowspan="2">R2C1</td><td>R2C2</td><td>R2C3</td></tr>
|
153
|
-
<tr><td>R3C1</td><td>R3C2</td></tr>
|
154
|
-
</table>
|
155
|
-
|
156
|
-
<h2>fixed width table (column where all colspans > 1, row where all rowspans > 1)</h2>
|
157
|
-
<table border="1" width="200">
|
158
|
-
<tbody>
|
159
|
-
<tr><td rowspan="2">R1C1</td><td colspan="2" rowspan="2">R1C2</td></tr>
|
160
|
-
<tr></tr>
|
161
|
-
<tr><td>R3C1</td><td colspan="2">R3C2</td></tr>
|
162
|
-
</tr>
|
163
|
-
</tbody>
|
164
|
-
</table>
|
165
|
-
|
166
|
-
<h2>paragraph with an overline wrapped in an underline</h2>
|
167
|
-
<p>123 <u>under <span style="text-decoration:overline">overline</span> line</u> 123</p>
|
168
|
-
|
169
|
-
<h2>paragraph with an underline wrapped in an overline</h2>
|
170
|
-
<p>123 <span style="text-decoration:overline">over <u>underline</u> line</span> 123</p>
|
171
|
-
|
172
|
-
<h2>style tag that styles images with a border</h2>
|
173
|
-
<style type="text/css">img { border: 2px solid red}</style>
|
174
|
-
|
175
|
-
<h2>image next to content wrapped in an anchor</h2>
|
176
|
-
<img alt="clippy" src="/assets/mercury/temp-logo.png"><a href="#bookmark1">link for #bookmark1</a>
|
177
|
-
|
178
|
-
<h2>snippet that's pre-loaded</h2>
|
179
|
-
<div data-snippet="snippet_0">snippet0</div>
|
180
|
-
|
181
|
-
<h2>bookmark links</h2>
|
182
|
-
<a name="bookmark1">Bookmark1</a><br/><a name="bookmark2">Bookmark2</a>
|
183
|
-
|
184
|
-
<br/><br/>
|
185
|
-
Additional content not wrapped in anything
|
186
|
-
</div>
|
187
|
-
<!-- end full region 1 -->
|
188
|
-
|
189
|
-
<!-- begin full region 2 -->
|
190
|
-
<h1>Full region (single snippet and no content)</h1>
|
191
|
-
<div id="full_2" data-mercury="full">
|
192
|
-
<div data-snippet="snippet_1">snippet1</div>
|
193
|
-
</div>
|
194
|
-
<!-- end full region 2 -->
|
195
|
-
|
196
|
-
<!-- begin full region 3 -->
|
197
|
-
<h1>Full region (fixed width/height and overflow)</h1>
|
198
|
-
<div id="full_3" data-mercury="full" style="width:200px;height:90px;">
|
199
|
-
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
|
200
|
-
<br/>1<br/>2<br/>3<br/>4<br/>5<br/>6<br/>7<br/><a href="#offset_test">8</a><br/>9<br/>10<br/>11<br/>12<br/>13<br/>14<br/>15
|
201
|
-
</div>
|
202
|
-
<!-- end full region 3 -->
|
203
|
-
|
204
|
-
<!-- begin simple region 1 -->
|
205
|
-
<h1>Simple region (h1 tag)</h1>
|
206
|
-
<h1 id="simple_1" data-mercury="simple" data-information="foo">This is a simple region</h1>
|
207
|
-
<!-- end simple region 1 -->
|
208
|
-
|
209
|
-
<!-- begin simple region 2 -->
|
210
|
-
<h1>Simple region (h2 tag with fixed width)</h1>
|
211
|
-
<h2 id="simple_2" data-mercury="simple" style="width:200px">This is a simple region which is much longer. It should wrap when displaying, and when editing.</h2>
|
212
|
-
<!-- end simple region 2 -->
|
213
|
-
|
214
|
-
<!-- begin snippets region 1 -->
|
215
|
-
<h1>Snippets region</h1>
|
216
|
-
<div id="snippets_1" data-mercury="snippets">
|
217
|
-
<div class="example-snippet" data-snippet="snippet_2">snippet2</div>
|
218
|
-
<div class="example-snippet" data-snippet="snippet_3">snippet3</div>
|
219
|
-
<div class="example-snippet" data-snippet="snippet_4">snippet4</div>
|
220
|
-
<div class="example-snippet" data-snippet="snippet_5">snippet5</div>
|
221
|
-
<div class="example-snippet" data-snippet="snippet_6">snippet6</div>
|
222
|
-
</div>
|
223
|
-
<br clear="both"/>
|
224
|
-
<!-- end snippets region 1 -->
|
225
|
-
|
226
|
-
<!-- begin snippets region 2 -->
|
227
|
-
<h1>Snippets region (iframe snippet that contains flash)</h1>
|
228
|
-
<div id="snippets_2" data-mercury="snippets">
|
229
|
-
<div class="example-snippet" data-snippet="snippet_7">snippet7</div>
|
230
|
-
<div class="example-snippet" data-snippet="snippet_8">snippet8</div>
|
231
|
-
<iframe class="example-snippet" data-snippet="snippet_9" width="560" height="349" src="http://www.youtube.com/embed/0pXYp72dwl0?wmode=transparent" frameborder="0" allowfullscreen="true"></iframe>
|
232
|
-
</div>
|
233
|
-
<!-- end snippets region 2 -->
|
234
|
-
|
235
|
-
<!-- begin markdown region 1 -->
|
236
|
-
<h1>Markdown region</h1>
|
237
|
-
<div id="markdown_1" data-mercury="markdown">
|
238
|
-
## notes ##
|
239
|
-
**whitespace** in markdown regions is _important_.
|
240
|
-
|
241
|
-
## ordered list ##
|
242
|
-
1. list item 1
|
243
|
-
2. list item 2
|
244
|
-
|
245
|
-
## unordered list ##
|
246
|
-
- list item 1
|
247
|
-
- list item 2
|
248
|
-
|
249
|
-
## horizontal rule ##
|
250
|
-
- - -
|
251
|
-
|
252
|
-
## anchor ##
|
253
|
-
[this is a link](foo 'optional title')
|
254
|
-
|
255
|
-
## image ##
|
256
|
-
![add alt text](/assets/mercury/temp-logo.png)
|
257
|
-
|
258
|
-
## snippet that's pre-loaded ##
|
259
|
-
[--snippet_1--]
|
260
|
-
|
261
|
-
## code ##
|
262
|
-
<a href="/foo">this html will not be escaped</a>
|
263
|
-
and whitespace will be retained
|
264
|
-
|
265
|
-
## blockquote ##
|
266
|
-
> this is indented one level
|
267
|
-
|
268
|
-
## paragraph with bold, italics, etc. ##
|
269
|
-
Turkey corned beef ham, chuck ham hock **venison _drumstick_ ** tongue ribeye. Beef tongue pancetta, short ribs meatball headcheese jowl bacon swine t-bone shoulder venison. Hamburger short loin turkey flank short ribs tail. Chicken tri-tip sausage, bresaola sirloin turkey hamburger <sub>headcheese</sub> shank rump. Pork ground round t-bone, ham hock sirloin biltong chicken fatback pork belly pastrami pancetta jowl tail. Cow ribeye pork chop, flank sirloin tail short loin pork loin chicken boudin pastrami. Boudin chuck shankle, spare ribs pancetta <sup>fatback</sup> bresaola.
|
270
|
-
</div>
|
271
|
-
<!-- end markdown region 1 -->
|
272
|
-
|
273
|
-
<!-- begin image region 1 -->
|
274
|
-
<h1>Image region</h1>
|
275
|
-
<img id="image_1" data-mercury="image" src="/images/bunny.gif" alt=""/>
|
276
|
-
<!-- end image region 1 -->
|
277
|
-
|
278
|
-
</body>
|
279
|
-
</html>
|
data/spec/dummy/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<form>
|
2
|
-
|
3
|
-
<div id="link_text_container" class="control-group string optional">
|
4
|
-
<label class="string optional control-label" for="link_text">Link Content</label>
|
5
|
-
<div class="controls">
|
6
|
-
<input class="string optional" id="link_text" name="link[text]" size="50" type="text">
|
7
|
-
</div>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="control-group url optional">
|
11
|
-
<label class="url optional control-label" for="link_external_url">
|
12
|
-
<input name="link_type" type="radio" value="external_url" checked="checked"/>URL
|
13
|
-
</label>
|
14
|
-
<div class="controls">
|
15
|
-
<input class="string url optional" id="link_external_url" name="link[external_url]" size="50" type="text">
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="control-group select optional">
|
20
|
-
<label class="select optional control-label" for="link_existing_bookmark">
|
21
|
-
<input name="link_type" type="radio" value="existing_bookmark"/>Existing Links
|
22
|
-
</label>
|
23
|
-
<div class="controls">
|
24
|
-
<select class="select optional" id="link_existing_bookmark" name="link[existing_bookmark]"></select>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<div class="control-group string optional">
|
28
|
-
<label class="string optional control-label" for="link_new_bookmark">
|
29
|
-
<input name="link_type" type="radio" value="new_bookmark"/>Bookmark
|
30
|
-
</label>
|
31
|
-
<div class="controls">
|
32
|
-
<input class="string optional" id="link_new_bookmark" name="link[new_bookmark]" size="50" type="text">
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div class="control-group select optional">
|
37
|
-
<label class="select optional control-label" for="link_target">Link Target</label>
|
38
|
-
<div class="controls">
|
39
|
-
<select class="select optional" id="link_target" name="link[target]">
|
40
|
-
<option value="">Self (the same window or tab)</option>
|
41
|
-
<option value="_blank">Blank (a new window or tab)</option>
|
42
|
-
<option value="_top">Top (removes any frames)</option>
|
43
|
-
<option value="popup">Popup Window (javascript new window popup)</option>
|
44
|
-
</select>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
<div id="popup_options" class="link-target-options" style="display:none">
|
48
|
-
<div class="control-group number optional">
|
49
|
-
<label class="number optional control-label" for="link_popup_width">Popup Width</label>
|
50
|
-
<div class="controls">
|
51
|
-
<input class="number optional" id="link_popup_width" name="link[popup_width]" size="50" type="number">
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
<div class="control-group number optional">
|
55
|
-
<label class="number optional control-label" for="link_popup_height">Popup Height</label>
|
56
|
-
<div class="controls">
|
57
|
-
<input class="number optional" id="link_popup_height" name="link[popup_height]" size="50" type="number">
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<input name="commit" type="submit" value="Insert Link">
|
63
|
-
|
64
|
-
</form>
|
65
|
-
|
66
|
-
<a name="link1">Link One</a>
|
67
|
-
<a name="link2">Link Two</a>
|
@@ -1,87 +0,0 @@
|
|
1
|
-
<form>
|
2
|
-
|
3
|
-
<div class="control-group url optional">
|
4
|
-
<label class="url optional control-label" for="media_image_url">
|
5
|
-
<input name="media_type" type="radio" value="image_url" checked="checked"/>URL
|
6
|
-
</label>
|
7
|
-
<div class="controls">
|
8
|
-
<input class="string url optional" id="media_image_url" name="media[image_url]" size="50" type="text">
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<div class="control-group url optional">
|
13
|
-
<label class="url optional control-label" for="media_youtube_url">
|
14
|
-
<input name="media_type" type="radio" value="youtube_url"/>Youtube Share URL
|
15
|
-
</label>
|
16
|
-
<div class="controls">
|
17
|
-
<input class="string url optional" id="media_youtube_url" name="media[youtube_url]" size="50" type="text" placeholder="http://youtu.be/Pny4hoN8eII">
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<div class="control-group url optional">
|
21
|
-
<label class="url optional control-label" for="media_vimeo_url">
|
22
|
-
<input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL
|
23
|
-
</label>
|
24
|
-
<div class="controls">
|
25
|
-
<input class="string url optional" id="media_vimeo_url" name="media[vimeo_url]" size="50" type="text" placeholder="http://vimeo.com/25708134">
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div class="media-options" id="image_url_options">
|
30
|
-
<div class="control-group select optional">
|
31
|
-
<label class="select optional control-label" for="media_image_alignment">Alignment</label>
|
32
|
-
<div class="controls">
|
33
|
-
<select class="select optional" id="media_image_alignment" name="media[image_alignment]">
|
34
|
-
<option value="">None</option>
|
35
|
-
<option value="left">Left</option>
|
36
|
-
<option value="right">Right</option>
|
37
|
-
<option value="top">Top</option>
|
38
|
-
<option value="middle">Middle</option>
|
39
|
-
<option value="bottom">Bottom</option>
|
40
|
-
<option value="absmiddle">Absolute Middle</option>
|
41
|
-
<option value="absbottom">Absolute Bottom</option>
|
42
|
-
</select>
|
43
|
-
</div>
|
44
|
-
<label class="select optional control-label" for="media_image_float">Float</label>
|
45
|
-
<div class="controls">
|
46
|
-
<select class="select optional" id="media_image_float" name="media[image_float]">
|
47
|
-
<option value="">None</option>
|
48
|
-
<option value="left">Left</option>
|
49
|
-
<option value="right">Right</option>
|
50
|
-
<option value="none">None</option>
|
51
|
-
<option value="inherit">Inherit</option>
|
52
|
-
</select>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
<div class="media-options" id="youtube_url_options" style="display:none">
|
57
|
-
<div class="control-group number optional">
|
58
|
-
<label class="number optional control-label" for="media_youtube_width">Width</label>
|
59
|
-
<div class="controls">
|
60
|
-
<input class="number optional" id="media_youtube_width" name="media[youtube_width]" size="50" type="number" value="560">
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
<div class="control-group number optional">
|
64
|
-
<label class="number optional control-label" for="media_youtube_height">Height</label>
|
65
|
-
<div class="controls">
|
66
|
-
<input class="number optional" id="media_youtube_height" name="media[youtube_height]" size="50" type="number" value="349">
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
</div>
|
70
|
-
<div class="media-options" id="vimeo_url_options" style="display:none">
|
71
|
-
<div class="control-group number optional">
|
72
|
-
<label class="number optional control-label" for="media_vimeo_width">Width</label>
|
73
|
-
<div class="controls">
|
74
|
-
<input class="number optional" id="media_vimeo_width" name="media[vimeo_width]" size="50" type="number" value="400">
|
75
|
-
</div>
|
76
|
-
</div>
|
77
|
-
<div class="control-group number optional">
|
78
|
-
<label class="number optional control-label" for="media_vimeo_height">Height</label>
|
79
|
-
<div class="controls">
|
80
|
-
<input class="number optional" id="media_vimeo_height" name="media[vimeo_height]" size="50" type="number" value="225">
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<input class="submit" name="commit" type="submit" value="Insert Media"/>
|
86
|
-
|
87
|
-
</form>
|
@@ -1,73 +0,0 @@
|
|
1
|
-
<form>
|
2
|
-
|
3
|
-
<div id="table_display" class="control-group optional">
|
4
|
-
<div class="controls">
|
5
|
-
<table border="1" cellspacing="0">
|
6
|
-
<tr>
|
7
|
-
<td id="cell1"> </td>
|
8
|
-
</tr>
|
9
|
-
<tr>
|
10
|
-
<td id="cell2"> </td>
|
11
|
-
</tr>
|
12
|
-
</table>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<div class="control-group buttons optional">
|
17
|
-
<label class="buttons optional control-label">Rows</label>
|
18
|
-
<div class="controls btn-group">
|
19
|
-
<button class="btn" data-action="addRowBefore">Add Before</button>
|
20
|
-
<button class="btn" data-action="addRow">Add After</button>
|
21
|
-
<button class="btn" data-action="removeRow">Remove</button>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<div class="control-group buttons optional">
|
25
|
-
<label class="buttons optional control-label">Columns</label>
|
26
|
-
<div class="controls btn-group">
|
27
|
-
<button class="btn" data-action="addColumnBefore">Add Before</button>
|
28
|
-
<button class="btn" data-action="addColumn">Add After</button>
|
29
|
-
<button class="btn" data-action="removeColumn">Remove</button>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
<hr/>
|
33
|
-
<div class="control-group buttons optional">
|
34
|
-
<label class="buttons optional control-label">Row Span</label>
|
35
|
-
<div class="controls btn-group">
|
36
|
-
<button class="btn" data-action="increaseRowspan">+</button>
|
37
|
-
<button class="btn" data-action="decreaseRowspan">-</button>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
<div class="control-group buttons optional">
|
41
|
-
<label class="buttons optional control-label">Column Span</label>
|
42
|
-
<div class="controls btn-group">
|
43
|
-
<button class="btn" data-action="increaseColspan">+</button>
|
44
|
-
<button class="btn" data-action="decreaseColspan">-</button>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<div class="control-group select optional">
|
49
|
-
<label class="select optional control-label" for="table_alignment">Alignment</label>
|
50
|
-
<div class="controls">
|
51
|
-
<select class="select optional" id="table_alignment" name="table[alignment]">
|
52
|
-
<option value="">None</option>
|
53
|
-
<option value="right">Right</option>
|
54
|
-
<option value="left">Left</option>
|
55
|
-
</select>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
<div class="control-group number optional">
|
59
|
-
<label class="number optional control-label" for="table_border">Border</label>
|
60
|
-
<div class="controls">
|
61
|
-
<input class="number optional" id="table_border" name="table[border]" size="50" type="number" value="1">
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
<div class="control-group number optional">
|
65
|
-
<label class="number optional control-label" for="table_spacing">Spacing</label>
|
66
|
-
<div class="controls">
|
67
|
-
<input class="number optional" id="table_spacing" name="table[spacing]" size="50" type="number" value="0">
|
68
|
-
</div>
|
69
|
-
</div>
|
70
|
-
|
71
|
-
<input class="submit" name="commit" type="submit" value="Insert Table"/>
|
72
|
-
|
73
|
-
</form>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<div id="region" data-scope="scope" data-version="1">contents</div>
|
2
|
-
<div id="region_with_snippet">contents<div class="example-snippet" data-snippet="snippet_1" data-version="1">snippet</div></div>
|
3
|
-
<div id="region_with_javascript_snippet"><div class="example-snippet" data-snippet="snippet_1" data-version="1">
|
4
|
-
<ul id="modifiable-element"></ul>
|
5
|
-
<script>$("#modifiable-element").append("<li />");</script>
|
6
|
-
</div></div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<div id="full_region1"></div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<img id="image_region1" src="foo.jpg" />
|
@@ -1 +0,0 @@
|
|
1
|
-
<div id="markdown_region1"></div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<div id="simple_region1"></div>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
describe "Mercury.Regions.Image", ->
|
2
|
-
|
3
|
-
beforeEach ->
|
4
|
-
fixture.load('mercury/regions/image.html')
|
5
|
-
@regionElement = $('#image_region1')
|
6
|
-
|
7
|
-
describe "constructor", ->
|
8
|
-
|
9
|
-
beforeEach ->
|
10
|
-
@buildSpy = spyOn(Mercury.Regions.Image.prototype, 'build').andCallFake(=>)
|
11
|
-
@bindEventsSpy = spyOn(Mercury.Regions.Image.prototype, 'bindEvents').andCallFake(=>)
|
12
|
-
|
13
|
-
it "expects an element and window", ->
|
14
|
-
@region = new Mercury.Regions.Image(@regionElement, window)
|
15
|
-
expect(@region.element.get(0)).toEqual($('#image_region1').get(0))
|
16
|
-
expect(@region.window).toEqual(window)
|
17
|
-
|
18
|
-
it "accepts options", ->
|
19
|
-
@region = new Mercury.Regions.Image(@regionElement, window, {foo: 'something'})
|
20
|
-
expect(@region.options).toEqual({foo: 'something'})
|
21
|
-
|
22
|
-
it "sets it's type", ->
|
23
|
-
@region = new Mercury.Regions.Image(@regionElement, window)
|
24
|
-
expect(@region.type()).toEqual('image')
|
25
|
-
|
26
|
-
it "calls build", ->
|
27
|
-
@region = new Mercury.Regions.Image(@regionElement, window)
|
28
|
-
expect(@buildSpy.callCount).toEqual(1)
|
29
|
-
|
30
|
-
it "calls bindEvents", ->
|
31
|
-
@region = new Mercury.Regions.Image(@regionElement, window)
|
32
|
-
expect(@bindEventsSpy.callCount).toEqual(1)
|
33
|
-
|
@@ -1,32 +0,0 @@
|
|
1
|
-
describe "Mercury.Regions.Simple", ->
|
2
|
-
|
3
|
-
beforeEach ->
|
4
|
-
fixture.load('mercury/regions/simple.html')
|
5
|
-
@regionElement = $('#simple_region1')
|
6
|
-
|
7
|
-
describe "constructor", ->
|
8
|
-
|
9
|
-
beforeEach ->
|
10
|
-
@buildSpy = spyOn(Mercury.Regions.Simple.prototype, 'build').andCallFake(=>)
|
11
|
-
@bindEventsSpy = spyOn(Mercury.Regions.Simple.prototype, 'bindEvents').andCallFake(=>)
|
12
|
-
|
13
|
-
it "expects an element and window", ->
|
14
|
-
@region = new Mercury.Regions.Simple(@regionElement, window)
|
15
|
-
expect(@region.element.get(0)).toEqual($('#simple_region1').get(0))
|
16
|
-
expect(@region.window).toEqual(window)
|
17
|
-
|
18
|
-
it "accepts options", ->
|
19
|
-
@region = new Mercury.Regions.Simple(@regionElement, window, {foo: 'something'})
|
20
|
-
expect(@region.options).toEqual({foo: 'something'})
|
21
|
-
|
22
|
-
it "sets it's type", ->
|
23
|
-
@region = new Mercury.Regions.Simple(@regionElement, window)
|
24
|
-
expect(@region.type()).toEqual('simple')
|
25
|
-
|
26
|
-
it "calls build", ->
|
27
|
-
@region = new Mercury.Regions.Simple(@regionElement, window)
|
28
|
-
expect(@buildSpy.callCount).toEqual(1)
|
29
|
-
|
30
|
-
it "calls bindEvents", ->
|
31
|
-
@region = new Mercury.Regions.Simple(@regionElement, window)
|
32
|
-
expect(@bindEventsSpy.callCount).toEqual(1)
|