Look and feel v21

This commit is contained in:
Laurent Destailleur
2024-10-16 17:26:00 +02:00
parent d28ed5339b
commit 4f772f15e0
11 changed files with 155 additions and 111 deletions

View File

@@ -6365,13 +6365,13 @@ function load_fiche_titre($title, $morehtmlright = '', $picto = 'generic', $pict
$return .= "\n";
$return .= '<table '.($id ? 'id="'.$id.'" ' : '').'class="centpercent notopnoleftnoright table-fiche-title'.($morecssontable ? ' '.$morecssontable : '').'">'; // margin bottom must be same than into print_barre_list
$return .= '<tr class="titre">';
$return .= '<tr class="toptitle">';
if ($picto) {
$return .= '<td class="nobordernopadding widthpictotitle valignmiddle col-picto">'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).'</td>';
}
$return .= '<td class="nobordernopadding valignmiddle col-title">';
$return .= '<div class="titre inline-block">';
$return .= $title; // $title is already HTML sanitized content
$return .= '<span class="inline-block valignmiddle">'.$title.'</span>'; // $title is already HTML sanitized content
$return .= '</div>';
$return .= '</td>';
if (dol_strlen($morehtmlcenter)) {
@@ -6439,7 +6439,8 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '',
print "\n";
print "<!-- Begin print_barre_liste -->\n";
print '<table class="centpercent notopnoleftnoright table-fiche-title'.($morecss ? ' '.$morecss : '').'"><tr>'; // margin bottom must be same than into load_fiche_tire
print '<table class="centpercent notopnoleftnoright table-fiche-title'.($morecss ? ' '.$morecss : '').'">';
print '<tr class="toptitle">'; // margin bottom must be same than into load_fiche_tire
// Left
@@ -13547,21 +13548,24 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
*/
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
{
/*
global $conf;
if (!empty($conf->dol_no_mouse_hover)) {
$showonlyonhover = 0;
}*/
global $langs;
$tag = 'span'; // Using div (like any style of type 'block') does not work when using the js copy code.
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'">';
if ($texttoshow === 'none') {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint"></span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
$result .= '<'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'>';
$result .= '<span class="clipboardCPValueToPrint"></span>';
} elseif ($texttoshow) {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint">'.dol_escape_htmltag($texttoshow, 1, 1).'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
$result .= '<'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'>';
$result .= '<span class="clipboardCPValueToPrint">'.dol_escape_htmltag($texttoshow, 1, 1).'</span>';
} else {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
$result .= '<'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'>';
}
$result .= '<span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft pictomodule" title="'.dolPrintHTML($langs->trans("ClickToCopyToClipboard")).'"></span>';
$result .= img_picto('', 'tick', 'class="clipboardCPTick hidden paddingleft pictomodule"');
$result .= '<span class="clipboardCPText"></span>';
$result .= '</span>';
return $result;
}