Fix alignement
This commit is contained in:
parent
937d0418b4
commit
5d148a8a99
@ -1079,16 +1079,16 @@ if ($step == 4 && $datatoimport) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$height = '24px'; //needs px for css height attribute below
|
$height = '32px'; //needs px for css height attribute below
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$mandatoryfieldshavesource = true;
|
$mandatoryfieldshavesource = true;
|
||||||
|
|
||||||
print '<table width="100%" class="nobordernopadding">';
|
print '<table class="nobordernopadding centpercent tableimport">';
|
||||||
foreach ($fieldstarget as $code => $line) {
|
foreach ($fieldstarget as $code => $line) {
|
||||||
if ($i == $minpos) {
|
if ($i == $minpos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
print '<tr class="oddeven" style="height:'.$height.'">';
|
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
|
||||||
$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]);
|
||||||
|
|
||||||
$tablealias = preg_replace('/(\..*)$/i', '', $code);
|
$tablealias = preg_replace('/(\..*)$/i', '', $code);
|
||||||
@ -1116,6 +1116,7 @@ if ($step == 4 && $datatoimport) {
|
|||||||
print '</option>';
|
print '</option>';
|
||||||
print $optionsnotused;
|
print $optionsnotused;
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
//print ajax_combobox('selectorderimport_'.($i+1));
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td class="nowraponall" style="font-weight:normal; text-align:right">';
|
print '<td class="nowraponall" style="font-weight:normal; text-align:right">';
|
||||||
$filecolumn = !empty($array_match_database_to_file[$code])?$array_match_database_to_file[$code]:0;
|
$filecolumn = !empty($array_match_database_to_file[$code])?$array_match_database_to_file[$code]:0;
|
||||||
@ -1224,7 +1225,7 @@ if ($step == 4 && $datatoimport) {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax) {
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
print '<script type="text/javascript">'."\n";
|
print '<script type="text/javascript">'."\n";
|
||||||
print 'var previousselectedvalueimport = "0";'."\n";
|
print 'var previousselectedvalueimport = "0";'."\n";
|
||||||
print 'var previousselectedlabelimport = "0";'."\n";
|
print 'var previousselectedlabelimport = "0";'."\n";
|
||||||
@ -1232,7 +1233,7 @@ if ($step == 4 && $datatoimport) {
|
|||||||
print '$(".targetselectchange").focus(function(){'."\n";
|
print '$(".targetselectchange").focus(function(){'."\n";
|
||||||
print 'previousselectedvalueimport = $(this).val();'."\n";
|
print 'previousselectedvalueimport = $(this).val();'."\n";
|
||||||
print 'previousselectedlabelimport = $(this).children("option:selected").text();'."\n";
|
print 'previousselectedlabelimport = $(this).children("option:selected").text();'."\n";
|
||||||
print 'console.log(previousselectedvalueimport)'."\n";
|
print 'console.log("previousselectedvalueimport="+previousselectedvalueimport)'."\n";
|
||||||
print '})'."\n";
|
print '})'."\n";
|
||||||
print '$(".targetselectchange").change(function(){'."\n";
|
print '$(".targetselectchange").change(function(){'."\n";
|
||||||
print 'if(previousselectedlabelimport != "" && previousselectedvalueimport != -1){'."\n";
|
print 'if(previousselectedlabelimport != "" && previousselectedvalueimport != -1){'."\n";
|
||||||
@ -1259,15 +1260,17 @@ if ($step == 4 && $datatoimport) {
|
|||||||
print 'value = $(this).val()'."\n";
|
print 'value = $(this).val()'."\n";
|
||||||
print 'arrayselectedfields.push(value);'."\n";
|
print 'arrayselectedfields.push(value);'."\n";
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
print '$.ajax({'."\n";
|
|
||||||
print 'type: "POST",'."\n";
|
print "$.ajax({\n";
|
||||||
print 'dataType: "json",'."\n";
|
print " type: 'POST',\n";
|
||||||
print 'url: "'.$_SERVER["PHP_SELF"].'?action=saveselectorder",'."\n";
|
print " dataType: 'json',\n";
|
||||||
print 'data: "selectorder="+arrayselectedfields.toString(),'."\n";
|
print " url: '".dol_escape_js($_SERVER["PHP_SELF"])."?action=saveselectorder&token=".newToken()."',\n";
|
||||||
print 'success: function(){'."\n";
|
print " data: 'selectorder='+arrayselectedfields.toString(),\n";
|
||||||
print 'console.log("Select order saved");'."\n";
|
print " success: function(){\n";
|
||||||
print '},'."\n";
|
print " console.log('Select order saved');\n";
|
||||||
|
print " },\n";
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
|
|
||||||
print '});'."\n";
|
print '});'."\n";
|
||||||
print '})'."\n";
|
print '})'."\n";
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
@ -2174,24 +2177,24 @@ $db->close();
|
|||||||
*/
|
*/
|
||||||
function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
|
function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
|
||||||
{
|
{
|
||||||
global $langs, $bc;
|
global $langs;
|
||||||
|
|
||||||
$height = '28px';
|
$height = '32px';
|
||||||
|
|
||||||
if ($key == 'none') {
|
if ($key == 'none') {
|
||||||
//stop multiple duplicate ids with no number
|
//stop multiple duplicate ids with no number
|
||||||
print "\n\n<!-- Box_no-key start-->\n";
|
print "\n\n<!-- Box_no-key start-->\n";
|
||||||
print '<div class="box boximport" style="padding:0;">'."\n";
|
print '<div class="box boximport" style="padding:0;">'."\n";
|
||||||
print '<table summary="boxtable_no-key" width="100%" class="nobordernopadding">'."\n";
|
print '<table summary="boxtable_no-key" class="centpercent nobordernopadding">'."\n";
|
||||||
} else {
|
} else {
|
||||||
print "\n\n<!-- Box ".$pos." start -->\n";
|
print "\n\n<!-- Box ".$pos." start -->\n";
|
||||||
print '<div class="box boximport" style="padding: 0;" id="boxto_'.$pos.'">'."\n";
|
print '<div class="box boximport" style="padding: 0;" id="boxto_'.$pos.'">'."\n";
|
||||||
|
|
||||||
print '<table summary="boxtable'.$pos.'" width="100%" class="nobordernopadding">'."\n";
|
print '<table summary="boxtable'.$pos.'" class="nobordernopadding centpercent tableimport">'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($pos && $pos > count($fieldssource)) && (!isset($fieldssource[$pos]["imported"]))) { // No fields
|
if (($pos && $pos > count($fieldssource)) && (!isset($fieldssource[$pos]["imported"]))) { // No fields
|
||||||
print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">';
|
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
|
||||||
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
||||||
//print img_picto(($pos > 0 ? $langs->trans("MoveField", $pos) : ''), 'grip_title', 'class="boxhandle" style="cursor:move;"');
|
//print img_picto(($pos > 0 ? $langs->trans("MoveField", $pos) : ''), 'grip_title', 'class="boxhandle" style="cursor:move;"');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -2200,7 +2203,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} elseif ($key == 'none') { // Empty line
|
} elseif ($key == 'none') { // Empty line
|
||||||
print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">';
|
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
|
||||||
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -2210,7 +2213,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
// Print field of source file
|
// Print field of source file
|
||||||
print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">';
|
print '<tr style="height:'.$height.'" class="trimport oddevenimport">';
|
||||||
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
||||||
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
||||||
//print img_picto($langs->trans("MoveField", $pos), 'grip_title', 'class="boxhandle" style="cursor:move;"');
|
//print img_picto($langs->trans("MoveField", $pos), 'grip_title', 'class="boxhandle" style="cursor:move;"');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user