git-svn-id: http://xe-core.googlecode.com/svn/trunk@836 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-30 10:32:58 +00:00
parent 078ea34bc4
commit d94dc0d9a8
12 changed files with 116 additions and 106 deletions

View file

@ -91,40 +91,5 @@
$this->setLayoutFile("popup_layout");
}
/**
* @brief 에디터를 return
**/
function getEditor($upload_target_srl, $allow_fileupload = false, $enable_autosave = false) {
$oEditorModel = &getModel('editor');
// 저장된 임시본이 있는지 검사
if($enable_autosave) {
$saved_doc = $oEditorModel->getSavedDoc($upload_target_srl);
Context::set('saved_doc', $saved_doc);
}
Context::set('enable_autosave', $enable_autosave);
// 업로드를 위한 변수 설정
Context::set('upload_target_srl', $upload_target_srl);
Context::set('allow_fileupload', $allow_fileupload);
// 에디터 컴포넌트를 구함
if(!Context::get('component_list')) {
$component_list = $oEditorModel->getComponentList();
Context::set('component_list', $component_list);
}
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
$tpl_path = $this->module_path.'tpl';
$tpl_file = 'editor.html';
// editor_path를 지정
Context::set('editor_path', $tpl_path);
require_once("./classes/template/TemplateHandler.class.php");
$oTemplate = new TemplateHandler();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>