mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
r7861 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7862 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
298a0465e5
commit
4f279059c7
6 changed files with 47 additions and 15 deletions
|
|
@ -1158,15 +1158,15 @@
|
|||
/**
|
||||
* @brief js file을 추가
|
||||
**/
|
||||
function addJsFile($file, $optimized = false, $targetie = '',$index=null) {
|
||||
function addJsFile($file, $optimized = false, $targetie = '',$index=null, $type="head") {
|
||||
$oContext = &Context::getInstance();
|
||||
return $oContext->_addJsFile($file, $targetie,$index);
|
||||
return $oContext->_addJsFile($file, $targetie,$index,$type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief js file을 추가
|
||||
**/
|
||||
function _addJsFile($file, $targetie = '',$index=null) {
|
||||
function _addJsFile($file, $targetie = '',$index=null,$type="head") {
|
||||
if(strpos($file,'://')===false && $file{0}!='/' && $file{0}!='.') $file = './'.$file;
|
||||
$file = preg_replace('@/\./|(?<!:)\/\/@', '/', $file);
|
||||
while(strpos($file,'/../')) $file = preg_replace('/\/([^\/]+)\/\.\.\//s','/',$file,1);
|
||||
|
|
@ -1175,7 +1175,7 @@
|
|||
|
||||
if(is_null($index)) $index=count($this->js_files);
|
||||
for($i=$index;array_key_exists($i,$this->js_files);$i++);
|
||||
$this->js_files[$i] = array('file' => $file, 'targetie' => $targetie);
|
||||
$this->js_files[$i] = array('file' => $file, 'targetie' => $targetie, 'type'=> $type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1230,6 +1230,7 @@
|
|||
{
|
||||
if(in_array($files[$i]['file'], $filenames))
|
||||
unset($files[$i]);
|
||||
|
||||
$filenames[] = $files[$i]['file'];
|
||||
}
|
||||
|
||||
|
|
@ -1239,17 +1240,23 @@
|
|||
/**
|
||||
* @brief js file 목록을 return
|
||||
**/
|
||||
function getJsFile() {
|
||||
function getJsFile($type='head') {
|
||||
$oContext = &Context::getInstance();
|
||||
return $oContext->_getJsFile();
|
||||
return $oContext->_getJsFile($type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief js file 목록을 return
|
||||
**/
|
||||
function _getJsFile() {
|
||||
function _getJsFile($type) {
|
||||
$_files = array();
|
||||
$files = $this->_getUniqueFileList($this->js_files);
|
||||
return $files;
|
||||
foreach($files as $k => $v)
|
||||
{
|
||||
if($v['type'] == $type) $_files[] = $v;
|
||||
}
|
||||
|
||||
return $_files;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue