mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 12:22:15 +09:00
페이지 위젯에 박스 위젯 추가. 각 위젯마다 배경을 지정할 수 있도록 하고 IE에서 메모리 누수 현상이 발생하던 부분을 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2983 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
23ac5b8f54
commit
9124d18a91
31 changed files with 1397 additions and 1001 deletions
|
|
@ -195,65 +195,5 @@
|
|||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 페이지에 에디터 컨테츠 추가하기 위한 tpl return
|
||||
**/
|
||||
function procPageAdminAddContent() {
|
||||
$content = Context::get('content');
|
||||
$args = Context::getRequestVars('style','widget_margin_left','widget_margin_right','widget_margin_bottom','widget_margin_top');
|
||||
|
||||
$tpl = $this->transEditorContent($content, $args);
|
||||
|
||||
$this->add('tpl', $tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터에서 생성한 컨텐츠를 페이지 수정시 사용할 수 있도록 코드 생성
|
||||
**/
|
||||
function transEditorContent($content, $args = null) {
|
||||
// 에디터의 내용을 변환하여 visual한 영역과 원본 소스를 가지고 있는 code로 분리
|
||||
$code = $content;
|
||||
|
||||
$oContext = &Context::getInstance();
|
||||
$content = preg_replace_callback('!<div([^\>]*)editor_component=([^\>]*)>(.*?)\<\/div\>!is', array($oContext,'transEditorComponent'), $content);
|
||||
$content = preg_replace_callback('!<img([^\>]*)editor_component=([^\>]*?)\>!is', array($oContext,'transEditorComponent'), $content);
|
||||
|
||||
// 결과물에 있는 css Meta 목록을 구해와서 해당 css를 아예 읽어버림
|
||||
require_once("./classes/optimizer/Optimizer.class.php");
|
||||
$oOptimizer = new Optimizer();
|
||||
preg_match_all('!<\!\-\-Meta:([^\-]*?)\-\->!is', $content, $matches);
|
||||
$css_header = null;
|
||||
for($i=0;$i<count($matches[1]);$i++) {
|
||||
$css_file = $matches[1][$i];
|
||||
$buff = FileHandler::readFile($css_file);
|
||||
$css_header .= $oOptimizer->replaceCssPath($css_file, $buff)."\n";
|
||||
}
|
||||
|
||||
$tpl = sprintf(
|
||||
'<style type="text/css">%s</style>'.
|
||||
'<div class="widgetOutput" style="%s" widget_margin_left="%s" widget_margin_right="%s" widget_margin_top="%s" widget_margin_bottom="%s" widget="widgetContent">'.
|
||||
'<div class="widgetSetup"></div>'.
|
||||
'<div class="widgetSize"></div>'.
|
||||
'<div class="widgetRemove"></div>'.
|
||||
'<div class="widgetResize"></div>'.
|
||||
'<div class="widgetResizeLeft"></div>'.
|
||||
'<div class="widgetBorder">'.
|
||||
'<div style="margin:%s %s %s %s;">'.
|
||||
'%s'.
|
||||
'</div><div class="clear"></div>'.
|
||||
'</div>'.
|
||||
'<div class="widgetContent" style="display:none;width:1px;height:1px;overflow:hidden;">%s</div>'.
|
||||
'</div>',
|
||||
$css_header,
|
||||
$args->style,
|
||||
$args->widget_margin_left, $args->widget_margin_right, $args->widget_margin_top, $args->widget_margin_bottom,
|
||||
$args->widget_margin_top, $args->widget_margin_right, $args->widget_margin_bottom, $args->widget_margin_left,
|
||||
$content,
|
||||
base64_encode($code)
|
||||
);
|
||||
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue