xquared 적용을 위한 javascript 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3038 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2007-11-21 15:22:58 +00:00
parent 04a1fed23c
commit 4a55cfe522
9 changed files with 28 additions and 18 deletions

View file

@ -4,14 +4,6 @@
* @brief 에디터 관련 스크립트
*/
/**
* 에디터에서 사용하기 위한 변수
**/
var editorMode = new Array(); ///<< 에디터의 html편집 모드 flag 세팅 변수 (html or null)
var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', locked:false} ///< 자동저장을 위한 정보를 가진 object
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}
/**
* 에디터 사용시 사용되는 이벤트 연결 함수 호출
**/
@ -33,6 +25,11 @@ function editorGetTextArea(editor_sequence) {
return xGetElementById( 'editor_textarea_' + editor_sequence );
}
function editorSync(editor_sequence) {
editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
}
// editor_sequence에 해당하는 form문 구함
function editorGetForm(editor_sequence) {
var iframe_obj = editorGetIFrame(editor_sequence);
@ -112,6 +109,7 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height) {
editorRelKeys[editor_sequence] = new Array();
editorRelKeys[editor_sequence]["primary"] = fo_obj[primary_key];
editorRelKeys[editor_sequence]["content"] = fo_obj[content_key];
editorRelKeys[editor_sequence]["func"] = editorSync;
// saved document(자동저장 문서)에 대한 확인
if(typeof(fo_obj._saved_doc_title)!="undefined" ) { ///<< _saved_doc_title field가 없으면 자동저장 하지 않음

View file

@ -0,0 +1,7 @@
/**
* 에디터에서 사용하기 위한 변수
**/
var editorMode = new Array(); ///<< 에디터의 html편집 모드 flag 세팅 변수 (html or null)
var editorAutoSaveObj = {fo_obj:null, editor_sequence:0, title:'', content:'', locked:false} ///< 자동저장을 위한 정보를 가진 object
var editorRelKeys = new Array(); ///< 에디터와 각 모듈과의 연동을 위한 key 값을 보관하는 변수
var editorDragObj = {isDrag:false, y:0, obj:null, id:'', det:0, source_height:0}

View file

@ -18,8 +18,8 @@ var uploaded_files = new Array();
* 함수는 editor.html 에서 파일 업로드 가능할 경우 호출됨
**/
// window.load 이벤트일 경우 && 문서 번호가 가상의 번호가 아니면 기존에 저장되어 있을지도 모르는 파일 목록을 가져옴
function editor_upload_init(editor_sequence) {
xAddEventListener(window,'load',function() { editor_upload_start(editor_sequence);} );
function editor_upload_init(editor_sequence, el) {
xAddEventListener(window,'load',function() { editor_upload_start(editor_sequence, el);} );
}
function editor_upload_get_target_srl(editor_sequence) {
@ -32,7 +32,7 @@ function editor_upload_get_uploader_name(editor_sequence) {
}
// 파일 업로드를 위한 기본 준비를 함
function editor_upload_start(editor_sequence) {
function editor_upload_start(editor_sequence, fo_obj) {
// 캐시 삭제
try { document.execCommand('BackgroundImageCache',false,true); } catch(e) { }
@ -58,7 +58,8 @@ function editor_upload_start(editor_sequence) {
if(!field_obj) return;
// 에디터를 감싸는 form을 구해 submit target을 임시 iframe으로 변경
var fo_obj = editorGetForm(editor_sequence);
if(!fo_obj)
fo_obj = editorGetForm(editor_sequence);
fo_obj.target = 'tmp_upload_iframe';
// SWF uploader 생성