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

This commit is contained in:
zero 2007-03-28 06:20:35 +00:00
parent e71e466612
commit 85c958c8b1
7 changed files with 20 additions and 16 deletions

View file

@ -175,8 +175,10 @@
} }
} }
if(!$document_srl) {
$oDB = &DB::getInstance(); $oDB = &DB::getInstance();
$document_srl = $oDB->getNextSequence(); $document_srl = $oDB->getNextSequence();
}
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로 // 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form'); if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');

View file

@ -29,6 +29,7 @@
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
$output = $oDB->executeQuery('document.getDocument', $args); $output = $oDB->executeQuery('document.getDocument', $args);
$document = $output->data; $document = $output->data;
if(!$document) return;
// 이 문서에 대한 권한이 있는지 확인 // 이 문서에 대한 권한이 있는지 확인
if($this->isGranted($document->document_srl) || $is_admin) { if($this->isGranted($document->document_srl) || $is_admin) {

View file

@ -24,14 +24,14 @@
$saved_doc = $output->data; $saved_doc = $output->data;
if(!$saved_doc) return; if(!$saved_doc) return;
// 해당 저장본 삭제 // 원본 글이 저장되어 있지 않은 글일 경우 첨부된 파일이 있으면 현재 글 번호로 옮김
$oEditorController = &getController('editor'); $oDocumentModel = &getModel('document');
$oEditorController->deleteSavedDoc(); $document = $oDocumentModel->getDocument($saved_doc->document_srl);
if($document->document_srl != $saved_doc->document_srl) {
// 첨부된 파일이 있으면 현재 글 번호로 옮김
$module_srl = Context::get('module_srl'); $module_srl = Context::get('module_srl');
$oFileController = &getController('file'); $oFileController = &getController('file');
$oFileController->moveFile($saved_doc->document_srl, $module_srl, $upload_target_srl); $oFileController->moveFile($saved_doc->document_srl, $module_srl, $upload_target_srl);
}
return $saved_doc; return $saved_doc;
} }

View file

@ -150,12 +150,11 @@ div.editor_drag_down_area {
} }
div.editor_autosaved_message { div.editor_autosaved_message {
padding:5px;
margin:5px 0px 5px 0px;
border:1px solid #f8be74;
font-size:9pt; font-size:9pt;
font-weight:bold; font-weight:bold;
color:#d79619; color:#888888;
background-color:#feffc4;
display:none; display:none;
position:absolute;
top:10px;
right:10px;
} }

View file

@ -87,7 +87,7 @@
<!-- iframe --> <!-- iframe -->
<div class="editor_iframe_box"><iframe id="editor_iframe_{$upload_target_srl}" frameBorder="0" style="border:0px;width:99%;height:300px;margin:0px;"></iframe><div class="editor_drag_down_area" id="editor_drag_bar_{$upload_target_srl}"></div></div> <div class="editor_iframe_box"><iframe id="editor_iframe_{$upload_target_srl}" frameBorder="0" style="border:0px;width:99%;height:300px;margin:0px;"></iframe><div class="editor_drag_down_area" id="editor_drag_bar_{$upload_target_srl}"></div></div>
<div class="editor_autosaved_message" id="editor_autosaved_message">{$lang->msg_auto_saved}</div> <div class="editor_autosaved_message" id="editor_autosaved_message">{$lang->msg_auto_saved} &nbsp;</div>
</div> </div>
<!--@if($allow_fileupload)--> <!--@if($allow_fileupload)-->

View file

@ -140,6 +140,7 @@ function _editorAutoSave() {
_autoSaveObj.title = title; _autoSaveObj.title = title;
_autoSaveObj.content = content; _autoSaveObj.content = content;
xTop("editor_autosaved_message", xScrollTop()+10);
xGetElementById("editor_autosaved_message").style.display = "block"; xGetElementById("editor_autosaved_message").style.display = "block";
setTimeout(function() {xGetElementById("editor_autosaved_message").style.display = "none";}, 3000); setTimeout(function() {xGetElementById("editor_autosaved_message").style.display = "none";}, 3000);
show_waiting_message = false; show_waiting_message = false;

View file

@ -136,6 +136,7 @@
* @brief 특정 글의 첨부파일을 다른 글로 이동 * @brief 특정 글의 첨부파일을 다른 글로 이동
**/ **/
function moveFile($source_srl, $target_module_srl, $target_srl) { function moveFile($source_srl, $target_module_srl, $target_srl) {
if($source_srl == $target_srl) return;
$oDB = &DB::getInstance(); $oDB = &DB::getInstance();
$oFileModel = &getModel('file'); $oFileModel = &getModel('file');