Fix look and feel v14

This commit is contained in:
Laurent Destailleur 2021-03-24 23:44:50 +01:00
parent 6f01869bcb
commit 8b4870b8b2
6 changed files with 41 additions and 12 deletions

View File

@ -547,8 +547,8 @@ while ($i < min($num, $limit)) {
// Label
if (!empty($arrayfields['t.libelle']['checked'])) {
print '<td>';
print dol_trunc($obj->note, 128);
print '<td class="tdoverflowmax500" title="'.dol_escape_htmltag($obj->note).'">';
print $obj->note;
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -586,7 +586,7 @@ while ($i < min($num, $limit)) {
}
// Price
if (!empty($arrayfields['d.amount']['checked'])) {
print '<td class="right">'.price($obj->subscription).'</td>';
print '<td class="right amount">'.price($obj->subscription).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -1520,7 +1520,6 @@ class Categorie extends CommonObject
return $cats;
}
/**
* Returns categories whose id or name match
* add wildcards in the name unless $exact = true
@ -1555,7 +1554,7 @@ class Categorie extends CommonObject
$sql .= " AND entity IN (".getEntity('category').")";
if ($nom) {
if (!$exact) {
$nom = '%'.str_replace('*', '%', $nom).'%';
$nom = '%'.$this->db->escape(str_replace('*', '%', $nom)).'%';
}
if (!$case) {
$sql .= " AND label LIKE '".$this->db->escape($nom)."'";
@ -1564,7 +1563,7 @@ class Categorie extends CommonObject
}
}
if ($id) {
$sql .= " AND rowid = '".$id."'";
$sql .= " AND rowid = ".((int) $id);
}
$res = $this->db->query($sql);

View File

@ -116,15 +116,15 @@ if (empty($nosearch)) {
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("FoundCats").'</td></tr>';
foreach ($cats as $cat) {
$color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"';
print "\t".'<tr class="oddeven">'."\n";
print "\t\t<td>";
$categstatic->id = $cat->id;
$categstatic->ref = $cat->label;
$categstatic->label = $cat->label;
$categstatic->type = $cat->type;
$categstatic->color = $cat->color;
$color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"';
print "\t".'<tr class="oddeven">'."\n";
print "\t\t<td>";
print '<span class="noborderoncategories"'.$color.'>';
print $categstatic->getNomUrl(1, '');
print '</span>';

View File

@ -1525,13 +1525,13 @@ while ($i < min($num, $limit)) {
}
}
if (!empty($arrayfields['s.phone']['checked'])) {
print "<td>".dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n";
print '<td class="nowraponall">'.dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['s.fax']['checked'])) {
print "<td>".dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."</td>\n";
print '<td class="nowraponall">'.dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -364,6 +364,9 @@ td.rightborder {
border-right: 1px solid #ccc;
}
td.amount {
color: #006666;
}
td.actionbuttons a {
padding-left: 6px;
}
@ -1088,6 +1091,18 @@ select.flat.selectlimit {
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax400 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 400px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax500 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowauto {
max-width: 0;
overflow: auto;

View File

@ -555,6 +555,9 @@ td.rightborder {
border-right: 1px solid #ccc;
}
td.amount {
color: #006666;
}
td.actionbuttons a {
padding-left: 6px;
}
@ -1159,6 +1162,18 @@ select.flat.selectlimit {
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax400 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 400px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax500 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowauto {
max-width: 0;
overflow: auto;