Merge pull request #9120 from grandoc/new_branch_18_07_2018

clean and update code
This commit is contained in:
Laurent Destailleur 2018-07-24 17:33:22 +02:00 committed by GitHub
commit dc34794ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 9 deletions

View File

@ -905,12 +905,11 @@ if ($step == 4 && $datatoimport)
$height=24; $height=24;
$i = 0; $i = 0;
$mandatoryfieldshavesource=true; $mandatoryfieldshavesource=true;
$var=true;
print '<table width="100%" class="nobordernopadding">'; print '<table width="100%" class="nobordernopadding">';
foreach($fieldstarget as $code=>$label) foreach($fieldstarget as $code=>$label)
{ {
$var = !$var; print '<tr class="oddeven" height="'.$height.'">';
print '<tr '.$bc[$var].' height="'.$height.'">';
$i++; $i++;
$entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]); $entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]);

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop> * Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* *
* 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
@ -586,7 +586,7 @@ else
print '</div>'; print '</div>';
/* /*
* Lignes produits * Products lines
*/ */
$num_prod = count($object->lines); $num_prod = count($object->lines);
@ -683,7 +683,7 @@ else
$line->array_options = array_merge($line->array_options, $srcLine->array_options); $line->array_options = array_merge($line->array_options, $srcLine->array_options);
} }
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print $line->showOptionals($extrafieldsline, $mode, array('style'=>$bc[$var], 'colspan'=>$colspan),$i); print $line->showOptionals($extrafieldsline, $mode, array('style'=>'class="oddeven"', 'colspan'=>$colspan),$i);
print '</tr>'; print '</tr>';
} }

View File

@ -658,7 +658,6 @@ if (! empty($conf->global->PRODUCT_CANVAS_ABILITY))
{ {
// Add canvas feature // Add canvas feature
$dir = DOL_DOCUMENT_ROOT . "/product/canvas/"; $dir = DOL_DOCUMENT_ROOT . "/product/canvas/";
$var = false;
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ProductSpecial").'</td>'."\n"; print '<td>'.$langs->trans("ProductSpecial").'</td>'."\n";
@ -686,8 +685,7 @@ if (! empty($conf->global->PRODUCT_CANVAS_ABILITY))
if ($conf->$module->enabled) if ($conf->$module->enabled)
{ {
print '<tr class="oddeven"><td>';
print "<tr ".$bc[$var]."><td>";
print $object->description; print $object->description;