mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@836 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
078ea34bc4
commit
d94dc0d9a8
12 changed files with 116 additions and 106 deletions
|
|
@ -7,6 +7,45 @@
|
|||
|
||||
class editorModel extends editor {
|
||||
|
||||
/**
|
||||
* @brief 에디터를 return
|
||||
**/
|
||||
function getEditor($upload_target_srl, $allow_fileupload = false, $enable_autosave = false) {
|
||||
// 저장된 임시본이 있는지 검사
|
||||
if($enable_autosave) {
|
||||
$saved_doc = $this->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 = $this->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);
|
||||
|
||||
// 만약 allow_fileupload == true 이면 upload_target_srl에 upload가능하다고 설정
|
||||
if($allow_fileupload) {
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->setUploadEnable($upload_target_srl);
|
||||
}
|
||||
require_once("./classes/template/TemplateHandler.class.php");
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 자동저장되어 있는 정보를 가져옴
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
<div class="editor_uploader_box">
|
||||
|
||||
<input type="hidden" name="upload_target_srl" value="{$upload_target_srl}" />
|
||||
<input type="hidden" name="act" value="procFileUploadFile" />
|
||||
<input type="hidden" name="act" value="procFileUpload" />
|
||||
|
||||
<!-- 미리보기 -->
|
||||
<div class="editor_preview_uploaded" id="preview_uploaded_{$upload_target_srl}"><img src="./images/blank.gif" width="100" height="100" alt="preview" /></div>
|
||||
|
|
|
|||
|
|
@ -60,9 +60,6 @@ function editor_upload_form_set(upload_target_srl) {
|
|||
if(fo_obj["document_srl"]) document_srl = fo_obj.document_srl.value;
|
||||
|
||||
var url = "./?act=procFileDelete&upload_target_srl="+upload_target_srl;
|
||||
if(module) url+="&module="+module;
|
||||
if(mid) url+="&mid="+mid;
|
||||
if(document_srl) url+="&document_srl="+document_srl;
|
||||
|
||||
// iframe에 url을 보내버림
|
||||
var iframe_obj = xGetElementById('tmp_upload_iframe');
|
||||
|
|
@ -159,7 +156,7 @@ function editor_remove_file(upload_target_srl) {
|
|||
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
|
||||
var mid = fo_obj.mid.value;
|
||||
var upload_target_srl = fo_obj.upload_target_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procFileDelete&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl;
|
||||
var url = "./?act=procFileDelete&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl;
|
||||
|
||||
// iframe에 url을 보내버림
|
||||
var iframe_obj = xGetElementById('tmp_upload_iframe');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue