Skip to content

Commit

Permalink
Merge pull request jejacks0n#177 from nreckart/pr/panel-handle-span
Browse files Browse the repository at this point in the history
Add a span element to the panel h1 to act as the draggable handle.
  • Loading branch information
jejacks0n committed Mar 12, 2012
2 parents 6d90c09 + cf3e8e3 commit fb80dfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/mercury/panel.js.coffee
Expand Up @@ -6,7 +6,7 @@ class @Mercury.Panel extends Mercury.Dialog

build: ->
@element = jQuery('<div>', {class: 'mercury-panel loading', style: 'display:none;'})
@titleElement = jQuery("<h1>#{Mercury.I18n(@options.title)}</h1>").appendTo(@element)
@titleElement = jQuery("<h1><span>#{Mercury.I18n(@options.title)}<span></h1>").appendTo(@element)
@paneElement = jQuery('<div>', {class: 'mercury-panel-pane'}).appendTo(@element)

if @options.closeButton
Expand Down Expand Up @@ -100,7 +100,7 @@ class @Mercury.Panel extends Mercury.Dialog
makeDraggable: ->
elementWidth = @element.width()
@element.draggable {
handle: 'h1',
handle: 'h1 span',
axis: 'x',
opacity: 0.70
scroll: false,
Expand Down
4 changes: 4 additions & 0 deletions vendor/assets/stylesheets/mercury/dialog.css
Expand Up @@ -78,6 +78,10 @@
cursor: move;
text-shadow: 1px 1px 2px rgba(0,0,0, .9);
}
.mercury-panel h1 span {
display: block;
width: 100%;
}
.mercury-panel h1 a.mercury-panel-close {
position: absolute;
right: -5px;
Expand Down

0 comments on commit fb80dfb

Please sign in to comment.