Responsive

This commit is contained in:
Laurent Destailleur 2022-11-22 15:48:29 +01:00
parent 3d8404ecb3
commit f15c7a1e80

View File

@ -1637,7 +1637,7 @@ if ($id > 0) {
if ($showfield) { if ($showfield) {
if ($value == 'country') { if ($value == 'country') {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth150 maxwidthonsmartphone'); print $form->select_country($search_country_id, 'search_country_id', '', 28, 'minwidth100 maxwidth150 maxwidthonsmartphone');
print '</td>'; print '</td>';
$filterfound++; $filterfound++;
} elseif ($value == 'code') { } elseif ($value == 'code') {
@ -2128,7 +2128,7 @@ if ($id > 0) {
$class .= ' right'; $class .= ' right';
} }
if (in_array($value, array('localtax1_type', 'localtax2_type'))) { if (in_array($value, array('localtax1_type', 'localtax2_type'))) {
$class .= ' nowrap'; $class .= ' nowraponall';
} }
if (in_array($value, array('use_default', 'fk_parent', 'sortorder'))) { if (in_array($value, array('use_default', 'fk_parent', 'sortorder'))) {
$class .= ' center'; $class .= ' center';
@ -2273,8 +2273,9 @@ if ($id > 0) {
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("Dictionary").'</td>'; print '<td>'.$langs->trans("Dictionary").'</td>';
print '<td></td>'; print '<td></td>';
print '<td class="hideonsmartphone"></td>';
print '</tr>'; print '</tr>';
$showemptyline = ''; $showemptyline = '';
@ -2285,13 +2286,13 @@ if ($id > 0) {
if ($i) { if ($i) {
if ($showemptyline) { if ($showemptyline) {
print '<tr class="oddeven"><td width="50%">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>'; print '<tr class="oddeven"><td></td><td></td><td class="hideonsmartphone"></td></tr>';
$showemptyline = 0; $showemptyline = 0;
} }
$value = $tabname[$i]; $value = $tabname[$i];
print '<tr class="oddeven"><td width="50%">'; print '<tr class="oddeven"><td class="minwidth200">';
if (!empty($tabcond[$i])) { if (!empty($tabcond[$i])) {
$tabnamenoprefix = preg_replace('/'.MAIN_DB_PREFIX.'/', '', $tabname[$i]); $tabnamenoprefix = preg_replace('/'.MAIN_DB_PREFIX.'/', '', $tabname[$i]);
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$i.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$i.'">';
@ -2309,7 +2310,7 @@ if ($id > 0) {
print img_picto('Edit', 'edit', ''); print img_picto('Edit', 'edit', '');
print '</a>'; print '</a>';
print '</td>'; print '</td>';
print '<td class="right">'; print '<td class="right hideonsmartphone">';
print $form->textwithpicto('', $langs->trans("Table").': '.MAIN_DB_PREFIX.$tabname[$i]); print $form->textwithpicto('', $langs->trans("Table").': '.MAIN_DB_PREFIX.$tabname[$i]);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -2374,7 +2375,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
} // For state page, we do not show the country input (we link to region, not country) } // For state page, we do not show the country input (we link to region, not country)
print '<td>'; print '<td>';
$fieldname = 'country'; $fieldname = 'country';
print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth150 maxwidthonsmartphone'); print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'minwidth100 maxwidth150 maxwidthonsmartphone');
print '</td>'; print '</td>';
} elseif ($value == 'country_id') { } elseif ($value == 'country_id') {
if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate) if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate)