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,11 +1,8 @@
1
1
  /*!
2
- * Mercury Editor is a Coffeescript and jQuery based WYSIWYG editor. Mercury Editor utilizes the HTML5 ContentEditable
3
- * spec to allow editing sections of a given page (instead of using iframes) and provides an editing experience that's as
4
- * realistic as possible. By not using iframes for editable regions it allows CSS to behave naturally.
2
+ * Mercury Editor is a Coffeescript and jQuery based WYSIWYG editor. Documentation and other useful information can be
3
+ * found at https://github.com/jejacks0n/mercury
5
4
  *
6
- * Mercury Editor was written for the future, and doesn't attempt to support legacy implementations of document editing.
7
- *
8
- * Currently supported browsers are
5
+ * Supported browsers:
9
6
  * - Firefox 4+
10
7
  * - Chrome 10+
11
8
  * - Safari 5+
@@ -0,0 +1,199 @@
1
+ /*
2
+ * Dialogs
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-dialog,
5
+ .mercury-select,
6
+ .mercury-palette {
7
+ -webkit-user-select: none;
8
+ -moz-user-select: none;
9
+ user-select: none;
10
+ position: absolute;
11
+ z-index: 10012;
12
+ width: 30px;
13
+ height: 30px;
14
+ border: 1px solid #727272;
15
+ border-radius: 2px;
16
+ -moz-border-radius: 2px;
17
+ margin-top: -1px;
18
+ background-color: #E2E1E2;
19
+ box-shadow: 1px 1px 4px rgba(0,0,0, .5);
20
+ -moz-box-shadow: 1px 1px 4px rgba(0,0,0, .5);
21
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
22
+ font-size: 8.5pt;
23
+ }
24
+ .mercury-dialog.loading,
25
+ .mercury-select.loading,
26
+ .mercury-palette.loading {
27
+ background-image: url(/assets/mercury/loading-light.gif);
28
+ background-repeat: no-repeat;
29
+ background-position: center;
30
+ }
31
+ /*
32
+ * Selects
33
+ *----------------------------------------------------------------------------*/
34
+ .mercury-select {
35
+ border-radius: 4px;
36
+ -moz-border-radius: 4px;
37
+ overflow: auto;
38
+ background-color: #FFF;
39
+ }
40
+ /*
41
+ * Panels
42
+ *----------------------------------------------------------------------------*/
43
+ .mercury-panel {
44
+ position: absolute;
45
+ z-index: 10011;
46
+ background-color: #111;
47
+ opacity: .9;
48
+ box-shadow: 1px 1px 4px rgba(0,0,0, .5);
49
+ -moz-box-shadow: 1px 1px 4px rgba(0,0,0, .5);
50
+ border-radius: 4px;
51
+ -moz-border-radius: 4px;
52
+ color: #FFF;
53
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
54
+ font-size: 9.5pt;
55
+ max-width: 500px;
56
+ }
57
+ .mercury-panel.loading {
58
+ background-image: url(/assets/mercury/loading-dark.gif);
59
+ background-repeat: no-repeat;
60
+ background-position: center;
61
+ }
62
+ .mercury-panel h1,
63
+ .mercury-panel h3 {
64
+ font-size: 9pt;
65
+ padding: 10px 15px 8px;
66
+ margin: 0;
67
+ background: #333;
68
+ white-space: nowrap;
69
+ }
70
+ .mercury-panel h1 {
71
+ -webkit-user-select: none;
72
+ -moz-user-select: none;
73
+ user-select: none;
74
+ font-size: 10pt;
75
+ -moz-border-radius-topleft: 4px;
76
+ -moz-border-radius-topright: 4px;
77
+ border-top-left-radius: 4px;
78
+ border-top-right-radius: 4px;
79
+ height: 15px;
80
+ cursor: move;
81
+ text-shadow: 1px 1px 2px rgba(0,0,0, .9);
82
+ }
83
+ .mercury-panel h4,
84
+ .mercury-panel h5,
85
+ .mercury-panel h6 {
86
+ margin: 0;
87
+ }
88
+ .mercury-panel .mercury-panel-pane {
89
+ box-sizing: border-box;
90
+ -moz-box-sizing: border-box;
91
+ -webkit-box-sizing: border-box;
92
+ padding: 15px;
93
+ overflow-y: auto;
94
+ overflow-x: hidden;
95
+ width: 100%;
96
+ }
97
+ .mercury-panel .mercury-panel-pane h3 {
98
+ margin: 10px -15px;
99
+ font-size: 9.5pt;
100
+ font-weight: normal;
101
+ padding: 8px 14px;
102
+ }
103
+ /*
104
+ * Specific Dialogs (eg. color palettes, selects)
105
+ *----------------------------------------------------------------------------*/
106
+ .mercury-color-picker {
107
+ width: 170px;
108
+ height: auto;
109
+ padding: 1px;
110
+ cursor: default;
111
+ }
112
+ .mercury-color-picker .picker {
113
+ float: left;
114
+ width: 15px;
115
+ height: 15px;
116
+ margin: 1px;
117
+ }
118
+ .mercury-color-picker .picker:hover {
119
+ outline: 1px solid #333;
120
+ }
121
+ .mercury-color-picker .last-picked {
122
+ position: relative;
123
+ top: 1px;
124
+ width: 166px;
125
+ border: 1px solid #333;
126
+ border-radius: 2px;
127
+ margin: 1px 1px 2px 1px;
128
+ -moz-border-radius: 2px;
129
+ clear: left;
130
+ text-align: center;
131
+ }
132
+ .mercury-select-options {
133
+ margin: 10px 0;
134
+ white-space: nowrap;
135
+ }
136
+ .mercury-select-options * {
137
+ cursor: default;
138
+ padding: 0 10px;
139
+ margin: 0;
140
+ line-height: 1.6em;
141
+ }
142
+ .mercury-select-options div:hover,
143
+ .mercury-select-options h1:hover,
144
+ .mercury-select-options h2:hover,
145
+ .mercury-select-options h3:hover,
146
+ .mercury-select-options h4:hover,
147
+ .mercury-select-options h5:hover,
148
+ .mercury-select-options h6:hover,
149
+ .mercury-select-options pre:hover {
150
+ background-color: #E2E1E2 !important;
151
+ color: #000 !important;
152
+ }
153
+ .mercury-select-options div[data-tag=pre] {
154
+ font-family: monospace;
155
+ }
156
+ /*
157
+ * Specific Panels (eg. snippets, notes, todos)
158
+ *----------------------------------------------------------------------------*/
159
+ .mercury-snippet-panel {
160
+ width: 300px;
161
+ }
162
+ .mercury-snippet-panel input.filter {
163
+ outline: none;
164
+ font-size: 1em;
165
+ border-radius: 30px;
166
+ moz-border-radius: 30px;
167
+ box-sizing: border-box;
168
+ -moz-box-sizing: border-box;
169
+ -webkit-box-sizing: border-box;
170
+ width: 100%;
171
+ padding-left: 20px;
172
+ background: #FFF url(/assets/mercury/search-icon.png) no-repeat 4px center;
173
+ }
174
+ .mercury-snippet-panel ul {
175
+ font-size: .9em;
176
+ padding: 10px 0 0 0;
177
+ margin: 0;
178
+ list-style-type: none;
179
+ }
180
+ .mercury-snippet-panel ul li {
181
+ clear: both;
182
+ padding-top: 20px;
183
+ }
184
+ .mercury-snippet-panel ul li img {
185
+ float: left;
186
+ }
187
+ .mercury-snippet-panel ul li h4,
188
+ .mercury-snippet-panel ul li .description {
189
+ float: right;
190
+ width: 245px;
191
+ }
192
+ .mercury-snippet-panel ul li h4 {
193
+ margin-bottom: 5px;
194
+ }
195
+ /* history / notes */
196
+ .mercury-history-panel,
197
+ .mercury-notes-panel {
198
+ width: 250px;
199
+ }
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Lightview
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-lightview-overlay {
5
+ position: fixed;
6
+ z-index: 10030;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ opacity: 0;
12
+ display: none;
13
+ background: rgba(0, 0, 0, .65);
14
+ }
15
+ .mercury-lightview {
16
+ position: fixed;
17
+ z-index: 10040;
18
+ top: 20px;
19
+ background: #000;
20
+ opacity: 0;
21
+ overflow: hidden;
22
+ display: none;
23
+ -webkit-border-radius: 10px;
24
+ -moz-border-radius: 10px;
25
+ border-radius: 10px;
26
+ -moz-box-shadow: 0 0 40px rgba(0, 0, 0, .9);
27
+ box-shadow: 0 0 40px rgba(0, 0, 0, .9);
28
+ font: normal normal normal 12px/normal Helvetica, Tahoma, Arial, sans-serif;
29
+ -moz-box-sizing: border-box;
30
+ box-sizing: border-box;
31
+ color: #CCC;
32
+ }
33
+ .mercury-lightview.loading {
34
+ background: #000 url(/assets/mercury/loading-dark.gif) no-repeat center;
35
+ }
36
+ .mercury-lightview .mercury-lightview-content {
37
+ margin: 10px 20px 20px;
38
+ }
39
+ .mercury-lightview h1.mercury-lightview-title {
40
+ margin: 0;
41
+ padding: 10px 20px 8px;
42
+ border-bottom: 1px solid #222;
43
+ color: #FFF;
44
+ -webkit-user-select: none;
45
+ -moz-user-select: none;
46
+ user-select: none;
47
+ font-size: 10pt;
48
+ white-space: nowrap;
49
+ text-shadow: 1px 1px 2px rgba(100, 100, 100, .5);
50
+ }
51
+ /*
52
+ * Forms
53
+ *----------------------------------------------------------------------------*/
54
+ .mercury-lightview form fieldset {
55
+ background: #111;
56
+ border: 1px solid #333;
57
+ }
58
+ .mercury-lightview form fieldset.buttons {
59
+ background: none;
60
+ border: none;
61
+ }
62
+ .mercury-lightview form select,
63
+ .mercury-lightview form input[type="text"],
64
+ .mercury-lightview form input[type="password"],
65
+ .mercury-lightview form textarea,
66
+ .mercury-lightview form input.text {
67
+ background: #000;
68
+ color: #FFF;
69
+ border: 2px solid #555;
70
+ }
71
+ /*
72
+ * Specific Lightviews
73
+ *----------------------------------------------------------------------------*/
74
+ /* about mercury */
75
+ .mercury-about-lightview {
76
+ width: 200px;
77
+ min-height: 100px;
78
+ padding-left: 130px;
79
+ background: url(/assets/mercury/temp-logo.png) no-repeat left center;
80
+ font-size: .9em;
81
+ }
82
+ .mercury-about-lightview ul {
83
+ list-style: none;
84
+ padding: 0;
85
+ margin: 20px 0 0 0;
86
+ }
87
+ .mercury-about-lightview a {
88
+ color: #09F;
89
+ }
90
+ .mercury-about-lightview a:hover {
91
+ color: #FFF;
92
+ }
@@ -0,0 +1,134 @@
1
+ /*
2
+ *= require_self
3
+ *= require ./dialog
4
+ *= require ./lightview
5
+ *= require ./modal
6
+ *= require ./statusbar
7
+ *= require ./toolbar
8
+ *= require ./tooltip
9
+ *= require ./uploader
10
+ */
11
+
12
+
13
+ html, body {
14
+ margin: 0;
15
+ padding: 0;
16
+ overflow: hidden;
17
+ }
18
+
19
+
20
+ /*
21
+ * Forms
22
+ *---------------------------------------------------------------------------*/
23
+ form,
24
+ form ul,
25
+ form ol,
26
+ form li,
27
+ form fieldset,
28
+ form p,
29
+ .filter {
30
+ margin: 0;
31
+ padding: 0;
32
+ }
33
+ form abbr {
34
+ border: 0;
35
+ font-variant: normal;
36
+ }
37
+ form fieldset {
38
+ margin-bottom: 10px;
39
+ background: #F6F6F6;
40
+ border: 1px solid #CCC;
41
+ border-radius: 7px;
42
+ -moz-border-radius: 7px;
43
+ }
44
+ form fieldset:last-child {
45
+ margin-bottom: 0;
46
+ }
47
+ form fieldset legend {
48
+ font-weight: bold;
49
+ margin-left: 10px;
50
+ margin-bottom: -4px;
51
+ }
52
+ form ol {
53
+ margin: 12px 9px;
54
+ }
55
+ form ol li {
56
+ display: block;
57
+ margin-bottom: 10px;
58
+ }
59
+ form label {
60
+ display: block;
61
+ float: left;
62
+ width: 23%;
63
+ margin-right: 9px;
64
+ text-align: right;
65
+ line-height: 27px;
66
+ font-size: 1.1em;
67
+ }
68
+ form label input {
69
+ width: auto !important;
70
+ margin: 0 5px 0 -20px !important;
71
+ }
72
+ form select,
73
+ form input[type=text],
74
+ form input[type=password],
75
+ form textarea,
76
+ form input.text {
77
+ margin: 0;
78
+ border: 2px solid #CCC;
79
+ padding: 2px 4px;
80
+ font-family: Arial, Geneva, sans-serif;
81
+ font-size: 1.5em;
82
+ width: 74%;
83
+ box-sizing: border-box;
84
+ -moz-box-sizing: border-box;
85
+ -webkit-box-sizing: border-box;
86
+ }
87
+ form li.boolean {
88
+ margin-left: 23%;
89
+ padding-left: 9px;
90
+ }
91
+ form li.boolean label {
92
+ width: auto;
93
+ }
94
+ form fieldset.buttons {
95
+ clear: both;
96
+ padding: 0;
97
+ background: none;
98
+ border: none;
99
+ text-align: left;
100
+ }
101
+ form fieldset.buttons ol {
102
+ margin: 0 -2px 0 0;
103
+ float: right;
104
+ }
105
+ form fieldset.buttons ol li {
106
+ float: left;
107
+ padding-left: 0.5em;
108
+ padding-right: 0;
109
+ }
110
+ form fieldset.buttons .commit {
111
+ margin: 0;
112
+ }
113
+ form fieldset.buttons .commit input {
114
+ padding: 8px 14px 9px !important;
115
+ font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
116
+ font-size: 1.3em;
117
+ background: #222 url(/assets/mercury/button.png) repeat-x;
118
+ display: inline-block;
119
+ color: #FFF;
120
+ text-decoration: none;
121
+ -moz-border-radius: 5px;
122
+ -webkit-border-radius: 5px;
123
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
124
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
125
+ text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
126
+ border: 0;
127
+ border-bottom: 1px solid rgba(0, 0, 0, 0.25);
128
+ position: relative;
129
+ cursor: pointer;
130
+ line-height: normal;
131
+ }
132
+ form fieldset.buttons .commit input:hover {
133
+ background-color: #000;
134
+ }
@@ -0,0 +1,191 @@
1
+ /*
2
+ * Modal
3
+ *----------------------------------------------------------------------------*/
4
+ .mercury-modal-overlay {
5
+ position: fixed;
6
+ z-index: 10040;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ opacity: 0;
12
+ display: none;
13
+ background: rgba(0,0,0, .65);
14
+ }
15
+ .mercury-modal {
16
+ position: fixed;
17
+ z-index: 10050;
18
+ top: 0;
19
+ width: 500px;
20
+ overflow: hidden;
21
+ padding: 0 0 10px;
22
+ background: #EFEFEF;
23
+ -webkit-border-bottom-left-radius: 4px;
24
+ -webkit-border-bottom-right-radius: 4px;
25
+ -moz-border-radius-bottomleft: 4px;
26
+ -moz-border-radius-bottomright: 4px;
27
+ border-bottom-left-radius: 4px;
28
+ border-bottom-right-radius: 4px;
29
+ -moz-box-shadow: 0 0 40px rgba(0, 0, 0, .9);
30
+ box-shadow: 0 0 40px rgba(0, 0, 0, .9);
31
+ font: normal normal normal 12px/normal Helvetica, Tahoma, Arial, sans-serif;
32
+ }
33
+ .mercury-modal.loading .mercury-modal-content-container {
34
+ background: #EFEFEF url(/assets/mercury/loading-light.gif) no-repeat center;
35
+ }
36
+ .mercury-modal h1.mercury-modal-title {
37
+ -webkit-user-select: none;
38
+ -moz-user-select: none;
39
+ user-select: none;
40
+ margin: 0;
41
+ padding: 2px 10px 0 10px;
42
+ background: #DDD;
43
+ border-bottom: 1px solid #CCC;
44
+ white-space: nowrap;
45
+ font-size: 14px;
46
+ line-height: 23px;
47
+ overflow: hidden;
48
+ }
49
+ .mercury-modal h1.mercury-modal-title:after {
50
+ content: '\00a0';
51
+ display: block;
52
+ visibility: hidden;
53
+ clear: both;
54
+ height: 0;
55
+ }
56
+ .mercury-modal h1.mercury-modal-title span {
57
+ float: left;
58
+ color: #000;
59
+ text-shadow: #EEE 1px 1px 0;
60
+ }
61
+ .mercury-modal h1.mercury-modal-title a {
62
+ display: block;
63
+ float: right;
64
+ font-size: 10px;
65
+ cursor: pointer;
66
+ color: #666;
67
+ padding: 0 4px;
68
+ line-height: 23px;
69
+ }
70
+ .mercury-modal h1.mercury-modal-title a:hover {
71
+ color: #333;
72
+ }
73
+ .mercury-modal .mercury-modal-content-container {
74
+ float: left;
75
+ width: 100%;
76
+ }
77
+ .mercury-modal .mercury-modal-content {
78
+ position: relative;
79
+ overflow: auto;
80
+ float: left;
81
+ box-sizing: border-box;
82
+ -moz-box-sizing: border-box;
83
+ -webkit-box-sizing: border-box;
84
+ padding: 20px 20px 10px;
85
+ font-family: Helvetica, Tahoma, Arial, sans-serif;
86
+ color: #000;
87
+ }
88
+ .mercury-modal .mercury-modal-content:after {
89
+ display: block;
90
+ clear: both;
91
+ content: '\00a0';
92
+ visibility: hidden;
93
+ overflow: hidden;
94
+ height: 0;
95
+ }
96
+ .mercury-modal .mercury-modal-pane-container {
97
+ overflow: auto;
98
+ margin: -20px -20px 0;
99
+ padding: 20px 20px 10px;
100
+ }
101
+ .mercury-modal .mercury-modal-pane-container .mercury-modal-pane {
102
+ float: left;
103
+ }
104
+ .mercury-modal .mercury-modal-controls {
105
+ padding: 15px 0 0;
106
+ border-top: 1px solid #CCC;
107
+ text-align: right;
108
+ }
109
+ /*
110
+ * Forms
111
+ *----------------------------------------------------------------------------*/
112
+ .mercury-modal textarea {
113
+ resize: none;
114
+ padding: 0;
115
+ box-sizing: border-box;
116
+ -moz-box-sizing: border-box;
117
+ -webkit-box-sizing: border-box;
118
+ }
119
+ /*
120
+ * Specific Modals (eg. htmlEditor)
121
+ *----------------------------------------------------------------------------*/
122
+ /* html editor */
123
+ #mercury_html_editor textarea {
124
+ margin: 0 0 -2px 0;
125
+ padding: 0;
126
+ border: 2px solid #CCC;
127
+ width: 100%;
128
+ }
129
+ #mercury_html_editor .mercury-modal-controls {
130
+ border: 0;
131
+ margin-top: -2px;
132
+ }
133
+ /* html sanitizer (when pasting from msword) */
134
+ #mercury_sanitizer .information {
135
+ background: url(/assets/mercury/clippy.png) no-repeat top left;
136
+ min-height: 65px;
137
+ padding-left: 50px;
138
+ margin-bottom: 10px;
139
+ }
140
+ #mercury_sanitizer textarea {
141
+ width: 100%;
142
+ font-family: monospace;
143
+ white-space: pre;
144
+ }
145
+ /* character */
146
+ #mercury_character .character {
147
+ float: left;
148
+ width: 20px;
149
+ height: 20px;
150
+ border: 1px solid #999;
151
+ background: #FFF;
152
+ margin: 0 2px 2px 0;
153
+ text-align: center;
154
+ font-size: 11pt;
155
+ line-height: 23px;
156
+ cursor: pointer;
157
+ }
158
+ #mercury_character .character:hover {
159
+ position: relative;
160
+ margin: -11px -5px 1px -5px;
161
+ width: 32px;
162
+ height: 32px;
163
+ font-size: 19pt;
164
+ line-height: 35px;
165
+ background: #DDD;
166
+ }
167
+ /* table */
168
+ #mercury_table #table_display {
169
+ width: 285px;
170
+ height: 285px;
171
+ float: left;
172
+ padding: 10px;
173
+ background: #F6F6F6;
174
+ border: 1px solid #CCC;
175
+ border-radius: 7px;
176
+ -moz-border-radius: 7px;
177
+ overflow: auto;
178
+ }
179
+ #mercury_table #table_display table {
180
+ width: 100%;
181
+ height: 100%;
182
+ }
183
+ #mercury_table #table_display td.selected {
184
+ background: #09F;
185
+ }
186
+ #mercury_table #table_options {
187
+ width: 383px;
188
+ float: left;
189
+ margin-left: 10px;
190
+ }
191
+