#119 파이어폭스에서 에디터에 포커스가 이동되어도 커서가 나타나지 않던 문제 해결.

#117 위지윅 에디터의 스킨화를 위한 분리 및 검사 완료. 단 모듈에서 에디터 스킨을 선택하는 부분에 대한 기획 필요.
에디터 tpl내의 언어파일을 에디터 모듈의 공통 언어로 합쳐서 수정.
에디터 iframe을 window.onload후 객체 생성을 하지 않고 바로 html태그로 출력하여 브라우저의 버벅거림을 살짝 줄임.



git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2406 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-24 06:08:23 +00:00
parent 67039ea3a1
commit 5574ab94b7
40 changed files with 548 additions and 278 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 B

View file

@ -19,22 +19,11 @@ function editorGetIFrame(upload_target_srl) {
return xGetElementById(obj_id);
}
// editor 초기화를 onload이벤트 후에 시작시킴
function editorInit(upload_target_srl, resizable, height) {
xAddEventListener(window, 'load', function() { editorStart(upload_target_srl, resizable, height); });
}
// editor 시작 (upload_target_srl로 iframe객체를 얻어서 쓰기 모드로 전환)
function editorStart(upload_target_srl, resizable, height) {
if(typeof(height)=="undefined"||!height) height = 350;
function editorStart(upload_target_srl, resizable, editor_height) {
if(typeof(resizable)=="undefined"||!resizable) resizable = false;
else resizable = true;
// iframe_area를 찾음
var iframe_area = xGetElementById("editor_iframe_area_"+upload_target_srl);
//xHeight(iframe_area, height+10);
xInnerHtml(iframe_area, '<iframe id="editor_iframe_'+upload_target_srl+'" frameBorder="0" style="background-color:transparent;width:100%;height:'+height+'px;"></iframe>');
// iframe obj를 찾음
var iframe_obj = editorGetIFrame(upload_target_srl);
if(!iframe_obj) return;
@ -42,6 +31,7 @@ function editorStart(upload_target_srl, resizable, height) {
// 현 에디터를 감싸고 있는 form문을 찾아서 content object를 찾아서 내용 sync
var fo_obj = iframe_obj.parentNode;
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
// saved document에 대한 체크
if(typeof(fo_obj._saved_doc_title)!="undefined" ) {
var saved_title = fo_obj._saved_doc_title.value;
@ -61,21 +51,19 @@ function editorStart(upload_target_srl, resizable, height) {
// 대상 form의 content object에서 데이터를 구함
var content = fo_obj.content.value;
if(!content && !xIE4Up) content = "<br />";
// iframe내의 document object
var contentDocument = iframe_obj.contentWindow.document;
// editing가능하도록 설정 시작
// 기본 내용 작성
var contentHtml = ''+
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+
'<html lang="ko" xmlns="http://www.w3.org/1999/xhtml><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/>'+
'<link rel="stylesheet" href="'+request_uri+'/common/css/default.css" type="text/css" />'+
'<link rel="stylesheet" href="'+request_uri+editor_path+'/css/editor.css" type="text/css" />'+
'<style>'+
'html {position:static}'+
'body {margin:0px}'+
'<style style="text/css">'+
'body {margin:0px; height:'+editor_height+'px;}'+
'</style>'+
'</head><body upload_target_srl="'+upload_target_srl+'">'+
content+
@ -84,6 +72,7 @@ function editorStart(upload_target_srl, resizable, height) {
contentDocument.designMode = 'on';
try {
contentDocument.execCommand("undo", false, null);
contentDocument.execCommand("useCSS", false, true);
} catch (e) {
}
contentDocument.open("text/html","replace");
@ -114,7 +103,6 @@ function editorStart(upload_target_srl, resizable, height) {
// 크기 변경 불가일 경우 드래그바 숨김
if(resizable == false) xGetElementById("editor_drag_bar_"+upload_target_srl).style.display = "none";
if(typeof(fixAdminLayoutFooter)=='function') fixAdminLayoutFooter(height);
}
// 여러개의 편집기를 예상하여 전역 배열 변수에 form, iframe의 정보를 넣음
@ -702,8 +690,8 @@ function eOptionClick(obj) {
}
// Editor Info Close
function closeEditorInfo() {
xGetElementById('editorInfo').style.display='none';
function closeEditorInfo(upload_target_srl) {
xGetElementById('editorInfo_'+upload_target_srl).style.display='none';
var expire = new Date();
expire.setTime(expire.getTime()+ (7000 * 24 * 3600000));
xSetCookie('EditorInfo', '1', expire);

View file

@ -93,7 +93,7 @@ function editor_display_uploaded_file(upload_target_srl) {
_prev_upload_target_srl = 0;
} else return;
}
var url = "./?act=procFileDelete&upload_target_srl="+upload_target_srl+"&mid="+current_url.getQuery('mid');
var url = request_uri + "?act=procFileDelete&upload_target_srl="+upload_target_srl+"&mid="+current_url.getQuery('mid');
// iframe에 url을 보내버림
var iframe_obj = xGetElementById('tmp_upload_iframe');
@ -160,7 +160,7 @@ function editor_upload_clear_list(upload_target_srl) {
while(obj.options.length) {
obj.remove(0);
}
var preview_obj = xGetElementById('uploaded_file_preview_box_'+upload_target_srl);
var preview_obj = xGetElementById('preview_uploaded_'+upload_target_srl);
xInnerHtml(preview_obj,'')
}
@ -230,7 +230,7 @@ function editor_remove_file(upload_target_srl) {
var fo_obj = obj;
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
var mid = fo_obj.mid.value;
var url = "./?act=procFileDelete&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl+"&mid="+current_url.getQuery('mid');
var url = request_uri+"/?act=procFileDelete&upload_target_srl="+upload_target_srl+"&file_srl="+file_srl+"&mid="+current_url.getQuery('mid');
// iframe에 url을 보내버림
var iframe_obj = xGetElementById('tmp_upload_iframe');
@ -238,7 +238,7 @@ function editor_remove_file(upload_target_srl) {
iframe_obj.contentWindow.document.location.href=url;
var preview_obj = xGetElementById('uploaded_file_preview_box_'+upload_target_srl);
var preview_obj = xGetElementById('preview_uploaded_'+upload_target_srl);
xInnerHtml(preview_obj, "");
}
@ -269,7 +269,7 @@ function editor_insert_file(upload_target_srl) {
var fo_obj = obj;
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
var mid = fo_obj.mid.value;
var url = "./?module=file&amp;act=procFileDownload&amp;file_srl="+file_srl+"&amp;sid="+sid;
var url = request_uri+"/?module=file&amp;act=procFileDownload&amp;file_srl="+file_srl+"&amp;sid="+sid;
openComponent("url_link", upload_target_srl, url);
}
}

View file

@ -1,62 +0,0 @@
<?php
/**
* @file modules/editor/tpl/lang/ko.lang.php
* @author zero <zero@nzeo.com>
* @brief English Language Pack (Basic Things)
**/
$lang->edit->fontname = 'Font';
$lang->edit->fontsize = 'Size';
$lang->edit->use_paragraph = 'Paragraph Function';
$lang->edit->fontlist = array(
"Gulim",
"Dodum",
"Batang",
"Goongseo",
"times",
"Courier",
"Tahoma",
"Arial",
);
$lang->edit->header = "Style";
$lang->edit->header_list = array(
"h1" => "Subject 1",
"h2" => "Subject 2",
"h3" => "Subject 3",
"h4" => "Subject 4",
"h5" => "Subject 5",
"h6" => "Subject 6",
);
$lang->edit->submit = 'Submit';
$lang->edit->help_fontcolor = "Select font color";
$lang->edit->help_fontbgcolor = "Select background color of font";
$lang->edit->help_bold = "Make font bold";
$lang->edit->help_italic = "Make italic font";
$lang->edit->help_underline = "Underline font";
$lang->edit->help_strike = "Strike font";
$lang->edit->help_redo = "Redo";
$lang->edit->help_undo = "Undo";
$lang->edit->help_align_left = "Align left";
$lang->edit->help_align_center = "Align center";
$lang->edit->help_align_right = "Align right";
$lang->edit->help_add_indent = "Add indent";
$lang->edit->help_remove_indent = "Remove indent";
$lang->edit->help_list_number = "Apply number list";
$lang->edit->help_list_bullet = "Apply bullet list";
$lang->edit->help_use_paragrapth = "Press Ctrl+Enter to use paragraph. (Press Alt+S to save)";
$lang->edit->upload = 'Attachment';
$lang->edit->upload_file = 'Attach';
$lang->edit->link_file = 'Insert to Content';
$lang->edit->delete_selected = 'Delete Selected';
$lang->edit->icon_align_article = 'Occupy a paragraph';
$lang->edit->icon_align_left = 'Align Left';
$lang->edit->icon_align_middle = 'Align Center';
$lang->edit->icon_align_right = 'Align Right';
$lang->about_dblclick_in_editor = 'You are able to set detail component configure by double-clicking on background, text, images, or quotations';
?>

View file

@ -1,62 +0,0 @@
<?php
/**
* @file modules/editor/tpl/lang/ko.lang.php
* @author zero <zero@nzeo.com> 翻訳RisaPapa
* @brief 日本語言語パッケージ(基本的な内容のみ)
**/
$lang->edit->fontname = 'フォント';
$lang->edit->fontsize = 'サイズ';
$lang->edit->use_paragraph = '段落機能';
$lang->edit->fontlist = array(
" Pゴシック",
" P明朝",
"Osaka等幅",
"ヒラギノ角ゴ Pro W3",
"times",
"Courier",
"Tahoma",
"Arial",
);
$lang->edit->header = "見出し";
$lang->edit->header_list = array(
"h1" => "見出し1",
"h2" => "見出し2",
"h3" => "見出し3",
"h4" => "見出し4",
"h5" => "見出し5",
"h6" => "見出し6",
);
$lang->edit->submit = '送信';
$lang->edit->help_fontcolor = "テキストの色を指定します。";
$lang->edit->help_fontbgcolor = "テキストの背景色を指定します。";
$lang->edit->help_bold = "テキストを太字に指定します。";
$lang->edit->help_italic = "テキストを斜体にします。";
$lang->edit->help_underline = "テキストに下線(アンダーライン)を引きます。";
$lang->edit->help_strike = "打ち消し線を引きます。";
$lang->edit->help_redo = "直前に取り消した処理をもう一度繰り返して実行します。";
$lang->edit->help_undo = "直前に行った操作や処理を取り消し元に戻します。";
$lang->edit->help_align_left = "テキストを左揃えで表示します。";
$lang->edit->help_align_center = "テキストを中央揃えで表示します。";
$lang->edit->help_align_right = "テキストを右揃えで表示します。";
$lang->edit->help_add_indent = "テキストの行頭の位置を右に寄せます。";
$lang->edit->help_remove_indent = "インデント(字下げ)を除去します。";
$lang->edit->help_list_number = "リスト項目に数字で順序を付けます。";
$lang->edit->help_list_bullet = "記号でリスト項目を記述します。";
$lang->edit->help_use_paragrapth = "段落機能を使用する場合は、「Ctrl+Enter」を押します書き終わった後、「Alt+S」を押すと保存されます";
$lang->edit->upload = '添付';
$lang->edit->upload_file = 'ファイル添付';
$lang->edit->link_file = 'テキスト挿入';
$lang->edit->delete_selected = '選択リスト削除';
$lang->edit->icon_align_article = '一段落';
$lang->edit->icon_align_left = '左揃え';
$lang->edit->icon_align_middle = '中央揃え';
$lang->edit->icon_align_right = '右揃え';
$lang->about_dblclick_in_editor = '背景、文字、イメージ、引用文の上にカーソルを合わせ,ダブルクリックすると詳細設定できるコンポーネントを表示します。';
?>

View file

@ -1,62 +0,0 @@
<?php
/**
* @file modules/editor/tpl/lang/ko.lang.php
* @author zero <zero@nzeo.com>
* @brief 한국어 언어팩 (기본적인 내용만 수록)
**/
$lang->edit->fontname = '글꼴';
$lang->edit->fontsize = '크기';
$lang->edit->use_paragraph = '문단기능';
$lang->edit->fontlist = array(
"굴림",
"돋움",
"바탕",
"궁서",
"times",
"Courier",
"Tahoma",
"Arial",
);
$lang->edit->header = "형식";
$lang->edit->header_list = array(
"h1" => "제목 1",
"h2" => "제목 2",
"h3" => "제목 3",
"h4" => "제목 4",
"h5" => "제목 5",
"h6" => "제목 6",
);
$lang->edit->submit = '확인';
$lang->edit->help_fontcolor = "글자의 색상을 지정합니다";
$lang->edit->help_fontbgcolor = "글자의 배경색상을 지정합니다";
$lang->edit->help_bold = "글자를 진하게 합니다";
$lang->edit->help_italic = "글자를 기울이게 합니다";
$lang->edit->help_underline = "밑줄을 긋습니다";
$lang->edit->help_strike = "취소선을 긋습니다";
$lang->edit->help_redo = "다음 동작으로 돌아갑니다";
$lang->edit->help_undo = "이전 동작으로 돌아갑니다";
$lang->edit->help_align_left = "왼쪽 정렬을 합니다";
$lang->edit->help_align_center = "가운데 정렬을 합니다";
$lang->edit->help_align_right = "오른쪽 정렬을 합니다";
$lang->edit->help_add_indent = "들여쓰기를 합니다";
$lang->edit->help_remove_indent = "들여쓰기를 제거합니다";
$lang->edit->help_list_number = "숫자로된 목록을 적용합니다";
$lang->edit->help_list_bullet = "기호로된 목록을 적용합니다";
$lang->edit->help_use_paragrapth = "문단 나누기를 하시려면 ctrl-엔터를 누르시면 됩니다. (글 작성완료후 alt-S를 누르면 저장이 됩니다)";
$lang->edit->upload = '첨부';
$lang->edit->upload_file = '파일 첨부';
$lang->edit->link_file = '본문 삽입';
$lang->edit->delete_selected = '선택 삭제';
$lang->edit->icon_align_article = '한 문단을 차지';
$lang->edit->icon_align_left = '글의 왼쪽으로';
$lang->edit->icon_align_middle = '가운데 정렬';
$lang->edit->icon_align_right = '글의 우측으로';
$lang->about_dblclick_in_editor = '배경, 글자, 이미지, 인용문등에서 더블클릭을 하시면 상세한 컴포넌트 설정이 가능합니다';
?>

View file

@ -1,62 +0,0 @@
<?php
/**
* @file modules/editor/tpl/lang/zh-CN.lang.php
* @author zero <zero@nzeo.com>
* @brief 简体中文语言包 (只收录基本内容)
**/
$lang->edit->fontname = '字体';
$lang->edit->fontsize = '大小';
$lang->edit->use_paragraph = '段落功能';
$lang->edit->fontlist = array(
"仿宋_GB2312",
"黑体",
"楷体_GB2312",
"宋体",
"times",
"Courier",
"Tahoma",
"Arial",
);
$lang->edit->header = "样式";
$lang->edit->header_list = array(
"h1" => "标题 1",
"h2" => "标题 2",
"h3" => "标题 3",
"h4" => "标题 4",
"h5" => "标题 5",
"h6" => "标题 6",
);
$lang->edit->submit = '确认';
$lang->edit->help_fontcolor = "文本颜色";
$lang->edit->help_fontbgcolor = "背景颜色";
$lang->edit->help_bold = "粗体";
$lang->edit->help_italic = "斜体";
$lang->edit->help_underline = "下划线";
$lang->edit->help_strike = "取消线";
$lang->edit->help_redo = "重新操作";
$lang->edit->help_undo = "返回操作";
$lang->edit->help_align_left = "左对齐";
$lang->edit->help_align_center = "居中对齐";
$lang->edit->help_align_right = "右对齐";
$lang->edit->help_add_indent = "缩进";
$lang->edit->help_remove_indent = "清除缩进";
$lang->edit->help_list_number = "有序列表";
$lang->edit->help_list_bullet = "无序列表";
$lang->edit->help_use_paragrapth = "分段请按 ctrl回车 (发表主题快捷键altS)";
$lang->edit->upload = '上传';
$lang->edit->upload_file = '上传附件';
$lang->edit->link_file = '插入内容';
$lang->edit->delete_selected = '删除所选';
$lang->edit->icon_align_article = '占一个段落';
$lang->edit->icon_align_left = '文本左侧';
$lang->edit->icon_align_middle = '居中对齐';
$lang->edit->icon_align_right = '文本右侧';
$lang->about_dblclick_in_editor = '双击背景, 文本, 图片, 引用即可对其相关组件进行详细设置。';
?>