xquared에서도 자동저장 가능하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3052 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2007-11-23 02:38:37 +00:00
parent cb152ca648
commit 40df9a7b74
5 changed files with 84 additions and 66 deletions

View file

@ -1,4 +1,5 @@
@charset "utf-8";
.xeEditor .editor_info .editor_autosaved_message { color:#888888; text-align:right; }
.xeEditor .fileAttach { position:relative; top:20px; padding:0 1em .5em 1em;}
.xeEditor .fileAttach .preview { padding:5px; width:110px; height:110px; border:1px solid #e1e1dd; background:#fbfbfb; float:left; margin-right:.5em;}

View file

@ -32,12 +32,9 @@
<div class="xeEditor" style="margin-top:5px; margin-bottom:5px;">
<!-- HTML 모드 사용 기능 및 자동저장 메세지 출력용 -->
<!--<div class="editor_info">
<div class="editor_option">
<input type="checkbox" id="use_html_{$editor_sequence}" value="Y" onclick="editorChangeMode(this, '{$editor_sequence}');" /> <label for="use_html_{$editor_sequence}">HTML</label>
</div>
<div class="editor_info">
<div class="editor_autosaved_message" id="editor_autosaved_message_{$editor_sequence}">&nbsp;</div>
</div>-->
</div>
<!-- 에디터 출력 -->
<div id = "xqEditor_{$editor_sequence}"></div>

View file

@ -37,14 +37,34 @@ function editorStart_xq(editor, element, editor_sequence, content_key, editor_he
editorMode[editor_sequence] = null;
var fo_obj = editorGetForm_xq(element);
fo_obj.setAttribute('editor_sequence', editor_sequence);
editor.setStaticContent(fo_obj[content_key].value);
editorRelKeys[editor_sequence]['content'] = fo_obj[content_key];
editorRelKeys[editor_sequence]['primary'] = fo_obj[primary_key];
// saved document(자동저장 문서)에 대한 확인
if(typeof(fo_obj._saved_doc_title)!="undefined" ) { ///<< _saved_doc_title field가 없으면 자동저장 하지 않음
var saved_title = fo_obj._saved_doc_title.value;
var saved_content = fo_obj._saved_doc_content.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;
} else {
editorRemoveSavedDoc();
}
}
}
editor.setStaticContent(fo_obj[content_key].value);
editor.setEditMode('wysiwyg');
editor.loadStylesheet(request_uri+editor_path+"/examples/css/xq_contents.css");
editor.getFrame().style.width = "100%";
editor.getFrame().parentNode.style.height = editor_height;
editor.addAutocompletions(getAdditionalAutocompletions());
if(typeof(fo_obj._saved_doc_title)!="undefined" ) editorEnableAutoSave(fo_obj, editor_sequence);
}
xq.Editor.prototype.insertHTML = function (html) {