Fix css and responsive pb

This commit is contained in:
Laurent Destailleur
2026-01-21 11:16:10 +01:00
parent 7e17711871
commit f8d9a2e829
5 changed files with 40 additions and 17 deletions

View File

@@ -1296,8 +1296,8 @@ if ($mode == 'marketplace') {
print '<div class="div-table-responsive-no-min">';
print '<table summary="list_of_modules" class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td colspan="2" class="hideonsmartphone">'.$form->textwithpicto($langs->trans("ModuleProviderSites"), $langs->trans("WebSiteDesc")).'</td>';
print '<td>';
print '<td colspan="2">'.$form->textwithpicto($langs->trans("ModuleProviderSites"), $langs->trans("WebSiteDesc")).'</td>';
print '<td class="hideonsmartphone">';
print '</td>';
print '<td></td>';
print '</tr>';
@@ -1412,8 +1412,9 @@ if ($mode == 'marketplace') {
print $remotestore->getPagination();
print '</form>';
print '</div></div>';
print '</div>';
print '<div class="clearboth"></div>';
print '</div>';
?>
<?php if (!empty($categories_tree)) { ?>
<div id="category-tree-left" class="paddingtop">

View File

@@ -534,7 +534,7 @@ class ExternalModules
} elseif ($this->versionCompare($product["dolibarr_min"], $dolibarrversiontouse) <= 0) {
if (!empty($product["dolibarr_max"]) && $product["dolibarr_max"] != 'auto' && $product["dolibarr_max"] != 'unknown' && $this->versionCompare($product["dolibarr_max"], $dolibarrversiontouse) >= 0) {
//compatible
$version = '<span class="compatible">'.$langs->trans(
$version = '<span class="compatible hideonsmartphone">'.$langs->trans(
'CompatibleUpTo',
$dolibarrversiontouse,
$product["dolibarr_min"],
@@ -543,7 +543,7 @@ class ExternalModules
$compatible = '';
} else {
// never compatible, module expired
$version = '<span class="warning hideonsmartphone">'.$langs->trans(
$version = '<span class="warning">'.$langs->trans(
'NotCompatible',
$dolibarrversiontouse,
$product["dolibarr_min"],
@@ -574,7 +574,7 @@ class ExternalModules
}
// Output the line
$html .= '<tr class="app oddeven nohover '.dol_escape_htmltag($compatible).'">';
$html .= '<tr class="'.(getDolOptimizeSmallScreen() ? 'app' : 'app app2').' oddeven nohover '.dol_escape_htmltag($compatible).'">';
// Logo
$html .= '<td class="center width150"><div class="newAppParent">';
@@ -585,17 +585,17 @@ class ExternalModules
$html .= '<td class="margeCote minwidth500imp"><h2 class="appTitle">';
$html .= dolPrintHTML(dol_string_nohtmltag(ucfirst($product["label"])));
if (!empty($product['author']) && $product['author'] != 'unkownauthor') {
$html .= '<small> &nbsp; - &nbsp; '.img_picto('', 'company', 'class="pictofixedwidth"');
$html .= '<span class="small"> &nbsp; - &nbsp; '.img_picto('', 'company', 'class="pictofixedwidth"');
if (!empty($product['author_url'])) {
$html .= '<a href="'.$product['author_url'].'" target="_blank">'.$product['author'].'</a>';
} else {
$html .= $product['author'];
}
$html .= '</small>';
$html .= '</span>';
}
$html .= '<br><small>';
$html .= '<br><span class="small">';
$html .= $version; // Version Dolibarr. No dol_escape_htmltag, it is already escape html
$html .= '</small>';
$html .= '</span>';
$html .= '</h2>';
$html .= '<small class="appDateCreation appRef"> ';
@@ -632,21 +632,32 @@ class ExternalModules
$html .= '<div class="storedesc">'.dolPrintHTML(dol_string_nohtmltag($product["description"])).'</div>';
$html .= '</td>';
if (getDolOptimizeSmallScreen()) {
$html .= '</tr><tr class="app2 oddeven nohover borderbottom '.dol_escape_htmltag($compatible).'">';
}
// Price - do not load if display none
$html .= '<td class="margeCote center amount">';
$html .= '<td class="margeCote center amount'.(getDolOptimizeSmallScreen() ? ' left" colspan="2"' : '"').'>';
$html .= $price;
$html .= '</td>';
if (!getDolOptimizeSmallScreen()) {
$html .= '</td>';
$html .= '<td class="margeCote nowraponall">';
}
// Links
$html .= '<td class="margeCote nowraponall">'.$download_link.'</td>';
$html .= $download_link;
$html .= '</td>';
$html .= '</tr>';
}
if (empty($this->products)) {
$html .= '<tr class=""><td colspan="3" class="center">';
$html .= '<br><br>';
$colspan = (getDolOptimizeSmallScreen() ? 1 : 3);
$langs->load("website");
$html .= '<tr class=""><td colspan="'.$colspan.'" class="center">';
$html .= '<br><br>';
$html .= $langs->trans("noResultsWereFound").'...';
$html .= '<br><br>';
$html .= '</td></tr>';

View File

@@ -124,7 +124,7 @@ div.divsearchfield {
tr.app {
height: 200px;
}
tr.app td {
tr.app2 td {
border-bottom: 1px solid #888;
}
div#newsDoli.tabBar {

View File

@@ -315,6 +315,17 @@ function getDolCurrency()
return (string) $conf->currency;
}
/**
* Return if render must be optimized for small screen
*
* @return string Value returned
*/
function getDolOptimizeSmallScreen()
{
global $conf;
return (string) $conf->dol_optimize_smallscreen;
}
/**
* Return the current entity
*

View File

@@ -64,7 +64,7 @@ $colorbacklinepair2 = '252,252,252'; // line pair
$colorbacklinepairhover = '240,242,249'; // line hover
$colorbacklinepairchecked = '240,242,249'; // line checked
$colorbacklinebreak = '248,247,244'; // line break
$colortexttitlenotab = '35,135,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
$colortexttitlenotab = '0,135,160'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
$colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120
$colortexttitle = '40, 40, 60';
$colortexttitlelink = '10, 20, 100';