mercury-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/LICENSE +20 -0
  2. data/README.rdoc +152 -0
  3. data/VERSION +1 -0
  4. data/app/assets/images/mercury/button.png +0 -0
  5. data/app/assets/images/mercury/clippy.png +0 -0
  6. data/app/assets/images/mercury/default-snippet.png +0 -0
  7. data/app/assets/images/mercury/loading-dark.gif +0 -0
  8. data/app/assets/images/mercury/loading-light.gif +0 -0
  9. data/app/assets/images/mercury/search-icon.png +0 -0
  10. data/app/assets/images/mercury/toolbar/editable/buttons.png +0 -0
  11. data/app/assets/images/mercury/toolbar/markupable/buttons.png +0 -0
  12. data/app/assets/images/mercury/toolbar/primary/_expander.png +0 -0
  13. data/app/assets/images/mercury/toolbar/primary/_pressed.png +0 -0
  14. data/app/assets/images/mercury/toolbar/primary/historypanel.png +0 -0
  15. data/app/assets/images/mercury/toolbar/primary/insertcharacter.png +0 -0
  16. data/app/assets/images/mercury/toolbar/primary/insertlink.png +0 -0
  17. data/app/assets/images/mercury/toolbar/primary/insertmedia.png +0 -0
  18. data/app/assets/images/mercury/toolbar/primary/inserttable.png +0 -0
  19. data/app/assets/images/mercury/toolbar/primary/inspectorpanel.png +0 -0
  20. data/app/assets/images/mercury/toolbar/primary/notespanel.png +0 -0
  21. data/app/assets/images/mercury/toolbar/primary/objectspanel.png +0 -0
  22. data/app/assets/images/mercury/toolbar/primary/preview.png +0 -0
  23. data/app/assets/images/mercury/toolbar/primary/redo.png +0 -0
  24. data/app/assets/images/mercury/toolbar/primary/save.png +0 -0
  25. data/app/assets/images/mercury/toolbar/primary/todospanel.png +0 -0
  26. data/app/assets/images/mercury/toolbar/primary/undo.png +0 -0
  27. data/app/assets/images/mercury/toolbar/snippetable/buttons.png +0 -0
  28. data/app/assets/javascripts/mercury.js +30 -0
  29. data/app/assets/javascripts/mercury/dialog.js.coffee +75 -0
  30. data/app/assets/javascripts/mercury/dialogs/backcolor.js.coffee +6 -0
  31. data/app/assets/javascripts/mercury/dialogs/forecolor.js.coffee +6 -0
  32. data/app/assets/javascripts/mercury/dialogs/formatblock.js.coffee +4 -0
  33. data/app/assets/javascripts/mercury/dialogs/objectspanel.js.coffee +10 -0
  34. data/app/assets/javascripts/mercury/dialogs/style.js.coffee +4 -0
  35. data/app/assets/javascripts/mercury/history_buffer.js.coffee +30 -0
  36. data/app/assets/javascripts/mercury/mercury.js.coffee +293 -0
  37. data/app/assets/javascripts/mercury/modal.js.coffee +177 -0
  38. data/app/assets/javascripts/mercury/modals/htmleditor.js.coffee +10 -0
  39. data/app/assets/javascripts/mercury/modals/insertcharacter.js.coffee +4 -0
  40. data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +92 -0
  41. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +72 -0
  42. data/app/assets/javascripts/mercury/modals/insertsnippet.js.coffee +11 -0
  43. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +56 -0
  44. data/app/assets/javascripts/mercury/native_extensions.js.coffee +47 -0
  45. data/app/assets/javascripts/mercury/page_editor.js.coffee +139 -0
  46. data/app/assets/javascripts/mercury/palette.js.coffee +29 -0
  47. data/app/assets/javascripts/mercury/panel.js.coffee +97 -0
  48. data/app/assets/javascripts/mercury/region.js.coffee +103 -0
  49. data/app/assets/javascripts/mercury/regions/editable.js.coffee +546 -0
  50. data/app/assets/javascripts/mercury/regions/markupable.js.coffee +380 -0
  51. data/app/assets/javascripts/mercury/regions/snippetable.js.coffee +127 -0
  52. data/app/assets/javascripts/mercury/select.js.coffee +40 -0
  53. data/app/assets/javascripts/mercury/snippet.js.coffee +92 -0
  54. data/app/assets/javascripts/mercury/snippet_toolbar.js.coffee +69 -0
  55. data/app/assets/javascripts/mercury/statusbar.js.coffee +25 -0
  56. data/app/assets/javascripts/mercury/table_editor.js.coffee +266 -0
  57. data/app/assets/javascripts/mercury/toolbar.button.js.coffee +152 -0
  58. data/app/assets/javascripts/mercury/toolbar.button_group.js.coffee +42 -0
  59. data/app/assets/javascripts/mercury/toolbar.expander.js.coffee +56 -0
  60. data/app/assets/javascripts/mercury/toolbar.js.coffee +72 -0
  61. data/app/assets/javascripts/mercury/tooltip.js.coffee +67 -0
  62. data/app/assets/javascripts/mercury/uploader.js.coffee +213 -0
  63. data/app/assets/javascripts/mercury/websocket.js.coffee +34 -0
  64. data/app/assets/stylesheets/mercury.css +31 -0
  65. data/app/assets/stylesheets/mercury/dialog.scss +178 -0
  66. data/app/assets/stylesheets/mercury/mercury.scss +119 -0
  67. data/app/assets/stylesheets/mercury/modal.scss +192 -0
  68. data/app/assets/stylesheets/mercury/statusbar.scss +23 -0
  69. data/app/assets/stylesheets/mercury/toolbar.scss +417 -0
  70. data/app/assets/stylesheets/mercury/tooltip.scss +26 -0
  71. data/app/assets/stylesheets/mercury/uploader.scss +109 -0
  72. data/app/controllers/images_controller.rb +19 -0
  73. data/app/controllers/mercury_controller.rb +20 -0
  74. data/app/models/image.rb +14 -0
  75. data/app/views/layouts/mercury.html.haml +12 -0
  76. data/app/views/mercury/modals/character.html.haml +252 -0
  77. data/app/views/mercury/modals/htmleditor.html.haml +8 -0
  78. data/app/views/mercury/modals/link.html.haml +31 -0
  79. data/app/views/mercury/modals/media.html.haml +33 -0
  80. data/app/views/mercury/modals/sanitizer.html.haml +4 -0
  81. data/app/views/mercury/modals/table.html.haml +49 -0
  82. data/app/views/mercury/palettes/backcolor.html.haml +79 -0
  83. data/app/views/mercury/palettes/forecolor.html.haml +79 -0
  84. data/app/views/mercury/panels/history.html.haml +0 -0
  85. data/app/views/mercury/panels/notes.html.haml +0 -0
  86. data/app/views/mercury/panels/snippets.html.haml +10 -0
  87. data/app/views/mercury/selects/formatblock.html.haml +10 -0
  88. data/app/views/mercury/selects/style.html.haml +4 -0
  89. data/app/views/mercury/snippets/example.html.haml +2 -0
  90. data/app/views/mercury/snippets/example_options.html.haml +16 -0
  91. data/config/engine.rb +6 -0
  92. data/config/routes.rb +15 -0
  93. data/db/migrate/20110526035601_create_images.rb +11 -0
  94. data/features/editing/basic.feature +11 -0
  95. data/features/step_definitions/debug_steps.rb +14 -0
  96. data/features/step_definitions/web_steps.rb +211 -0
  97. data/features/support/env.rb +46 -0
  98. data/features/support/paths.rb +35 -0
  99. data/features/support/selectors.rb +42 -0
  100. data/lib/mercury-rails.rb +4 -0
  101. data/log/.gitkeep +0 -0
  102. data/mercury-rails.gemspec +230 -0
  103. data/spec/javascripts/mercury/dialog_spec.js.coffee +258 -0
  104. data/spec/javascripts/mercury/history_buffer_spec.js.coffee +79 -0
  105. data/spec/javascripts/mercury/mercury_spec.js.coffee +52 -0
  106. data/spec/javascripts/mercury/native_extensions_spec.js.coffee +66 -0
  107. data/spec/javascripts/mercury/page_editor_spec.js.coffee +435 -0
  108. data/spec/javascripts/mercury/palette_spec.js.coffee +51 -0
  109. data/spec/javascripts/mercury/panel_spec.js.coffee +147 -0
  110. data/spec/javascripts/mercury/region_spec.js.coffee +261 -0
  111. data/spec/javascripts/mercury/regions/_editable_.js.coffee +0 -0
  112. data/spec/javascripts/mercury/regions/_markupable_.js.coffee +0 -0
  113. data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +368 -0
  114. data/spec/javascripts/mercury/select_spec.js.coffee +51 -0
  115. data/spec/javascripts/mercury/snippet_spec.js.coffee +246 -0
  116. data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +186 -0
  117. data/spec/javascripts/mercury/statusbar_spec.js.coffee +78 -0
  118. data/spec/javascripts/mercury/table_editor_spec.js.coffee +192 -0
  119. data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +92 -0
  120. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +341 -0
  121. data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +120 -0
  122. data/spec/javascripts/mercury/toolbar_spec.js.coffee +152 -0
  123. data/spec/javascripts/mercury/tooltip_spec.js.coffee +188 -0
  124. data/spec/javascripts/mercury/uploader_spec.js.coffee +512 -0
  125. data/spec/javascripts/responses/blank.html +1 -0
  126. data/spec/javascripts/spec_helper.js +513 -0
  127. data/spec/javascripts/templates/mercury/dialog.html +2 -0
  128. data/spec/javascripts/templates/mercury/page_editor.html +24 -0
  129. data/spec/javascripts/templates/mercury/palette.html +16 -0
  130. data/spec/javascripts/templates/mercury/panel.html +16 -0
  131. data/spec/javascripts/templates/mercury/region.html +2 -0
  132. data/spec/javascripts/templates/mercury/regions/snippetable.html +4 -0
  133. data/spec/javascripts/templates/mercury/select.html +16 -0
  134. data/spec/javascripts/templates/mercury/snippet.html +1 -0
  135. data/spec/javascripts/templates/mercury/snippet_toolbar.html +16 -0
  136. data/spec/javascripts/templates/mercury/statusbar.html +7 -0
  137. data/spec/javascripts/templates/mercury/table_editor.html +65 -0
  138. data/spec/javascripts/templates/mercury/toolbar.button.html +64 -0
  139. data/spec/javascripts/templates/mercury/toolbar.button_group.html +9 -0
  140. data/spec/javascripts/templates/mercury/toolbar.expander.html +18 -0
  141. data/spec/javascripts/templates/mercury/toolbar.html +10 -0
  142. data/spec/javascripts/templates/mercury/tooltip.html +12 -0
  143. data/spec/javascripts/templates/mercury/uploader.html +11 -0
  144. data/vendor/assets/javascripts/jquery-1.6.js +8865 -0
  145. data/vendor/assets/javascripts/jquery-ui-1.8.13.custom.min.js +249 -0
  146. data/vendor/assets/javascripts/jquery-ui-1.8.13.sortable.custom.js +1078 -0
  147. data/vendor/assets/javascripts/jquery.easing.js +173 -0
  148. data/vendor/assets/javascripts/jquery.json2.js +178 -0
  149. data/vendor/assets/javascripts/jquery.serialize_object.js +16 -0
  150. data/vendor/assets/javascripts/jquery.ujs.js +289 -0
  151. data/vendor/assets/javascripts/liquidmetal.js +88 -0
  152. data/vendor/assets/javascripts/showdown.js +1362 -0
  153. metadata +364 -0
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Statusbar
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-statusbar {
5
+ position: absolute;
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ user-select: none;
9
+ box-sizing: border-box;
10
+ -moz-box-sizing: border-box;
11
+ z-index: 10020;
12
+ bottom: 0;
13
+ width: 100%;
14
+ height: 23px;
15
+ cursor: default;
16
+ padding: 0 10px;
17
+ background: #E2E1E2;
18
+ border-top: 1px solid #727272;
19
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
20
+ font-size: 8.5pt;
21
+ line-height: 23px;
22
+ color: #222;
23
+ }
@@ -0,0 +1,417 @@
1
+ /*
2
+ * Toolbar
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-toolbar-container {
5
+ user-select: none;
6
+ position: absolute;
7
+ z-index: 10010;
8
+ top: 0;
9
+ width: 100%;
10
+ border-bottom: 1px solid #E2E1E2;
11
+ }
12
+ .mercury-toolbar {
13
+ -webkit-user-select: none;
14
+ -moz-user-select: none;
15
+ user-select: none;
16
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(198,198,198)), color-stop(1, rgb(226,225,226)));
17
+ background-image: -moz-linear-gradient(center bottom, rgb(198,198,198) 0%, rgb(226,225,226) 100%);
18
+ border-bottom: 1px solid #727272;
19
+ cursor: default;
20
+ }
21
+ .mercury-toolbar-button-container {
22
+ float: left;
23
+ }
24
+ .mercury-toolbar-expander {
25
+ position: absolute;
26
+ display: none;
27
+ right: 0;
28
+ border-left: 1px solid #727272;
29
+ }
30
+ .mercury-button,
31
+ .mercury-button-group,
32
+ .mercury-separator,
33
+ .mercury-line-separator {
34
+ display: block;
35
+ float: left;
36
+ }
37
+ .mercury-separator,
38
+ .mercury-line-separator {
39
+ width: 1px;
40
+ border: 0;
41
+ margin: 0;
42
+ }
43
+ .mercury-line-separator {
44
+ width: 1px;
45
+ background: #727272;
46
+ }
47
+ .mercury-button em {
48
+ display: block;
49
+ font-style: normal;
50
+ }
51
+ .mercury-expander {
52
+ padding: 5px 0;
53
+ border-radius: 4px;
54
+ -moz-border-radius: 4px;
55
+ .mercury-expander-button {
56
+ cursor: default;
57
+ white-space: nowrap;
58
+ padding: 0 20px 0 10px;
59
+ &:hover {
60
+ background: #CCC;
61
+ }
62
+ em {
63
+ display: inline-block;
64
+ float: left;
65
+ width: 20px;
66
+ height: 20px;
67
+ margin-right: 10px;
68
+ -webkit-background-size: 100% 100%;
69
+ -moz-background-size: 100% 100%;
70
+ background-size: 100% 100%;
71
+ }
72
+ span {
73
+ display: inline-block;
74
+ line-height: 20px;
75
+ }
76
+ }
77
+ }
78
+ .disabled .mercury-button,
79
+ .mercury-button.disabled {
80
+ opacity: 0.33;
81
+ }
82
+ /*
83
+ * Toolbar: Primary Toolbar
84
+ *----------------------------------------------------------------------------*/
85
+ .mercury-primary-toolbar {
86
+ position: relative;
87
+ height: 58px;
88
+ overflow: hidden;
89
+ text-shadow: #EEE 0 1px 0;
90
+ .mercury-button {
91
+ display: inline-block;
92
+ height: 58px;
93
+ margin-bottom: 20px;
94
+ min-width: 55px;
95
+ text-align: center;
96
+ white-space: nowrap;
97
+ text-decoration: none;
98
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
99
+ &.pressed {
100
+ background: url(/assets/mercury/toolbar/primary/_pressed.png) no-repeat top center;
101
+ }
102
+ em {
103
+ margin: 0 -5px;
104
+ height: 15px;
105
+ padding-top: 41px;
106
+ background-repeat: no-repeat;
107
+ background-position: 50% 7px;
108
+ font-size: 8.5pt;
109
+ line-height: 15px;
110
+ color: #222;
111
+ }
112
+ &.active {
113
+ em {
114
+ background-position: 51% 8px;
115
+ }
116
+ }
117
+ }
118
+ .mercury-separator,
119
+ .mercury-line-separator {
120
+ display: inline-block;
121
+ width: 1px;
122
+ height: 50px;
123
+ margin: 5px 20px 28px;
124
+ }
125
+ .mercury-toolbar-button-container {
126
+ white-space: nowrap;
127
+ padding-right: 10px;
128
+ }
129
+ .mercury-toolbar-expander {
130
+ width: 12px;
131
+ height: 58px;
132
+ background: rgba(0, 0, 0, .2) url(/assets/mercury/toolbar/primary/_expander.png) no-repeat center 90%;
133
+ }
134
+ }
135
+ /* default buttons */
136
+ .mercury-primary-toolbar .mercury-save-button em,
137
+ .mercury-expander-button[data-button=save] em { background-image: url(/assets/mercury/toolbar/primary/save.png) }
138
+ .mercury-primary-toolbar .mercury-preview-button em,
139
+ .mercury-expander-button[data-button=preview] em { background-image: url(/assets/mercury/toolbar/primary/preview.png) }
140
+ .mercury-primary-toolbar .mercury-undo-button em,
141
+ .mercury-expander-button[data-button=undo] em { background-image: url(/assets/mercury/toolbar/primary/undo.png) }
142
+ .mercury-primary-toolbar .mercury-redo-button em,
143
+ .mercury-expander-button[data-button=redo] em { background-image: url(/assets/mercury/toolbar/primary/redo.png) }
144
+ .mercury-primary-toolbar .mercury-insertlink-button em,
145
+ .mercury-expander-button[data-button=insertlink] em { background-image: url(/assets/mercury/toolbar/primary/insertlink.png) }
146
+ .mercury-primary-toolbar .mercury-insertmedia-button em,
147
+ .mercury-expander-button[data-button=insertmedia] em { background-image: url(/assets/mercury/toolbar/primary/insertmedia.png) }
148
+ .mercury-primary-toolbar .mercury-inserttable-button em,
149
+ .mercury-expander-button[data-button=inserttable] em { background-image: url(/assets/mercury/toolbar/primary/inserttable.png) }
150
+ .mercury-primary-toolbar .mercury-insertcharacter-button em,
151
+ .mercury-expander-button[data-button=insertcharacter] em { background-image: url(/assets/mercury/toolbar/primary/insertcharacter.png) }
152
+ .mercury-primary-toolbar .mercury-objectspanel-button em,
153
+ .mercury-expander-button[data-button=objectspanel] em { background-image: url(/assets/mercury/toolbar/primary/objectspanel.png) }
154
+ .mercury-primary-toolbar .mercury-historypanel-button em,
155
+ .mercury-expander-button[data-button=historypanel] em { background-image: url(/assets/mercury/toolbar/primary/historypanel.png) }
156
+ .mercury-primary-toolbar .mercury-notespanel-button em,
157
+ .mercury-expander-button[data-button=notespanel] em { background-image: url(/assets/mercury/toolbar/primary/notespanel.png) }
158
+ .mercury-primary-toolbar .mercury-todospanel-button em,
159
+ .mercury-expander-button[data-button=todospanel] em { background-image: url(/assets/mercury/toolbar/primary/todospanel.png) }
160
+ .mercury-primary-toolbar .mercury-notespanel-button em,
161
+ .mercury-expander-button[data-button=notespanel] em { background-image: url(/assets/mercury/toolbar/primary/notespanel.png) }
162
+ .mercury-primary-toolbar .mercury-todospanel-button em,
163
+ .mercury-expander-button[data-button=todospanel] em { background-image: url(/assets/mercury/toolbar/primary/todospanel.png) }
164
+ /*
165
+ * Toolbar: Editable Region Toolbar
166
+ *----------------------------------------------------------------------------*/
167
+ .mercury-editable-toolbar {
168
+ padding: 3px 13px 1px 10px;
169
+ border-top: 1px solid #E2E1E2;
170
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(198,198,198)), color-stop(1, rgb(210,210,209)));
171
+ background-image: -moz-linear-gradient(center bottom, rgb(198,198,198) 0%, rgb(210,210,209) 100%);
172
+ &:after {
173
+ content: '\00a0';
174
+ display: block;
175
+ visibility: hidden;
176
+ clear: both;
177
+ height: 0;
178
+ }
179
+ .mercury-separator,
180
+ .mercury-line-separator {
181
+ height: 18px;
182
+ padding: 0;
183
+ margin: 0 7px 2px;
184
+ }
185
+ .mercury-separator {
186
+ margin: 0 3px 2px;
187
+ }
188
+ .mercury-button-group {
189
+ white-space: nowrap;
190
+ .mercury-button:first-child {
191
+ width: 23px;
192
+ }
193
+ }
194
+ .mercury-button {
195
+ width: 22px;
196
+ height: 18px;
197
+ margin: 0 0 2px;
198
+ background-image: url(/assets/mercury/toolbar/editable/buttons.png);
199
+ em {
200
+ background-image: url(/assets/mercury/toolbar/editable/buttons.png);
201
+ display: none;
202
+ }
203
+ }
204
+ .mercury-button-palette {
205
+ width: 23px;
206
+ background-position: 0 -36px;
207
+ }
208
+ .mercury-button-select {
209
+ width: auto !important;
210
+ overflow: hidden;
211
+ padding-left: 6px;
212
+ background-position: -24px -36px;
213
+ em {
214
+ display: block;
215
+ padding-right: 15px;
216
+ background-position: right -36px;
217
+ cursor: pointer;
218
+ white-space: nowrap;
219
+ font-style: normal;
220
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
221
+ font-size: 8.5pt;
222
+ line-height: 19px;
223
+ color: #222;
224
+ }
225
+ }
226
+ /* default buttons */
227
+ .mercury-bold-button { background-position: 0 0 }
228
+ .mercury-bold-button.active { background-position: 0 -18px }
229
+ .mercury-italic-button { background-position: -23px 0 }
230
+ .mercury-italic-button.active { background-position: -23px -18px }
231
+ .mercury-overline-button { background-position: -45px 0 }
232
+ .mercury-overline-button.active { background-position: -45px -18px }
233
+ .mercury-strikethrough-button { background-position: -67px 0 }
234
+ .mercury-strikethrough-button.active { background-position: -67px -18px }
235
+ .mercury-underline-button { background-position: -89px 0 }
236
+ .mercury-underline-button.active { background-position: -89px -18px }
237
+ .mercury-subscript-button { background-position: -112px 0 }
238
+ .mercury-subscript-button.active { background-position: -112px -18px }
239
+ .mercury-superscript-button { background-position: -135px 0 }
240
+ .mercury-superscript-button.active { background-position: -135px -18px }
241
+ .mercury-justifyleft-button { background-position: -158px 0 }
242
+ .mercury-justifyleft-button.active { background-position: -158px -18px }
243
+ .mercury-justifycenter-button { background-position: -181px 0 }
244
+ .mercury-justifycenter-button.active { background-position: -181px -18px }
245
+ .mercury-justifyright-button { background-position: -203px 0 }
246
+ .mercury-justifyright-button.active { background-position: -203px -18px }
247
+ .mercury-justifyfull-button { background-position: -225px 0 }
248
+ .mercury-justifyfull-button.active { background-position: -225px -18px }
249
+ .mercury-insertunorderedlist-button { background-position: -248px 0 }
250
+ .mercury-insertunorderedlist-button.active { background-position: -248px -18px }
251
+ .mercury-insertorderedlist-button { background-position: -271px 0 }
252
+ .mercury-insertorderedlist-button.active { background-position: -271px -18px }
253
+ .mercury-outdent-button { background-position: -294px 0 }
254
+ .mercury-outdent-button.active { background-position: -294px -18px }
255
+ .mercury-indent-button { background-position: -317px 0 }
256
+ .mercury-indent-button.active { background-position: -317px -18px }
257
+ .mercury-insertrowbefore-button { background-position: -340px 0 }
258
+ .mercury-insertrowbefore-button.active { background-position: -340px -18px }
259
+ .mercury-insertrowafter-button { background-position: -363px 0 }
260
+ .mercury-insertrowafter-button.active { background-position: -363px -18px }
261
+ .mercury-deleterow-button { background-position: -385px 0 }
262
+ .mercury-deleterow-button.active { background-position: -385px -18px }
263
+ .mercury-insertcolumnbefore-button { background-position: -407px 0 }
264
+ .mercury-insertcolumnbefore-button.active { background-position: -407px -18px }
265
+ .mercury-insertcolumnafter-button { background-position: -429px 0 }
266
+ .mercury-insertcolumnafter-button.active { background-position: -429px -18px }
267
+ .mercury-deletecolumn-button { background-position: -451px 0 }
268
+ .mercury-deletecolumn-button.active { background-position: -451px -18px }
269
+ .mercury-increasecolspan-button { background-position: -474px 0; width: 23px }
270
+ .mercury-increasecolspan-button.active { background-position: -474px -18px }
271
+ .mercury-decreasecolspan-button { background-position: -497px 0 }
272
+ .mercury-decreasecolspan-button.active { background-position: -497px -18px }
273
+ .mercury-increaserowspan-button { background-position: -520px 0 }
274
+ .mercury-increaserowspan-button.active { background-position: -520px -18px }
275
+ .mercury-decreaserowspan-button { background-position: -542px 0 }
276
+ .mercury-decreaserowspan-button.active { background-position: -542px -18px }
277
+ .mercury-horizontalrule-button { background-position: -564px 0 }
278
+ .mercury-horizontalrule-button.active { background-position: -564px -18px }
279
+ .mercury-removeformatting-button { background-position: -588px 0 }
280
+ .mercury-removeformatting-button.active { background-position: -588px -18px }
281
+ .mercury-htmleditor-button { background-position: -612px 0 }
282
+ .mercury-htmleditor-button.active { background-position: -612px -18px }
283
+ }
284
+ /*
285
+ * Toolbar: Markupable Region Toolbar
286
+ *----------------------------------------------------------------------------*/
287
+ .mercury-markupable-toolbar {
288
+ padding: 3px 13px 1px 10px;
289
+ border-top: 1px solid #E2E1E2;
290
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(198,198,198)), color-stop(1, rgb(210,210,209)));
291
+ background-image: -moz-linear-gradient(center bottom, rgb(198,198,198) 0%, rgb(210,210,209) 100%);
292
+ &:after {
293
+ content: '\00a0';
294
+ display: block;
295
+ visibility: hidden;
296
+ clear: both;
297
+ height: 0;
298
+ }
299
+ .mercury-separator,
300
+ .mercury-line-separator {
301
+ height: 18px;
302
+ padding: 0;
303
+ margin: 0 7px 2px;
304
+ }
305
+ .mercury-separator {
306
+ margin: 0 3px 2px;
307
+ }
308
+ .mercury-button-group {
309
+ white-space: nowrap;
310
+ .mercury-button:first-child {
311
+ width: 23px;
312
+ }
313
+ }
314
+ .mercury-button {
315
+ width: 22px;
316
+ height: 18px;
317
+ margin: 0 0 2px;
318
+ background-image: url(/assets/mercury/toolbar/markupable/buttons.png);
319
+ em {
320
+ background-image: url(/assets/mercury/toolbar/markupable/buttons.png);
321
+ display: none;
322
+ }
323
+ }
324
+ .mercury-button-palette {
325
+ width: 23px;
326
+ background-position: 0 -36px;
327
+ }
328
+ .mercury-button-select {
329
+ width: auto !important;
330
+ overflow: hidden;
331
+ padding-left: 6px;
332
+ background-position: -24px -36px;
333
+ em {
334
+ display: block;
335
+ padding-right: 15px;
336
+ background-position: right -36px;
337
+ cursor: pointer;
338
+ white-space: nowrap;
339
+ font-style: normal;
340
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
341
+ font-size: 8.5pt;
342
+ line-height: 19px;
343
+ color: #222;
344
+ }
345
+ }
346
+ /* default buttons */
347
+ .mercury-bold-button { background-position: 0 0 }
348
+ .mercury-bold-button.active { background-position: 0 -18px }
349
+ .mercury-italic-button { background-position: -23px 0 }
350
+ .mercury-italic-button.active { background-position: -23px -18px }
351
+ .mercury-subscript-button { background-position: -112px 0 }
352
+ .mercury-subscript-button.active { background-position: -112px -18px }
353
+ .mercury-superscript-button { background-position: -135px 0 }
354
+ .mercury-superscript-button.active { background-position: -135px -18px }
355
+ .mercury-insertunorderedlist-button { background-position: -248px 0 }
356
+ .mercury-insertunorderedlist-button.active { background-position: -248px -18px }
357
+ .mercury-insertorderedlist-button { background-position: -271px 0 }
358
+ .mercury-insertorderedlist-button.active { background-position: -271px -18px }
359
+ .mercury-outdent-button { background-position: -294px 0 }
360
+ .mercury-outdent-button.active { background-position: -294px -18px }
361
+ .mercury-indent-button { background-position: -317px 0 }
362
+ .mercury-indent-button.active { background-position: -317px -18px }
363
+ .mercury-horizontalrule-button { background-position: -564px 0 }
364
+ .mercury-horizontalrule-button.active { background-position: -564px -18px }
365
+ }
366
+ /*
367
+ * Toolbar: Snippetable Region Toolbar
368
+ *----------------------------------------------------------------------------*/
369
+ .mercury-snippet-toolbar {
370
+ position: absolute;
371
+ top: 100px;
372
+ left: 15px;
373
+ border: 1px solid #727272;
374
+ border-radius: 3px;
375
+ -moz-border-radius: 3px;
376
+ box-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
377
+ padding: 3px 7px 1px 7px;
378
+ &:after {
379
+ content: '\00a0';
380
+ display: block;
381
+ visibility: hidden;
382
+ clear: both;
383
+ height: 0;
384
+ }
385
+ .mercury-separator,
386
+ .mercury-line-separator {
387
+ height: 18px;
388
+ padding: 0;
389
+ margin: 0 7px 2px;
390
+ }
391
+ .mercury-separator {
392
+ margin: 0 3px 2px;
393
+ }
394
+ .mercury-button-group {
395
+ white-space: nowrap;
396
+ .mercury-button:first-child {
397
+ width: 23px;
398
+ }
399
+ }
400
+ .mercury-button {
401
+ width: 23px;
402
+ height: 18px;
403
+ margin: 0 0 2px;
404
+ background-image: url(/assets/mercury/toolbar/snippetable/buttons.png);
405
+ em {
406
+ background-image: url(/assets/mercury/toolbar/snippetable/buttons.png);
407
+ display: none;
408
+ }
409
+ }
410
+ /* default buttons */
411
+ .mercury-editsnippet-button { background-position: -24px 0 }
412
+ .mercury-editsnippet-button.active { background-position: -24px -18px }
413
+ .mercury-removesnippet-button { background-position: -48px 0 }
414
+ .mercury-removesnippet-button.active { background-position: -48px -18px }
415
+ .mercury-dragsnippet-button { background-position: -72px 0 }
416
+ .mercury-dragsnippet-button.active { background-position: -72px -18px }
417
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Tooltip
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-tooltip {
5
+ position: absolute;
6
+ top: 100px;
7
+ left: 100px;
8
+ max-width: 400px;
9
+ overflow: hidden;
10
+ background: rgba(0, 0, 0, .70);
11
+ padding: 2px 5px;
12
+ border-radius: 2px;
13
+ -moz-border-radius: 2px;
14
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
15
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
16
+ font: normal normal normal 11px/normal Helvetica, Tahoma, Arial, sans-serif;
17
+ color: #EEE;
18
+ word-wrap: break-word;
19
+ a {
20
+ color: #EEE;
21
+ text-decoration: none;
22
+ &:hover {
23
+ color: #FFF;
24
+ }
25
+ }
26
+ }