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/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
8326004cb2
2773 changed files with 91485 additions and 0 deletions
BIN
modules/editor/components/quotation/icon.gif
Normal file
BIN
modules/editor/components/quotation/icon.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 696 B |
17
modules/editor/components/quotation/info.xml
Normal file
17
modules/editor/components/quotation/info.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component version="0.1">
|
||||
<title xml:lang="ko">인용구 작성</title>
|
||||
<title xml:lang="jp">引用文作成</title>
|
||||
<title xml:lang="zh-CN">引用</title>
|
||||
<title xml:lang="en">Quotations</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">특정 범위를 인용문으로 꾸밀 수 있습니다. 외곽선의 종류나 색상, 굵기를 수정할 수 있으며 열기/닫기 기능을 가진 폴더기능을 만들 수 있습니다.</description>
|
||||
<description xml:lang="jp">特定範囲を引用文として表示することができます。ボーダーの種類、色、太さを修正することができ、「開く・畳む」の機能も作成できます。</description>
|
||||
<description xml:lang="zh-CN">可以把要发表的主题特定范围用引用布置。可以修改外围线的种类或粗细,还支持展开/折叠功能。</description>
|
||||
<description xml:lang="en">You can decorate specific range as quotation. The style, color or thickness of outline can be modified and folder system which has open/close function can be made.</description>
|
||||
</author>
|
||||
</component>
|
||||
40
modules/editor/components/quotation/lang/en.lang.php
Normal file
40
modules/editor/components/quotation/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/quotation/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief editor module > language pack of quotation component
|
||||
**/
|
||||
|
||||
$lang->quotation_use_folder = "Use Folding Function";
|
||||
$lang->quotation_opener = "Name of Open Button";
|
||||
$lang->quotation_closer = "Name of Close Button";
|
||||
$lang->quotation_padding = "Padding";
|
||||
$lang->quotation_margin = "Margin";
|
||||
$lang->quotation_border_color = "Border Color";
|
||||
$lang->quotation_border_thickness = "Border Thickness";
|
||||
|
||||
$lang->folder_text_bold = "Text Boldness";
|
||||
$lang->about_folder_text_bold = "Make Link Text Bold";
|
||||
|
||||
$lang->folder_text_color = "Link Color";
|
||||
$lang->folder_text_color_blue = "Blue";
|
||||
$lang->folder_text_color_red = "Red";
|
||||
$lang->folder_text_color_yellow = "Yellow";
|
||||
$lang->folder_text_color_green = "Green";
|
||||
|
||||
$lang->quotation_border_style = "Border Style";
|
||||
$lang->quotation_border_style_list = array(
|
||||
"None",
|
||||
"Solid",
|
||||
"Dotted",
|
||||
"Solid on Left",
|
||||
"Solid on Right",
|
||||
);
|
||||
|
||||
$lang->quotation_bg_color = "Background Color";
|
||||
|
||||
$lang->quotation_opener = "Name of Open Link";
|
||||
$lang->quotation_opener = "Name of Close Link";
|
||||
$lang->quotation_cmd_opener = "More...";
|
||||
$lang->quotation_cmd_closer = "Close";
|
||||
?>
|
||||
40
modules/editor/components/quotation/lang/jp.lang.php
Normal file
40
modules/editor/components/quotation/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/emoticon/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa
|
||||
* @brief ウィジウィグエディター(editor)モジュール > 引用句 (quotation)コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->quotation_use_folder = "畳み機能使用";
|
||||
$lang->quotation_opener = "開くボタン名";
|
||||
$lang->quotation_closer = "閉じるボタン名";
|
||||
$lang->quotation_padding = "内部余白";
|
||||
$lang->quotation_margin = "外部余白";
|
||||
$lang->quotation_border_color = "ボーダーカラー";
|
||||
$lang->quotation_border_thickness = "ボーダー";
|
||||
|
||||
$lang->folder_text_bold = "太字にする";
|
||||
$lang->about_folder_text_bold = "チェックするとリンクの文字列が太字で表示されます。";
|
||||
|
||||
$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 = "閉じる";
|
||||
?>
|
||||
40
modules/editor/components/quotation/lang/ko.lang.php
Normal file
40
modules/editor/components/quotation/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/emoticon/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > 인용구 (quotation) 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->quotation_use_folder = "접기 기능 사용";
|
||||
$lang->quotation_opener = "열기 버튼 이름";
|
||||
$lang->quotation_closer = "닫기 버튼 이름";
|
||||
$lang->quotation_padding = "내부 여백";
|
||||
$lang->quotation_margin = "외부 여백";
|
||||
$lang->quotation_border_color = "테두리 색";
|
||||
$lang->quotation_border_thickness = "테두리 굵기";
|
||||
|
||||
$lang->folder_text_bold = "글자 굵게";
|
||||
$lang->about_folder_text_bold = "선택하시면 링크의 글자가 굵게 표시됩니다";
|
||||
|
||||
$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 = "닫기";
|
||||
?>
|
||||
40
modules/editor/components/quotation/lang/zh-CN.lang.php
Normal file
40
modules/editor/components/quotation/lang/zh-CN.lang.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/emoticon/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 网页编辑器(editor) 模块 > 引用 (quotation) 组件语言包
|
||||
**/
|
||||
|
||||
$lang->quotation_use_folder = "使用折叠功能";
|
||||
$lang->quotation_opener = "打开按钮名称";
|
||||
$lang->quotation_closer = "关闭按钮名称";
|
||||
$lang->quotation_padding = "内测边距";
|
||||
$lang->quotation_margin = "外侧边距";
|
||||
$lang->quotation_border_color = "边框颜色";
|
||||
$lang->quotation_border_thickness = "边框粗细";
|
||||
|
||||
$lang->folder_text_bold = "粗体显示";
|
||||
$lang->about_folder_text_bold = "选择此项将把链接的文本显示为粗体";
|
||||
|
||||
$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 = "关闭";
|
||||
?>
|
||||
108
modules/editor/components/quotation/quotation.class.php
Normal file
108
modules/editor/components/quotation/quotation.class.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?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);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
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;
|
||||
$body = $xml_obj->body;
|
||||
|
||||
$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">%s</div>', $style, $folder_id,$body);
|
||||
} else {
|
||||
$output .= sprintf('<div style="%s">%s</div>', $style, $body);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
BIN
modules/editor/components/quotation/tpl/images/blank.gif
Normal file
BIN
modules/editor/components/quotation/tpl/images/blank.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
BIN
modules/editor/components/quotation/tpl/images/border_dotted.gif
Normal file
BIN
modules/editor/components/quotation/tpl/images/border_dotted.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 B |
Binary file not shown.
|
After Width: | Height: | Size: 79 B |
Binary file not shown.
|
After Width: | Height: | Size: 77 B |
BIN
modules/editor/components/quotation/tpl/images/border_solid.gif
Normal file
BIN
modules/editor/components/quotation/tpl/images/border_solid.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 89 B |
24
modules/editor/components/quotation/tpl/popup.css
Normal file
24
modules/editor/components/quotation/tpl/popup.css
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../../modules/admin/tpl/css/admin.css);
|
||||
|
||||
#folder_area { clear:left; }
|
||||
|
||||
.border_type { float:left; margin-right:1em; width:120px; }
|
||||
|
||||
img.color_icon { width:14px; height:14px; border:1px solid #FFFFFF; }
|
||||
|
||||
img.color_icon_over { width:14px; height:14px; border:1px solid #000000; cursor:pointer; }
|
||||
|
||||
img.border_preview_color { width:30px; height:16px; border:1px solid #EEEEEE; background-color:#88EE22; }
|
||||
|
||||
img.border_preview_none_color { width:30px; height:12px; border:1px solid #EEEEEE; background-color:#FFFFFF; }
|
||||
|
||||
img.bg_preview_color { width:30px; height:16px; border:1px solid #000000; background-color:#FFFFFF; }
|
||||
|
||||
.editor_color_box { clear:both; height:65px; width:400px; border:1px solid #DDDDDD; padding:2px; }
|
||||
|
||||
.editor_link_type { float:left; margin-right:.5em; vertical-align:middle; white-space:nowrap; }
|
||||
|
||||
.editor_color_input { clear:both; }
|
||||
|
||||
li { list-style:none; float:left; margin:5px 10px 0px 0;}
|
||||
149
modules/editor/components/quotation/tpl/popup.html
Normal file
149
modules/editor/components/quotation/tpl/popup.html
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<div id="popHeadder">
|
||||
<h1>{$component_info->title} ver. {$component_info->version}</h1>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="tableType5">
|
||||
<col width="120" />
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_use_folder}</th>
|
||||
<td colspan="5">
|
||||
<input type="checkbox" id="quotation_use" value="Y" onclick="toggle_folder(this)" />
|
||||
|
||||
<div id="folder_area" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_opener}</th>
|
||||
<td><input type="text" class="inputTypeText" id="quotation_opener" value="{$lang->quotation_cmd_opener}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_closer}</th>
|
||||
<td><input type="text" class="inputTypeText" id="quotation_closer" value="{$lang->quotation_cmd_closer}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->folder_text_bold}</th>
|
||||
<td><input type="checkbox" name="bold" value="Y" id="quotation_bold" /> <label for="quotation_bold">{$lang->about_folder_text_bold}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->folder_text_color}</th>
|
||||
<td>
|
||||
<div class="editor_link_type" >
|
||||
<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>
|
||||
<div class="editor_link_type" >
|
||||
<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>
|
||||
<div class="editor_link_type" >
|
||||
<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>
|
||||
<div class="editor_link_type" >
|
||||
<input type="radio" name="color" value="green" id="quotation_color_green" />
|
||||
<label for="quotation_color_green" class="editor_green_text">{$lang->folder_text_color_green}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_padding}</th>
|
||||
<td><input type="text" class="inputTypeText" size="2" id="quotation_padding" value="5" />px</td>
|
||||
<th scope="row">{$lang->quotation_margin}</th>
|
||||
<td><input type="text" class="inputTypeText" size="2" id="quotation_margin" value="5" />px</td>
|
||||
<th scope="row">{$lang->quotation_border_thickness}</th>
|
||||
<td><input type="text" class="inputTypeText" size="1" id="border_thickness" value="1" />px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_border_style}</th>
|
||||
<td colspan="5">
|
||||
<div class="border_type">
|
||||
<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 class="border_type">
|
||||
<input type="radio" name="border_style" value="solid" id="border_style_solid" checked="checked" />
|
||||
<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 class="border_type">
|
||||
<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 class="border_type">
|
||||
<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 class="border_type">
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_border_color}</th>
|
||||
<td colspan="5">
|
||||
<div class="editor_color_box">
|
||||
<script type="text/javascript">
|
||||
printColor("border", "{$tpl_path}/images/blank.gif");
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<ul class="buttonLeft">
|
||||
<li><img src="./images/border_solid.gif" alt="blank" class="border_preview_color" id="border_preview_color" /></li>
|
||||
<li>#<input type="text" id="border_color_input" size="6" maxlength="6" class="inputTypeText" value="000000" onkeyup="manual_select_color('border',this)"/></li>
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->quotation_bg_color}</th>
|
||||
<td colspan="5">
|
||||
<div class="editor_color_box">
|
||||
<script type="text/javascript">
|
||||
printColor("bg", "{$tpl_path}/images/blank.gif");
|
||||
</script>
|
||||
</div>
|
||||
<ul class="buttonLeft">
|
||||
<li><img src="./images/blank.gif" alt="blank" class="bg_preview_color" id="bg_preview_color" /></li>
|
||||
<li>#<input type="text" id="bg_color_input" size="6" maxlength="6" class="inputTypeText" value="FFFFFF" onkeyup="manual_select_color('bg',this)"/></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="popFooter" class="tCenter">
|
||||
<a href="#" onclick="insertQuotation()" class="button"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
|
||||
<a href="#" onclick="winopen('./?module=editor&act=dispEditorComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;" class="button"><span>{$lang->about_component}</span></a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
261
modules/editor/components/quotation/tpl/popup.js
Normal file
261
modules/editor/components/quotation/tpl/popup.js
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
var selected_node = null;
|
||||
function getQuotation() {
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||
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() {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var use_folder = "N";
|
||||
if(xGetElementById("quotation_use").checked) use_folder = "Y";
|
||||
|
||||
var folder_opener = xGetElementById("quotation_opener").value;
|
||||
var folder_closer = xGetElementById("quotation_closer").value;
|
||||
if(!folder_opener||!folder_closer) use_folder = "N";
|
||||
|
||||
var bold = "N";
|
||||
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 padding = parseInt(xGetElementById("quotation_padding").value,10);
|
||||
|
||||
var border_style = "solid";
|
||||
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 border_color = xGetElementById("border_color_input").value;
|
||||
|
||||
var bg_color = xGetElementById("bg_color_input").value;
|
||||
|
||||
var content = "";
|
||||
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+";";
|
||||
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-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;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
/* 색상 클릭시 */
|
||||
function select_color(type, code) {
|
||||
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 수동 색상 변경시 */
|
||||
function manual_select_color(type, obj) {
|
||||
if(obj.value.length!=6) return;
|
||||
code = obj.value;
|
||||
xGetElementById(type+"_preview_color").style.backgroundColor = "#"+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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 색상표를 출력 */
|
||||
function printColor(type, blank_img_src) {
|
||||
var colorTable = new Array('22','44','66','88','AA','CC','EE');
|
||||
var html = "";
|
||||
|
||||
for(var i=0;i<8;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
|
||||
|
||||
for(var i=0; i<colorTable.length; i+=3) {
|
||||
for(var j=0; j<colorTable.length; j+=2) {
|
||||
for(var k=0; k<colorTable.length; k++) {
|
||||
var code = colorTable[i] + colorTable[j] + colorTable[k];
|
||||
html += printColorBlock(type, code, blank_img_src);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var i=8;i<16;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
|
||||
|
||||
document.write(html);
|
||||
}
|
||||
|
||||
/* 개별 색상 block 출력 함수 */
|
||||
function printColorBlock(type, code, blank_img_src) {
|
||||
if(type=="bg") {
|
||||
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
|
||||
} else {
|
||||
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
|
||||
}
|
||||
}
|
||||
|
||||
/* 폴더 여닫기 기능 toggle */
|
||||
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