mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX Responsive errors due to boxes
This commit is contained in:
@@ -182,6 +182,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
global $langs, $user, $conf;
|
||||
|
||||
// Trick to get result into a var from a function that makes print instead of return
|
||||
// TODO Replace ob_start with param nooutput=1 into showBox
|
||||
ob_start();
|
||||
$result = $this->showBox($head, $contents);
|
||||
$output = ob_get_contents();
|
||||
@@ -191,14 +192,14 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
}
|
||||
|
||||
/**
|
||||
*Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
|
||||
* Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
*
|
||||
* @param int $nooutput No print, only return string
|
||||
* @return void
|
||||
*/
|
||||
function showBox($head = null, $contents = null)
|
||||
function showBox($head = null, $contents = null, $nooutput=0)
|
||||
{
|
||||
global $langs, $user, $conf;
|
||||
|
||||
@@ -242,7 +243,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
$out.= '>';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
$out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td>';
|
||||
$out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td class="tdoverflow maxwidth300onsmartphone">';
|
||||
}
|
||||
if (! empty($head['text']))
|
||||
{
|
||||
@@ -358,13 +359,16 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
}
|
||||
} else {
|
||||
dol_syslog(get_class($this).'::showBoxCached');
|
||||
$out = dol_readcachefile($cachedir, $filename);
|
||||
print "<!-- Box ".get_class($this)." from cache -->";
|
||||
|
||||
$out = "<!-- Box ".get_class($this)." from cache -->";
|
||||
$out.= dol_readcachefile($cachedir, $filename);
|
||||
}
|
||||
print $out;
|
||||
}
|
||||
|
||||
|
||||
if ($nooutput) return $out;
|
||||
else print $out;
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user