mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
1. JS/CSS 파일 제거 문법 추가
: Context.class.php에 unloadCSSFile, unloadJsFile 추가 (파일명과 옵션이 일치해야 제거됨) : templateHandler에 <!--%unload(..)--> 추가 2. optmized된 JS/CSS 통합 파일을 제일 먼저 불러오도록 순서 변경 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4580 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2f44b9c980
commit
81ac933a7a
3 changed files with 97 additions and 4 deletions
|
|
@ -46,10 +46,12 @@
|
|||
// 캐시 디렉토리가 없으면 실행하지 않음
|
||||
if(!is_dir($this->cache_path)) return $this->_getOptimizedRemoved($source_files);
|
||||
|
||||
$files = array();
|
||||
|
||||
if(!count($source_files)) return;
|
||||
foreach($source_files as $file) {
|
||||
if(!$file || !$file['file']) continue;
|
||||
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) || $file['file'] == './common/css/button.css') $files[] = $file;
|
||||
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) ) $files[] = $file;
|
||||
else $targets[] = $file;
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +64,7 @@
|
|||
|
||||
$this->doOptimizedFile($path, $filename, $targets, $type);
|
||||
|
||||
$files[] = array('file' => $path.'/'.$filename, 'media' => 'all');
|
||||
array_unshift($files, array('file' => $path.'/'.$filename, 'media' => 'all'));
|
||||
|
||||
return $this->_getOptimizedRemoved($files);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue