mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +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
|
|
@ -445,7 +445,7 @@
|
||||||
|
|
||||||
// 변환 후 출력
|
// 변환 후 출력
|
||||||
if(strtolower($this->charset) == 'utf-8') print $content;
|
if(strtolower($this->charset) == 'utf-8') print $content;
|
||||||
else print iconv('UTF-8',$this->charset."//TRANSLIT", $content);
|
else print iconv('UTF-8',$this->charset."//TRANSLIT//IGNORE", $content);
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,5 @@
|
||||||
<action name="procEditorAdminDisableComponent" type="controller" standalone="true" />
|
<action name="procEditorAdminDisableComponent" type="controller" standalone="true" />
|
||||||
<action name="procEditorAdminMoveListOrder" type="controller" standalone="true" />
|
<action name="procEditorAdminMoveListOrder" type="controller" standalone="true" />
|
||||||
<action name="procEditorAdminSetupComponent" type="controller" standalone="true" />
|
<action name="procEditorAdminSetupComponent" type="controller" standalone="true" />
|
||||||
|
|
||||||
<action name="loadSaveDoc" type="controller" standalone="true" />
|
|
||||||
</actions>
|
</actions>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@
|
||||||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||||
|
|
||||||
|
// 2009. 06. 13 자동 저장된 SRL 체크
|
||||||
|
$oModuleController->insertTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,6 +62,9 @@
|
||||||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,6 +89,10 @@
|
||||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
||||||
$oModuleController->insertTrigger('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');
|
return new Object(0, 'success_updated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,18 +236,12 @@
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 자동 저장글 로드
|
* @brief 자동 저장글 Srl 로드 (자기글인지 확인)
|
||||||
**/
|
**/
|
||||||
function loadSaveDoc() {
|
function triggerSrlSetting(&$obj) {
|
||||||
$editor_sequence = Context::get('editor_sequence');
|
|
||||||
|
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$saved_doc = $oEditorModel->getSavedDoc(null);
|
$saved_doc = $oEditorModel->getSavedDoc(null);
|
||||||
$vars = $this->getVariables();
|
if($obj->uploadTargetSrl == $saved_doc->document_srl) Context::set("getIsPermitted",$saved_doc->document_srl);
return $output;
|
||||||
$this->add("title", $saved_doc->title);
|
|
||||||
$this->add("content", $saved_doc->content);
|
|
||||||
$this->add("document_srl", $saved_doc->document_srl);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,8 @@ function queueComplete(numFilesUploaded) {
|
||||||
function reloadFileList(settings) {
|
function reloadFileList(settings) {
|
||||||
var params = new Array();
|
var params = new Array();
|
||||||
params["file_list_area_id"] = settings["fileListAreaID"];
|
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;
|
params["mid"] = current_mid;
|
||||||
var response_tags = new Array("error","message","files","upload_status","upload_target_srl","editor_sequence","left_size");
|
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);
|
exec_xml("file","getFileList", params, completeReloadFileList, response_tags, settings);
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,9 @@
|
||||||
|
|
||||||
$editor_sequence = Context::get("editor_sequence");
|
$editor_sequence = Context::get("editor_sequence");
|
||||||
$upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
$upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||||
if(!$upload_target_srl) {
|
if(!$upload_target_srl) {
|
||||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = Context::get('uploadTargetSrl');
|
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) {
|
if($upload_target_srl) {
|
||||||
$tmp_files = $this->getFiles($upload_target_srl);
|
$tmp_files = $this->getFiles($upload_target_srl);
|
||||||
|
|
@ -203,12 +204,22 @@
|
||||||
);
|
);
|
||||||
return $upload_status;
|
return $upload_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 특정 모듈의 file 설정을 return
|
* @brief 특정 모듈의 file 설정을 return
|
||||||
**/
|
**/
|
||||||
function getFileModuleConfig($module_srl) {
|
function getFileModuleConfig($module_srl) {
|
||||||
return $this->getFileConfig($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