mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
autosave document. loading attached files
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6535 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3fe1a50344
commit
bd685e0198
6 changed files with 30 additions and 16 deletions
|
|
@ -22,7 +22,5 @@
|
|||
<action name="procEditorAdminDisableComponent" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminMoveListOrder" type="controller" standalone="true" />
|
||||
<action name="procEditorAdminSetupComponent" type="controller" standalone="true" />
|
||||
|
||||
<action name="loadSaveDoc" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@
|
|||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
|
||||
// 2009. 06. 13 자동 저장된 SRL 체크
|
||||
$oModuleController->insertTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -59,6 +62,9 @@
|
|||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
||||
|
||||
// 2009. 06. 13 자동 저장된 SRL 체크
|
||||
if(!$oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -83,6 +89,10 @@
|
|||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
|
||||
// 2009. 06. 13 자동 저장된 SRL 체크
|
||||
if(!$oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before'))
|
||||
$oModuleController->insertTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,18 +236,12 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 자동 저장글 로드
|
||||
* @brief 자동 저장글 Srl 로드 (자기글인지 확인)
|
||||
**/
|
||||
function loadSaveDoc() {
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
|
||||
function triggerSrlSetting(&$obj) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
$saved_doc = $oEditorModel->getSavedDoc(null);
|
||||
$vars = $this->getVariables();
|
||||
$this->add("title", $saved_doc->title);
|
||||
$this->add("content", $saved_doc->content);
|
||||
$this->add("document_srl", $saved_doc->document_srl);
|
||||
|
||||
if($obj->uploadTargetSrl == $saved_doc->document_srl) Context::set("getIsPermitted",$saved_doc->document_srl);
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,8 @@ function queueComplete(numFilesUploaded) {
|
|||
function reloadFileList(settings) {
|
||||
var params = new Array();
|
||||
params["file_list_area_id"] = settings["fileListAreaID"];
|
||||
params["editor_sequence"] = settings["editorSequence"];
|
||||
params["editor_sequence"] = settings["editorSequence"];
|
||||
params["upload_target_srl"] = settings["uploadTargetSrl"];
|
||||
params["mid"] = current_mid;
|
||||
var response_tags = new Array("error","message","files","upload_status","upload_target_srl","editor_sequence","left_size");
|
||||
exec_xml("file","getFileList", params, completeReloadFileList, response_tags, settings);
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@
|
|||
|
||||
$editor_sequence = Context::get("editor_sequence");
|
||||
$upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(!$upload_target_srl) {
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = Context::get('uploadTargetSrl');
|
||||
if(!$upload_target_srl) {
|
||||
if($this->getIsPermitted(Context::get('upload_target_srl')))
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = Context::get('upload_target_srl');
|
||||
}
|
||||
if($upload_target_srl) {
|
||||
$tmp_files = $this->getFiles($upload_target_srl);
|
||||
|
|
@ -203,12 +204,22 @@
|
|||
);
|
||||
return $upload_status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 file 설정을 return
|
||||
**/
|
||||
function getFileModuleConfig($module_srl) {
|
||||
return $this->getFileConfig($module_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 사용자가 해당 SRL에 첨부된 파일 수정 권한이 있는지 확인 - 트리거를 통해 반환되는 정보를 이용.
|
||||
**/
|
||||
function getIsPermitted($checking_target) {
|
||||
Context::set("getIsPermitted", '');
|
||||
$obj->uploadTargetSrl = $checking_target;
|
||||
$output = ModuleHandler::triggerCall('file.getIsPermitted', 'before', $obj);
|
||||
return Context::get("getIsPermitted");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue