Update code using new css class

This commit is contained in:
philippe grand 2017-04-25 11:59:18 +02:00
parent 215ef30abe
commit e2dbcb2b5a
13 changed files with 26 additions and 45 deletions

View File

@ -96,9 +96,7 @@ print "</tr>\n";
foreach ($list as $key) foreach ($list as $key)
{ {
print '<tr class="oddeven value">';
print '<tr '.$bc[$var].' class="value">';
// Param // Param
$label = $langs->trans($key); $label = $langs->trans($key);

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com> * Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
@ -651,11 +651,10 @@ if ($resql)
// Lines with values // Lines with values
while ($i < $num) while ($i < $num)
{ {
$var = ! $var;
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
//print_r($obj); //print_r($obj);
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">'; print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{ {
$tmpaction='edit'; $tmpaction='edit';
@ -689,7 +688,7 @@ if ($resql)
// Show value for field // Show value for field
if ($showfield) { if ($showfield) {
print '</tr><tr '.$bc[$var].' nohover tr-'.$tmpfieldlist.'-'.$rowid.' "><td colspan="5">'; // To create an artificial CR for the current tr we are on print '</tr><tr class="oddeven" nohover tr-'.$tmpfieldlist.'-'.$rowid.' "><td colspan="5">'; // To create an artificial CR for the current tr we are on
$okforextended = true; $okforextended = true;
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
$okforextended = false; $okforextended = false;
@ -781,7 +780,7 @@ if ($resql)
// Show value for field // Show value for field
if ($showfield) { if ($showfield) {
print '</tr><tr '.$bc[$var].' nohover tr-'.$tmpfieldlist.'-'.$i.' "><td colspan="5">'; // To create an artificial CR for the current tr we are on print '</tr><tr class="oddeven" nohover tr-'.$tmpfieldlist.'-'.$i.' "><td colspan="5">'; // To create an artificial CR for the current tr we are on
$okforextended = true; $okforextended = true;
if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
$okforextended = false; $okforextended = false;

View File

@ -428,8 +428,6 @@ $h++;
print "<br>\n"; print "<br>\n";
$var=true;
if ($mode == 'common') if ($mode == 'common')
{ {
@ -782,7 +780,7 @@ if ($mode == 'marketplace')
print '</tr>'; print '</tr>';
print "<tr ".$bc[$var].">\n"; print "<tr class=\"oddeven\">\n";
$url='https://www.dolistore.com'; $url='https://www.dolistore.com';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>'; print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td>'.$langs->trans("DoliStoreDesc").'</td>'; print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
@ -790,7 +788,7 @@ if ($mode == 'marketplace')
print '</tr>'; print '</tr>';
print "<tr ".$bc[$var].">\n"; print "<tr class=\"oddeven\">\n";
$url='https://partners.dolibarr.org'; $url='https://partners.dolibarr.org';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>'; print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>'; print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';

View File

@ -93,7 +93,6 @@ print $langs->trans("ListOfSupportedOauthProviders").'<br><br>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
$var = true;
$i=0; $i=0;
foreach ($list as $key) foreach ($list as $key)
@ -116,31 +115,27 @@ foreach ($list as $key)
if ($supported) if ($supported)
{ {
$redirect_uri=$urlwithroot.'/core/modules/oauth/'.$supportedoauth2array[$key[0]].'_oauthcallback.php'; $redirect_uri=$urlwithroot.'/core/modules/oauth/'.$supportedoauth2array[$key[0]].'_oauthcallback.php';
$var = !$var; print '<tr class="oddeven value">';
print '<tr '.$bc[$var].' class="value">';
print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>'; print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>';
print '<td><input style="width: 80%" type"text" name="uri'.$key[0].'" value="'.$redirect_uri.'">'; print '<td><input style="width: 80%" type"text" name="uri'.$key[0].'" value="'.$redirect_uri.'">';
print '</td></tr>'; print '</td></tr>';
} }
else else
{ {
$var = !$var; print '<tr class="oddeven value">';
print '<tr '.$bc[$var].' class="value">';
print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>'; print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>';
print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>'; print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>';
print '</td></tr>'; print '</td></tr>';
} }
// Api Id // Api Id
$var = !$var; print '<tr class="oddeven value">';
print '<tr '.$bc[$var].' class="value">';
print '<td><label for="'.$key[1].'">'.$langs->trans($key[1]).'</label></td>'; print '<td><label for="'.$key[1].'">'.$langs->trans($key[1]).'</label></td>';
print '<td><input type="text" size="100" id="'.$key[1].'" name="'.$key[1].'" value="'.$conf->global->{$key[1]}.'">'; print '<td><input type="text" size="100" id="'.$key[1].'" name="'.$key[1].'" value="'.$conf->global->{$key[1]}.'">';
print '</td></tr>'; print '</td></tr>';
// Api Secret // Api Secret
$var = !$var; print '<tr class="oddeven value">';
print '<tr '.$bc[$var].' class="value">';
print '<td><label for="'.$key[2].'">'.$langs->trans($key[2]).'</label></td>'; print '<td><label for="'.$key[2].'">'.$langs->trans($key[2]).'</label></td>';
print '<td><input type="password" size="100" id="'.$key[2].'" name="'.$key[2].'" value="'.$conf->global->{$key[2]}.'">'; print '<td><input type="password" size="100" id="'.$key[2].'" name="'.$key[2].'" value="'.$conf->global->{$key[2]}.'">';
print '</td></tr>'; print '</td></tr>';

View File

@ -140,7 +140,6 @@ if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $i = 0;
$var = True;
$oldmod = ""; $oldmod = "";
while ($i < $num) while ($i < $num)
@ -187,8 +186,7 @@ if ($result)
} }
print '<tr '. $bc[$var].'>'; print '<tr class="oddeven">';
print '<td>'.img_object('',$picto).' '.$objMod->getName(); print '<td>'.img_object('',$picto).' '.$objMod->getName();
print '<a name="'.$objMod->getName().'">&nbsp;</a>'; print '<a name="'.$objMod->getName().'">&nbsp;</a>';

View File

@ -99,7 +99,7 @@ foreach ($list as $key)
{ {
print '<tr '.$bc[$var].' class="value">'; print '<tr class="oddeven value">';
// Param // Param
$label = $langs->trans($key); $label = $langs->trans($key);

View File

@ -5,7 +5,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -361,7 +361,6 @@ foreach ($dirmodels as $reldir)
if (is_dir($dir)) if (is_dir($dir))
{ {
$var=true;
$handle=opendir($dir); $handle=opendir($dir);
@ -379,7 +378,7 @@ foreach ($dirmodels as $reldir)
$module = new $classname($db, new FactureFournisseur($db)); $module = new $classname($db, new FactureFournisseur($db));
print "<tr ".$bc[$var].">\n"; print "<tr class=\"oddeven\">\n";
print "<td>"; print "<td>";
print (empty($module->name)?$name:$module->name); print (empty($module->name)?$name:$module->name);
print "</td>\n"; print "</td>\n";

View File

@ -5,7 +5,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -382,7 +382,6 @@ print '</tr>'."\n";
clearstatcache(); clearstatcache();
$var=true;
foreach ($dirmodels as $reldir) foreach ($dirmodels as $reldir)
{ {
$dir = dol_buildpath($reldir."core/modules/supplier_order/pdf/"); $dir = dol_buildpath($reldir."core/modules/supplier_order/pdf/");
@ -403,7 +402,7 @@ foreach ($dirmodels as $reldir)
$module = new $classname($db, new CommandeFournisseur($db)); $module = new $classname($db, new CommandeFournisseur($db));
print "<tr ".$bc[$var].">\n"; print "<tr class=\"oddeven\">\n";
print "<td>"; print "<td>";
print (empty($module->name)?$name:$module->name); print (empty($module->name)?$name:$module->name);
print "</td>\n"; print "</td>\n";

View File

@ -367,7 +367,6 @@ foreach ($dirmodels as $reldir)
if (is_dir($dir)) if (is_dir($dir))
{ {
$var=true;
$handle=opendir($dir); $handle=opendir($dir);
@ -385,7 +384,7 @@ foreach ($dirmodels as $reldir)
$module = new $classname($db, new PaiementFourn($db)); $module = new $classname($db, new PaiementFourn($db));
print "<tr ".$bc[$var].">\n"; print "<tr class=\"oddeven\">\n";
print "<td>"; print "<td>";
print (empty($module->name)?$name:$module->name); print (empty($module->name)?$name:$module->name);
print "</td>\n"; print "</td>\n";

View File

@ -194,7 +194,6 @@ print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Value").'</td>'; print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Value").'</td>';
print '<td align="right" colspan="2"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>'; print '<td align="right" colspan="2"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n"; print "</tr>\n";
$var=true;
foreach ($syslogModules as $moduleName) foreach ($syslogModules as $moduleName)
{ {
@ -207,7 +206,7 @@ foreach ($syslogModules as $moduleName)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td width="140">'; print '<td width="140">';
print '<input '.$bc[$var].' type="checkbox" name="SYSLOG_HANDLERS[]" value="'.$moduleName.'" '.(in_array($moduleName, $activeModules) ? 'checked' : '').($moduleactive <= 0 ? 'disabled' : '').'> '; print '<input class="oddeven" type="checkbox" name="SYSLOG_HANDLERS[]" value="'.$moduleName.'" '.(in_array($moduleName, $activeModules) ? 'checked' : '').($moduleactive <= 0 ? 'disabled' : '').'> ';
print $module->getName(); print $module->getName();
print '</td>'; print '</td>';

View File

@ -136,10 +136,10 @@ else
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>'; print '<td colspan="2">'.$langs->trans('OptionVatMode').'</td><td>'.$langs->trans('Description').'</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr '.$bc[false].'><td width="200"><input type="radio" name="tax_mode" value="0"'.($tax_mode != 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDefault').'</td>'; print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="0"'.($tax_mode != 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDefault').'</td>';
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDefaultDesc')); print '<td colspan="2">'.nl2br($langs->trans('OptionVatDefaultDesc'));
print "</td></tr>\n"; print "</td></tr>\n";
print '<tr '.$bc[true].'><td width="200"><input type="radio" name="tax_mode" value="1"'.($tax_mode == 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDebitOption').'</td>'; print '<tr class="oddeven"><td width="200"><input type="radio" name="tax_mode" value="1"'.($tax_mode == 1 ? ' checked' : '').'> '.$langs->trans('OptionVATDebitOption').'</td>';
print '<td colspan="2">'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n"; print '<td colspan="2">'.nl2br($langs->trans('OptionVatDebitOptionDesc'))."</td></tr>\n";
print "</table>\n"; print "</table>\n";
@ -152,7 +152,7 @@ else
print '<tr class="liste_titre"><td>&nbsp;</td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>'; print '<tr class="liste_titre"><td>&nbsp;</td><td>'.$langs->trans("Buy").'</td><td>'.$langs->trans("Sell").'</td></tr>';
// Products // Products
print '<tr '.$bc[false].'><td>'.$langs->trans("Product").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("Product").'</td>';
print '<td>'; print '<td>';
print $langs->trans("OnDelivery"); print $langs->trans("OnDelivery");
print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; print ' ('.$langs->trans("SupposedToBeInvoiceDate").')';
@ -163,7 +163,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Services // Services
print '<tr '.$bc[true].'><td>'.$langs->trans("Services").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("Services").'</td>';
print '<td>'; print '<td>';
if ($tax_mode == 0) if ($tax_mode == 0)
{ {
@ -206,7 +206,7 @@ foreach ($list as $key)
{ {
print '<tr '.$bc[$var].' class="value">'; print '<tr class="oddeven value">';
// Param // Param
$label = $langs->trans($key); $label = $langs->trans($key);

View File

@ -450,7 +450,6 @@ if ($id)
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
$var=true;
if ($num) if ($num)
{ {
// There is several pages // There is several pages
@ -499,11 +498,10 @@ if ($id)
// Lines with values // Lines with values
while ($i < $num) while ($i < $num)
{ {
$var = ! $var;
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
//print_r($obj); //print_r($obj);
print '<tr '.$bc[$var].' id="rowid-'.$obj->rowid.'">'; print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{ {
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">'; print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';

View File

@ -120,8 +120,7 @@ foreach($workflowcodes as $key => $params)
$oldfamily = $family; $oldfamily = $family;
} }
$var = !$var; print "<tr class=\"oddeven\">\n";
print "<tr ".$bc[$var].">\n";
print "<td>".img_object('', $picto).$langs->trans('desc'.$key); print "<td>".img_object('', $picto).$langs->trans('desc'.$key);
if (! empty($params['warning'])) if (! empty($params['warning']))
{ {