mercury-rails 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/README.rdoc +81 -50
  2. data/VERSION +1 -1
  3. data/app/assets/javascripts/mercury/dialog.js.coffee +4 -4
  4. data/app/assets/javascripts/mercury/dialogs/backcolor.js.coffee +3 -3
  5. data/app/assets/javascripts/mercury/dialogs/forecolor.js.coffee +3 -3
  6. data/app/assets/javascripts/mercury/dialogs/formatblock.js.coffee +1 -1
  7. data/app/assets/javascripts/mercury/dialogs/objectspanel.js.coffee +3 -3
  8. data/app/assets/javascripts/mercury/dialogs/style.js.coffee +1 -1
  9. data/app/assets/javascripts/mercury/history_buffer.js.coffee +2 -2
  10. data/app/assets/javascripts/mercury/mercury.js.coffee +47 -54
  11. data/app/assets/javascripts/mercury/modal.js.coffee +13 -13
  12. data/app/assets/javascripts/mercury/modals/htmleditor.js.coffee +2 -2
  13. data/app/assets/javascripts/mercury/modals/insertcharacter.js.coffee +2 -2
  14. data/app/assets/javascripts/mercury/modals/insertlink.js.coffee +7 -7
  15. data/app/assets/javascripts/mercury/modals/insertmedia.js.coffee +5 -5
  16. data/app/assets/javascripts/mercury/modals/insertsnippet.js.coffee +2 -2
  17. data/app/assets/javascripts/mercury/modals/inserttable.js.coffee +14 -15
  18. data/app/assets/javascripts/mercury/native_extensions.js.coffee +2 -1
  19. data/app/assets/javascripts/mercury/page_editor.js.coffee +27 -27
  20. data/app/assets/javascripts/mercury/palette.js.coffee +6 -6
  21. data/app/assets/javascripts/mercury/panel.js.coffee +4 -4
  22. data/app/assets/javascripts/mercury/region.js.coffee +9 -9
  23. data/app/assets/javascripts/mercury/regions/editable.js.coffee +71 -71
  24. data/app/assets/javascripts/mercury/regions/markupable.js.coffee +51 -42
  25. data/app/assets/javascripts/mercury/regions/snippetable.js.coffee +7 -8
  26. data/app/assets/javascripts/mercury/select.js.coffee +8 -8
  27. data/app/assets/javascripts/mercury/snippet.js.coffee +6 -6
  28. data/app/assets/javascripts/mercury/snippet_toolbar.js.coffee +7 -7
  29. data/app/assets/javascripts/mercury/statusbar.js.coffee +7 -3
  30. data/app/assets/javascripts/mercury/table_editor.js.coffee +24 -24
  31. data/app/assets/javascripts/mercury/toolbar.button.js.coffee +20 -21
  32. data/app/assets/javascripts/mercury/toolbar.button_group.js.coffee +2 -2
  33. data/app/assets/javascripts/mercury/toolbar.expander.js.coffee +9 -9
  34. data/app/assets/javascripts/mercury/toolbar.js.coffee +12 -13
  35. data/app/assets/javascripts/mercury/tooltip.js.coffee +7 -7
  36. data/app/assets/javascripts/mercury/uploader.js.coffee +12 -13
  37. data/app/assets/javascripts/mercury_loader.js +98 -0
  38. data/app/assets/stylesheets/mercury/modal.scss +5 -5
  39. data/app/assets/stylesheets/mercury/toolbar.scss +62 -64
  40. data/app/views/layouts/mercury.html.haml +0 -4
  41. data/app/views/mercury/modals/character.html.haml +1 -1
  42. data/app/views/mercury/modals/htmleditor.html.haml +1 -1
  43. data/app/views/mercury/modals/table.html.haml +10 -10
  44. data/config/routes.rb +2 -2
  45. data/mercury-rails.gemspec +17 -20
  46. data/spec/javascripts/mercury/dialogs/backcolor_spec.js.coffee +3 -3
  47. data/spec/javascripts/mercury/dialogs/forecolor_spec.js.coffee +3 -3
  48. data/spec/javascripts/mercury/dialogs/objectspanel_spec.js.coffee +3 -3
  49. data/spec/javascripts/mercury/modals/htmleditor_spec.js.coffee +4 -4
  50. data/spec/javascripts/mercury/modals/insertcharacter_spec.js.coffee +2 -2
  51. data/spec/javascripts/mercury/modals/insertlink_spec.js.coffee +10 -10
  52. data/spec/javascripts/mercury/modals/insertmedia_spec.js.coffee +7 -7
  53. data/spec/javascripts/mercury/modals/insertsnippet_spec.js.coffee +4 -4
  54. data/spec/javascripts/mercury/modals/inserttable_spec.js.coffee +17 -17
  55. data/spec/javascripts/mercury/page_editor_spec.js.coffee +5 -6
  56. data/spec/javascripts/mercury/region_spec.js.coffee +5 -5
  57. data/spec/javascripts/mercury/regions/editable_spec.js.coffee +398 -0
  58. data/spec/javascripts/mercury/regions/snippetable_spec.js.coffee +18 -14
  59. data/spec/javascripts/mercury/snippet_spec.js.coffee +1 -1
  60. data/spec/javascripts/mercury/toolbar.button_spec.js.coffee +16 -16
  61. data/spec/javascripts/templates/mercury/modals/inserttable.html +11 -11
  62. data/spec/javascripts/templates/mercury/regions/editable.html +3 -0
  63. data/spec/javascripts/templates/mercury/toolbar.button.html +8 -8
  64. data/vendor/assets/javascripts/{jquery-ui-1.8.13.sortable.custom.js → jquery-ui-1.8.13.custom.js} +250 -0
  65. data/vendor/assets/javascripts/jquery.additions.js +151 -0
  66. data/vendor/assets/javascripts/showdown.js +1254 -1276
  67. metadata +26 -29
  68. data/app/assets/javascripts/mercury/websocket.js.coffee +0 -34
  69. data/spec/javascripts/mercury/regions/_editable_.js.coffee +0 -0
  70. data/vendor/assets/javascripts/jquery-ui-1.8.13.custom.min.js +0 -249
  71. data/vendor/assets/javascripts/jquery.easing.js +0 -173
  72. data/vendor/assets/javascripts/jquery.json2.js +0 -178
  73. data/vendor/assets/javascripts/jquery.serialize_object.js +0 -16
  74. data/vendor/assets/javascripts/jquery.ujs.js +0 -289
@@ -8,7 +8,7 @@ class @Mercury.Toolbar.ButtonGroup
8
8
 
9
9
 
10
10
  build: ->
11
- @element = $('<div>', {class: "mercury-button-group mercury-#{@name}-group"})
11
+ @element = jQuery('<div>', {class: "mercury-button-group mercury-#{@name}-group"})
12
12
  if @options._context || @options._regions
13
13
  @element.addClass('disabled')
14
14
 
@@ -17,7 +17,7 @@ class @Mercury.Toolbar.ButtonGroup
17
17
  Mercury.bind 'region:update', (event, options) =>
18
18
  context = Mercury.Toolbar.ButtonGroup.contexts[@name]
19
19
  if context
20
- if options.region && $.type(options.region.currentElement) == 'function'
20
+ if options.region && jQuery.type(options.region.currentElement) == 'function'
21
21
  element = options.region.currentElement()
22
22
  if element.length && context.call(@, element, options.region.element)
23
23
  @element.removeClass('disabled')
@@ -9,8 +9,8 @@ class @Mercury.Toolbar.Expander extends Mercury.Palette
9
9
 
10
10
  build: ->
11
11
  @container.css({whiteSpace: 'normal'})
12
- @trigger = $('<div>', {class: 'mercury-toolbar-expander'}).appendTo($(@options.appendTo).get(0) ? 'body')
13
- @element = $('<div>', {class: "mercury-palette mercury-expander mercury-#{@name}-expander", style: 'display:none'})
12
+ @trigger = jQuery('<div>', {class: 'mercury-toolbar-expander'}).appendTo(jQuery(@options.appendTo).get(0) ? 'body')
13
+ @element = jQuery('<div>', {class: "mercury-palette mercury-expander mercury-#{@name}-expander", style: 'display:none'})
14
14
  @windowResize()
15
15
 
16
16
 
@@ -24,20 +24,20 @@ class @Mercury.Toolbar.Expander extends Mercury.Palette
24
24
  event.stopPropagation()
25
25
  hiddenButtons = []
26
26
  for button in @container.find('.mercury-button')
27
- button = $(button)
27
+ button = jQuery(button)
28
28
  hiddenButtons.push(button.data('expander')) if button.position().top > 5
29
29
 
30
30
  @loadContent(hiddenButtons.join(''))
31
31
  @toggle()
32
32
 
33
33
  @element.click (event) =>
34
- buttonName = $(event.target).closest('[data-button]').data('button')
34
+ buttonName = jQuery(event.target).closest('[data-button]').data('button')
35
35
  button = @container.find(".mercury-#{buttonName}-button")
36
36
  button.click()
37
37
 
38
38
 
39
39
  windowResize: ->
40
- if @containerWidth > $(window).width() then @trigger.show() else @trigger.hide()
40
+ if @containerWidth > jQuery(window).width() then @trigger.show() else @trigger.hide()
41
41
  @hide()
42
42
 
43
43
 
@@ -46,11 +46,11 @@ class @Mercury.Toolbar.Expander extends Mercury.Palette
46
46
  position = @trigger.offset()
47
47
  width = @element.width()
48
48
 
49
- position.left = position.left - width + @trigger.width() if position.left + width > $(window).width()
49
+ position.left = position.left - width + @trigger.width() if position.left + width > jQuery(window).width()
50
50
 
51
51
  @element.css {
52
- top: position.top + @trigger.height(),
53
- left: position.left,
54
- display: if keepVisible then 'block' else 'none',
52
+ top: position.top + @trigger.height()
53
+ left: position.left
54
+ display: if keepVisible then 'block' else 'none'
55
55
  visibility: 'visible'
56
56
  }
@@ -6,16 +6,16 @@ class @Mercury.Toolbar
6
6
 
7
7
 
8
8
  build: ->
9
- @element = $('<div>', {class: 'mercury-toolbar-container', style: 'width:10000px'})
10
- @element.appendTo($(@options.appendTo).get(0) ? 'body')
9
+ @element = jQuery('<div>', {class: 'mercury-toolbar-container', style: 'width:10000px'})
10
+ @element.appendTo(jQuery(@options.appendTo).get(0) ? 'body')
11
11
 
12
- for toolbarName, buttons of Mercury.config.toolbars
12
+ for own toolbarName, buttons of Mercury.config.toolbars
13
13
  continue if buttons._custom
14
- toolbar = $('<div>', {class: "mercury-toolbar mercury-#{toolbarName}-toolbar"}).appendTo(@element)
14
+ toolbar = jQuery('<div>', {class: "mercury-toolbar mercury-#{toolbarName}-toolbar"}).appendTo(@element)
15
15
  toolbar.attr('data-regions', buttons._regions) if buttons._regions
16
- container = $('<div>', {class: 'mercury-toolbar-button-container'}).appendTo(toolbar)
16
+ container = jQuery('<div>', {class: 'mercury-toolbar-button-container'}).appendTo(toolbar)
17
17
 
18
- for buttonName, options of buttons
18
+ for own buttonName, options of buttons
19
19
  continue if buttonName == '_regions'
20
20
  button = @buildButton(buttonName, options)
21
21
  button.appendTo(container) if button
@@ -31,21 +31,20 @@ class @Mercury.Toolbar
31
31
 
32
32
  buildButton: (name, options) ->
33
33
  return false if name[0] == '_'
34
- switch $.type(options)
35
-
34
+ switch jQuery.type(options)
36
35
  when 'array' # button
37
36
  [title, summary, handled] = options
38
37
  new Mercury.Toolbar.Button(name, title, summary, handled, {appendDialogsTo: @element})
39
38
 
40
39
  when 'object' # button group
41
40
  group = new Mercury.Toolbar.ButtonGroup(name, options)
42
- for a, o of options
43
- button = @buildButton(a, o)
41
+ for own action, opts of options
42
+ button = @buildButton(action, opts)
44
43
  button.appendTo(group) if button
45
44
  group
46
45
 
47
46
  when 'string' # separator
48
- $('<hr>', {class: "mercury-#{if options == '-' then 'line-separator' else 'separator'}"})
47
+ jQuery('<hr>', {class: "mercury-#{if options == '-' then 'line-separator' else 'separator'}"})
49
48
 
50
49
  else throw "Unknown button structure -- please provide an array, object, or string for #{name}."
51
50
 
@@ -53,13 +52,13 @@ class @Mercury.Toolbar
53
52
  bindEvents: ->
54
53
  Mercury.bind 'region:focused', (event, options) =>
55
54
  for toolbar in @element.find(".mercury-toolbar")
56
- toolbar = $(toolbar)
55
+ toolbar = jQuery(toolbar)
57
56
  if regions = toolbar.data('regions')
58
57
  toolbar.removeClass('disabled') if regions.split(',').indexOf(options.region.type) > -1
59
58
 
60
59
  Mercury.bind 'region:blurred', (event, options) =>
61
60
  for toolbar in @element.find(".mercury-toolbar")
62
- toolbar = $(toolbar)
61
+ toolbar = jQuery(toolbar)
63
62
  if regions = toolbar.data('regions')
64
63
  toolbar.addClass('disabled') if regions.split(',').indexOf(options.region.type) > -1
65
64
 
@@ -2,10 +2,10 @@
2
2
  Mercury.tooltip.show(forElement, content, options)
3
3
  return Mercury.tooltip
4
4
 
5
- $.extend Mercury.tooltip, {
5
+ jQuery.extend Mercury.tooltip, {
6
6
 
7
7
  show: (@forElement, @content, @options = {}) ->
8
- @document = $(@forElement.get(0).ownerDocument)
8
+ @document = jQuery(@forElement.get(0).ownerDocument)
9
9
  @initialize()
10
10
  if @visible then @update() else @appear()
11
11
 
@@ -18,8 +18,8 @@ $.extend Mercury.tooltip, {
18
18
 
19
19
 
20
20
  build: ->
21
- @element = $('<div>', {class: 'mercury-tooltip'})
22
- @element.appendTo($(@options.appendTo).get(0) ? 'body')
21
+ @element = jQuery('<div>', {class: 'mercury-tooltip'})
22
+ @element.appendTo(jQuery(@options.appendTo).get(0) ? 'body')
23
23
 
24
24
 
25
25
  bindEvents: ->
@@ -47,14 +47,14 @@ $.extend Mercury.tooltip, {
47
47
  offset = @forElement.offset()
48
48
  width = @element.width()
49
49
 
50
- top = offset.top + (Mercury.displayRect.top - $(@document).scrollTop()) + @forElement.outerHeight()
51
- left = offset.left - $(@document).scrollLeft()
50
+ top = offset.top + (Mercury.displayRect.top - jQuery(@document).scrollTop()) + @forElement.outerHeight()
51
+ left = offset.left - jQuery(@document).scrollLeft()
52
52
 
53
53
  left = left - (left + width + 25) - Mercury.displayRect.width if (left + width + 25) > Mercury.displayRect.width
54
54
  left = if left <= 0 then 0 else left
55
55
 
56
56
  @element.css {
57
- top: top,
57
+ top: top
58
58
  left: left
59
59
  }
60
60
 
@@ -2,7 +2,7 @@
2
2
  Mercury.uploader.show(file, options)
3
3
  return Mercury.uploader
4
4
 
5
- $.extend Mercury.uploader, {
5
+ jQuery.extend Mercury.uploader, {
6
6
 
7
7
  show: (file, @options = {}) ->
8
8
  @file = new Mercury.uploader.File(file)
@@ -37,15 +37,15 @@ $.extend Mercury.uploader, {
37
37
 
38
38
 
39
39
  build: ->
40
- @element = $('<div>', {class: 'mercury-uploader', style: 'display:none'})
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
43
  @element.append('<div class="mercury-uploader-progress"><span>Processing...</span><div class="mercury-uploader-indicator"><div><b>0%</b></div></div></div>')
44
44
 
45
- @overlay = $('<div>', {class: 'mercury-uploader-overlay', style: 'display:none'})
45
+ @overlay = jQuery('<div>', {class: 'mercury-uploader-overlay', style: 'display:none'})
46
46
 
47
- @element.appendTo($(@options.appendTo).get(0) ? 'body')
48
- @overlay.appendTo($(@options.appendTo).get(0) ? 'body')
47
+ @element.appendTo(jQuery(@options.appendTo).get(0) ? 'body')
48
+ @overlay.appendTo(jQuery(@options.appendTo).get(0) ? 'body')
49
49
 
50
50
 
51
51
  bindEvents: ->
@@ -65,8 +65,8 @@ $.extend Mercury.uploader, {
65
65
 
66
66
 
67
67
  position: ->
68
- viewportWidth = $(window).width()
69
- viewportHeight = $(window).height()
68
+ viewportWidth = jQuery(window).width()
69
+ viewportHeight = jQuery(window).height()
70
70
 
71
71
  width = @element.outerWidth()
72
72
  height = @element.outerHeight()
@@ -84,17 +84,17 @@ $.extend Mercury.uploader, {
84
84
 
85
85
  loadImage: ->
86
86
  @file.readAsDataURL (result) =>
87
- @element.find('.mercury-uploader-preview b').html($('<img>', {src: result}))
87
+ @element.find('.mercury-uploader-preview b').html(jQuery('<img>', {src: result}))
88
88
  @upload()
89
89
 
90
90
 
91
91
  upload: ->
92
92
  xhr = new XMLHttpRequest
93
- $.each ['onloadstart', 'onprogress', 'onload', 'onabort', 'onerror'], (index, eventName) =>
93
+ jQuery.each ['onloadstart', 'onprogress', 'onload', 'onabort', 'onerror'], (index, eventName) =>
94
94
  xhr.upload[eventName] = (event) => @uploaderEvents[eventName].call(@, event)
95
95
  xhr.onload = (event) =>
96
96
  try
97
- response = $.evalJSON(event.target.responseText)
97
+ response = jQuery.evalJSON(event.target.responseText)
98
98
  Mercury.trigger('action', {action: 'insertImage', value: {src: response.url}})
99
99
  catch error
100
100
  @updateStatus('Unable to process response')
@@ -143,7 +143,7 @@ $.extend Mercury.uploader, {
143
143
  @updateStatus('Processing...',)
144
144
 
145
145
 
146
- uploaderEvents: {
146
+ uploaderEvents:
147
147
  onloadstart: -> @updateStatus('Uploading...')
148
148
 
149
149
  onprogress: (event) -> @updateStatus('Uploading...', event.loaded)
@@ -159,7 +159,6 @@ $.extend Mercury.uploader, {
159
159
  onerror: ->
160
160
  @updateStatus('Error: Unable to upload the file')
161
161
  @hide(1)
162
- }
163
162
  }
164
163
 
165
164
 
@@ -208,6 +207,6 @@ class Mercury.uploader.MultiPartPost
208
207
 
209
208
  buildBody: ->
210
209
  boundary = '--' + @boundary
211
- for name, value of @formInputs
210
+ for own name, value of @formInputs
212
211
  @body += "#{boundary}\r\nContent-Disposition: form-data; name=\"#{name}\"\r\n\r\n#{unescape(encodeURIComponent(value))}\r\n"
213
212
  @body += "#{boundary}\r\nContent-Disposition: form-data; name=\"#{@inputName}\"; filename=\"#{@file.name}\"\r\nContent-Type: #{@file.type}\r\nContent-Transfer-Encoding: binary\r\n\r\n#{@contents}\r\n#{boundary}--"
@@ -0,0 +1,98 @@
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.
5
+ *
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
9
+ * - Firefox 4+
10
+ * - Chrome 10+
11
+ * - Safari 5+
12
+ *
13
+ * Copyright (c) 2011 Jeremy Jackson
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
16
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
17
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
18
+ * persons to whom the Software is furnished to do so, subject to the following conditions:
19
+ *
20
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
21
+ * Software.
22
+ *
23
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
25
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
26
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
+ *
28
+ *= require_self
29
+ */
30
+ (function() {
31
+ if (!document.getElementsByTagName) return;
32
+
33
+ var head = document.getElementsByTagName("head")[0];
34
+ if (window == top) {
35
+ var style = document.createElement('style');
36
+ style.innerText = 'body{visibility:hidden;display:none}';
37
+ head.appendChild(style);
38
+ }
39
+
40
+ var timer;
41
+ function fireContentLoadedEvent() {
42
+ if (document.mercuryLoaded) return;
43
+ if (timer) window.clearTimeout(timer);
44
+ document.mercuryLoaded = true;
45
+
46
+ if (window == top) {
47
+ setTimeout(function() {
48
+ document.body.innerHTML = '&nbsp;';
49
+ for (var i = 0; i <= document.styleSheets.length - 1; i += 1) {
50
+ document.styleSheets[i].disabled = true
51
+ }
52
+
53
+ var link = document.createElement('link');
54
+ link.href = '/assets/mercury.css';
55
+ link.media = 'screen';
56
+ link.rel = 'stylesheet';
57
+ link.type = 'text/css';
58
+ head.appendChild(link);
59
+
60
+ var script = document.createElement('script');
61
+ script.src = '/assets/mercury.js';
62
+ script.type = 'text/javascript';
63
+ head.appendChild(script);
64
+ script.onload = function() {
65
+ document.body.style.visibility = 'visible';
66
+ document.body.style.display = 'block';
67
+ new Mercury.PageEditor()
68
+ }
69
+ }, 1);
70
+ } else if (top.Mercury) {
71
+ window.Mercury = top.Mercury;
72
+ Mercury.trigger('initialize:frame');
73
+ }
74
+ }
75
+
76
+ function checkReadyState() {
77
+ if (document.readyState === 'complete') {
78
+ document.stopObserving('readystatechange', checkReadyState);
79
+ fireContentLoadedEvent();
80
+ }
81
+ }
82
+
83
+ function pollDoScroll() {
84
+ try { document.documentElement.doScroll('left'); }
85
+ catch(e) {
86
+ timer = pollDoScroll.defer();
87
+ return;
88
+ }
89
+ fireContentLoadedEvent();
90
+ }
91
+
92
+ if (document.addEventListener) {
93
+ document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
94
+ } else {
95
+ document.observe('readystatechange', checkReadyState);
96
+ if (window == top) { timer = pollDoScroll.defer(); }
97
+ }
98
+ })();
@@ -114,10 +114,10 @@
114
114
  }
115
115
  }
116
116
  /*
117
- * Specific Modals (eg. htmleditor)
117
+ * Specific Modals (eg. htmlEditor)
118
118
  *----------------------------------------------------------------------------*/
119
- /* htmleditor */
120
- #mercury_htmleditor {
119
+ /* htmlEditor */
120
+ #mercury_htmlEditor {
121
121
  textarea {
122
122
  margin: 0 0 -2px 0;
123
123
  padding: 0;
@@ -143,8 +143,8 @@
143
143
  white-space: pre;
144
144
  }
145
145
  }
146
- /* insertcharacter */
147
- #mercury_insertcharacter {
146
+ /* insertCharacter */
147
+ #mercury_insertCharacter {
148
148
  .character {
149
149
  float: left;
150
150
  width: 20px;
@@ -141,24 +141,22 @@
141
141
  .mercury-expander-button[data-button=undo] em { background-image: url(/assets/mercury/toolbar/primary/undo.png) }
142
142
  .mercury-primary-toolbar .mercury-redo-button em,
143
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) }
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
158
  .mercury-primary-toolbar .mercury-todospanel-button em,
159
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
160
  .mercury-primary-toolbar .mercury-todospanel-button em,
163
161
  .mercury-expander-button[data-button=todospanel] em { background-image: url(/assets/mercury/toolbar/primary/todospanel.png) }
164
162
  /*
@@ -238,48 +236,48 @@
238
236
  .mercury-subscript-button.active { background-position: -112px -18px }
239
237
  .mercury-superscript-button { background-position: -135px 0 }
240
238
  .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 }
239
+ .mercury-justifyLeft-button { background-position: -158px 0 }
240
+ .mercury-justifyLeft-button.active { background-position: -158px -18px }
241
+ .mercury-justifyCenter-button { background-position: -181px 0 }
242
+ .mercury-justifyCenter-button.active { background-position: -181px -18px }
243
+ .mercury-justifyRight-button { background-position: -203px 0 }
244
+ .mercury-justifyRight-button.active { background-position: -203px -18px }
245
+ .mercury-justifyFull-button { background-position: -225px 0 }
246
+ .mercury-justifyFull-button.active { background-position: -225px -18px }
247
+ .mercury-insertUnorderedList-button { background-position: -248px 0 }
248
+ .mercury-insertUnorderedList-button.active { background-position: -248px -18px }
249
+ .mercury-insertOrderedList-button { background-position: -271px 0 }
250
+ .mercury-insertOrderedList-button.active { background-position: -271px -18px }
253
251
  .mercury-outdent-button { background-position: -294px 0 }
254
252
  .mercury-outdent-button.active { background-position: -294px -18px }
255
253
  .mercury-indent-button { background-position: -317px 0 }
256
254
  .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 }
255
+ .mercury-insertRowBefore-button { background-position: -340px 0 }
256
+ .mercury-insertRowBefore-button.active { background-position: -340px -18px }
257
+ .mercury-insertRowAfter-button { background-position: -363px 0 }
258
+ .mercury-insertRowAfter-button.active { background-position: -363px -18px }
259
+ .mercury-deleteRow-button { background-position: -385px 0 }
260
+ .mercury-deleteRow-button.active { background-position: -385px -18px }
261
+ .mercury-insertColumnBefore-button { background-position: -407px 0 }
262
+ .mercury-insertColumnBefore-button.active { background-position: -407px -18px }
263
+ .mercury-insertColumnAfter-button { background-position: -429px 0 }
264
+ .mercury-insertColumnAfter-button.active { background-position: -429px -18px }
265
+ .mercury-deleteColumn-button { background-position: -451px 0 }
266
+ .mercury-deleteColumn-button.active { background-position: -451px -18px }
267
+ .mercury-increaseColspan-button { background-position: -474px 0; width: 23px }
268
+ .mercury-increaseColspan-button.active { background-position: -474px -18px }
269
+ .mercury-decreaseColspan-button { background-position: -497px 0 }
270
+ .mercury-decreaseColspan-button.active { background-position: -497px -18px }
271
+ .mercury-increaseRowspan-button { background-position: -520px 0 }
272
+ .mercury-increaseRowspan-button.active { background-position: -520px -18px }
273
+ .mercury-decreaseRowspan-button { background-position: -542px 0 }
274
+ .mercury-decreaseRowspan-button.active { background-position: -542px -18px }
275
+ .mercury-horizontalRule-button { background-position: -564px 0 }
276
+ .mercury-horizontalRule-button.active { background-position: -564px -18px }
277
+ .mercury-removeFormatting-button { background-position: -588px 0 }
278
+ .mercury-removeFormatting-button.active { background-position: -588px -18px }
279
+ .mercury-htmlEditor-button { background-position: -612px 0 }
280
+ .mercury-htmlEditor-button.active { background-position: -612px -18px }
283
281
  }
284
282
  /*
285
283
  * Toolbar: Markupable Region Toolbar
@@ -352,16 +350,16 @@
352
350
  .mercury-subscript-button.active { background-position: -112px -18px }
353
351
  .mercury-superscript-button { background-position: -135px 0 }
354
352
  .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 }
353
+ .mercury-insertUnorderedList-button { background-position: -248px 0 }
354
+ .mercury-insertUnorderedList-button.active { background-position: -248px -18px }
355
+ .mercury-insertOrderedList-button { background-position: -271px 0 }
356
+ .mercury-insertOrderedList-button.active { background-position: -271px -18px }
359
357
  .mercury-outdent-button { background-position: -294px 0 }
360
358
  .mercury-outdent-button.active { background-position: -294px -18px }
361
359
  .mercury-indent-button { background-position: -317px 0 }
362
360
  .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 }
361
+ .mercury-horizontalRule-button { background-position: -564px 0 }
362
+ .mercury-horizontalRule-button.active { background-position: -564px -18px }
365
363
  }
366
364
  /*
367
365
  * Toolbar: Snippetable Region Toolbar
@@ -408,10 +406,10 @@
408
406
  }
409
407
  }
410
408
  /* 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 }
409
+ .mercury-editSnippet-button { background-position: -24px 0 }
410
+ .mercury-editSnippet-button.active { background-position: -24px -18px }
411
+ .mercury-removeSnippet-button { background-position: -48px 0 }
412
+ .mercury-removeSnippet-button.active { background-position: -48px -18px }
415
413
  .mercury-dragsnippet-button { background-position: -72px 0 }
416
414
  .mercury-dragsnippet-button.active { background-position: -72px -18px }
417
415
  }