Float the menu bar of the designer

This commit is contained in:
Madhura Jayaratne 2012-12-10 21:48:39 +05:30
parent 5d10c689b9
commit ca98097f3c
3 changed files with 36 additions and 13 deletions

View File

@ -23,9 +23,11 @@ AJAX.registerOnload('pmd/move.js', function() {
if ($.FullScreen.supported) {
$(document).fullScreenChange(function() {
if (! $.FullScreen.isFullScreen()) {
$('#canvas_outer').css({'width': 'auto', 'height': 'auto'});
$('#page_content').removeClass('content_fullscreen')
.css({'width': 'auto', 'height': 'auto'});
$('#enterFullscreen').show();
$('#exitFullscreen').hide();
Top_menu_reposition($('#key_Left_Right')[0]);
}
});
} else {
@ -485,11 +487,14 @@ function Rect(x1, y1, w, h, color)
//--------------------------- FULLSCREEN -------------------------------------
function Enter_fullscreen()
{
if (! $.FullScreen.isFullScreen()) {
$('#canvas_outer').css({'width': screen.width - 5, 'height': screen.height - 28});
if (! $.FullScreen.isFullScreen()) {
$('#enterFullscreen').hide();
$('#exitFullscreen').show();
$('#page_content').requestFullScreen();
$('#page_content')
.addClass('content_fullscreen')
.css({'width': screen.width - 5, 'height': screen.height - 5})
.requestFullScreen();
Top_menu_reposition($('#key_Left_Right')[0]);
}
}
@ -983,12 +988,7 @@ function Show_left_menu(id_this) // max/min all tables
function Top_menu_right(id_this)
{
if (id_this.alt == ">") {
var top_menu_width = 10;
$('#top_menu').children().each(function () {
top_menu_width += $(this).outerWidth(true);
});
var offset = parseInt(document.getElementById('top_menu').offsetWidth - top_menu_width, 10);
document.getElementById('top_menu').style.paddingLeft = offset + 'px';
moveTopMenuToRight(id_this);
id_this.alt = "<";
id_this.src = pmaThemeImage + "pmd/2leftarrow_m.png";
} else {
@ -997,6 +997,23 @@ function Top_menu_right(id_this)
id_this.src = pmaThemeImage + "pmd/2rightarrow_m.png";
}
}
function Top_menu_reposition(id_this)
{
if (id_this.alt == "<") {
moveTopMenuToRight(id_this);
}
}
function moveTopMenuToRight(id_this)
{
var top_menu_width = 10;
$('#top_menu').children().each(function () {
top_menu_width += $(this).outerWidth(true);
});
var offset = parseInt(document.getElementById('canvas_outer').offsetWidth - top_menu_width, 10);
document.getElementById('top_menu').style.paddingLeft = offset + 'px';
}
//------------------------------------------------------------------------------
function Start_display_field()
{

View File

@ -240,7 +240,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
left: <?php
echo isset($tab_pos[$t_n]) ? $tab_pos[$t_n]["X"] : rand(20, 700); ?>px;
top: <?php
echo isset($tab_pos[$t_n]) ? $tab_pos[$t_n]["Y"] : rand(20, 550); ?>px;
echo isset($tab_pos[$t_n]) ? $tab_pos[$t_n]["Y"] : rand(50, 550); ?>px;
visibility: <?php
echo ! isset($tab_pos[$t_n]) || $tab_pos[$t_n]["H"]
? "visible"

View File

@ -19,10 +19,13 @@ if (! defined('PMA_MINIMUM_COMMON') && ! defined('TESTSUITE')) {
color: #000;
}
.content_fullscreen {
position : relative;
overflow: auto;
}
#canvas_outer {
position: relative;
overflow: auto;
float: left;
}
#canvas {
@ -281,6 +284,9 @@ canvas.pmd * {
border-right: #999 solid 1px;
border-left: #999 solid 1px;
height: 28px;
position: fixed;
z-index: 101;
width: 100%
}
.pmd_header a {