Utilisation de la compression des css et js
This commit is contained in:
parent
db921cfaa0
commit
7f683faa6e
@ -3,10 +3,15 @@ require_once 'includecss.php';
|
||||
if($sortie!='prt') require_once 'includejs.php';
|
||||
|
||||
if(isset($tabStyles) && count($tabStyles)>0){
|
||||
foreach($tabStyles as $group){
|
||||
foreach($tabStyles as $name => $group){
|
||||
if( in_array('all', $group['pages']) || in_array($page, $group['pages']) ){
|
||||
foreach($group['list'] as $style){
|
||||
print '<link rel="stylesheet" type="text/css" href="./css/'.$style.'" />';
|
||||
if(ENVIRONNEMENT == 'DEV'){
|
||||
foreach($group['list'] as $style){
|
||||
print '<link rel="stylesheet" type="text/css" href="./css/'.$style.'" />';
|
||||
print "\n";
|
||||
}
|
||||
}else{
|
||||
print '<link rel="stylesheet" type="text/css" href="./min/?g='.$name.'"/>';
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
@ -14,10 +19,15 @@ if(isset($tabStyles) && count($tabStyles)>0){
|
||||
}
|
||||
|
||||
if(isset($tabScripts) && count($tabScripts)>0){
|
||||
foreach($tabScripts as $group){
|
||||
foreach($tabScripts as $name => $group){
|
||||
if(in_array('all', $group['pages']) || in_array($page, $group['pages'])){
|
||||
foreach($group['list'] as $script){
|
||||
print '<script type="text/javascript" src="./js/'.$script.'"></script>';
|
||||
if(ENVIRONNEMENT == 'DEV'){
|
||||
foreach($group['list'] as $script){
|
||||
print '<script type="text/javascript" src="./js/'.$script.'"></script>';
|
||||
print "\n";
|
||||
}
|
||||
}else{
|
||||
print '<script type="text/javascript" src="./min/?g='.$name.'"></script>';
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//Inclusion des js en fonction de la variable page
|
||||
$tabScripts = array(
|
||||
'scripts' => array(
|
||||
'list' => array('jquery.js', 'jquery.bgiframe.min.js', 'jquery.autocomplete.js', 'dropDownOverlapping.js', 'menu.js', 'scripts.js'),
|
||||
'list' => array('jquery.js', 'jquery.bgiframe.js', 'jquery.autocomplete.js', 'dropDownOverlapping.js', 'menu.js', 'scripts.js'),
|
||||
//Pour le nouveau menu ajout : jquery.dimensions.js, jquery.easing.js, jquery-ui.js
|
||||
'pages' => array('all'),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user