Fix debug panel style in admin module

This commit is contained in:
Kijin Sung 2016-02-15 14:46:15 +09:00
parent 115738a84b
commit 83bf38c245
2 changed files with 7 additions and 3 deletions

View file

@ -341,15 +341,18 @@ button.btn {
color: #fcfcfc;
position: absolute;
left: 10px; top: 10px;
margin: 0; padding: 0;
}
#rhymix_debug_panel .debug_header .debug_maximize {
font: normal 20px/24px Arial, sans-serif;
text-decoration: none;
color: #444444;
position: absolute;
right: 32px; top: 7px;
right: 32px; top: 6px;
}
#rhymix_debug_panel .debug_header .debug_close {
font: normal 28px/28px Arial, sans-serif;
text-decoration: none;
color: #444444;
position: absolute;
right: 10px; top: 4px;

View file

@ -15,7 +15,8 @@ $(function() {
// Initialize the debug button.
$('<a href="#"></a>').text("DEBUG").appendTo(button).click(function(event) {
event.preventDefault();
panel.css({ width: 0 }).show().animate({ width: 540 }, 200);
var max_width = Math.min(540, $(window).width());
panel.css({ width: max_width, left: max_width * -1 }).show().animate({ left: 0 }, 200);
button.hide();
});
@ -27,7 +28,7 @@ $(function() {
}));
header.append($('<a class="debug_close" href="#">&times;</a>').click(function(event) {
event.preventDefault();
panel.animate({ width: 0 }, 200, function() {
panel.animate({ left: panel.width() * -1 }, 200, function() {
panel.hide();
button.show();
});