Skip to content

Commit

Permalink
Fight against valign="top". Minor css fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 14, 2015
1 parent 7460721 commit 3e94cc0
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 89 deletions.
4 changes: 2 additions & 2 deletions htdocs/compta/bank/account.php
Expand Up @@ -313,13 +313,13 @@
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';

// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
print '</td></tr>';

// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$object->label.'</td></tr>';

print '</table>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/annuel.php
Expand Up @@ -144,7 +144,7 @@
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';

// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
if ($_GET["account"])
{
Expand Down Expand Up @@ -172,7 +172,7 @@
print '</td></tr>';

// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">';
if (! empty($id))
{
Expand Down
126 changes: 67 additions & 59 deletions htdocs/compta/bank/card.php

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions htdocs/compta/bank/graph.php
Expand Up @@ -441,7 +441,7 @@
$datas = array();
$datamin = array();
$dataall = array();

$subtotal = 0;

$day = $min;
Expand Down Expand Up @@ -483,7 +483,7 @@
if ($acct->min_desired) array_push($graph_datas[$i],$datamin[$i]);
if ($acct->min_allowed) array_push($graph_datas[$i],$dataall[$i]);
}

$px3 = new DolGraph();
$px3->SetData($graph_datas);
$arraylegends=array($langs->transnoentities("Balance"));
Expand Down Expand Up @@ -760,7 +760,7 @@
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';

// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
if ($account)
{
Expand Down Expand Up @@ -799,7 +799,7 @@
print '</td></tr>';

// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">';
if ($account && $_GET["option"]!='all')
{
Expand Down
6 changes: 3 additions & 3 deletions htdocs/compta/bank/releve.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
*
Expand Down Expand Up @@ -128,13 +128,13 @@
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';

// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print '</td></tr>';

// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$acct->label.'</td></tr>';

print '</table>';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/treso.php
Expand Up @@ -98,13 +98,13 @@
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';

// Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">';
print $form->showrefnav($acct, 'ref', $linkback, 1, 'ref');
print '</td></tr>';

// Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<tr><td>'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$acct->label.'</td></tr>';

print '</table>';
Expand Down
12 changes: 8 additions & 4 deletions htdocs/core/actions_fetchobject.inc.php
Expand Up @@ -25,15 +25,19 @@

// $action must be defined
// $object must be defined (object is loaded in this file with fetch)
// $cancel must be defined
// $id or $ref must be defined (object is loaded in this file with fetch)

if ($id > 0 || ! empty($ref))
if (($id > 0 || ! empty($ref)) && empty($cancel))
{
$ret = $object->fetch($id,$ref);
if ($ret > 0) {
if ($ret > 0)
{
$object->fetch_thirdparty();
$id=$object->id;
} else {
$id = $object->id;
}
else
{
setEventMessages($object->error, $object->errors, 'errors');
$action='';
}
Expand Down
8 changes: 4 additions & 4 deletions htdocs/expensereport/list.php
Expand Up @@ -177,7 +177,7 @@
if ($search_amount_ht) $param.="&search_amount_ht=".$search_amount_ht;
if ($search_amount_ttc) $param.="&search_amount_ttc=".$search_amount_ttc;
if ($search_status >= 0) $param.="&search_status=".$search_status;

print_barre_liste($langs->trans("ListTripsAndExpenses"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<table class="noborder" width="100%">';
Expand Down Expand Up @@ -221,9 +221,9 @@

// Amount with no taxe
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ht" value="'.$search_amount_ht.'"></td>';

print '<td class="liste_titre">&nbsp;</td>';

// Amount with all taxes
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="6" name="search_amount_ttc" value="'.$search_amount_ttc.'"></td>';

Expand Down Expand Up @@ -288,7 +288,7 @@
}
else
{
print '<td colspan="9">'.$langs->trans("NoRecordFound").'</td>';
print '<tr '.$bc[false].'>'.'<td colspan="9">'.$langs->trans("NoRecordFound").'</td></tr>';
}
print "</table>";

Expand Down
4 changes: 2 additions & 2 deletions htdocs/holiday/view_log.php
Expand Up @@ -88,8 +88,8 @@
print '<td>'.$user_action->getNomUrl(1).'</td>';
print '<td>'.$user_update->getNomUrl(1).'</td>';
print '<td>'.$logs_CP['type_action'].'</td>';
print '<td style="text-align: right;">'.$logs_CP['prev_solde'].' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.$logs_CP['new_solde'].' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.price2num($logs_CP['prev_solde'],8).' '.$langs->trans('days').'</td>';
print '<td style="text-align: right;">'.price2num($logs_CP['new_solde'],8).' '.$langs->trans('days').'</td>';
print '</tr>'."\n";

}
Expand Down
14 changes: 9 additions & 5 deletions htdocs/projet/tasks.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -38,6 +38,7 @@
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$backtopage=GETPOST('backtopage','alpha');
$cancel=GETPOST('cancel');

$mode = GETPOST('mode', 'alpha');
$mine = ($mode == 'mine' ? 1 : 0);
Expand All @@ -48,7 +49,7 @@
$extrafields_project = new ExtraFields($db);
$extrafields_task = new ExtraFields($db);

include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not includ_once
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once

if ($id > 0 || ! empty($ref))
{
Expand Down Expand Up @@ -85,7 +86,7 @@
$date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user');
$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');

if (empty($_POST["cancel"]))
if (! $cancel)
{
if (empty($label))
{
Expand Down Expand Up @@ -271,10 +272,11 @@
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="createtask">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';

if (! empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">';
if (! empty($mode)) print '<input type="hidden" name="mode" value="'.$mode.'">';

dol_fiche_head('');

print '<table class="border" width="100%">';

$defaultref='';
Expand Down Expand Up @@ -342,7 +344,9 @@

print '</table>';

print '<div align="center"><br>';
dol_fiche_end();

print '<div align="center">';
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
print ' &nbsp; &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
Expand Down
8 changes: 6 additions & 2 deletions htdocs/theme/eldy/style.css.php
Expand Up @@ -1680,8 +1680,12 @@
.border tbody tr, .border tbody tr td {
height: 20px;
}
div.tabBar table.border tr {
height: 20px;
div.tabBar table.border tr, div.tabBar table.border tr td {
height: 28px;
}
div.tabBar .tdtop {
vertical-align: top;
padding-top: 6px;
}

table.border td, div.border div div.tagtd {
Expand Down

0 comments on commit 3e94cc0

Please sign in to comment.