diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 68670940e..0498cb5ac 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -714,18 +714,18 @@ /** * @brief js file을 추가 **/ - function addJsFile($file, $optimized = true) { + function addJsFile($file, $optimized = true, $targetie = '') { $oContext = &Context::getInstance(); - return $oContext->_addJsFile($file, $optimized); + return $oContext->_addJsFile($file, $optimized, $targetie); } /** * @brief js file을 추가 **/ - function _addJsFile($file, $optimized) { + function _addJsFile($file, $optimized, $targetie) { if(in_array($file, $this->js_files)) return; //if(!preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file)); - $this->js_files[] = array('file' => $file, 'optimized' => $optimized); + $this->js_files[] = array('file' => $file, 'optimized' => $optimized, 'targetie' => $targetie); } /** @@ -763,19 +763,19 @@ /** * @brief CSS file 추가 **/ - function addCSSFile($file, $optimized = true, $media = 'all') { + function addCSSFile($file, $optimized = true, $media = 'all', $targetie = '') { $oContext = &Context::getInstance(); - return $oContext->_addCSSFile($file, $optimized, $media); + return $oContext->_addCSSFile($file, $optimized, $media, $targetie); } /** * @brief CSS file 추가 **/ - function _addCSSFile($file, $optimized, $media) { + function _addCSSFile($file, $optimized, $media, $targetie) { if(in_array($file, $this->css_files)) return; //if(preg_match('/^http:\/\//i',$file)) $file = str_replace(realpath("."), ".", realpath($file)); - $this->css_files[] = array('file' => $file, 'optimized' => $optimized, 'media' => $media); + $this->css_files[] = array('file' => $file, 'optimized' => $optimized, 'media' => $media, 'targetie' => $targetie); } /** diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index c4c81f7cc..3a69da858 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -115,8 +115,8 @@ // 의 변경 $buff = preg_replace_callback('!<\!--@(.*?)-->!is', array($this, '_compileFuncToCode'), $buff); - // import xml filter/ css/ js/ 언어파일 (media는 css에만 적용) - $buff = preg_replace_callback('!<\!--%import\(\"([^\"]*?)\"(,optimized\=(true|false)(,media\=\"([^\"]*)\")?)?\)-->!is', array($this, '_compileImportCode'), $buff); + // import xml filter/ css/ js/ 언어파일 (media는 css에만 적용) + $buff = preg_replace_callback('!<\!--%import\(\"([^\"]*?)\"(,optimized\=(true|false))?(,media\=\"([^\"]*)\")?(,targetie=\"([^\"]*)\")?\)-->!is', array($this, '_compileImportCode'), $buff); // 파일에 쓰기 전에 직접 호출되는 것을 방지 $buff = sprintf('%s%s%s','',"\n",$buff); @@ -265,6 +265,10 @@ if(isset($matches[5])) $media = trim($matches[5]); if(!$media) $media = 'all'; + if(isset($matches[7])) + $targetie = trim($matches[7]); + if(!$targetie) $targetie = ''; + else $optimized = 'false'; // given_file이 lang으로 끝나게 되면 언어팩을 읽도록 함 if(substr($given_file, -4)=='lang') { @@ -309,12 +313,12 @@ // css file case 'css' : $meta_file = sprintf('%s%s', $base_path, $filename); - $output = sprintf('', $base_path, $filename, $optimized, $media); + $output = sprintf('', $base_path, $filename, $optimized, $media, $targetie); break; // js file case 'js' : $meta_file = sprintf('%s%s', $base_path, $filename); - $output = sprintf('', $base_path, $filename, $optimized); + $output = sprintf('', $base_path, $filename, $optimized, $targetie); break; } } diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html index e85616e68..6f339a186 100644 --- a/common/tpl/common_layout.html +++ b/common/tpl/common_layout.html @@ -3,16 +3,42 @@
- - - - - + + + + + + + + + + + + +