Add global parameter defaultCSSfiles

This commit is contained in:
Benjamin Renard 2015-01-08 15:15:40 +01:00
parent bee41b3d9d
commit 3a6bd1ea06
3 changed files with 15 additions and 1 deletions

View file

@ -233,6 +233,14 @@ define('CONST2','val2')
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>$GLOBALS['defaultCSSfiles']</term>
<listitem>
<simpara>Tableau déterminant les fichiers CSS à charger sur toute les pages. Ces fichiers seront
chargés dans l'ordre et en dernier permettant de surcharger tous paramètres de style.</simpara>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</sect2> </sect2>

View file

@ -203,4 +203,5 @@ $GLOBALS['defaultJSscipts']=array(
'LSinfosBox.js' 'LSinfosBox.js'
); );
?> // CSS
$GLOBALS['defaultCSSfiles']=array();

View file

@ -1350,6 +1350,11 @@ class LSsession {
// Css // Css
self :: addCssFile("LSdefault.css"); self :: addCssFile("LSdefault.css");
if (isset($GLOBALS['defaultCSSfiles']) && is_array($GLOBALS['defaultCSSfiles'])) {
foreach ($GLOBALS['defaultCSSfiles'] as $file) {
self :: addCssFile($file);
}
}
$Css_txt=''; $Css_txt='';
foreach (self :: $CssFiles as $file) { foreach (self :: $CssFiles as $file) {
$Css_txt.="<link rel='stylesheet' type='text/css' href='".$file."' />\n"; $Css_txt.="<link rel='stylesheet' type='text/css' href='".$file."' />\n";