mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 21:29:58 +09:00
옛날 스킨용 자동 저장문서의 첨부파일 불러오기 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6561 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8e5eb37e53
commit
c41cad4c1a
3 changed files with 38 additions and 2 deletions
|
|
@ -22,5 +22,7 @@
|
|||
<action name="procEditorAdminDisableComponent" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminMoveListOrder" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminSetupComponent" type="controller" standalone="true" />
|
||||
|
||||
<action name="procEditorLoadSavedDocument" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -254,6 +254,27 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 자동 저장글 Srl 로드 - XE 이전 버전 사용자를 위함.
|
||||
**/
|
||||
function procEditorLoadSavedDocument() {
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$primary_key = Context::get('primary_key');
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oFileController = &getController('file');
|
||||
|
||||
$saved_doc = $oEditorModel->getSavedDoc(null);
|
||||
|
||||
$oFileController->setUploadInfo($editor_sequence, $saved_doc->document_srl);
|
||||
$vars = $this->getVariables();
|
||||
$this->add("editor_sequence", $editor_sequence);
|
||||
$this->add("key", $primary_key);
|
||||
$this->add("title", $saved_doc->title);
|
||||
$this->add("content", $saved_doc->content);
|
||||
$this->add("document_srl", $saved_doc->document_srl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 게시글의 입력/수정이 일어났을 경우 자동 저장문서를 제거하는 trigger
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -97,15 +97,20 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
|||
|
||||
var saved_title = fo_obj._saved_doc_title.value;
|
||||
var saved_content = fo_obj._saved_doc_content.value;
|
||||
var saved_srl = fo_obj._saved_doc_srl.value;
|
||||
|
||||
if(saved_title || saved_content) {
|
||||
// 자동저장된 문서 활용여부를 물은 후 사용하지 않는다면 자동저장된 문서 삭제
|
||||
if(confirm(fo_obj._saved_doc_message.value)) {
|
||||
if(typeof(fo_obj.title)!='undefined') fo_obj.title.value = saved_title;
|
||||
editorRelKeys[editor_sequence]['content'].value = saved_content;
|
||||
editorRelKeys[editor_sequence]['primary'].value = saved_srl;
|
||||
|
||||
var param = new Array();
|
||||
param['editor_sequence'] = editor_sequence;
|
||||
param['primary_key'] = primary_key;
|
||||
var response_tags = new Array("error","message","editor_sequence","key","title","content","document_srl");
|
||||
exec_xml('editor',"procEditorLoadSavedDocument", param, getAutoSavedSrl, response_tags);
|
||||
editorUploadInit(uploadSettingObj, true);
|
||||
|
||||
} else {
|
||||
editorRemoveSavedDoc();
|
||||
}
|
||||
|
|
@ -562,3 +567,11 @@ function setPreviewHeight(editor_sequence){
|
|||
if(h < 400) h=400;
|
||||
xHeight('editor_preview_'+editor_sequence,h+20);
|
||||
}
|
||||
function getAutoSavedSrl(ret_obj, response_tags, c) {
|
||||
var editor_sequence = ret_obj['editor_sequence'];
|
||||
var primary_key = ret_obj['key'];
|
||||
var fo_obj = editorGetForm(editor_sequence);
|
||||
|
||||
fo_obj[primary_key].value = ret_obj['document_srl'];
|
||||
editorUploadInit(uploadSettingObj, true);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue