[+] Classes : added new class Media => It contains all the method related to media like CSS, JS

[+] Classes : added new method Media::addJquery(), Media::addJqueryUI(), Media::addJqueryPlugin()
[~] Deprecated : All method related to CCC has been moved in class Media
This commit is contained in:
vAugagneur
2011-09-30 13:01:10 +00:00
parent 6f2d02442d
commit e8901103e3
289 changed files with 5588 additions and 3517 deletions
+48
View File
@@ -0,0 +1,48 @@
<?php
header('content-type: text/css');
$css_folder = __DIR__.'/../js/jquery/';
$css_files = array(
'datepicker.css' =>
array('new_file' => $css_folder.'themes/base/jquery.ui.datepicker.css'),
'fileuploader.css' =>
array('new_file' => $css_folder.'plugins/ajaxfileupload/jquery.ajaxfileupload.css'),
'jquery.autocomplete.css' =>
array('new_file' => $css_folder.'plugins/autocomplete/jquery.autocomplete.css'),
'jquery.cluetip.css' =>
array('new_file' => $css_folder.'plugins/cluetip/jquery.cluetip.css'),
'jquery.fancybox-1.3.4.css' =>
array('new_file' => $css_folder.'plugins/fancybox/jquery.fancybox.css'),
'jquery.jgrowl.css'=>
array('new_file' => $css_folder.'plugins/jgrowl/jquery.jgrowl.css'),
'jquery.treeview.css' =>
array('new_file' => $css_folder.'plugins/treeview/jquery.treeview.css'),
'jqzoom.css' =>
array('new_file' => $css_folder.'plugins/jqzoom/jquery.jqzoom.css'),
'tabpane.css' =>
array('new_file' => $css_folder.'plugins/tabpane/jquery.tabpane.css'),
'thickbox.css' =>
array('new_file' => $css_folder.'plugins/thickbox/jquery.thickbox.css'),
'jquery.fancybox.css' =>
array('new_file' => $css_folder.'plugins/fancybox/jquery.fancybox.css'),
'jquery.autocomplete.css' =>
array('new_file' => $css_folder.'plugins/autocomplete/jquery.autocomplete.css')
);
$file = $_GET['file'];
if (!array_key_exists($file, $css_files)) //check if file is a real prestashop native CSS
die('file_not_found');
else
$html = file_get_contents($css_files[$file]['new_file']);
if ($file == 'datepicker.css')
{
$html .= file_get_contents($css_folder.'themes/base/jquery.ui.theme.css');
$html = str_replace('url(images', 'url(../themes/base/images', $html);
}
echo $html ;