From 7f683faa6e127cd334c7659858a176904b3274f4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 15 Jul 2009 15:58:10 +0000 Subject: [PATCH] Utilisation de la compression des css et js --- www/includeheader.php | 22 ++++++++++++++++------ www/includejs.php | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/www/includeheader.php b/www/includeheader.php index bd8a12bef..17b4c4776 100644 --- a/www/includeheader.php +++ b/www/includeheader.php @@ -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 ''; + if(ENVIRONNEMENT == 'DEV'){ + foreach($group['list'] as $style){ + print ''; + print "\n"; + } + }else{ + print ''; 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 ''; + if(ENVIRONNEMENT == 'DEV'){ + foreach($group['list'] as $script){ + print ''; + print "\n"; + } + }else{ + print ''; print "\n"; } } diff --git a/www/includejs.php b/www/includejs.php index 8917064f1..77821ef88 100644 --- a/www/includejs.php +++ b/www/includejs.php @@ -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'), ),