Done #104. Autoload a coordination object css file when exists
This commit is contained in:
parent
e4b844b1a4
commit
8223485aee
@ -306,8 +306,13 @@ function mxPageHeaders($title, $keywords, $description, $classification, $author
|
|||||||
function mxCallCss($arrayCallCss)
|
function mxCallCss($arrayCallCss)
|
||||||
{
|
{
|
||||||
if ( $GLOBALS["SYSTEM_TEMPLATE"]->isMxBloc("CSSLOAD") && is_array($arrayCallCss) && count($arrayCallCss)>0 )
|
if ( $GLOBALS["SYSTEM_TEMPLATE"]->isMxBloc("CSSLOAD") && is_array($arrayCallCss) && count($arrayCallCss)>0 )
|
||||||
// if ( is_array($arrayCallCss) && count($arrayCallCss)>0 )
|
|
||||||
{
|
{
|
||||||
|
// Auto loading of custom ccs file located in coordination object
|
||||||
|
if(is_file($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className)."/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className).".css"))
|
||||||
|
{
|
||||||
|
$arrayCallCss[] = $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className)."/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className).".css";
|
||||||
|
}
|
||||||
|
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("CSSLOAD", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."headers/css.mxt");
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("CSSLOAD", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."headers/css.mxt");
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("CSSLOAD", "appe");
|
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("CSSLOAD", "appe");
|
||||||
|
|
||||||
@ -315,7 +320,6 @@ function mxCallCss($arrayCallCss)
|
|||||||
{
|
{
|
||||||
if( is_string( $arrayCallCss[$j]) )
|
if( is_string( $arrayCallCss[$j]) )
|
||||||
{
|
{
|
||||||
// var_dump($arrayCallCss[$j]);
|
|
||||||
$GLOBALS['SYSTEM_TEMPLATE']->MxText("blocCSS".".hrefcss", $arrayCallCss[$j]);
|
$GLOBALS['SYSTEM_TEMPLATE']->MxText("blocCSS".".hrefcss", $arrayCallCss[$j]);
|
||||||
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocIntegrity", "delete");
|
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocIntegrity", "delete");
|
||||||
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocOrigin", "delete");
|
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocOrigin", "delete");
|
||||||
@ -328,6 +332,19 @@ function mxCallCss($arrayCallCss)
|
|||||||
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS", "loop");
|
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS", "loop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("");
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// Auto loading of custom ccs file located in coordination object
|
||||||
|
if(is_file($GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className)."/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className).".css"))
|
||||||
|
{
|
||||||
|
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("CSSLOAD", "modify", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."headers/css.mxt");
|
||||||
|
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("CSSLOAD", "appe");
|
||||||
|
|
||||||
|
$GLOBALS['SYSTEM_TEMPLATE']->MxText("blocCSS".".hrefcss", $GLOBALS['SYSTEM_TEMPLATE_PATH'].$GLOBALS['SYSTEM_TEMPLATE_DIR']."object_coordination/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className)."/".strtolower($GLOBALS["SYSTEM_CONTROL"]->className).".css");
|
||||||
|
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocIntegrity", "delete");
|
||||||
|
$GLOBALS['SYSTEM_TEMPLATE']->MxBloc("blocCSS".".blocOrigin", "delete");
|
||||||
|
|
||||||
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("");
|
$GLOBALS["SYSTEM_TEMPLATE"]->WithMxPath("");
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@ -336,6 +353,7 @@ function mxCallCss($arrayCallCss)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fonction d'inclusion des appels de scripts Javascript
|
* fonction d'inclusion des appels de scripts Javascript
|
||||||
|
Loading…
x
Reference in New Issue
Block a user