mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 09:09:59 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@558 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
13fd8167ec
commit
958975c3a5
8 changed files with 176 additions and 33 deletions
|
|
@ -675,7 +675,7 @@
|
||||||
**/
|
**/
|
||||||
function transContent($content) {
|
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);
|
||||||
|
|
||||||
// <br> 코드 변환
|
// <br> 코드 변환
|
||||||
$content = str_replace(array("<BR>","<br>","<Br>"),"<br />", $content);
|
$content = str_replace(array("<BR>","<br>","<Br>"),"<br />", $content);
|
||||||
|
|
@ -690,7 +690,7 @@
|
||||||
* @brief 내용의 멀티미디어 태그를 html 태그로 변경
|
* @brief 내용의 멀티미디어 태그를 html 태그로 변경
|
||||||
* <img ... class="multimedia" ..> 로 되어 있는 코드를 변경
|
* <img ... class="multimedia" ..> 로 되어 있는 코드를 변경
|
||||||
**/
|
**/
|
||||||
function _transMultimedia($matches) {
|
function _transEditorComponent($matches) {
|
||||||
// IE에서는 태그의 특성중에서 " 를 빼어 버리는 경우가 있기에 정규표현식으로 추가해줌
|
// IE에서는 태그의 특성중에서 " 를 빼어 버리는 경우가 있기에 정규표현식으로 추가해줌
|
||||||
$buff = $matches[0];
|
$buff = $matches[0];
|
||||||
$buff = preg_replace('/([^=^"^ ]*)=([^"])([^=^ ]*)/i', '$1="$2$3"', $buff);
|
$buff = preg_replace('/([^=^"^ ]*)=([^"])([^=^ ]*)/i', '$1="$2$3"', $buff);
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,27 @@ function resizeImagePopup(evt) {
|
||||||
if(popup) popup.focus();
|
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) {
|
function svc_folder_open(id) {
|
||||||
var open_text_obj = xGetElementById("_folder_open_"+id);
|
var open_text_obj = xGetElementById("_folder_open_"+id);
|
||||||
var close_text_obj = xGetElementById("_folder_close_"+id);
|
var close_text_obj = xGetElementById("_folder_close_"+id);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
**/
|
**/
|
||||||
|
|
||||||
$lang->quotation = "인용구 사용하기";
|
$lang->quotation = "인용구 사용하기";
|
||||||
$lang->quotation_use_folder = "폴더기능 사용";
|
$lang->quotation_use_folder = "접기 기능 사용";
|
||||||
$lang->quotation_opener = "열기 버튼 이름";
|
$lang->quotation_opener = "열기 버튼 이름";
|
||||||
$lang->quotation_closer = "닫기 버튼 이름";
|
$lang->quotation_closer = "닫기 버튼 이름";
|
||||||
$lang->quotation_padding = "내부 여백";
|
$lang->quotation_padding = "내부 여백";
|
||||||
|
|
@ -14,6 +14,15 @@
|
||||||
$lang->quotation_border_color = "테두리 색";
|
$lang->quotation_border_color = "테두리 색";
|
||||||
$lang->quotation_border_thickness = "테두리 굵기";
|
$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 = "테두리 종류";
|
||||||
$lang->quotation_border_style_list = array(
|
$lang->quotation_border_style_list = array(
|
||||||
"없음",
|
"없음",
|
||||||
|
|
|
||||||
|
|
@ -56,24 +56,66 @@
|
||||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||||
**/
|
**/
|
||||||
function transHTML($xml_obj) {
|
function transHTML($xml_obj) {
|
||||||
$src = $xml_obj->attrs->src;
|
$use_folder = $xml_obj->attrs->use_folder;
|
||||||
$alt = $xml_obj->attrs->alt;
|
$folder_opener = $xml_obj->attrs->folder_opener;
|
||||||
$width = $xml_obj->attrs->width;
|
if(!$folder_opener) $folder_opener = "more...";
|
||||||
$height = $xml_obj->attrs->height;
|
$folder_closer = $xml_obj->attrs->folder_closer;
|
||||||
$align = $xml_obj->attrs->align;
|
if(!$folder_closer) $folder_closer= "close...";
|
||||||
$border = $xml_obj->attrs->border;
|
$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);
|
$output = "";
|
||||||
if(!$alt) $alt = $src;
|
$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();
|
if($use_folder == "Y") {
|
||||||
$output = array("src=\"".$src."\"");
|
$folder_id = rand(1000000,9999999);
|
||||||
if($alt) $output[] = "alt=\"".$alt."\"";
|
|
||||||
if($width) $output[] = "width=\"".$width."\"";
|
if($bold == "Y") $class = "bold";
|
||||||
if($height) $output[] = "height=\"".$height."\"";
|
switch($color) {
|
||||||
if($align) $output[] = "align=\"".$align."\"";
|
case "red" :
|
||||||
if($border) $output[] = "border=\"".$border."\"";
|
$class .= " editor_red_text";
|
||||||
return "<img ".implode(" ", $output)." />";
|
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('<div id="folder_open_%s" style="margin:%spx;display:block;"><a class="%s" href="#" onclick="zbxe_folder_open(\'%s\');return false;">%s</a></div>', $folder_id, $margin, $class, $folder_id, $folder_opener);
|
||||||
|
$output .= sprintf('<div id="folder_close_%s" style="margin:%spx;display:none;"><a class="%s" href="#" onclick="zbxe_folder_close(\'%s\');return false;">%s</a></div>', $folder_id, $margin, $class, $folder_id, $folder_closer);
|
||||||
|
|
||||||
|
$output .= sprintf('<div style="%s" id="folder_%s">', $style, $folder_id);
|
||||||
|
} else {
|
||||||
|
$output .= sprintf('<div style="%s">', $style);
|
||||||
|
}
|
||||||
|
debugPrint($output);
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
.editor_window {
|
.editor_window {
|
||||||
width:550px;
|
width:555px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,12 +29,19 @@
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
float:left;
|
float:left;
|
||||||
width:410px;
|
width:400px;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
margin:5px;
|
margin:5px;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#folder_area {
|
||||||
|
clear:left;
|
||||||
|
height:115px;
|
||||||
|
border:1px dotted #DDDDDD;
|
||||||
|
margin:0px 10px 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.body label {
|
.body label {
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
|
|
@ -48,7 +55,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor_input_long {
|
.editor_input_long {
|
||||||
width:350px;
|
width:380px;
|
||||||
height:13px;
|
height:13px;
|
||||||
font-size:9pt;
|
font-size:9pt;
|
||||||
border:1px solid #AAAAAA;
|
border:1px solid #AAAAAA;
|
||||||
|
|
@ -113,6 +120,7 @@ img.bg_preview_color {
|
||||||
.editor_color_box {
|
.editor_color_box {
|
||||||
clear:both;
|
clear:both;
|
||||||
height:65px;
|
height:65px;
|
||||||
|
width:400px;
|
||||||
border:1px solid #DDDDDD;
|
border:1px solid #DDDDDD;
|
||||||
padding:2px;
|
padding:2px;
|
||||||
margin-bottom:3px;
|
margin-bottom:3px;
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,34 @@
|
||||||
<div class="body"><input type="checkbox" id="quotation_use" value="Y" checked="true" onclick="toggle_folder(this)" /></div>
|
<div class="body"><input type="checkbox" id="quotation_use" value="Y" checked="true" onclick="toggle_folder(this)" /></div>
|
||||||
|
|
||||||
<div id="folder_area" style="display:block">
|
<div id="folder_area" style="display:block">
|
||||||
|
<div class="header">{$lang->quotation_opener}</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_opener}</div>
|
<div class="header">{$lang->quotation_closer}</div>
|
||||||
<div class="body"><input type="text" class="editor_input_long" id="quotation_opener" value="{$lang->quotation_cmd_opener}" /></div>
|
<div class="body"><input type="text" class="editor_input_long" id="quotation_closer" value="{$lang->quotation_cmd_closer}" /></div>
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_closer}</div>
|
<div class="header">{$lang->folder_text_bold}</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="checkbox" name="bold" value="Y" id="quotation_bold" /> <label for="quotation_bold">{$lang->about_folder_text_bold}</label></div>
|
||||||
|
|
||||||
|
<div class="header">{$lang->folder_text_color}</div>
|
||||||
|
<div class="body">
|
||||||
|
<span>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="header">{$lang->quotation_padding}</div>
|
<div class="header">{$lang->quotation_padding}</div>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ function getQuotation() {
|
||||||
var use_folder = node.getAttribute("use_folder");
|
var use_folder = node.getAttribute("use_folder");
|
||||||
var folder_opener = node.getAttribute("folder_opener");
|
var folder_opener = node.getAttribute("folder_opener");
|
||||||
var folder_closer = node.getAttribute("folder_closer");
|
var folder_closer = node.getAttribute("folder_closer");
|
||||||
|
var bold = node.getAttribute("bold");
|
||||||
|
var color = node.getAttribute("color");
|
||||||
var margin = node.getAttribute("margin");
|
var margin = node.getAttribute("margin");
|
||||||
var padding = node.getAttribute("padding");
|
var padding = node.getAttribute("padding");
|
||||||
var border_style = node.getAttribute("border_style");
|
var border_style = node.getAttribute("border_style");
|
||||||
|
|
@ -24,6 +26,23 @@ function getQuotation() {
|
||||||
|
|
||||||
if(use_folder=="Y") xGetElementById("quotation_use").checked = true;
|
if(use_folder=="Y") xGetElementById("quotation_use").checked = true;
|
||||||
else xGetElementById("quotation_use").checked = false;
|
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_opener").value = folder_opener;
|
||||||
xGetElementById("quotation_closer").value = folder_closer;
|
xGetElementById("quotation_closer").value = folder_closer;
|
||||||
|
|
@ -65,6 +84,13 @@ function insertQuotation() {
|
||||||
var folder_closer = xGetElementById("quotation_closer").value;
|
var folder_closer = xGetElementById("quotation_closer").value;
|
||||||
if(!folder_opener||!folder_closer) use_folder = "N";
|
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 margin = parseInt(xGetElementById("quotation_margin").value,10);
|
||||||
|
|
||||||
var padding = parseInt(xGetElementById("quotation_padding").value,10);
|
var padding = parseInt(xGetElementById("quotation_padding").value,10);
|
||||||
|
|
@ -104,12 +130,29 @@ function insertQuotation() {
|
||||||
|
|
||||||
if(!content) content = " ";
|
if(!content) content = " ";
|
||||||
|
|
||||||
var text = "\n<div editor_component=\"quotation\" class=\"editor_quotation\" use_folder=\""+use_folder+"\" folder_opener=\""+folder_opener+"\" folder_closer=\""+folder_closer+"\" 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";
|
|
||||||
|
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
if(selected_node) {
|
||||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
selected_node.setAttribute("use_folder", use_folder);
|
||||||
opener.editorReplaceHTML(iframe_obj, text);
|
selected_node.setAttribute("folder_opener", folder_opener);
|
||||||
opener.editorFocus(opener.editorPrevSrl);
|
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);
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
} else {
|
||||||
|
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";
|
||||||
|
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||||
|
opener.editorReplaceHTML(iframe_obj, text);
|
||||||
|
opener.editorFocus(opener.editorPrevSrl);
|
||||||
|
}
|
||||||
|
|
||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
$lang->urllink_title = "제목";
|
$lang->urllink_title = "제목";
|
||||||
$lang->urllink_url = "URL";
|
$lang->urllink_url = "URL";
|
||||||
$lang->urllink_open_window = "새창열기";
|
$lang->urllink_open_window = "새창열기";
|
||||||
$lang->urllink_bold = " 글자 굵게";
|
$lang->urllink_bold = "글자 굵게";
|
||||||
|
|
||||||
$lang->urllink_color = "링크 색상 ";
|
$lang->urllink_color = "링크 색상 ";
|
||||||
$lang->urllink_color_blue = "파란색";
|
$lang->urllink_color_blue = "파란색";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue