diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 84094255f..f3074dc8d 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -675,7 +675,7 @@
**/
function transContent($content) {
// 에디터 컴포넌트를 찾아서 결과 코드로 변환
- $content = preg_replace_callback('!<(div|img)([^\>]*?)>(<\/div>)?!is', array($this,'_transMultimedia'), $content);
+ $content = preg_replace_callback('!<(div|img)([^\>]*)editor_component=([^\>]*?)>!is', array($this,'_transEditorComponent'), $content);
//
코드 변환
$content = str_replace(array("
","
","
"),"
", $content);
@@ -690,7 +690,7 @@
* @brief 내용의 멀티미디어 태그를 html 태그로 변경
* 로 되어 있는 코드를 변경
**/
- function _transMultimedia($matches) {
+ function _transEditorComponent($matches) {
// IE에서는 태그의 특성중에서 " 를 빼어 버리는 경우가 있기에 정규표현식으로 추가해줌
$buff = $matches[0];
$buff = preg_replace('/([^=^"^ ]*)=([^"])([^=^ ]*)/i', '$1="$2$3"', $buff);
diff --git a/common/js/common.js b/common/js/common.js
index b390faa80..d543ea885 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -111,7 +111,27 @@ function resizeImagePopup(evt) {
if(popup) popup.focus();
}
-// 에디터에서 사용하는 내용 여닫는 코드 (고정)
+// 에디터에서 사용하는 내용 여닫는 코드 (고정, zbxe용)
+function zbxe_folder_open(id) {
+ var open_text_obj = xGetElementById("folder_open_"+id);
+ var close_text_obj = xGetElementById("folder_close_"+id);
+ var folder_obj = xGetElementById("folder_"+id);
+ open_text_obj.style.display = "none";
+ close_text_obj.style.display = "block";
+ folder_obj.style.display = "block";
+}
+
+function zbxe_folder_close(id) {
+ var open_text_obj = xGetElementById("folder_open_"+id);
+ var close_text_obj = xGetElementById("folder_close_"+id);
+ var folder_obj = xGetElementById("folder_"+id);
+ open_text_obj.style.display = "block";
+ close_text_obj.style.display = "none";
+ folder_obj.style.display = "none";
+}
+
+
+// 에디터에서 사용하는 내용 여닫는 코드 (고정, zb5 beta 호환용)
function svc_folder_open(id) {
var open_text_obj = xGetElementById("_folder_open_"+id);
var close_text_obj = xGetElementById("_folder_close_"+id);
diff --git a/modules/editor/components/quotation/lang/ko.lang.php b/modules/editor/components/quotation/lang/ko.lang.php
index 0a7d388b5..324ca3fd4 100644
--- a/modules/editor/components/quotation/lang/ko.lang.php
+++ b/modules/editor/components/quotation/lang/ko.lang.php
@@ -6,7 +6,7 @@
**/
$lang->quotation = "인용구 사용하기";
- $lang->quotation_use_folder = "폴더기능 사용";
+ $lang->quotation_use_folder = "접기 기능 사용";
$lang->quotation_opener = "열기 버튼 이름";
$lang->quotation_closer = "닫기 버튼 이름";
$lang->quotation_padding = "내부 여백";
@@ -14,6 +14,15 @@
$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(
"없음",
diff --git a/modules/editor/components/quotation/quotation.class.php b/modules/editor/components/quotation/quotation.class.php
index 052a2299a..f8b110b19 100644
--- a/modules/editor/components/quotation/quotation.class.php
+++ b/modules/editor/components/quotation/quotation.class.php
@@ -56,24 +56,66 @@
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
**/
function transHTML($xml_obj) {
- $src = $xml_obj->attrs->src;
- $alt = $xml_obj->attrs->alt;
- $width = $xml_obj->attrs->width;
- $height = $xml_obj->attrs->height;
- $align = $xml_obj->attrs->align;
- $border = $xml_obj->attrs->border;
+ $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;
- $src = str_replace(array('&','"'), array('&','&qout;'), $src);
- if(!$alt) $alt = $src;
+ $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;
+ }
- $output = array();
- $output = array("src=\"".$src."\"");
- if($alt) $output[] = "alt=\"".$alt."\"";
- if($width) $output[] = "width=\"".$width."\"";
- if($height) $output[] = "height=\"".$height."\"";
- if($align) $output[] = "align=\"".$align."\"";
- if($border) $output[] = "border=\"".$border."\"";
- return "
";
+ 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;";
+ $output .= sprintf('