New: Use div instead of tables into login page.

This commit is contained in:
Laurent Destailleur
2013-02-24 14:57:49 +01:00
parent 6b20370ffa
commit 3baf8a6c00
9 changed files with 223 additions and 49 deletions

71
dev/test/testdiv.php Normal file
View File

@@ -0,0 +1,71 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
<html>
<head>
<meta name="robots" content="noindex,nofollow" />
<meta name="author" content="Dolibarr Development Team">
<link rel="shortcut icon" type="image/x-icon" href="/dolibarrnew/theme/eldy/img/favicon.ico"/>
<title>Login Dolibarr 3.4.0-alpha</title>
<!-- Includes for JQuery (Ajax library) -->
<link rel="stylesheet" type="text/css" href="/dolibarrnew/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
<link rel="stylesheet" type="text/css" title="default" href="/dolibarrnew/custom/filemanager/css/filemanager.css.php"><!-- Added by module filemanager-->
<!-- Includes JS for JQuery -->
<script type="text/javascript" src="/dolibarrnew/includes/jquery/js/jquery-latest.min.js"></script>
<script type="text/javascript" src="/dolibarrnew/core/js/dst.js"></script>
<link rel="stylesheet" type="text/css" href="/dolibarrnew/theme/eldy/style.css.php?lang=fr_FR" />
<!-- HTTP_USER_AGENT = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22 -->
</head>
<body class="body">
<center>
<div class="login_table" align="center">
<!-- <tr><td colspan="2" valign="middle"> -->
<div id="login_line1" align="center">
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
<table class="none" summary="Login pass" cellpadding="2" align="center">
<!-- Login -->
<tr>
<td valign="bottom"> &nbsp; <strong><label for="username">Login</label></strong>fds fs df sdf gdsfgsdf r &nbsp; </td>
<td valign="bottom" nowrap="nowrap">
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="" tabindex="1" />
</td>
</tr>
<!-- Password -->
<tr><td valign="top" nowrap="nowrap"> &nbsp; <strong><label for="password">Mot de passe</label></strong> &nbsp; </td>
<td valign="top" nowrap="nowrap">
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" autocomplete="off" />
</td></tr>
</table>
</center>
</div> <!-- end div left -->
<!-- </td>
<td align="center" valign="middle">-->
<div id="login_right" style="display: inline-block; min-width: 250px; margin: 0 auto;">
<img alt="Logo" title="" src="/dolibarrnew/theme/dolibarr_logo.png" id="img_logo" />
</div>
</div> <!-- end div line1 -->
<!--</td>
</tr>-->
</div>
</center>
</body>
</html>
<!-- END PHP TEMPLATE -->

View File

@@ -31,12 +31,12 @@ class MenuManager
var $type_user; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
var $name="eldy";
var $menu_array;
var $menu_array_after;
var $tabMenu;
/**
* Constructor
@@ -52,7 +52,7 @@ class MenuManager
// On sauve en session le menu principal choisi
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
// Read mainmenu and leftmenu that define which menu to show
if (isset($_GET["mainmenu"]))
{
@@ -62,11 +62,11 @@ class MenuManager
$_SESSION["leftmenuopened"]="";
}
else
{
{
// On va le chercher en session si non defini par le lien
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
}
if (isset($_GET["leftmenu"]))
{
// On sauve en session le menu principal choisi
@@ -86,7 +86,7 @@ class MenuManager
// On va le chercher en session si non defini par le lien
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
}
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
$tabMenu=array();
$menuArbo = new Menubase($db,'eldy');
@@ -112,11 +112,11 @@ class MenuManager
$conf->global->MAIN_SEARCHFORM_SOCIETE=0;
$conf->global->MAIN_SEARCHFORM_CONTACT=0;
}
$res='ErrorBadParameterForMode';
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu);
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu);
return $res;
}

View File

@@ -51,7 +51,8 @@ print $langs->trans("ToolsDesc").'<br><br>';
$db->close();
llxFooter();
$db->close();
?>

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -75,7 +75,10 @@ $(document).ready(function () {
});
</script>
<center>
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
<input type="hidden" name="mainmenu" value="home" />
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<input type="hidden" name="loginfunction" value="loginfunction" />
<!-- Add fields to send local user information -->
@@ -94,11 +97,14 @@ $(document).ready(function () {
</table>
<br>
<table class="login_table" summary="Login area" cellpadding="2" align="center">
<div class="login_table">
<tr><td colspan="2" valign="middle">
<table class="none" summary="Login pass" cellpadding="2" align="center">
<!-- <tr><td colspan="2" valign="middle"> -->
<div id="login_line1">
<div id="login_left">
<table class="left" summary="Login pass" cellpadding="2">
<!-- Login -->
<tr>
<td valign="bottom"> &nbsp; <strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong> &nbsp; </td>
@@ -106,13 +112,11 @@ $(document).ready(function () {
<input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
</td>
</tr>
<!-- Password -->
<tr><td valign="top" nowrap="nowrap"> &nbsp; <strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong> &nbsp; </td>
<td valign="top" nowrap="nowrap">
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" autocomplete="off" />
</td></tr>
<?php
if (! empty($hookmanager->resArray['options'])) {
foreach ($hookmanager->resArray['options'] as $format => $option)
@@ -124,7 +128,6 @@ if (! empty($hookmanager->resArray['options'])) {
}
}
?>
<?php if ($captcha) { ?>
<!-- Captcha -->
<tr><td valign="middle" nowrap="nowrap"> &nbsp; <b><?php echo $langs->trans('SecurityCode'); ?></b></td>
@@ -138,24 +141,27 @@ if (! empty($hookmanager->resArray['options'])) {
</td></tr>
<?php } ?>
</table>
</td>
<td align="center" valign="middle">
</div> <!-- end div left -->
<div id="login_right">
<img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" />
</td>
</tr>
</div>
</div>
<div id="login_line2" style="clear: both">
<!-- Button Connection -->
<tr><td colspan="3" style="text-align:center;"><br>
<input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
</td></tr>
<br><input type="submit" class="button" value="&nbsp; <?php echo $langs->trans('Connection'); ?> &nbsp;" tabindex="5" />
<?php
if ($forgetpasslink || $helpcenterlink) {
echo '<tr><td colspan="3" align="center">';
if ($forgetpasslink || $helpcenterlink)
{
echo '<br>';
echo '<div align="center" style="margin-top: 4px;">';
if ($forgetpasslink) {
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">(';
echo $langs->trans('PasswordForgotten');
@@ -176,11 +182,13 @@ if ($forgetpasslink || $helpcenterlink) {
}
echo $langs->trans('NeedHelpCenter').')</a>';
}
echo '</td></tr>';
echo '</div>';
}
?>
</table>
</div>
</div>
</form>
@@ -233,6 +241,8 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
</center> <!-- end of center -->
</body>
</html>
<!-- END PHP TEMPLATE -->

View File

@@ -80,12 +80,6 @@ $img_button=dol_buildpath($path.'/theme/amarok/img/button_bg.png',1);
font-size:100%;
}
/*.fiche ul {
margin:0.5em;
padding:0.5em;
padding-left: 2em;
}*/
body {
background-color:#f5f5f5;
<?php if ($_SESSION['dol_login'] != '') {?>
@@ -178,11 +172,29 @@ form {
margin:0px;
}
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */
/* Login */
/* ============================================================================== */
body.body center{color:white;}
form#login {
display:block;
border:solid 1px rgba(0,0,0,.4);
@@ -240,7 +252,12 @@ form#login table.login_table {
background:none !important;
}
body.body center{color:white;}
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
table.login_table { background-color: red !important;}
table.login_table tr td {vertical-align:middle;}

View File

@@ -161,12 +161,22 @@ div.float
{
float:<?php print $left; ?>;
}
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */
@@ -488,7 +498,9 @@ form#login {
}
.login_table {
padding:12px;
width: 540px;
margin-left: 10px;
margin-right: 10px;
max-width: 540px;
border: 1px solid #C0C0C0;
background-color: #E0E0E0;
@@ -527,6 +539,13 @@ div.login_block table {
display: inline;
}
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login {
white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;

View File

@@ -183,12 +183,22 @@ form {
padding: 0em 0em 0em 0em;
margin: 0em 0em 0em 0em;
}
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */
@@ -521,7 +531,9 @@ form#login {
font-size: 13px;
}
.login_table_title {
width: 540px;
margin-left: 10px;
margin-right: 10px;
max-width: 540px;
color: #888888;
text-shadow: 1px 1px 1px #FFF;
}
@@ -529,8 +541,10 @@ form#login {
text-shadow: 1px 1px 1px #FFF;
}
.login_table {
margin-left: 10px;
margin-right: 10px;
padding:12px;
width: 540px;
max-width: 540px;
border: 1px solid #C0C0C0;
background-color: #E0E0E0;
@@ -570,6 +584,13 @@ div.login_block table {
display: inline;
}
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login {
white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;
@@ -2138,13 +2159,9 @@ div.table-val-border-col {
/* ============================================================================== */
#login {
position: relative;
display: block;
width: 480px;
height: auto;
top: 20px;
left: 50%;
margin-left: -240px;
margin-bottom: 30px;
}

View File

@@ -166,12 +166,22 @@ div.float
{
float:<?php print $left; ?>;
}
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */
@@ -535,7 +545,7 @@ form#login {
font-size: 13px;
}
.login_table_title {
width: 540px;
max-width: 540px;
color: #888888;
text-shadow: 1px 1px 1px #FFF;
}
@@ -543,8 +553,10 @@ form#login {
text-shadow: 1px 1px 1px #FFF;
}
.login_table {
margin-left: 10px;
margin-right: 10px;
padding:12px;
width: 540px;
max-width: 540px;
border: 1px solid #C0C0C0;
background-color: #E0E0E0;
@@ -583,6 +595,13 @@ div.login_block table {
display: inline;
}
div#login_left, div#login_right {
display: inline-block;
min-width: 220px;
text-align: center;
vertical-align: middle;
}
div.login {
white-space:nowrap;
padding: <?php echo ($conf->browser->phone?'0':'8')?>px 0px 0px 0px;

View File

@@ -303,12 +303,22 @@ th .button {
-webkit-border-radius:0px !important;
border-radius:0px !important;
}
.valignmiddle {
vertical-align: middle;
}
.centpercent {
width: 100%;
}
.center {
text-align: center;
}
.left {
text-align: <?php print $left; ?>;
}
.right {
text-align: <?php print $right; ?>;
}
/* ============================================================================== */
@@ -712,12 +722,13 @@ foreach($mainmenuusedarray as $val)
/* Login */
form#login {
margin-top: 70px;
margin-top: 60px;
margin-bottom: 30px;
font-size: 13px;
vertical-align: middle;
}
.login_table_title {
width: 540px;
max-width: 540px;
color: #888888;
text-shadow: 1px 1px 1px #FFF;
}
@@ -725,11 +736,13 @@ form#login {
text-shadow: 1px 1px 1px #FFF;
}
.login_table {
margin-left: 10px;
margin-right: 10px;
padding-left:6px;
padding-right:6px;
padding-top:14px;
padding-top:12px;
padding-bottom:12px;
width: 540px;
max-width: 540px;
border: 1px solid #C0C0C0;
background-color: #E0E0E0;
@@ -747,6 +760,13 @@ form#login {
background-image: -ms-linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
background-image: linear-gradient(top, rgba(250,250,250,.6) 0%, rgba(192,192,192,.3) 100%);
}
div#login_left, div#login_right {
display: inline-block;
min-width: 250px;
padding-top: 10px;
text-align: center;
vertical-align: middle;
}
table.login_table tr td table.none tr td {
padding: 2px;
}
@@ -2058,7 +2078,7 @@ table.cal_month { border-spacing: 0px; }
.cal_current_month { border-top: 0; border-left: solid 1px #E0E0E0; border-right: 0; border-bottom: solid 1px #E0E0E0; }
.cal_other_month { border-top: 0; border-left: solid 1px #C0C0C0; border-right: 0; border-bottom: solid 1px #C0C0C0; }
.cal_current_month_right { border-right: solid 1px #E0E0E0; }
.cal_other_month_right { border-right: solid 1px #C0C0C0; }
.cal_other_month_right { border-right: solid 1px #C0C0C0; }
.cal_other_month { opacity: 0.6; background: #DDDDDD; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_past_month { opacity: 0.6; background: #EEEEEE; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }