kiteditor 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/POST_INSTALL +21 -0
- data/{vendor → app}/assets/images/mercury/button.png +0 -0
- data/{vendor → app}/assets/images/mercury/close.png +0 -0
- data/app/assets/images/mercury/default-snippet.png +0 -0
- data/{vendor → app}/assets/images/mercury/loading-dark.gif +0 -0
- data/{vendor → app}/assets/images/mercury/loading-light.gif +0 -0
- data/{vendor → app}/assets/images/mercury/missing-image.png +0 -0
- data/{vendor → app}/assets/images/mercury/search-icon.png +0 -0
- data/{vendor → app}/assets/images/mercury/temp-logo.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/{vendor/assets/javascripts/mercury/dependencies → app/assets/javascripts}/jquery-1.7.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury.js +60 -87
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery-ui-1.8.13.custom.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.additions.js +103 -13
- data/{vendor → app}/assets/javascripts/mercury/dependencies/jquery.htmlClean.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/liquidmetal.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dependencies/showdown.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialog.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/dialogs/snippetpanel.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/finalize.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/lightview.js.coffee +38 -17
- data/app/assets/javascripts/mercury/locales/ar.locale.js.coffee +201 -0
- data/app/assets/javascripts/mercury/locales/da.locale.js.coffee +208 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/de.locale.js.coffee +4 -10
- data/{vendor → app}/assets/javascripts/mercury/locales/es.locale.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/example.local.js.coffee +3 -5
- data/{vendor → app}/assets/javascripts/mercury/locales/fr.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/hu.locale.js.coffee +209 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/it.locale.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/ko.local.js.coffee +4 -10
- data/{vendor → app}/assets/javascripts/mercury/locales/nl.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/pl.locale.js.coffee +213 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/pt.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/ru.locale.js.coffee +200 -0
- data/{vendor → app}/assets/javascripts/mercury/locales/sv.local.js.coffee +3 -9
- data/{vendor → app}/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +3 -9
- data/app/assets/javascripts/mercury/locales/uk.locale.js.coffee +200 -0
- data/app/assets/javascripts/mercury/locales/zh.local.js.coffee +203 -0
- data/app/assets/javascripts/mercury/mercury-compiled.js +10720 -0
- data/{vendor → app}/assets/javascripts/mercury/mercury.js.coffee +10 -1
- data/{vendor → app}/assets/javascripts/mercury/modal.js.coffee +62 -40
- data/{vendor → app}/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -0
- data/{vendor → app}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +1 -0
- data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +152 -0
- data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +132 -0
- data/{vendor → app}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +2 -0
- data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +68 -0
- data/{vendor → app}/assets/javascripts/mercury/native_extensions.js.coffee +0 -6
- data/{vendor → app}/assets/javascripts/mercury/page_editor.js.coffee +84 -50
- data/{vendor → app}/assets/javascripts/mercury/palette.js.coffee +1 -1
- data/{vendor → app}/assets/javascripts/mercury/panel.js.coffee +3 -2
- data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +2 -2
- data/{vendor → app}/assets/javascripts/mercury/plugins/save_as_xml/plugin.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/region.js.coffee +18 -17
- data/{vendor/assets/javascripts/mercury/regions/editable.js.coffee → app/assets/javascripts/mercury/regions/full.js.coffee} +41 -31
- data/app/assets/javascripts/mercury/regions/image.js.coffee +93 -0
- data/{vendor/assets/javascripts/mercury/regions/markupable.js.coffee → app/assets/javascripts/mercury/regions/markdown.js.coffee} +29 -24
- data/{vendor → app}/assets/javascripts/mercury/regions/simple.js.coffee +11 -54
- data/{vendor/assets/javascripts/mercury/regions/snippetable.js.coffee → app/assets/javascripts/mercury/regions/snippets.js.coffee} +10 -9
- data/{vendor → app}/assets/javascripts/mercury/select.js.coffee +1 -1
- data/app/assets/javascripts/mercury/snippet.js.coffee +136 -0
- data/{vendor → app}/assets/javascripts/mercury/snippet_toolbar.js.coffee +19 -6
- data/{vendor → app}/assets/javascripts/mercury/statusbar.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/support/history.js +0 -0
- data/{vendor → app}/assets/javascripts/mercury/table_editor.js.coffee +16 -0
- data/{vendor → app}/assets/javascripts/mercury/toolbar.button.js.coffee +45 -30
- data/{vendor → app}/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
- data/{vendor → app}/assets/javascripts/mercury/toolbar.expander.js.coffee +4 -4
- data/{vendor → app}/assets/javascripts/mercury/toolbar.js.coffee +10 -6
- data/{vendor → app}/assets/javascripts/mercury/tooltip.js.coffee +0 -0
- data/{vendor → app}/assets/javascripts/mercury/uploader.js.coffee +37 -19
- data/app/assets/stylesheets/_mercury-bootstrap-overrides.scss +61 -0
- data/app/assets/stylesheets/_mercury-sass.scss +33 -0
- data/{vendor → app}/assets/stylesheets/mercury.css +1 -5
- data/{vendor → app}/assets/stylesheets/mercury/all_images.css.erb +6 -2
- data/app/assets/stylesheets/mercury/bootstrap-ish.css +1367 -0
- data/app/assets/stylesheets/mercury/bootstrap-overrides.css +61 -0
- data/{vendor → app}/assets/stylesheets/mercury/dialog.css +21 -8
- data/{vendor → app}/assets/stylesheets/mercury/lightview.css +6 -56
- data/app/assets/stylesheets/mercury/mercury.css +43 -0
- data/{vendor → app}/assets/stylesheets/mercury/modal.css +15 -32
- data/{vendor → app}/assets/stylesheets/mercury/statusbar.css +0 -0
- data/{vendor → app}/assets/stylesheets/mercury/toolbar.css +4 -1
- data/{vendor → app}/assets/stylesheets/mercury/tooltip.css +0 -0
- data/{vendor → app}/assets/stylesheets/mercury/uploader.css +4 -4
- data/app/helpers/mercury_helper.rb +7 -0
- data/app/views/layouts/mercury.html.erb +10 -20
- data/app/views/layouts/mercury.html.haml +19 -0
- data/app/views/layouts/mercury.html.slim +19 -0
- data/app/views/mercury/modals/character.html +1 -1
- data/app/views/mercury/modals/htmleditor.html +3 -7
- data/app/views/mercury/modals/link.html +37 -51
- data/app/views/mercury/modals/media.html +102 -0
- data/app/views/mercury/modals/table.html +79 -73
- data/app/views/mercury/panels/snippets.html +6 -1
- data/app/views/mercury/snippets/example/options.html.erb +23 -27
- data/app/views/mercury/snippets/no_options/preview.html.erb +1 -0
- data/config/routes.rb +9 -0
- data/features/generators/authentication.feature +10 -0
- data/features/generators/images.feature +41 -0
- data/features/generators/install.feature +21 -0
- data/features/loading/loading.feature +5 -2
- data/features/loading/user_interface.feature +9 -7
- data/features/regions/{editable → full}/advanced_editing.feature +0 -0
- data/features/regions/full/basic_editing.feature +198 -0
- data/features/regions/{editable → full}/inserting_links.feature +20 -19
- data/features/regions/{editable → full}/inserting_media.feature +36 -18
- data/features/regions/{editable → full}/inserting_snippets.feature +28 -18
- data/features/regions/{editable → full}/inserting_special_characters.feature +2 -2
- data/features/regions/full/inserting_tables.feature +109 -0
- data/features/regions/{editable → full}/pasting.feature +0 -0
- data/features/regions/{editable → full}/uploading_images.feature +0 -0
- data/features/regions/{markupable → image}/uploading_images.feature +0 -0
- data/features/regions/{markupable → markdown}/advanced_editing.feature +0 -0
- data/features/regions/{markupable → markdown}/basic_editing.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_links.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_media.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_snippets.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_special_characters.feature +0 -0
- data/features/regions/{markupable → markdown}/inserting_tables.feature +0 -0
- data/features/regions/{snippetable/advanced_editing.feature → markdown/uploading_images.feature} +0 -0
- data/features/regions/simple/basic_editing.feature +5 -0
- data/features/regions/{snippetable/basic_editing.feature → snippets/advanced_editing.feature} +0 -0
- data/features/regions/{snippetable/inserting_snippets.feature → snippets/basic_editing.feature} +0 -0
- data/{vendor/assets/javascripts/mercury/locales/da.locale.js.coffee → features/regions/snippets/inserting_snippets.feature} +0 -0
- data/features/saving/saving.feature +8 -8
- data/features/step_definitions/custom_web_steps.rb +22 -0
- data/features/step_definitions/generator_steps.rb +23 -0
- data/features/step_definitions/mercury_steps.rb +1 -438
- data/features/support/aruba.rb +28 -0
- data/features/support/env.rb +11 -1
- data/features/support/selectors.rb +23 -0
- data/lib/generators/mercury/install/authentication/authentication_generator.rb +17 -0
- data/lib/generators/mercury/install/images/images_generator.rb +47 -0
- data/{app/models/mercury/image.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image.rb} +7 -0
- data/{db/migrate/20110526035601_create_mercury_images.rb → lib/generators/mercury/install/images/templates/ar_paperclip_image_migration.rb} +0 -0
- data/{app/controllers/mercury → lib/generators/mercury/install/images/templates}/images_controller.rb +0 -0
- data/lib/generators/mercury/install/{templates → images/templates}/mongoid_paperclip_image.rb +0 -0
- data/lib/generators/mercury/install/install_generator.rb +12 -23
- data/lib/mercury-rails.rb +1 -2
- data/lib/mercury/authentication.rb +1 -0
- data/lib/mercury/cucumber/step_definitions.rb +13 -0
- data/lib/mercury/cucumber/step_definitions/mercury_steps.rb +408 -0
- data/{features → lib/mercury/cucumber}/support/mercury_contents.rb +3 -3
- data/{features → lib/mercury/cucumber}/support/mercury_selectors.rb +0 -20
- data/lib/mercury/engine.rb +19 -0
- data/lib/mercury/rails.rb +5 -0
- data/lib/mercury/version.rb +3 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -0
- data/spec/dummy/app/assets/javascripts/prototype.js +6082 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +110 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mercury.html.erb +28 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +58 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/teabag.rb +9 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/db/.gitkeep +0 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/blank.html +1 -0
- 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 +279 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialog.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/backcolor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/forecolor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/formatblock.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/snippetpanel.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/dialogs/style.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/lightview.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modal.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/htmleditor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/insertcharacter.html +0 -0
- data/spec/javascripts/fixtures/mercury/modals/insertlink.html +67 -0
- data/spec/javascripts/fixtures/mercury/modals/insertmedia.html +87 -0
- data/spec/javascripts/{templates → fixtures}/mercury/modals/insertsnippet.html +0 -0
- data/spec/javascripts/fixtures/mercury/modals/inserttable.html +73 -0
- data/spec/javascripts/{templates → fixtures}/mercury/page_editor.html +4 -4
- data/spec/javascripts/{templates → fixtures}/mercury/palette.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/panel.html +0 -0
- data/spec/javascripts/fixtures/mercury/region.html +6 -0
- data/spec/javascripts/fixtures/mercury/regions/full.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/image.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/markdown.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/simple.html +1 -0
- data/spec/javascripts/fixtures/mercury/regions/snippets.html +4 -0
- data/spec/javascripts/{templates → fixtures}/mercury/select.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/snippet.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/snippet_toolbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/statusbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/table_editor.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.button_group.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.expander.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/toolbar.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/tooltip.html +0 -0
- data/spec/javascripts/{templates → fixtures}/mercury/uploader.html +0 -0
- data/spec/javascripts/mercury/{dialog_spec.js.coffee → dialog_spec.coffee} +11 -12
- data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +3 -4
- data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/lightview_spec.js.coffee +180 -142
- data/spec/javascripts/mercury/mercury_spec.js.coffee +19 -13
- data/spec/javascripts/mercury/modal_spec.js.coffee +192 -148
- data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +107 -34
- data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +106 -26
- data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +2 -3
- data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +50 -40
- data/spec/javascripts/mercury/page_editor_spec.js.coffee +124 -80
- data/spec/javascripts/mercury/palette_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/panel_spec.js.coffee +9 -12
- data/spec/javascripts/mercury/region_spec.js.coffee +22 -17
- data/spec/javascripts/mercury/regions/{editable_spec.js.coffee → full_spec.js.coffee} +26 -28
- data/spec/javascripts/mercury/regions/image_spec.js.coffee +33 -0
- data/spec/javascripts/mercury/regions/{markupable_spec.js.coffee → markdown_spec.js.coffee} +32 -34
- data/spec/javascripts/mercury/regions/simple_spec.js.coffee +32 -0
- data/spec/javascripts/mercury/regions/{snippetable_spec.js.coffee → snippets_spec.js.coffee} +54 -55
- data/spec/javascripts/mercury/select_spec.js.coffee +4 -5
- data/spec/javascripts/mercury/snippet_spec.js.coffee +92 -16
- data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +31 -16
- data/spec/javascripts/mercury/statusbar_spec.js.coffee +9 -10
- data/spec/javascripts/mercury/table_editor_spec.js.coffee +1 -2
- data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +7 -9
- data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +55 -26
- data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +13 -13
- data/spec/javascripts/mercury/toolbar_spec.js.coffee +43 -14
- data/spec/javascripts/mercury/tooltip_spec.js.coffee +1 -2
- data/spec/javascripts/mercury/uploader_spec.js.coffee +47 -33
- data/spec/javascripts/spec_helper.coffee +4 -0
- data/spec/javascripts/{spec_helper.js → support/event_simulation.js} +0 -2
- data/spec/teabag_env.rb +32 -0
- metadata +366 -196
- data/features/regions/editable/basic_editing.feature +0 -195
- data/features/regions/editable/inserting_tables.feature +0 -109
- data/spec/javascripts/templates/mercury/modals/insertlink.html +0 -30
- data/spec/javascripts/templates/mercury/modals/insertmedia.html +0 -35
- data/spec/javascripts/templates/mercury/modals/inserttable.html +0 -27
- data/spec/javascripts/templates/mercury/region.html +0 -2
- data/spec/javascripts/templates/mercury/regions/editable.html +0 -3
- data/spec/javascripts/templates/mercury/regions/snippetable.html +0 -4
- data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +0 -54
- data/vendor/assets/javascripts/mercury_loader.js +0 -193
- data/vendor/assets/javascripts/mercury_overrides.js +0 -6
- data/vendor/assets/stylesheets/mercury/mercury.css +0 -151
- data/vendor/assets/stylesheets/mercury_overrides.css +0 -17
@@ -4,30 +4,20 @@
|
|
4
4
|
<meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0">
|
5
5
|
<%= csrf_meta_tags %>
|
6
6
|
<title>Mercury Editor</title>
|
7
|
-
<%= stylesheet_link_tag 'mercury'
|
8
|
-
<%= javascript_include_tag '
|
7
|
+
<%= stylesheet_link_tag 'mercury' %>
|
8
|
+
<%= javascript_include_tag 'jquery-1.7', 'mercury' %>
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<script type="text/javascript">
|
12
|
-
|
13
|
-
var
|
14
|
-
saveStyle: null, // 'form', or 'json' (default json)
|
15
|
-
saveMethod: null, // 'POST', or 'PUT', (create, vs. update -- default POST)
|
16
|
-
visible: null // if the interface should start visible or not (default true)
|
17
|
-
};
|
12
|
+
// Set to the url that you want to save any given page to, leave null for default handling.
|
13
|
+
var saveUrl = null;
|
18
14
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<% if Rails.application.config.respond_to?(:mercury_page_editor_config) %>
|
26
|
-
jQuery.extend(options, <%= Rails.application.config.mercury_page_editor_config.to_json.html_safe %>);
|
27
|
-
<% end -%>
|
28
|
-
|
29
|
-
<!-- Instantiate the PageEditor -->
|
30
|
-
new Mercury.PageEditor(saveUrl, options);
|
15
|
+
// Instantiate the PageEditor
|
16
|
+
new Mercury.PageEditor(saveUrl, {
|
17
|
+
saveStyle: null, // 'form', or 'json' (default json)
|
18
|
+
saveMethod: null, // 'PUT', or 'POST', (create, vs. update -- default PUT)
|
19
|
+
visible: true // boolean - if the interface should start visible or not
|
20
|
+
});
|
31
21
|
</script>
|
32
22
|
</body>
|
33
23
|
</html>
|
@@ -0,0 +1,19 @@
|
|
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
|
+
});
|
@@ -0,0 +1,19 @@
|
|
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,13 +1,9 @@
|
|
1
|
-
<form id="mercury_html_editor" style="width:650px">
|
1
|
+
<form id="mercury_html_editor" class="mercury-form" style="width:650px">
|
2
2
|
|
3
3
|
<textarea class="mercury-display-pane-container" rows="5" style="width:100%"></textarea>
|
4
4
|
|
5
|
-
<div class="mercury-display-controls">
|
6
|
-
<
|
7
|
-
<ol>
|
8
|
-
<li class="commit button"><input class="submit" name="commit" type="submit" value="Save and Replace"/></li>
|
9
|
-
</ol>
|
10
|
-
</fieldset>
|
5
|
+
<div class="form-actions mercury-display-controls">
|
6
|
+
<input class="btn btn-primary" name="commit" type="submit" value="Save and Replace"/>
|
11
7
|
</div>
|
12
8
|
|
13
9
|
</form>
|
@@ -1,26 +1,27 @@
|
|
1
|
-
<form id="mercury_link" style="height: 875px; width: 800px;">
|
1
|
+
<form id="mercury_link" class="form-horizontal" style="height: 875px; width: 800px;">
|
2
2
|
|
3
|
-
<div class="mercury-display-pane-container">
|
4
|
-
<div class="mercury-display-pane">
|
3
|
+
<div class="form-inputs mercury-display-pane-container">
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
<fieldset id="link_text_container">
|
6
|
+
<div class="control-group string optional">
|
7
|
+
<label class="string optional control-label" for="link_text">Link Content</label>
|
8
|
+
<div class="controls">
|
9
|
+
<input class="span6 string optional" id="link_text" name="link[text]" size="50" type="text">
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</fieldset>
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
<fieldset>
|
15
|
+
<legend>Standard Links</legend>
|
16
|
+
<div class="control-group url optional">
|
17
|
+
<label class="url optional control-label" for="link_external_url">
|
18
|
+
<input name="link_type" type="radio" value="external_url" checked="checked"/>URL
|
19
|
+
</label>
|
20
|
+
<div class="controls">
|
21
|
+
<input class="span6 string url optional" id="link_external_url" name="link[external_url]" size="50" type="text">
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</fieldset>
|
24
25
|
|
25
26
|
<fieldset class="inputs">
|
26
27
|
<legend><span>Internal Link</span></legend>
|
@@ -55,40 +56,25 @@
|
|
55
56
|
</ol>
|
56
57
|
</fieldset>
|
57
58
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<label class="label" for="link_popup_width">Popup Width</label>
|
73
|
-
<input id="link_popup_width" name="link[popup_width]" type="text"/>
|
74
|
-
</li>
|
75
|
-
<li id="link_popup_height_input" class="string input optional stringish">
|
76
|
-
<label class="label" for="link_popup_height">Popup Height</label>
|
77
|
-
<input id="link_popup_height" name="link[popup_height]" type="text"/>
|
78
|
-
</li>
|
79
|
-
</div>
|
80
|
-
</ol>
|
81
|
-
</fieldset>
|
59
|
+
<fieldset>
|
60
|
+
<legend>Options</legend>
|
61
|
+
<div class="control-group select optional">
|
62
|
+
<label class="select optional control-label" for="link_target">Link Target</label>
|
63
|
+
<div class="controls">
|
64
|
+
<select class="select optional" id="link_target" name="link[target]">
|
65
|
+
<option value="">Self (the same window or tab)</option>
|
66
|
+
<option value="_blank">Blank (a new window or tab)</option>
|
67
|
+
<option value="_top">Top (removes any frames)</option>
|
68
|
+
<option value="popup">Popup Window (javascript new window popup)</option>
|
69
|
+
</select>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
</fieldset>
|
82
73
|
|
83
|
-
</div>
|
84
74
|
</div>
|
85
75
|
|
86
|
-
<div class="mercury-display-controls">
|
87
|
-
<
|
88
|
-
<ol>
|
89
|
-
<li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Link"/></li>
|
90
|
-
</ol>
|
91
|
-
</fieldset>
|
76
|
+
<div class="form-actions mercury-display-controls">
|
77
|
+
<input class="btn btn-primary" name="commit" type="submit" value="Insert Link">
|
92
78
|
</div>
|
93
79
|
|
94
80
|
</form>
|
@@ -1 +1,103 @@
|
|
1
1
|
Not used (rendered by Kit)
|
2
|
+
|
3
|
+
<form id="mercury_media" class="form-horizontal" style="width:615px">
|
4
|
+
|
5
|
+
<div class="form-inputs mercury-display-pane-container">
|
6
|
+
|
7
|
+
<fieldset>
|
8
|
+
<legend>Images</legend>
|
9
|
+
<div class="control-group url optional">
|
10
|
+
<label class="url optional control-label" for="media_image_url">
|
11
|
+
<input name="media_type" type="radio" value="image_url" checked="checked"/>URL
|
12
|
+
</label>
|
13
|
+
<div class="controls">
|
14
|
+
<input class="span6 string url optional" id="media_image_url" name="media[image_url]" size="50" type="text">
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</fieldset>
|
18
|
+
|
19
|
+
<fieldset>
|
20
|
+
<legend>Videos</legend>
|
21
|
+
<div class="control-group url optional">
|
22
|
+
<label class="url optional control-label" for="media_youtube_url">
|
23
|
+
<input name="media_type" type="radio" value="youtube_url"/>YouTube URL
|
24
|
+
</label>
|
25
|
+
<div class="controls">
|
26
|
+
<input class="span6 string url optional" id="media_youtube_url" name="media[youtube_url]" size="50" type="text" placeholder="http://youtu.be/Pny4hoN8eII">
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="control-group url optional">
|
30
|
+
<label class="url optional control-label" for="media_vimeo_url">
|
31
|
+
<input name="media_type" type="radio" value="vimeo_url"/>Vimeo URL
|
32
|
+
</label>
|
33
|
+
<div class="controls">
|
34
|
+
<input class="span6 string url optional" id="media_vimeo_url" name="media[vimeo_url]" size="50" type="text" placeholder="http://vimeo.com/25708134">
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</fieldset>
|
38
|
+
|
39
|
+
<fieldset>
|
40
|
+
<legend>Options</legend>
|
41
|
+
<div class="media-options" id="image_url_options">
|
42
|
+
<div class="control-group select optional">
|
43
|
+
<label class="select optional control-label" for="media_image_alignment">Alignment</label>
|
44
|
+
<div class="controls">
|
45
|
+
<select class="select optional" id="media_image_alignment" name="media[image_alignment]">
|
46
|
+
<option value="">None</option>
|
47
|
+
<option value="left">Left</option>
|
48
|
+
<option value="right">Right</option>
|
49
|
+
<option value="top">Top</option>
|
50
|
+
<option value="middle">Middle</option>
|
51
|
+
<option value="bottom">Bottom</option>
|
52
|
+
<option value="absmiddle">Absolute Middle</option>
|
53
|
+
<option value="absbottom">Absolute Bottom</option>
|
54
|
+
</select>
|
55
|
+
</div>
|
56
|
+
<label class="select optional control-label" for="media_image_float">Float</label>
|
57
|
+
<div class="controls">
|
58
|
+
<select class="select optional" id="media_image_float" name="media[image_float]">
|
59
|
+
<option value="">None</option>
|
60
|
+
<option value="left">Left</option>
|
61
|
+
<option value="right">Right</option>
|
62
|
+
<option value="none">None</option>
|
63
|
+
<option value="inherit">Inherit</option>
|
64
|
+
</select>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<div class="media-options" id="youtube_url_options" style="display:none">
|
69
|
+
<div class="control-group number optional">
|
70
|
+
<label class="number optional control-label" for="media_youtube_width">Width</label>
|
71
|
+
<div class="controls">
|
72
|
+
<input class="span2 number optional" id="media_youtube_width" name="media[youtube_width]" size="50" type="number" value="560">
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<div class="control-group number optional">
|
76
|
+
<label class="number optional control-label" for="media_youtube_height">Height</label>
|
77
|
+
<div class="controls">
|
78
|
+
<input class="span2 number optional" id="media_youtube_height" name="media[youtube_height]" size="50" type="number" value="349">
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
<div class="media-options" id="vimeo_url_options" style="display:none">
|
83
|
+
<div class="control-group number optional">
|
84
|
+
<label class="number optional control-label" for="media_vimeo_width">Width</label>
|
85
|
+
<div class="controls">
|
86
|
+
<input class="span2 number optional" id="media_vimeo_width" name="media[vimeo_width]" size="50" type="number" value="400">
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
<div class="control-group number optional">
|
90
|
+
<label class="number optional control-label" for="media_vimeo_height">Height</label>
|
91
|
+
<div class="controls">
|
92
|
+
<input class="span2 number optional" id="media_vimeo_height" name="media[vimeo_height]" size="50" type="number" value="225">
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
</fieldset>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
<div class="form-actions mercury-display-controls">
|
100
|
+
<input class="btn btn-primary" name="commit" type="submit" value="Insert Media"/>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</form>
|
@@ -1,84 +1,90 @@
|
|
1
|
-
<form id="mercury_table" style="width:700px">
|
1
|
+
<form id="mercury_table" class="form-horizontal" style="width:700px">
|
2
2
|
|
3
|
-
<div class="mercury-display-pane-container">
|
4
|
-
<div class="mercury-display-pane">
|
3
|
+
<div class="form-inputs mercury-display-pane-container">
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
5
|
+
<fieldset id="table_display">
|
6
|
+
<div class="control-group optional">
|
7
|
+
<div class="controls">
|
8
|
+
<table border="1" cellspacing="0">
|
9
|
+
<tr>
|
10
|
+
<td> </td>
|
11
|
+
<td> </td>
|
12
|
+
<td> </td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td> </td>
|
16
|
+
<td> </td>
|
17
|
+
<td> </td>
|
18
|
+
</tr>
|
19
|
+
</table>
|
20
|
+
</div>
|
19
21
|
</div>
|
22
|
+
</fieldset>
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
24
|
+
<fieldset>
|
25
|
+
<div class="control-group buttons optional">
|
26
|
+
<label class="buttons optional control-label">Rows</label>
|
27
|
+
<div class="controls btn-group">
|
28
|
+
<button class="btn" data-action="addRowBefore">Add Before</button>
|
29
|
+
<button class="btn" data-action="addRowAfter">Add After</button>
|
30
|
+
<button class="btn" data-action="removeRow">Remove</button>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<div class="control-group buttons optional">
|
34
|
+
<label class="buttons optional control-label">Columns</label>
|
35
|
+
<div class="controls btn-group">
|
36
|
+
<button class="btn" data-action="addColumnBefore">Add Before</button>
|
37
|
+
<button class="btn" data-action="addColumnAfter">Add After</button>
|
38
|
+
<button class="btn" data-action="removeColumn">Remove</button>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<hr/>
|
42
|
+
<div class="control-group buttons optional">
|
43
|
+
<label class="buttons optional control-label">Row Span</label>
|
44
|
+
<div class="controls btn-group">
|
45
|
+
<button class="btn" data-action="increaseRowspan">+</button>
|
46
|
+
<button class="btn" data-action="decreaseRowspan">-</button>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<div class="control-group buttons optional">
|
50
|
+
<label class="buttons optional control-label">Column Span</label>
|
51
|
+
<div class="controls btn-group">
|
52
|
+
<button class="btn" data-action="increaseColspan">+</button>
|
53
|
+
<button class="btn" data-action="decreaseColspan">-</button>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</fieldset>
|
49
57
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
58
|
+
<fieldset>
|
59
|
+
<legend>Options</legend>
|
60
|
+
<div class="control-group select optional">
|
61
|
+
<label class="select optional control-label" for="table_alignment">Alignment</label>
|
62
|
+
<div class="controls">
|
63
|
+
<select class="select optional" id="table_alignment" name="table[alignment]">
|
64
|
+
<option value="">None</option>
|
65
|
+
<option value="right">Right</option>
|
66
|
+
<option value="left">Left</option>
|
67
|
+
</select>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div class="control-group number optional">
|
71
|
+
<label class="number optional control-label" for="table_border">Border</label>
|
72
|
+
<div class="controls">
|
73
|
+
<input class="span1 number optional" id="table_border" name="table[border]" size="50" type="number" value="1">
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<div class="control-group number optional">
|
77
|
+
<label class="number optional control-label" for="table_spacing">Spacing</label>
|
78
|
+
<div class="controls">
|
79
|
+
<input class="span1 number optional" id="table_spacing" name="table[spacing]" size="50" type="number" value="0">
|
80
|
+
</div>
|
71
81
|
</div>
|
82
|
+
</fieldset>
|
72
83
|
|
73
|
-
</div>
|
74
84
|
</div>
|
75
85
|
|
76
|
-
<div class="mercury-display-controls">
|
77
|
-
<
|
78
|
-
<ol>
|
79
|
-
<li class="commit button"><input class="submit" name="commit" type="submit" value="Insert Table" /></li>
|
80
|
-
</ol>
|
81
|
-
</fieldset>
|
86
|
+
<div class="form-actions mercury-display-controls">
|
87
|
+
<input class="btn btn-primary" name="commit" type="submit" value="Insert Table"/>
|
82
88
|
</div>
|
83
89
|
|
84
|
-
</form>
|
90
|
+
</form>
|