mercury-rails 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/LICENSE +5 -0
  2. data/{README.rdoc → README.md} +150 -60
  3. data/VERSION +1 -1
  4. data/annotated_source.template +57 -0
  5. data/app/controllers/mercury_controller.rb +8 -4
  6. data/app/models/image.rb +2 -2
  7. data/app/views/layouts/mercury.html.erb +14 -0
  8. data/app/views/mercury/lightviews/about.html +7 -0
  9. data/app/views/mercury/lightviews/imageprocessor.html +3 -0
  10. data/app/views/mercury/modals/character.html +255 -0
  11. data/app/views/mercury/modals/htmleditor.html +13 -0
  12. data/app/views/mercury/modals/link.html +75 -0
  13. data/app/views/mercury/modals/media.html +82 -0
  14. data/app/views/mercury/modals/sanitizer.html +9 -0
  15. data/app/views/mercury/modals/table.html +84 -0
  16. data/app/views/mercury/palettes/backcolor.html +73 -0
  17. data/app/views/mercury/palettes/forecolor.html +73 -0
  18. data/app/views/mercury/panels/history.html +3 -0
  19. data/app/views/mercury/panels/notes.html +3 -0
  20. data/app/views/mercury/panels/snippets.html +12 -0
  21. data/app/views/mercury/selects/formatblock.html +11 -0
  22. data/app/views/mercury/selects/style.html +5 -0
  23. data/app/views/mercury/snippets/example.html.erb +1 -0
  24. data/app/views/mercury/snippets/example_options.html.erb +23 -0
  25. data/config/routes.rb +1 -1
  26. data/features/editing/basic.feature +1 -1
  27. data/features/support/paths.rb +1 -0
  28. data/lib/generators/mercury/install/install_generator.rb +14 -0
  29. data/mercury-rails.gemspec +115 -106
  30. data/spec/javascripts/mercury/dialog_spec.js.coffee +54 -38
  31. data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +1 -1
  32. data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +1 -1
  33. data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +1 -1
  34. data/spec/javascripts/mercury/dialogs/{objectspanel_spec.js.coffee → snippetpanel_spec.js.coffee} +4 -4
  35. data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +1 -1
  36. data/spec/javascripts/mercury/history_buffer_spec.js.coffee +0 -1
  37. data/spec/javascripts/mercury/lightview_spec.js.coffee +448 -0
  38. data/spec/javascripts/mercury/mercury_spec.js.coffee +1 -1
  39. data/spec/javascripts/mercury/modal_spec.js.coffee +474 -0
  40. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +1 -1
  41. data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +1 -1
  42. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +8 -2
  43. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +1 -1
  44. data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +1 -1
  45. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +1 -1
  46. data/spec/javascripts/mercury/native_extensions_spec.js.coffee +1 -1
  47. data/spec/javascripts/mercury/page_editor_spec.js.coffee +160 -20
  48. data/spec/javascripts/mercury/palette_spec.js.coffee +1 -1
  49. data/spec/javascripts/mercury/panel_spec.js.coffee +1 -1
  50. data/spec/javascripts/mercury/region_spec.js.coffee +1 -1
  51. data/spec/javascripts/mercury/regions/editable_spec.js.coffee +191 -6
  52. data/spec/javascripts/mercury/regions/markupable_spec.js.coffee +369 -0
  53. data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +1 -1
  54. data/spec/javascripts/mercury/select_spec.js.coffee +1 -1
  55. data/spec/javascripts/mercury/snippet_spec.js.coffee +3 -3
  56. data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +2 -2
  57. data/spec/javascripts/mercury/statusbar_spec.js.coffee +91 -17
  58. data/spec/javascripts/mercury/table_editor_spec.js.coffee +5 -1
  59. data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +1 -1
  60. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +1 -1
  61. data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +1 -1
  62. data/spec/javascripts/mercury/toolbar_spec.js.coffee +70 -15
  63. data/spec/javascripts/mercury/tooltip_spec.js.coffee +1 -1
  64. data/spec/javascripts/mercury/uploader_spec.js.coffee +9 -1
  65. data/spec/javascripts/templates/mercury/dialogs/{objectspanel.html → snippetpanel.html} +0 -0
  66. data/spec/javascripts/templates/mercury/lightview.html +13 -0
  67. data/spec/javascripts/templates/mercury/modal.html +13 -0
  68. data/spec/javascripts/templates/mercury/page_editor.html +11 -1
  69. data/spec/javascripts/templates/mercury/statusbar.html +1 -0
  70. data/spec/javascripts/templates/mercury/toolbar.html +1 -0
  71. data/{app → vendor}/assets/images/mercury/button.png +0 -0
  72. data/{app → vendor}/assets/images/mercury/clippy.png +0 -0
  73. data/{app → vendor}/assets/images/mercury/default-snippet.png +0 -0
  74. data/{app → vendor}/assets/images/mercury/loading-dark.gif +0 -0
  75. data/{app → vendor}/assets/images/mercury/loading-light.gif +0 -0
  76. data/{app → vendor}/assets/images/mercury/search-icon.png +0 -0
  77. data/vendor/assets/images/mercury/temp-logo.png +0 -0
  78. data/{app → vendor}/assets/images/mercury/toolbar/editable/buttons.png +0 -0
  79. data/{app → vendor}/assets/images/mercury/toolbar/primary/_expander.png +0 -0
  80. data/{app → vendor}/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
  81. data/{app → vendor}/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
  82. data/{app → vendor}/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
  83. data/{app → vendor}/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
  84. data/{app → vendor}/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
  85. data/{app → vendor}/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
  86. data/{app → vendor}/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
  87. data/{app → vendor}/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
  88. data/{app → vendor}/assets/images/mercury/toolbar/primary/preview.png +0 -0
  89. data/{app → vendor}/assets/images/mercury/toolbar/primary/redo.png +0 -0
  90. data/{app → vendor}/assets/images/mercury/toolbar/primary/save.png +0 -0
  91. data/{app/assets/images/mercury/toolbar/primary/objectspanel.png → vendor/assets/images/mercury/toolbar/primary/snippetpanel.png} +0 -0
  92. data/{app → vendor}/assets/images/mercury/toolbar/primary/undo.png +0 -0
  93. data/{app → vendor}/assets/images/mercury/toolbar/snippetable/buttons.png +0 -0
  94. data/vendor/assets/javascripts/mercury.js +302 -0
  95. data/vendor/assets/javascripts/mercury/dialog.js.coffee +157 -0
  96. data/{app → vendor}/assets/javascripts/mercury/dialogs/backcolor.js.coffee +0 -0
  97. data/{app → vendor}/assets/javascripts/mercury/dialogs/forecolor.js.coffee +0 -0
  98. data/{app → vendor}/assets/javascripts/mercury/dialogs/formatblock.js.coffee +0 -0
  99. data/{app → vendor}/assets/javascripts/mercury/dialogs/objectspanel.js.coffee +1 -1
  100. data/{app → vendor}/assets/javascripts/mercury/dialogs/style.js.coffee +0 -0
  101. data/{app → vendor}/assets/javascripts/mercury/history_buffer.js.coffee +0 -0
  102. data/vendor/assets/javascripts/mercury/lightview.js.coffee +156 -0
  103. data/vendor/assets/javascripts/mercury/lightviews/imageprocessor.js.coffee +2 -0
  104. data/vendor/assets/javascripts/mercury/mercury.js.coffee +63 -0
  105. data/{app → vendor}/assets/javascripts/mercury/modal.js.coffee +25 -17
  106. data/{app → vendor}/assets/javascripts/mercury/modals/htmleditor.js.coffee +0 -0
  107. data/{app → vendor}/assets/javascripts/mercury/modals/insertcharacter.js.coffee +0 -0
  108. data/{app → vendor}/assets/javascripts/mercury/modals/insertlink.js.coffee +3 -0
  109. data/{app → vendor}/assets/javascripts/mercury/modals/insertmedia.js.coffee +10 -2
  110. data/{app → vendor}/assets/javascripts/mercury/modals/insertsnippet.js.coffee +0 -0
  111. data/{app → vendor}/assets/javascripts/mercury/modals/inserttable.js.coffee +2 -2
  112. data/{app → vendor}/assets/javascripts/mercury/native_extensions.js.coffee +0 -0
  113. data/{app → vendor}/assets/javascripts/mercury/page_editor.js.coffee +44 -13
  114. data/{app → vendor}/assets/javascripts/mercury/palette.js.coffee +0 -0
  115. data/{app → vendor}/assets/javascripts/mercury/panel.js.coffee +0 -0
  116. data/{app → vendor}/assets/javascripts/mercury/region.js.coffee +0 -0
  117. data/{app → vendor}/assets/javascripts/mercury/regions/editable.js.coffee +58 -12
  118. data/{app → vendor}/assets/javascripts/mercury/regions/markupable.js.coffee +26 -24
  119. data/{app → vendor}/assets/javascripts/mercury/regions/snippetable.js.coffee +0 -0
  120. data/{app → vendor}/assets/javascripts/mercury/select.js.coffee +3 -0
  121. data/{app → vendor}/assets/javascripts/mercury/snippet.js.coffee +9 -5
  122. data/{app → vendor}/assets/javascripts/mercury/snippet_toolbar.js.coffee +0 -0
  123. data/vendor/assets/javascripts/mercury/statusbar.js.coffee +51 -0
  124. data/{app → vendor}/assets/javascripts/mercury/table_editor.js.coffee +9 -8
  125. data/{app → vendor}/assets/javascripts/mercury/toolbar.button.js.coffee +0 -0
  126. data/{app → vendor}/assets/javascripts/mercury/toolbar.button_group.js.coffee +0 -0
  127. data/{app → vendor}/assets/javascripts/mercury/toolbar.expander.js.coffee +0 -0
  128. data/{app → vendor}/assets/javascripts/mercury/toolbar.js.coffee +14 -1
  129. data/{app → vendor}/assets/javascripts/mercury/tooltip.js.coffee +3 -0
  130. data/{app → vendor}/assets/javascripts/mercury/uploader.js.coffee +22 -13
  131. data/vendor/assets/javascripts/{jquery-1.6.js → mercury_dependencies/jquery-1.6.js} +0 -0
  132. data/vendor/assets/javascripts/{jquery-ui-1.8.13.custom.js → mercury_dependencies/jquery-ui-1.8.13.custom.js} +0 -0
  133. data/vendor/assets/javascripts/{jquery.additions.js → mercury_dependencies/jquery.additions.js} +0 -0
  134. data/vendor/assets/javascripts/{liquidmetal.js → mercury_dependencies/liquidmetal.js} +0 -0
  135. data/vendor/assets/javascripts/{showdown.js → mercury_dependencies/showdown.js} +0 -0
  136. data/vendor/assets/javascripts/mercury_loader.js +191 -0
  137. data/{app → vendor}/assets/stylesheets/mercury.css +3 -6
  138. data/vendor/assets/stylesheets/mercury/dialog.css +199 -0
  139. data/vendor/assets/stylesheets/mercury/lightview.css +92 -0
  140. data/vendor/assets/stylesheets/mercury/mercury.css +134 -0
  141. data/vendor/assets/stylesheets/mercury/modal.css +191 -0
  142. data/{app/assets/stylesheets/mercury/statusbar.scss → vendor/assets/stylesheets/mercury/statusbar.css} +9 -1
  143. data/vendor/assets/stylesheets/mercury/toolbar.css +329 -0
  144. data/{app/assets/stylesheets/mercury/tooltip.scss → vendor/assets/stylesheets/mercury/tooltip.css} +7 -7
  145. data/vendor/assets/stylesheets/mercury/uploader.css +111 -0
  146. metadata +230 -225
  147. data/app/assets/images/mercury/toolbar/markupable/buttons.png +0 -0
  148. data/app/assets/images/mercury/toolbar/primary/todospanel.png +0 -0
  149. data/app/assets/javascripts/mercury.js +0 -30
  150. data/app/assets/javascripts/mercury/dialog.js.coffee +0 -75
  151. data/app/assets/javascripts/mercury/mercury.js.coffee +0 -286
  152. data/app/assets/javascripts/mercury/statusbar.js.coffee +0 -29
  153. data/app/assets/javascripts/mercury_loader.js +0 -98
  154. data/app/assets/stylesheets/mercury/dialog.scss +0 -179
  155. data/app/assets/stylesheets/mercury/mercury.scss +0 -127
  156. data/app/assets/stylesheets/mercury/modal.scss +0 -194
  157. data/app/assets/stylesheets/mercury/toolbar.scss +0 -415
  158. data/app/assets/stylesheets/mercury/uploader.scss +0 -109
  159. data/app/views/layouts/mercury.html.haml +0 -8
  160. data/app/views/mercury/modals/character.html.haml +0 -252
  161. data/app/views/mercury/modals/htmleditor.html.haml +0 -8
  162. data/app/views/mercury/modals/link.html.haml +0 -31
  163. data/app/views/mercury/modals/media.html.haml +0 -33
  164. data/app/views/mercury/modals/sanitizer.html.haml +0 -4
  165. data/app/views/mercury/modals/table.html.haml +0 -49
  166. data/app/views/mercury/palettes/backcolor.html.haml +0 -79
  167. data/app/views/mercury/palettes/forecolor.html.haml +0 -79
  168. data/app/views/mercury/panels/history.html.haml +0 -0
  169. data/app/views/mercury/panels/notes.html.haml +0 -0
  170. data/app/views/mercury/panels/snippets.html.haml +0 -10
  171. data/app/views/mercury/selects/formatblock.html.haml +0 -10
  172. data/app/views/mercury/selects/style.html.haml +0 -4
  173. data/app/views/mercury/snippets/example.html.haml +0 -2
  174. data/app/views/mercury/snippets/example_options.html.haml +0 -16
  175. data/log/.gitkeep +0 -0
  176. data/spec/javascripts/mercury/regions/_markupable_.js.coffee +0 -0
@@ -1,79 +0,0 @@
1
- .mercury-color-picker
2
- .picker{ style: "background:#FFFFFF" }
3
- .picker{ style: "background:#FFCCCC" }
4
- .picker{ style: "background:#FFCC99" }
5
- .picker{ style: "background:#FFFF99" }
6
- .picker{ style: "background:#FFFFCC" }
7
- .picker{ style: "background:#99FF99" }
8
- .picker{ style: "background:#99FFFF" }
9
- .picker{ style: "background:#CCFFFF" }
10
- .picker{ style: "background:#CCCCFF" }
11
- .picker{ style: "background:#FFCCFF" }
12
-
13
- .picker{ style: "background:#CCCCCC" }
14
- .picker{ style: "background:#FF6666" }
15
- .picker{ style: "background:#FF9966" }
16
- .picker{ style: "background:#FFFF66" }
17
- .picker{ style: "background:#FFFF33" }
18
- .picker{ style: "background:#66FF99" }
19
- .picker{ style: "background:#33FFFF" }
20
- .picker{ style: "background:#66FFFF" }
21
- .picker{ style: "background:#9999FF" }
22
- .picker{ style: "background:#FF99FF" }
23
-
24
- .picker{ style: "background:#C0C0C0" }
25
- .picker{ style: "background:#FF0000" }
26
- .picker{ style: "background:#FF9900" }
27
- .picker{ style: "background:#FFCC66" }
28
- .picker{ style: "background:#FFFF00" }
29
- .picker{ style: "background:#33FF33" }
30
- .picker{ style: "background:#66CCCC" }
31
- .picker{ style: "background:#33CCFF" }
32
- .picker{ style: "background:#6666CC" }
33
- .picker{ style: "background:#CC66CC" }
34
-
35
- .picker{ style: "background:#999999" }
36
- .picker{ style: "background:#CC0000" }
37
- .picker{ style: "background:#FF6600" }
38
- .picker{ style: "background:#FFCC33" }
39
- .picker{ style: "background:#FFCC00" }
40
- .picker{ style: "background:#33CC00" }
41
- .picker{ style: "background:#00CCCC" }
42
- .picker{ style: "background:#3366FF" }
43
- .picker{ style: "background:#6633FF" }
44
- .picker{ style: "background:#CC33CC" }
45
-
46
- .picker{ style: "background:#666666" }
47
- .picker{ style: "background:#990000" }
48
- .picker{ style: "background:#CC6600" }
49
- .picker{ style: "background:#CC9933" }
50
- .picker{ style: "background:#999900" }
51
- .picker{ style: "background:#009900" }
52
- .picker{ style: "background:#339999" }
53
- .picker{ style: "background:#3333FF" }
54
- .picker{ style: "background:#6600CC" }
55
- .picker{ style: "background:#993399" }
56
-
57
- .picker{ style: "background:#333333" }
58
- .picker{ style: "background:#660000" }
59
- .picker{ style: "background:#993300" }
60
- .picker{ style: "background:#996633" }
61
- .picker{ style: "background:#666600" }
62
- .picker{ style: "background:#006600" }
63
- .picker{ style: "background:#336666" }
64
- .picker{ style: "background:#000099" }
65
- .picker{ style: "background:#333399" }
66
- .picker{ style: "background:#663366" }
67
-
68
- .picker{ style: "background:#000000" }
69
- .picker{ style: "background:#330000" }
70
- .picker{ style: "background:#663300" }
71
- .picker{ style: "background:#663333" }
72
- .picker{ style: "background:#333300" }
73
- .picker{ style: "background:#003300" }
74
- .picker{ style: "background:#003333" }
75
- .picker{ style: "background:#000066" }
76
- .picker{ style: "background:#330099" }
77
- .picker{ style: "background:#330033" }
78
-
79
- .last-picked Last Color Picked
File without changes
File without changes
@@ -1,10 +0,0 @@
1
- .mercury-snippet-panel
2
-
3
- .filter
4
- %input.filter{ :type => 'text' }
5
-
6
- %ul
7
- %li{ 'data-filter' => "example-snippet" }
8
- = image_tag('mercury/default-snippet.png', 'data-snippet' => 'example' )
9
- %h4 Snippet Name
10
- .description A one to two line long description of what this snippet does.
@@ -1,10 +0,0 @@
1
- .mercury-select-options
2
- %h1{ data: {tag: "h1"} } Heading 1 <h1>
3
- %h2{ data: {tag: "h2"} } Heading 2 <h2>
4
- %h3{ data: {tag: "h3"} } Heading 3 <h3>
5
- %h4{ data: {tag: "h4"} } Heading 4 <h4>
6
- %h5{ data: {tag: "h5"} } Heading 5 <h5>
7
- %h6{ data: {tag: "h6"} } Heading 6 <h6>
8
- %div{ data: {tag: "p"} } Paragraph <p>
9
- %div{ data: {tag: "blockquote"} } Blockquote <blockquote>
10
- %div{ data: {tag: "pre"} } Formatted <pre>
@@ -1,4 +0,0 @@
1
- .mercury-select-options
2
- .red{ data: {class: "red"} } Red text
3
- .large-bold{ data: {class: "large-bold"} } Large bold text
4
- .blue{ data: {class: "blue"} } Blue background
@@ -1,2 +0,0 @@
1
- %h1= params[:options][:first_name]
2
- %h2= "likes #{params[:options][:favorite_beer]}"
@@ -1,16 +0,0 @@
1
- = semantic_form_for 'options', { html: { style: 'width:600px' } } do |f|
2
-
3
- .mercury-modal-pane-container
4
- .mercury-modal-pane
5
-
6
- = f.inputs do
7
- = f.input :first_name, required: false, label: 'First Name'
8
-
9
- = f.inputs 'Options' do
10
- = f.input :favorite_beer, as: :select, required: false, label: 'Favorite Beer', include_blank: false,
11
- collection: [['Miller Lite', 'miller_lite'], ['PBR', 'pbr'], ['Coors', 'coors']]
12
-
13
- .mercury-modal-controls
14
-
15
- = f.buttons do
16
- = f.commit_button 'Insert Snippet'
data/log/.gitkeep DELETED
File without changes