Skip to content
Browse files

Merge pull request #177 from nreckart/pr/panel-handle-span

Add a span element to the panel h1 to act as the draggable handle.
  • Loading branch information...
2 parents 6d90c09 + cf3e8e3 commit fb80dfb0b9fbf4b99c68bbb431422a0a27104db0 @jejacks0n jejacks0n committed Mar 11, 2012
View
4 vendor/assets/javascripts/mercury/panel.js.coffee
@@ -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
@@ -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,
View
4 vendor/assets/stylesheets/mercury/dialog.css
@@ -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;

0 comments on commit fb80dfb

Please sign in to comment.
Something went wrong with that request. Please try again.