mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@603 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4b82a36153
commit
2a252d8de4
8 changed files with 153 additions and 476 deletions
|
|
@ -44,7 +44,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->content_size = strlen($output);
|
$this->content_size = strlen($output);
|
||||||
print $output;
|
print trim($output);
|
||||||
|
|
||||||
// 디버깅 데이터 출력
|
// 디버깅 데이터 출력
|
||||||
$this->_debugOutput();
|
$this->_debugOutput();
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 147 B |
|
|
@ -2,40 +2,18 @@
|
||||||
/**
|
/**
|
||||||
* @file /modules/editor/components/emoticon/lang/ko.lang.php
|
* @file /modules/editor/components/emoticon/lang/ko.lang.php
|
||||||
* @author zero <zero@nzeo.com>
|
* @author zero <zero@nzeo.com>
|
||||||
* @brief 위지윅에디터(editor) 모듈 > 인용구 (quotation) 컴포넌트의 언어팩
|
* @brief 위지윅에디터(editor) 모듈 > 테이블 생성(table_maker) 컴포넌트의 언어팩
|
||||||
**/
|
**/
|
||||||
|
|
||||||
$lang->quotation = "인용구 사용하기";
|
$lang->table = "테이블 추가";
|
||||||
$lang->quotation_use_folder = "접기 기능 사용";
|
$lang->table_width = "가로크기";
|
||||||
$lang->quotation_opener = "열기 버튼 이름";
|
$lang->table_cols_count = "가로열 갯수";
|
||||||
$lang->quotation_closer = "닫기 버튼 이름";
|
$lang->table_rows_count = "가로열 갯수";
|
||||||
$lang->quotation_padding = "내부 여백";
|
$lang->table_cellspacing = "셀간 간격";
|
||||||
$lang->quotation_margin = "외부 여백";
|
$lang->table_cellpadding = "셀내 여백";
|
||||||
$lang->quotation_border_color = "테두리 색";
|
$lang->table_border = "외곽선 굵기";
|
||||||
$lang->quotation_border_thickness = "테두리 굵기";
|
$lang->table_inner_border = "구분선 굵기";
|
||||||
|
|
||||||
$lang->folder_text_bold = "글자 굵게";
|
$lang->table_border_color = "외곽선 색";
|
||||||
$lang->about_folder_text_bold = "선택하시면 링크의 글자가 굵게 표시됩니다";
|
$lang->table_bg_color = "배경 색";
|
||||||
|
|
||||||
$lang->folder_text_color = "링크 색상 ";
|
|
||||||
$lang->folder_text_color_blue = "파란색";
|
|
||||||
$lang->folder_text_color_red = "붉은색";
|
|
||||||
$lang->folder_text_color_yellow = "노란색";
|
|
||||||
$lang->folder_text_color_green = "녹색";
|
|
||||||
|
|
||||||
$lang->quotation_border_style = "테두리 종류";
|
|
||||||
$lang->quotation_border_style_list = array(
|
|
||||||
"없음",
|
|
||||||
"실선",
|
|
||||||
"점선",
|
|
||||||
"좌측 실선",
|
|
||||||
"우측 실선",
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang->quotation_bg_color = "배경 색";
|
|
||||||
|
|
||||||
$lang->quotation_opener = "열기 링크 이름";
|
|
||||||
$lang->quotation_opener = "닫기 링크 이름";
|
|
||||||
$lang->quotation_cmd_opener = "더 보기...";
|
|
||||||
$lang->quotation_cmd_closer = "닫기";
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* @class quotation
|
|
||||||
* @author zero (zero@nzeo.com)
|
|
||||||
* @brief 에디터에서 인용문 기능 제공.
|
|
||||||
**/
|
|
||||||
|
|
||||||
class quotation extends EditorHandler {
|
|
||||||
|
|
||||||
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
|
|
||||||
var $upload_target_srl = 0;
|
|
||||||
var $component_path = '';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief upload_target_srl과 컴포넌트의 경로를 받음
|
|
||||||
**/
|
|
||||||
function quotation($upload_target_srl, $component_path) {
|
|
||||||
$this->upload_target_srl = $upload_target_srl;
|
|
||||||
$this->component_path = $component_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
|
||||||
**/
|
|
||||||
function getPopupContent() {
|
|
||||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
|
||||||
$tpl_path = $this->component_path.'tpl';
|
|
||||||
$tpl_file = 'popup.html';
|
|
||||||
|
|
||||||
Context::set("tpl_path", $tpl_path);
|
|
||||||
|
|
||||||
require_once("./classes/template/TemplateHandler.class.php");
|
|
||||||
$oTemplate = new TemplateHandler();
|
|
||||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
|
||||||
*
|
|
||||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
|
||||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
|
||||||
**/
|
|
||||||
function transHTML($xml_obj) {
|
|
||||||
$use_folder = $xml_obj->attrs->use_folder;
|
|
||||||
$folder_opener = $xml_obj->attrs->folder_opener;
|
|
||||||
if(!$folder_opener) $folder_opener = "more...";
|
|
||||||
$folder_closer = $xml_obj->attrs->folder_closer;
|
|
||||||
if(!$folder_closer) $folder_closer= "close...";
|
|
||||||
$bold = $xml_obj->attrs->bold;
|
|
||||||
$color = $xml_obj->attrs->color;
|
|
||||||
$margin = $xml_obj->attrs->margin;
|
|
||||||
$padding = $xml_obj->attrs->padding;
|
|
||||||
$border_style = $xml_obj->attrs->border_style;
|
|
||||||
$border_thickness = $xml_obj->attrs->border_thickness;
|
|
||||||
$border_color = $xml_obj->attrs->border_color;
|
|
||||||
$bg_color = $xml_obj->attrs->bg_color;
|
|
||||||
|
|
||||||
$output = "";
|
|
||||||
$style = sprintf('margin:%spx;padding:%spx;background-color:#%s;', $margin, $padding, $bg_color);
|
|
||||||
switch($border_style) {
|
|
||||||
case "solid" :
|
|
||||||
$style .= "border:".$border_thickness."px solid #".$border_color.";";
|
|
||||||
break;
|
|
||||||
case "dotted" :
|
|
||||||
$style .= "border:".$border_thickness."px dotted #".$border_color.";";
|
|
||||||
break;
|
|
||||||
case "left_solid" :
|
|
||||||
$style .= "border-left:".$border_thickness."px solid #".$border_color.";";
|
|
||||||
break;
|
|
||||||
case "left_dotted" :
|
|
||||||
$style .= "border-elft:".$border_thickness."px dotted #".$border_color.";";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($use_folder == "Y") {
|
|
||||||
$folder_id = rand(1000000,9999999);
|
|
||||||
|
|
||||||
if($bold == "Y") $class = "bold";
|
|
||||||
switch($color) {
|
|
||||||
case "red" :
|
|
||||||
$class .= " editor_red_text";
|
|
||||||
break;
|
|
||||||
case "yellow" :
|
|
||||||
$class .= " editor_yellow_text";
|
|
||||||
break;
|
|
||||||
case "green" :
|
|
||||||
$class .= " editor_green_text";
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
$class .= " editor_blue_text";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$style .= "display:none;";
|
|
||||||
|
|
||||||
$folder_margin = sprintf("%spx %spx %spx %spx", $margin, $margin, 10, $margin);
|
|
||||||
$output .= sprintf('<div id="folder_open_%s" style="margin:%s;display:block;"><a class="%s" href="#" onclick="zbxe_folder_open(\'%s\');return false;">%s</a></div>', $folder_id, $folder_margin, $class, $folder_id, $folder_opener);
|
|
||||||
$output .= sprintf('<div id="folder_close_%s" style="margin:%s;display:none;"><a class="%s" href="#" onclick="zbxe_folder_close(\'%s\');return false;">%s</a></div>', $folder_id, $folder_margin, $class, $folder_id, $folder_closer);
|
|
||||||
|
|
||||||
$output .= sprintf('<div style="%s" id="folder_%s">', $style, $folder_id);
|
|
||||||
debugPrint($output);
|
|
||||||
} else {
|
|
||||||
$output .= sprintf('<div style="%s">', $style);
|
|
||||||
}
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
38
modules/editor/components/table_maker/table_maker.class.php
Normal file
38
modules/editor/components/table_maker/table_maker.class.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @class table_maker
|
||||||
|
* @author zero (zero@nzeo.com)
|
||||||
|
* @brief 에디터에 테이블 추가 기능
|
||||||
|
**/
|
||||||
|
|
||||||
|
class table_maker extends EditorHandler {
|
||||||
|
|
||||||
|
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
|
||||||
|
var $upload_target_srl = 0;
|
||||||
|
var $component_path = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief upload_target_srl과 컴포넌트의 경로를 받음
|
||||||
|
**/
|
||||||
|
function table_maker($upload_target_srl, $component_path) {
|
||||||
|
$this->upload_target_srl = $upload_target_srl;
|
||||||
|
$this->component_path = $component_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||||
|
**/
|
||||||
|
function getPopupContent() {
|
||||||
|
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||||
|
$tpl_path = $this->component_path.'tpl';
|
||||||
|
$tpl_file = 'popup.html';
|
||||||
|
|
||||||
|
Context::set("tpl_path", $tpl_path);
|
||||||
|
|
||||||
|
require_once("./classes/template/TemplateHandler.class.php");
|
||||||
|
$oTemplate = new TemplateHandler();
|
||||||
|
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
.editor_window {
|
.editor_window {
|
||||||
width:555px;
|
width:620px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -16,57 +16,34 @@
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.item_area {
|
||||||
float:left;
|
|
||||||
width:100px;
|
|
||||||
clear:left;
|
clear:left;
|
||||||
text-align:left;
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
width:90px;
|
||||||
|
float:left;
|
||||||
|
text-align:right;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
margin:5px;
|
margin:5px;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
font-size:9pt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
float:left;
|
|
||||||
width:400px;
|
|
||||||
text-align:left;
|
|
||||||
margin:5px;
|
|
||||||
font-size:9pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
#folder_area {
|
|
||||||
clear:left;
|
|
||||||
height:115px;
|
|
||||||
border:1px dotted #DDDDDD;
|
|
||||||
margin:0px 10px 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body label {
|
|
||||||
cursor:pointer;
|
|
||||||
font-size:9pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor_input {
|
|
||||||
width:50px;
|
|
||||||
height:13px;
|
|
||||||
font-size:9pt;
|
|
||||||
border:1px solid #AAAAAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor_input_long {
|
|
||||||
width:380px;
|
|
||||||
height:13px;
|
|
||||||
font-size:9pt;
|
|
||||||
border:1px solid #AAAAAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor_select {
|
|
||||||
width:80px;
|
width:80px;
|
||||||
height:14px;
|
float:left;
|
||||||
|
text-align:left;
|
||||||
|
margin:5px 10px 5px 5px;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table_input {
|
||||||
|
width:40px;
|
||||||
|
height:13px;
|
||||||
|
font-size:9pt;
|
||||||
|
border:1px solid #AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
.editor_button_area {
|
.editor_button_area {
|
||||||
clear:both;
|
clear:both;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
|
|
|
||||||
|
|
@ -4,128 +4,75 @@
|
||||||
|
|
||||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||||
<div class="editor_window">
|
<div class="editor_window">
|
||||||
<div class="editor_title">{$lang->quotation}</div>
|
<div class="editor_title">{$lang->table}</div>
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_use_folder}</div>
|
<div class="item_area">
|
||||||
<div class="body"><input type="checkbox" id="quotation_use" value="Y" onclick="toggle_folder(this)" /></div>
|
<div class="header">{$lang->table_cols_count} :</div>
|
||||||
|
<div class="body"><input type="text" class="table_input" id="cols_count" value="3" /></div>
|
||||||
|
|
||||||
<div id="folder_area" style="display:none">
|
<div class="header">{$lang->table_rows_count} :</div>
|
||||||
<div class="header">{$lang->quotation_opener}</div>
|
<div class="body"><input type="text" class="table_input" id="rows_count" value="3" /></div>
|
||||||
<div class="body"><input type="text" class="editor_input_long" id="quotation_opener" value="{$lang->quotation_cmd_opener}" /></div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_closer}</div>
|
<div class="header">{$lang->table_width} :</div>
|
||||||
<div class="body"><input type="text" class="editor_input_long" id="quotation_closer" value="{$lang->quotation_cmd_closer}" /></div>
|
<div class="body"><input type="text" class="table_input" id="width" value="600" />px</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="header">{$lang->folder_text_bold}</div>
|
<div class="item_area">
|
||||||
<div class="body"><input type="checkbox" name="bold" value="Y" id="quotation_bold" /> <label for="quotation_bold">{$lang->about_folder_text_bold}</label></div>
|
<div class="header">{$lang->table_border} :</div>
|
||||||
|
<div class="body"><input type="text" class="table_input" id="border" value="1" />px</div>
|
||||||
|
|
||||||
<div class="header">{$lang->folder_text_color}</div>
|
<div class="header">{$lang->table_inner_border} :</div>
|
||||||
<div class="body">
|
<div class="body"><input type="text" class="table_input" id="inner_border" value="1" />px</div>
|
||||||
<span>
|
</div>
|
||||||
<input type="radio" name="color" value="blue" id="quotation_color_blue" />
|
|
||||||
<label for="quotation_color_blue" class="editor_blue_text">{$lang->folder_text_color_blue}</label>
|
<div class="item_area">
|
||||||
</span>
|
<div class="header">{$lang->table_cellspacing} :</div>
|
||||||
<span>
|
<div class="body"><input type="text" class="table_input" id="cellspacing" value="0" />px</div>
|
||||||
<input type="radio" name="color" value="red" id="quotation_color_red" />
|
|
||||||
<label for="quotation_color_red" class="editor_red_text">{$lang->folder_text_color_red}</label>
|
<div class="header">{$lang->table_cellpadding} :</div>
|
||||||
</span>
|
<div class="body"><input type="text" class="table_input" id="cellpadding" value="2" />px</div>
|
||||||
<span>
|
</div>
|
||||||
<input type="radio" name="color" value="yellow" id="quotation_color_yellow" />
|
|
||||||
<label for="quotation_color_yellow" class="editor_yellow_text">{$lang->folder_text_color_yellow}</label>
|
<div class="item_area">
|
||||||
</span>
|
<div class="header">{$lang->table_border_color} :</div>
|
||||||
<span>
|
<div class="body">
|
||||||
<input type="radio" name="color" value="green" id="quotation_color_green" />
|
<div class="editor_color_box">
|
||||||
<label for="quotation_color_green" class="editor_green_text">{$lang->folder_text_color_green}</label>
|
<script type="text/javascript">
|
||||||
</span>
|
printColor("border", "{$tpl_path}/images/blank.gif");
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="editor_color_input">
|
||||||
|
<table border="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><img src="./images/border_solid.gif" alt="blank" class="border_preview_color" id="border_preview_color" /></td>
|
||||||
|
<td>#</td>
|
||||||
|
<td><input type="text" id="border_color_input" size="6" maxlength="6" class="table_input" value="88EE22" onkeyup="manual_select_color('border',this)"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item_area">
|
||||||
|
<div class="header">{$lang->table_bg_color} :</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="editor_color_box">
|
||||||
|
<script type="text/javascript">
|
||||||
|
printColor("bg", "{$tpl_path}/images/blank.gif");
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="editor_color_input">
|
||||||
|
<table border="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td><img src="./images/blank.gif" alt="blank" class="bg_preview_color" id="bg_preview_color" /></td>
|
||||||
|
<td>#</td>
|
||||||
|
<td><input type="text" id="bg_color_input" size="6" maxlength="6" class="table_input" value="FFFFFF" onkeyup="manual_select_color('bg',this)"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_padding}</div>
|
|
||||||
<div class="body"><input type="text" class="editor_input" id="quotation_padding" value="5" />px</div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_margin}</div>
|
|
||||||
<div class="body"><input type="text" class="editor_input" id="quotation_margin" value="5" />px</div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_border_style}</div>
|
|
||||||
<div class="body">
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="border_style" value="" id="border_style_none" />
|
|
||||||
<label for="border_style_none">
|
|
||||||
<img src="./images/blank.gif" class="border_preview_none_color" alt="blank" />
|
|
||||||
{$lang->quotation_border_style_list[0]}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="border_style" value="solid" id="border_style_solid" checked="true" />
|
|
||||||
<label for="border_style_solid">
|
|
||||||
<img src="./images/border_solid.gif" class="border_preview_color" id="border_style_solid_icon" alt="solid" />
|
|
||||||
{$lang->quotation_border_style_list[1]}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="border_style" value="dotted" id="border_style_dotted" />
|
|
||||||
<label for="border_style_dotted">
|
|
||||||
<img src="./images/border_dotted.gif" class="border_preview_color" id="border_style_dotted_icon" alt="dotted" />
|
|
||||||
{$lang->quotation_border_style_list[2]}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="border_style" value="left_solid" id="border_style_left_solid" />
|
|
||||||
<label for="border_style_left_solid">
|
|
||||||
<img src="./images/border_left_solid.gif" class="border_preview_color" id="border_style_left_solid_icon" alt="left solid"/>
|
|
||||||
{$lang->quotation_border_style_list[3]}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="radio" name="border_style" value="left_dotted" id="border_style_left_dotted" />
|
|
||||||
<label for="border_style_left_dotted">
|
|
||||||
<img src="./images/border_left_dotted.gif" class="border_preview_color" id="border_style_left_dotted_icon" alt="left dotted"/>
|
|
||||||
{$lang->quotation_border_style_list[4]}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_border_thickness}</div>
|
|
||||||
<div class="body"><input type="text" class="editor_input" id="border_thickness" value="1" />px</div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_border_color}</div>
|
|
||||||
<div class="body">
|
|
||||||
<div class="editor_color_box">
|
|
||||||
<script type="text/javascript">
|
|
||||||
printColor("border", "{$tpl_path}/images/blank.gif");
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
<div class="editor_color_input">
|
|
||||||
<table border="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td><img src="./images/border_solid.gif" alt="blank" class="border_preview_color" id="border_preview_color" /></td>
|
|
||||||
<td>#</td>
|
|
||||||
<td><input type="text" id="border_color_input" size="6" maxlength="6" class="editor_input" value="88EE22" onkeyup="manual_select_color('border',this)"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_bg_color}</div>
|
|
||||||
<div class="body">
|
|
||||||
<div class="editor_color_box">
|
|
||||||
<script type="text/javascript">
|
|
||||||
printColor("bg", "{$tpl_path}/images/blank.gif");
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
<div class="editor_color_input">
|
|
||||||
<table border="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td><img src="./images/blank.gif" alt="blank" class="bg_preview_color" id="bg_preview_color" /></td>
|
|
||||||
<td>#</td>
|
|
||||||
<td><input type="text" id="bg_color_input" size="6" maxlength="6" class="editor_input" value="FFFFFF" onkeyup="manual_select_color('bg',this)"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="editor_button_area">
|
<div class="editor_button_area">
|
||||||
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertQuotation()" />
|
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertTable()" />
|
||||||
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
|
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,193 +3,53 @@
|
||||||
* 있으면 가져와서 원하는 곳에 삽입
|
* 있으면 가져와서 원하는 곳에 삽입
|
||||||
**/
|
**/
|
||||||
var selected_node = null;
|
var selected_node = null;
|
||||||
function getQuotation() {
|
function getTable() {
|
||||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||||
if(typeof(opener)=="undefined") return;
|
if(typeof(opener)=="undefined") return;
|
||||||
|
|
||||||
var node = opener.editorPrevNode;
|
|
||||||
if(!node || node.nodeName != "DIV") return;
|
|
||||||
|
|
||||||
selected_node = node;
|
|
||||||
|
|
||||||
var use_folder = node.getAttribute("use_folder");
|
|
||||||
var folder_opener = node.getAttribute("folder_opener");
|
|
||||||
var folder_closer = node.getAttribute("folder_closer");
|
|
||||||
var bold = node.getAttribute("bold");
|
|
||||||
var color = node.getAttribute("color");
|
|
||||||
var margin = node.getAttribute("margin");
|
|
||||||
var padding = node.getAttribute("padding");
|
|
||||||
var border_style = node.getAttribute("border_style");
|
|
||||||
var border_thickness = node.getAttribute("border_thickness");
|
|
||||||
var border_color = node.getAttribute("border_color");
|
|
||||||
var bg_color = node.getAttribute("bg_color");
|
|
||||||
|
|
||||||
if(use_folder=="Y") xGetElementById("quotation_use").checked = true;
|
|
||||||
else xGetElementById("quotation_use").checked = false;
|
|
||||||
toggle_folder( xGetElementById("quotation_use") );
|
|
||||||
|
|
||||||
if(bold=="Y") xGetElementById("quotation_bold").checked = true;
|
|
||||||
switch(color) {
|
|
||||||
case "red" :
|
|
||||||
xGetElementById("quotation_color_red").checked = true;
|
|
||||||
break;
|
|
||||||
case "yellow" :
|
|
||||||
xGetElementById("quotation_color_yellow").checked = true;
|
|
||||||
break;
|
|
||||||
case "green" :
|
|
||||||
xGetElementById("quotation_color_green").checked = true;
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
xGetElementById("quotation_color_blue").checked = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
xGetElementById("quotation_opener").value = folder_opener;
|
|
||||||
xGetElementById("quotation_closer").value = folder_closer;
|
|
||||||
xGetElementById("quotation_margin").value = margin;
|
|
||||||
xGetElementById("quotation_padding").value = padding;
|
|
||||||
|
|
||||||
switch(border_style) {
|
|
||||||
case "solid" :
|
|
||||||
xGetElementById("border_style_solid").checked = true;
|
|
||||||
break;
|
|
||||||
case "dotted" :
|
|
||||||
xGetElementById("border_style_dotted").checked = true;
|
|
||||||
break;
|
|
||||||
case "left_solid" :
|
|
||||||
xGetElementById("border_style_left_solid").checked = true;
|
|
||||||
break;
|
|
||||||
case "left_dotted" :
|
|
||||||
xGetElementById("border_style_left_dotted").checked = true;
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
xGetElementById("border_style_none").checked = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
xGetElementById("border_thickness").value = border_thickness;
|
|
||||||
|
|
||||||
select_color('border', border_color);
|
|
||||||
select_color('bg', bg_color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 추가 버튼 클릭시 부모창의 위지윅 에디터에 인용구 추가 */
|
/* 추가 버튼 클릭시 부모창의 위지윅 에디터에 인용구 추가 */
|
||||||
function insertQuotation() {
|
function insertTable() {
|
||||||
if(typeof(opener)=="undefined") return;
|
if(typeof(opener)=="undefined") return;
|
||||||
|
|
||||||
var use_folder = "N";
|
var cols_count = parseInt(xGetElementById("cols_count").value,10);
|
||||||
if(xGetElementById("quotation_use").checked) use_folder = "Y";
|
if(!cols_count) cols_count = 1;
|
||||||
|
|
||||||
var folder_opener = xGetElementById("quotation_opener").value;
|
var rows_count = parseInt(xGetElementById("rows_count").value,10);
|
||||||
var folder_closer = xGetElementById("quotation_closer").value;
|
if(!rows_count) rows_count = 1;
|
||||||
if(!folder_opener||!folder_closer) use_folder = "N";
|
|
||||||
|
|
||||||
var bold = "N";
|
var width = parseInt(xGetElementById("width").value,10);
|
||||||
if(xGetElementById("quotation_bold").checked) bold = "Y";
|
|
||||||
var color = "blue";
|
|
||||||
if(xGetElementById("quotation_color_red").checked) color = "red";
|
|
||||||
if(xGetElementById("quotation_color_yellow").checked) color = "yellow";
|
|
||||||
if(xGetElementById("quotation_color_green").checked) color = "green";
|
|
||||||
|
|
||||||
var margin = parseInt(xGetElementById("quotation_margin").value,10);
|
var border = parseInt(xGetElementById("border").value,10);
|
||||||
|
|
||||||
var padding = parseInt(xGetElementById("quotation_padding").value,10);
|
var inner_border = parseInt(xGetElementById("inner_border").value,10);
|
||||||
|
|
||||||
var border_style = "solid";
|
var cellspacing = parseInt(xGetElementById("cellspacing").value,10);
|
||||||
if(xGetElementById("border_style_none").checked) border_style = "none";
|
|
||||||
if(xGetElementById("border_style_solid").checked) border_style = "solid";
|
|
||||||
if(xGetElementById("border_style_dotted").checked) border_style = "dotted";
|
|
||||||
if(xGetElementById("border_style_left_solid").checked) border_style = "left_solid";
|
|
||||||
if(xGetElementById("border_style_left_dotted").checked) border_style = "left_dotted";
|
|
||||||
|
|
||||||
var border_thickness = parseInt(xGetElementById("border_thickness").value,10);
|
var cellpadding = parseInt(xGetElementById("cellpadding").value,10);
|
||||||
|
|
||||||
var border_color = xGetElementById("border_color_input").value;
|
var border_color = xGetElementById("border_color_input").value;
|
||||||
|
if(border_color.length!=6) border_color = "000000";
|
||||||
|
|
||||||
var bg_color = xGetElementById("bg_color_input").value;
|
var bg_color = xGetElementById("bg_color_input").value;
|
||||||
|
if(bg_color.length!=6) bg_color = "FFFFFF";
|
||||||
|
|
||||||
var content = "";
|
var text = "\n<table width=\""+width+"\" border=\""+inner_border+"\" cellspacing=\""+cellspacing+"\" cellpadding=\""+cellpadding+"\" style=\"border:"+border+"px solid #"+border_color+";background-color:#"+bg_color+"\">";
|
||||||
if(selected_node) content = xInnerHtml(selected_node);
|
|
||||||
else content = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
|
||||||
|
|
||||||
var style = "margin:"+margin+"px; padding:"+padding+"px; background-color:#"+bg_color+";";
|
for(var row=0; row<rows_count;row++) {
|
||||||
switch(border_style) {
|
text += "<tr>";
|
||||||
case "solid" :
|
for(var col=0; col<cols_count;col++) {
|
||||||
style += "border:"+border_thickness+"px solid #"+border_color+";";
|
text += "<td> </td>";
|
||||||
break;
|
|
||||||
case "dotted" :
|
|
||||||
style += "border:"+border_thickness+"px dotted #"+border_color+";";
|
|
||||||
break;
|
|
||||||
case "left_solid" :
|
|
||||||
style += "border-left:"+border_thickness+"px solid #"+border_color+";";
|
|
||||||
break;
|
|
||||||
case "left_dotted" :
|
|
||||||
style += "border-left:"+border_thickness+"px dotted #"+border_color+";";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!content) content = " ";
|
|
||||||
|
|
||||||
var text = "\n<div editor_component=\"quotation\" use_folder=\""+use_folder+"\" folder_opener=\""+folder_opener+"\" folder_closer=\""+folder_closer+"\" bold=\""+bold+"\" color=\""+color+"\" margin=\""+margin+"\" padding=\""+padding+"\" border_style=\""+border_style+"\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\" style=\""+style+"\">"+content+"</div>\n<br />";
|
|
||||||
|
|
||||||
if(selected_node) {
|
|
||||||
selected_node.setAttribute("use_folder", use_folder);
|
|
||||||
selected_node.setAttribute("folder_opener", folder_opener);
|
|
||||||
selected_node.setAttribute("folder_closer", folder_closer);
|
|
||||||
selected_node.setAttribute("bold", bold);
|
|
||||||
selected_node.setAttribute("color", color);
|
|
||||||
selected_node.setAttribute("margin", margin);
|
|
||||||
selected_node.setAttribute("padding", padding);
|
|
||||||
selected_node.setAttribute("border_style", border_style);
|
|
||||||
selected_node.setAttribute("border_thickness", border_thickness);
|
|
||||||
selected_node.setAttribute("border_color", border_color);
|
|
||||||
selected_node.setAttribute("bg_color", bg_color);
|
|
||||||
selected_node.setAttribute("style", style);
|
|
||||||
|
|
||||||
selected_node.style.margin = margin+"px";
|
|
||||||
selected_node.style.padding = padding +"px";
|
|
||||||
selected_node.style.backgroundColor = "#"+bg_color;
|
|
||||||
|
|
||||||
selected_node.style.borderStyle = "none";
|
|
||||||
selected_node.style.borderWidth = "0px";
|
|
||||||
|
|
||||||
switch(border_style) {
|
|
||||||
case "solid" :
|
|
||||||
selected_node.style.borderStyle = "solid";
|
|
||||||
selected_node.style.borderWidth = border_thickness+"px";
|
|
||||||
selected_node.style.borderColor = "#"+border_color;
|
|
||||||
break;
|
|
||||||
case "dotted" :
|
|
||||||
selected_node.style.borderStyle = "dotted";
|
|
||||||
selected_node.style.borderWidth = border_thickness+"px";
|
|
||||||
selected_node.style.borderColor = "#"+border_color;
|
|
||||||
break;
|
|
||||||
case "left_solid" :
|
|
||||||
selected_node.style.borderLeftStyle = "solid";
|
|
||||||
selected_node.style.borderLeftWidth = border_thickness+"px";
|
|
||||||
selected_node.style.borderLeftColor = "#"+border_color;
|
|
||||||
break;
|
|
||||||
case "left_dotted" :
|
|
||||||
selected_node.style.borderLeftStyle = "dotted";
|
|
||||||
selected_node.style.borderLeftWidth = border_thickness+"px";
|
|
||||||
selected_node.style.borderCLeftColor = "#"+border_color;
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
selected_node.style.borderStyle = "solid";
|
|
||||||
selected_node.style.borderWidth = "0px";
|
|
||||||
selected_node.style.borderColor = "#"+border_color;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
text += "</tr>";
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
|
||||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
|
||||||
opener.editorReplaceHTML(iframe_obj, text);
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
|
||||||
}
|
}
|
||||||
|
text += "</table>\n<br />";
|
||||||
|
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||||
|
opener.editorReplaceHTML(iframe_obj, text);
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|
@ -198,13 +58,6 @@ function insertQuotation() {
|
||||||
function select_color(type, code) {
|
function select_color(type, code) {
|
||||||
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+code;
|
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+code;
|
||||||
xGetElementById(type+"_color_input").value = code;
|
xGetElementById(type+"_color_input").value = code;
|
||||||
|
|
||||||
if(type=="border") {
|
|
||||||
xGetElementById("border_style_solid_icon").style.backgroundColor = "#"+code;
|
|
||||||
xGetElementById("border_style_dotted_icon").style.backgroundColor = "#"+code;
|
|
||||||
xGetElementById("border_style_left_solid_icon").style.backgroundColor = "#"+code;
|
|
||||||
xGetElementById("border_style_left_dotted_icon").style.backgroundColor = "#"+code;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 수동 색상 변경시 */
|
/* 수동 색상 변경시 */
|
||||||
|
|
@ -251,11 +104,4 @@ function printColorBlock(type, code, blank_img_src) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 폴더 여닫기 기능 toggle */
|
xAddEventListener(window, "load", getTable);
|
||||||
function toggle_folder(obj) {
|
|
||||||
if(obj.checked) xGetElementById("folder_area").style.display = "block";
|
|
||||||
else xGetElementById("folder_area").style.display = "none";
|
|
||||||
setFixedPopupSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
xAddEventListener(window, "load", getQuotation);
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue