mercury-rails 0.2.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/app/controllers/{images_controller.rb → mercury/images_controller.rb} +3 -3
  2. data/app/controllers/mercury_controller.rb +13 -3
  3. data/app/models/{image.rb → mercury/image.rb} +3 -1
  4. data/app/views/layouts/mercury.html.erb +14 -6
  5. data/app/views/mercury/lightviews/about.html +7 -3
  6. data/app/views/mercury/modals/character.html +2 -2
  7. data/app/views/mercury/modals/htmleditor.html +2 -2
  8. data/app/views/mercury/modals/link.html +3 -3
  9. data/app/views/mercury/modals/media.html +3 -3
  10. data/app/views/mercury/modals/table.html +3 -3
  11. data/app/views/mercury/panels/snippets.html +1 -1
  12. data/app/views/mercury/selects/formatblock.html +9 -9
  13. data/app/views/mercury/snippets/example/options.html.erb +27 -16
  14. data/config/engine.rb +35 -0
  15. data/db/migrate/{20110526035601_create_images.rb → 20110526035601_create_mercury_images.rb} +2 -2
  16. data/features/loading/loading.feature +1 -1
  17. data/features/loading/navigating.feature +1 -1
  18. data/features/loading/user_interface.feature +2 -2
  19. data/features/regions/editable/basic_editing.feature +8 -8
  20. data/features/regions/editable/inserting_snippets.feature +4 -5
  21. data/features/regions/editable/inserting_tables.feature +9 -9
  22. data/features/step_definitions/mercury_steps.rb +20 -23
  23. data/features/step_definitions/web_steps.rb +5 -5
  24. data/features/support/mercury_selectors.rb +1 -0
  25. data/lib/generators/mercury/install/install_generator.rb +24 -3
  26. data/lib/generators/mercury/install/templates/mongoid_paperclip_image.rb +17 -0
  27. data/lib/mercury-rails.rb +0 -1
  28. data/lib/mercury/authentication.rb +8 -0
  29. data/spec/javascripts/mercury/dialog_spec.js.coffee +28 -21
  30. data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +0 -2
  31. data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +0 -2
  32. data/spec/javascripts/mercury/dialogs/formatblock_spec.js.coffee +0 -2
  33. data/spec/javascripts/mercury/dialogs/snippetpanel_spec.js.coffee +0 -2
  34. data/spec/javascripts/mercury/dialogs/style_spec.js.coffee +0 -2
  35. data/spec/javascripts/mercury/history_buffer_spec.js.coffee +0 -2
  36. data/spec/javascripts/mercury/lightview_spec.js.coffee +42 -21
  37. data/spec/javascripts/mercury/mercury_spec.js.coffee +87 -7
  38. data/spec/javascripts/mercury/modal_spec.js.coffee +53 -23
  39. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +0 -2
  40. data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +2 -3
  41. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +0 -2
  42. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +2 -2
  43. data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +0 -2
  44. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +2 -4
  45. data/spec/javascripts/mercury/native_extensions_spec.js.coffee +20 -2
  46. data/spec/javascripts/mercury/page_editor_spec.js.coffee +130 -35
  47. data/spec/javascripts/mercury/palette_spec.js.coffee +4 -6
  48. data/spec/javascripts/mercury/panel_spec.js.coffee +44 -6
  49. data/spec/javascripts/mercury/region_spec.js.coffee +42 -8
  50. data/spec/javascripts/mercury/regions/editable_spec.js.coffee +0 -2
  51. data/spec/javascripts/mercury/regions/markupable_spec.js.coffee +0 -2
  52. data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +3 -5
  53. data/spec/javascripts/mercury/select_spec.js.coffee +4 -6
  54. data/spec/javascripts/mercury/snippet_spec.js.coffee +3 -4
  55. data/spec/javascripts/mercury/snippet_toolbar_spec.js.coffee +2 -4
  56. data/spec/javascripts/mercury/statusbar_spec.js.coffee +0 -2
  57. data/spec/javascripts/mercury/table_editor_spec.js.coffee +2 -4
  58. data/spec/javascripts/mercury/toolbar.button_group_spec.js.coffee +0 -2
  59. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +34 -15
  60. data/spec/javascripts/mercury/toolbar.expander_spec.js.coffee +0 -2
  61. data/spec/javascripts/mercury/toolbar_spec.js.coffee +41 -26
  62. data/spec/javascripts/mercury/tooltip_spec.js.coffee +3 -5
  63. data/spec/javascripts/mercury/uploader_spec.js.coffee +8 -14
  64. data/spec/javascripts/spec_helper.js +1 -0
  65. data/spec/javascripts/templates/mercury/page_editor.html +1 -0
  66. data/spec/javascripts/templates/mercury/region.html +2 -2
  67. data/vendor/assets/images/mercury/missing-image.png +0 -0
  68. data/vendor/assets/javascripts/mercury.js +218 -112
  69. data/vendor/assets/javascripts/mercury/dependencies/{jquery-1.6.js → jquery-1.7.js} +2030 -1595
  70. data/vendor/assets/javascripts/mercury/dependencies/jquery.additions.js +55 -0
  71. data/vendor/assets/javascripts/mercury/dialog.js.coffee +7 -5
  72. data/vendor/assets/javascripts/mercury/dialogs/backcolor.js.coffee +1 -1
  73. data/vendor/assets/javascripts/mercury/dialogs/forecolor.js.coffee +1 -1
  74. data/vendor/assets/javascripts/mercury/dialogs/formatblock.js.coffee +1 -1
  75. data/vendor/assets/javascripts/mercury/dialogs/{objectspanel.js.coffee → snippetpanel.js.coffee} +2 -2
  76. data/vendor/assets/javascripts/mercury/dialogs/style.js.coffee +1 -1
  77. data/vendor/assets/javascripts/mercury/finalize.js.coffee +3 -0
  78. data/vendor/assets/javascripts/mercury/lightview.js.coffee +76 -30
  79. data/vendor/assets/javascripts/mercury/locales/da.locale.js.coffee +211 -0
  80. data/vendor/assets/javascripts/mercury/locales/de.locale.js.coffee +206 -0
  81. data/vendor/assets/javascripts/mercury/locales/es.locale.js.coffee +211 -0
  82. data/vendor/assets/javascripts/mercury/locales/example.local.js.coffee +211 -0
  83. data/vendor/assets/javascripts/mercury/locales/fr.locale.js.coffee +211 -0
  84. data/vendor/assets/javascripts/mercury/locales/it.locale.js.coffee +208 -0
  85. data/vendor/assets/javascripts/mercury/locales/ko.local.js.coffee +206 -0
  86. data/vendor/assets/javascripts/mercury/locales/nl.locale.js.coffee +206 -0
  87. data/vendor/assets/javascripts/mercury/locales/pt.locale.js.coffee +211 -0
  88. data/vendor/assets/javascripts/mercury/locales/sv.local.js.coffee +209 -0
  89. data/vendor/assets/javascripts/mercury/locales/swedish_chef.locale.js.coffee +213 -0
  90. data/vendor/assets/javascripts/mercury/mercury.js.coffee +62 -17
  91. data/vendor/assets/javascripts/mercury/modal.js.coffee +34 -21
  92. data/vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee +1 -2
  93. data/vendor/assets/javascripts/mercury/modals/insertcharacter.js.coffee +3 -3
  94. data/vendor/assets/javascripts/mercury/modals/insertlink.js.coffee +4 -4
  95. data/vendor/assets/javascripts/mercury/modals/insertmedia.js.coffee +10 -9
  96. data/vendor/assets/javascripts/mercury/modals/insertsnippet.js.coffee +1 -1
  97. data/vendor/assets/javascripts/mercury/modals/inserttable.js.coffee +8 -9
  98. data/vendor/assets/javascripts/mercury/native_extensions.js.coffee +26 -8
  99. data/vendor/assets/javascripts/mercury/page_editor.js.coffee +68 -46
  100. data/vendor/assets/javascripts/mercury/palette.js.coffee +1 -1
  101. data/vendor/assets/javascripts/mercury/panel.js.coffee +25 -7
  102. data/vendor/assets/javascripts/mercury/plugins/save_as_xml/mercury/page_editor.js.coffee +1 -0
  103. data/vendor/assets/javascripts/mercury/region.js.coffee +21 -17
  104. data/vendor/assets/javascripts/mercury/regions/editable.js.coffee +47 -35
  105. data/vendor/assets/javascripts/mercury/regions/markupable.js.coffee +43 -36
  106. data/vendor/assets/javascripts/mercury/regions/snippetable.js.coffee +22 -24
  107. data/vendor/assets/javascripts/mercury/select.js.coffee +3 -2
  108. data/vendor/assets/javascripts/mercury/snippet.js.coffee +2 -1
  109. data/vendor/assets/javascripts/mercury/snippet_toolbar.js.coffee +10 -7
  110. data/vendor/assets/javascripts/mercury/statusbar.js.coffee +4 -4
  111. data/vendor/assets/javascripts/mercury/table_editor.js.coffee +1 -3
  112. data/vendor/assets/javascripts/mercury/toolbar.button.js.coffee +42 -20
  113. data/vendor/assets/javascripts/mercury/toolbar.button_group.js.coffee +3 -3
  114. data/vendor/assets/javascripts/mercury/toolbar.expander.js.coffee +2 -2
  115. data/vendor/assets/javascripts/mercury/toolbar.js.coffee +8 -6
  116. data/vendor/assets/javascripts/mercury/tooltip.js.coffee +13 -9
  117. data/vendor/assets/javascripts/mercury/uploader.js.coffee +22 -16
  118. data/vendor/assets/javascripts/mercury_loader.js +2 -0
  119. data/vendor/assets/javascripts/mercury_overrides.js +6 -0
  120. data/vendor/assets/stylesheets/mercury/all_images.css.erb +89 -0
  121. data/vendor/assets/stylesheets/mercury/dialog.css +13 -4
  122. data/vendor/assets/stylesheets/mercury/lightview.css +66 -15
  123. data/vendor/assets/stylesheets/mercury/mercury.css +12 -7
  124. data/vendor/assets/stylesheets/mercury/modal.css +9 -5
  125. data/vendor/assets/stylesheets/mercury/toolbar.css +3 -29
  126. metadata +266 -144
  127. data/POST_INSTALL +0 -15
  128. data/README.md +0 -299
  129. data/VERSION +0 -1
  130. data/annotated_source.template +0 -57
  131. data/config/routes.rb +0 -15
  132. data/mercury-rails.gemspec +0 -288
  133. data/spec/javascripts/responses/blank.html +0 -1
  134. data/vendor/assets/javascripts/mercury/lightviews/imageprocessor.js.coffee +0 -2
@@ -2,7 +2,7 @@
2
2
  Mercury.uploader.show(file, options) if Mercury.config.uploading.enabled
3
3
  return Mercury.uploader
4
4
 
5
- jQuery.extend Mercury.uploader, {
5
+ jQuery.extend Mercury.uploader,
6
6
 
7
7
  show: (file, @options = {}) ->
8
8
  @file = new Mercury.uploader.File(file)
@@ -40,7 +40,9 @@ jQuery.extend Mercury.uploader, {
40
40
  @element = jQuery('<div>', {class: 'mercury-uploader', style: 'display:none'})
41
41
  @element.append('<div class="mercury-uploader-preview"><b><img/></b></div>')
42
42
  @element.append('<div class="mercury-uploader-details"></div>')
43
- @element.append('<div class="mercury-uploader-progress"><span>Processing...</span><div class="mercury-uploader-indicator"><div><b>0%</b></div></div></div>')
43
+ @element.append('<div class="mercury-uploader-progress"><span></span><div class="mercury-uploader-indicator"><div><b>0%</b></div></div></div>')
44
+
45
+ @updateStatus('Processing...')
44
46
 
45
47
  @overlay = jQuery('<div>', {class: 'mercury-uploader-overlay', style: 'display:none'})
46
48
 
@@ -49,7 +51,7 @@ jQuery.extend Mercury.uploader, {
49
51
 
50
52
 
51
53
  bindEvents: ->
52
- Mercury.bind 'resize', => @position()
54
+ Mercury.on 'resize', => @position()
53
55
 
54
56
 
55
57
  appear: ->
@@ -75,7 +77,11 @@ jQuery.extend Mercury.uploader, {
75
77
 
76
78
 
77
79
  fillDisplay: ->
78
- details = ["Name: #{@file.name}", "Size: #{@file.readableSize}", "Type: #{@file.type}"]
80
+ details = [
81
+ Mercury.I18n('Name: %s', @file.name),
82
+ Mercury.I18n('Size: %s', @file.readableSize),
83
+ Mercury.I18n('Type: %s', @file.type)
84
+ ]
79
85
  @element.find('.mercury-uploader-details').html(details.join('<br/>'))
80
86
 
81
87
 
@@ -92,7 +98,7 @@ jQuery.extend Mercury.uploader, {
92
98
  xhr.onload = (event) =>
93
99
  if (event.currentTarget.status >= 400)
94
100
  @updateStatus('Error: Unable to upload the file')
95
- alert("#{event.currentTarget.status}: Unable to process response")
101
+ Mercury.notify('Unable to process response: %s', event.currentTarget.status)
96
102
  @hide()
97
103
  else
98
104
  try
@@ -101,10 +107,13 @@ jQuery.extend Mercury.uploader, {
101
107
  Mercury.config.uploading.handler(event.target.responseText)
102
108
  else
103
109
  jQuery.parseJSON(event.target.responseText)
104
- Mercury.trigger('action', {action: 'insertImage', value: {src: response.image.url}})
110
+ src = response.url || response.image.url
111
+ throw 'Malformed response from server.' unless src
112
+ Mercury.trigger('action', {action: 'insertImage', value: {src: src}})
113
+ @hide()
105
114
  catch error
106
115
  @updateStatus('Error: Unable to upload the file')
107
- alert("Unable to process response: #{error}")
116
+ Mercury.notify('Unable to process response: %s', error)
108
117
  @hide()
109
118
 
110
119
  xhr.open('post', Mercury.config.uploading.url, true)
@@ -125,7 +134,7 @@ jQuery.extend Mercury.uploader, {
125
134
 
126
135
 
127
136
  updateStatus: (message, loaded) ->
128
- @element.find('.mercury-uploader-progress span').html(message)
137
+ @element.find('.mercury-uploader-progress span').html(Mercury.I18n(message).toString())
129
138
  if loaded
130
139
  percent = Math.floor(loaded * 100 / @file.size) + '%'
131
140
  @element.find('.mercury-uploader-indicator div').css({width: percent})
@@ -133,7 +142,7 @@ jQuery.extend Mercury.uploader, {
133
142
 
134
143
 
135
144
  hide: (delay = 0) ->
136
- setTimeout((=>
145
+ setTimeout delay * 1000, =>
137
146
  @element.animate {opacity: 0}, 200, 'easeInOutSine', =>
138
147
  @overlay.animate {opacity: 0}, 200, 'easeInOutSine', =>
139
148
  @overlay.hide()
@@ -141,14 +150,13 @@ jQuery.extend Mercury.uploader, {
141
150
  @reset()
142
151
  @visible = false
143
152
  Mercury.trigger('focus:frame')
144
- ), delay * 1000)
145
153
 
146
154
 
147
155
  reset: ->
148
156
  @element.find('.mercury-uploader-preview b').html('')
149
157
  @element.find('.mercury-uploader-indicator div').css({width: 0})
150
158
  @element.find('.mercury-uploader-indicator b').html('0%').hide()
151
- @updateStatus('Processing...',)
159
+ @updateStatus('Processing...')
152
160
 
153
161
 
154
162
  uploaderEvents:
@@ -161,13 +169,11 @@ jQuery.extend Mercury.uploader, {
161
169
  @hide(1)
162
170
 
163
171
  onload: ->
164
- @updateStatus('Successfully uploaded', @file.size)
165
- @hide(1)
172
+ @updateStatus('Successfully uploaded...', @file.size)
166
173
 
167
174
  onerror: ->
168
175
  @updateStatus('Error: Unable to upload the file')
169
176
  @hide(3)
170
- }
171
177
 
172
178
 
173
179
 
@@ -182,8 +188,8 @@ class Mercury.uploader.File
182
188
 
183
189
  # add any errors if we need to
184
190
  errors = []
185
- errors.push('Too large') if @size >= Mercury.config.uploading.maxFileSize
186
- errors.push('Unsupported format') unless Mercury.config.uploading.allowedMimeTypes.indexOf(@type) > -1
191
+ errors.push(Mercury.I18n('Too large')) if @size >= Mercury.config.uploading.maxFileSize
192
+ errors.push(Mercury.I18n('Unsupported format')) unless Mercury.config.uploading.allowedMimeTypes.indexOf(@type) > -1
187
193
  @errors = errors.join(' / ') if errors.length
188
194
 
189
195
 
@@ -99,6 +99,7 @@ if (!window.mercuryPackages) window.mercuryPackages = {
99
99
  if (!match || !match[1]) continue;
100
100
 
101
101
  match[1].replace(/([^&=]*)=([^&=]*)/g, function (m, attr, value) {
102
+ if (['true', 'false'].indexOf(value) >= 0) value = JSON.parse(value);
102
103
  options[attr] = value;
103
104
  });
104
105
  }
@@ -130,6 +131,7 @@ if (!window.mercuryPackages) window.mercuryPackages = {
130
131
  var script = document.createElement('script');
131
132
  script.src = options.src + '/' + src;
132
133
  script.type = 'text/javascript';
134
+ script.charset = 'utf-8';
133
135
  head.appendChild(script);
134
136
  script.onload = function() {
135
137
  loaded += 1;
@@ -0,0 +1,6 @@
1
+ /*!
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
4
+ *
5
+ * This file is intended to provide a standard way to override or add JS that comes default with Mercury Editor.
6
+ */
@@ -0,0 +1,89 @@
1
+ /*
2
+ * mercury.css
3
+ *----------------------------------------------------------------------------*/
4
+ form fieldset.buttons .commit input {
5
+ background-image: url(<%= asset_path 'mercury/button.png' %>);
6
+ }
7
+ /*
8
+ * dialog.css
9
+ *----------------------------------------------------------------------------*/
10
+ .mercury-dialog.loading,
11
+ .mercury-select.loading,
12
+ .mercury-palette.loading {
13
+ background-image: url(<%= asset_path 'mercury/loading-light.gif' %>);
14
+ }
15
+ .mercury-panel.loading {
16
+ background-image: url(<%= asset_path 'mercury/loading-dark.gif' %>);
17
+ }
18
+ .mercury-panel h1 a.mercury-panel-close {
19
+ background-image: url(<%= asset_path 'mercury/close.png' %>);
20
+ }
21
+ .mercury-snippet-panel input.filter {
22
+ background-image: url(<%= asset_path 'mercury/search-icon.png' %>);
23
+ background-position: 4px center;
24
+ }
25
+ /*
26
+ * lightview.css
27
+ *----------------------------------------------------------------------------*/
28
+ .mercury-lightview.loading {
29
+ background-image: url(<%= asset_path 'mercury/loading-dark.gif' %>);
30
+ }
31
+ .mercury-lightview h1.mercury-lightview-title a.mercury-lightview-close {
32
+ background-image: url(<%= asset_path 'mercury/close.png' %>);
33
+ }
34
+ #mercury_about {
35
+ background-image: url(<%= asset_path 'mercury/temp-logo.png' %>);
36
+ background-position: 0 0;
37
+ }
38
+ /*
39
+ * modal.css
40
+ *----------------------------------------------------------------------------*/
41
+ .mercury-modal.loading .mercury-modal-content-container {
42
+ background-image: url(<%= asset_path 'mercury/loading-light.gif' %>);
43
+ }
44
+ /*
45
+ * toolbar.css
46
+ *----------------------------------------------------------------------------*/
47
+ .mercury-primary-toolbar .mercury-button.pressed {
48
+ background-image: url(<%= asset_path 'mercury/toolbar/primary/_pressed.png' %>);
49
+ background-position: top center;
50
+ }
51
+ .mercury-primary-toolbar .mercury-toolbar-expander {
52
+ background-image: url(<%= asset_path 'mercury/toolbar/primary/_expander.png' %>);
53
+ background-position: center 90%;
54
+ }
55
+ .mercury-primary-toolbar .mercury-save-button em,
56
+ .mercury-expander-button[data-button=save] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/save.png' %>) }
57
+ .mercury-primary-toolbar .mercury-preview-button em,
58
+ .mercury-expander-button[data-button=preview] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/preview.png' %>) }
59
+ .mercury-primary-toolbar .mercury-undo-button em,
60
+ .mercury-expander-button[data-button=undo] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/undo.png' %>) }
61
+ .mercury-primary-toolbar .mercury-redo-button em,
62
+ .mercury-expander-button[data-button=redo] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/redo.png' %>) }
63
+ .mercury-primary-toolbar .mercury-insertLink-button em,
64
+ .mercury-expander-button[data-button=insertLink] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/insertlink.png' %>) }
65
+ .mercury-primary-toolbar .mercury-insertMedia-button em,
66
+ .mercury-expander-button[data-button=insertMedia] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/insertmedia.png' %>) }
67
+ .mercury-primary-toolbar .mercury-insertTable-button em,
68
+ .mercury-expander-button[data-button=insertTable] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/inserttable.png' %>) }
69
+ .mercury-primary-toolbar .mercury-insertCharacter-button em,
70
+ .mercury-expander-button[data-button=insertCharacter] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/insertcharacter.png' %>) }
71
+ .mercury-primary-toolbar .mercury-snippetPanel-button em,
72
+ .mercury-expander-button[data-button=snippetPanel] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/snippetpanel.png' %>) }
73
+ .mercury-primary-toolbar .mercury-historyPanel-button em,
74
+ .mercury-expander-button[data-button=historyPanel] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/historypanel.png' %>) }
75
+ .mercury-primary-toolbar .mercury-notesPanel-button em,
76
+ .mercury-expander-button[data-button=notesPanel] em { background-image: url(<%= asset_path 'mercury/toolbar/primary/notespanel.png' %>) }
77
+ .mercury-editable-toolbar .mercury-button {
78
+ background-image: url(<%= asset_path 'mercury/toolbar/editable/buttons.png' %>);
79
+ }
80
+ .mercury-editable-toolbar .mercury-button em {
81
+ background-image: url(<%= asset_path 'mercury/toolbar/editable/buttons.png' %>);
82
+ }
83
+
84
+ .mercury-snippet-toolbar .mercury-button {
85
+ background-image: url(<%= asset_path 'mercury/toolbar/snippetable/buttons.png' %>);
86
+ }
87
+ .mercury-snippet-toolbar .mercury-button em {
88
+ background-image: url(<%= asset_path 'mercury/toolbar/snippetable/buttons.png' %>);
89
+ }
@@ -24,7 +24,6 @@
24
24
  .mercury-dialog.loading,
25
25
  .mercury-select.loading,
26
26
  .mercury-palette.loading {
27
- background-image: url(/assets/mercury/loading-light.gif);
28
27
  background-repeat: no-repeat;
29
28
  background-position: center;
30
29
  }
@@ -55,7 +54,6 @@
55
54
  max-width: 500px;
56
55
  }
57
56
  .mercury-panel.loading {
58
- background-image: url(/assets/mercury/loading-dark.gif);
59
57
  background-repeat: no-repeat;
60
58
  background-position: center;
61
59
  }
@@ -80,6 +78,16 @@
80
78
  cursor: move;
81
79
  text-shadow: 1px 1px 2px rgba(0,0,0, .9);
82
80
  }
81
+ .mercury-panel h1 a.mercury-panel-close {
82
+ position: absolute;
83
+ right: -5px;
84
+ top: -4px;
85
+ width: 42px;
86
+ height: 42px;
87
+ cursor: default;
88
+ background-repeat: no-repeat;
89
+ background-position: center;
90
+ }
83
91
  .mercury-panel h4,
84
92
  .mercury-panel h5,
85
93
  .mercury-panel h6 {
@@ -169,7 +177,8 @@
169
177
  -webkit-box-sizing: border-box;
170
178
  width: 100%;
171
179
  padding-left: 20px;
172
- background: #FFF url(/assets/mercury/search-icon.png) no-repeat 4px center;
180
+ background-color: #FFF;
181
+ background-repeat: no-repeat;
173
182
  }
174
183
  .mercury-snippet-panel ul {
175
184
  font-size: .9em;
@@ -196,4 +205,4 @@
196
205
  .mercury-history-panel,
197
206
  .mercury-notes-panel {
198
207
  width: 250px;
199
- }
208
+ }
@@ -31,10 +31,11 @@
31
31
  color: #CCC;
32
32
  }
33
33
  .mercury-lightview.loading {
34
- background: #000 url(/assets/mercury/loading-dark.gif) no-repeat center;
34
+ background-repeat: no-repeat;
35
+ background-position: center;
35
36
  }
36
37
  .mercury-lightview .mercury-lightview-content {
37
- margin: 10px 20px 20px;
38
+ padding: 10px 20px 20px;
38
39
  }
39
40
  .mercury-lightview h1.mercury-lightview-title {
40
41
  margin: 0;
@@ -53,9 +54,22 @@
53
54
  width: 32px;
54
55
  height: 42px;
55
56
  margin: -14px -20px;
56
- background: url(/assets/mercury/close.png) no-repeat center;
57
+ background-repeat: no-repeat;
58
+ background-position: center;
59
+ }
60
+ .mercury-lightview .mercury-display-pane-container {
61
+ overflow: auto;
62
+ margin: -10px -20px 0;
63
+ padding: 20px 20px 10px;
64
+ }
65
+ .mercury-lightview .mercury-display-pane-container .mercury-display-pane {
66
+ float: left;
67
+ }
68
+ .mercury-lightview .mercury-display-controls {
69
+ padding: 15px 0 0;
70
+ border-top: 1px solid #333;
71
+ text-align: right;
57
72
  }
58
-
59
73
  /*
60
74
  * Forms
61
75
  *----------------------------------------------------------------------------*/
@@ -72,29 +86,66 @@
72
86
  .mercury-lightview form input[type="password"],
73
87
  .mercury-lightview form textarea,
74
88
  .mercury-lightview form input.text {
75
- background: #000;
89
+ background: #444;
76
90
  color: #FFF;
77
91
  border: 2px solid #555;
92
+ -moz-box-shadow: inset 0 0 3px #000000;
93
+ -webkit-box-shadow: inset 0 0 3px #000000;
94
+ box-shadow: inset 0 0 3px #000000;
95
+ }
96
+ .mercury-lightview form input[type="button"] {
97
+ border: 2px solid #555;
98
+ border-radius: 4px;
99
+ background: #222;
100
+ color: #FFF;
101
+ }
102
+ .mercury-lightview hr {
103
+ border-color: #333;
78
104
  }
79
105
  /*
80
106
  * Specific Lightviews
81
107
  *----------------------------------------------------------------------------*/
82
108
  /* about mercury */
83
- .mercury-about-lightview {
84
- width: 200px;
109
+ #mercury_about {
110
+ width: 300px;
85
111
  min-height: 100px;
86
- padding-left: 130px;
87
- background: url(/assets/mercury/temp-logo.png) no-repeat left center;
88
- font-size: .9em;
112
+ font-size: 1.1em;
113
+ background-repeat: no-repeat;
89
114
  }
90
- .mercury-about-lightview ul {
115
+ #mercury_about ul {
116
+ float: left;
91
117
  list-style: none;
92
118
  padding: 0;
93
- margin: 20px 0 0 0;
119
+ margin: 118px 0 0 0;
120
+ width: 120px;
121
+ text-align: center;
94
122
  }
95
- .mercury-about-lightview a {
123
+ #mercury_about p {
124
+ margin: 0;
125
+ float: right;
126
+ width: 175px;
127
+ }
128
+ #mercury_about a {
96
129
  color: #09F;
97
130
  }
98
- .mercury-about-lightview a:hover {
131
+ #mercury_about a:hover {
99
132
  color: #FFF;
100
- }
133
+ }
134
+ /* character */
135
+ .mercury-lightview #mercury_character .character {
136
+ border: 1px solid #444;
137
+ background: #222;
138
+ }
139
+ .mercury-lightview #mercury_character .character:hover {
140
+ background: #555;
141
+ border: 1px solid #CCC;
142
+ }
143
+ /* table */
144
+ .mercury-lightview #mercury_table #table_display {
145
+ background: #222;
146
+ border: 1px solid #444;
147
+ height: 301px;
148
+ }
149
+ .mercury-lightview #mercury_table #table_display td.selected {
150
+ background: #09F;
151
+ }
@@ -7,28 +7,29 @@
7
7
  *= require ./toolbar
8
8
  *= require ./tooltip
9
9
  *= require ./uploader
10
+ *= require ./all_images
10
11
  */
11
12
 
12
-
13
+ /*
14
+ * General Layout
15
+ *---------------------------------------------------------------------------*/
13
16
  html, body {
17
+ -webkit-transition: -webkit-transform 3s;
14
18
  margin: 0;
15
19
  padding: 0;
16
20
  overflow: hidden;
17
21
  }
18
-
19
22
  .mercury-iframe {
20
23
  position: absolute;
21
24
  top: 0;
22
25
  width: 100%;
23
26
  visibility: hidden;
24
27
  }
25
-
26
28
  .mercury-focusable {
27
29
  position: absolute;
28
30
  opacity: 0;
29
31
  }
30
32
 
31
-
32
33
  /*
33
34
  * Forms
34
35
  *---------------------------------------------------------------------------*/
@@ -76,10 +77,13 @@ form label {
76
77
  text-align: right;
77
78
  line-height: 27px;
78
79
  font-size: 1.1em;
80
+ overflow: hidden;
81
+ text-overflow: ellipsis;
82
+ white-space: nowrap;
79
83
  }
80
84
  form label input {
81
85
  width: auto !important;
82
- margin: 0 5px 0 -20px !important;
86
+ margin: 0 5px 0 2px !important;
83
87
  }
84
88
  form select,
85
89
  form input[type=text],
@@ -126,7 +130,8 @@ form fieldset.buttons .commit input {
126
130
  padding: 8px 14px 9px !important;
127
131
  font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', sans-serif;
128
132
  font-size: 1.3em;
129
- background: #222 url(/assets/mercury/button.png) repeat-x;
133
+ background-color: #222;
134
+ background-repeat: repeat-x;
130
135
  display: inline-block;
131
136
  color: #FFF;
132
137
  text-decoration: none;
@@ -143,4 +148,4 @@ form fieldset.buttons .commit input {
143
148
  }
144
149
  form fieldset.buttons .commit input:hover {
145
150
  background-color: #000;
146
- }
151
+ }