[+] 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:
@@ -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 ;
|
||||
Reference in New Issue
Block a user