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@558 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
13fd8167ec
commit
958975c3a5
8 changed files with 176 additions and 33 deletions
|
|
@ -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(
|
||||
"없음",
|
||||
|
|
|
|||
|
|
@ -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 "<img ".implode(" ", $output)." />";
|
||||
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('<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 {
|
||||
width:550px;
|
||||
width:555px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
|
@ -29,12 +29,19 @@
|
|||
|
||||
.body {
|
||||
float:left;
|
||||
width:410px;
|
||||
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;
|
||||
|
|
@ -48,7 +55,7 @@
|
|||
}
|
||||
|
||||
.editor_input_long {
|
||||
width:350px;
|
||||
width:380px;
|
||||
height:13px;
|
||||
font-size:9pt;
|
||||
border:1px solid #AAAAAA;
|
||||
|
|
@ -113,6 +120,7 @@ img.bg_preview_color {
|
|||
.editor_color_box {
|
||||
clear:both;
|
||||
height:65px;
|
||||
width:400px;
|
||||
border:1px solid #DDDDDD;
|
||||
padding:2px;
|
||||
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 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="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="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="body"><input type="text" class="editor_input_long" id="quotation_closer" value="{$lang->quotation_cmd_closer}" /></div>
|
||||
<div class="header">{$lang->folder_text_bold}</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 class="header">{$lang->quotation_padding}</div>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ function getQuotation() {
|
|||
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");
|
||||
|
|
@ -24,6 +26,23 @@ function getQuotation() {
|
|||
|
||||
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;
|
||||
|
|
@ -65,6 +84,13 @@ function insertQuotation() {
|
|||
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);
|
||||
|
|
@ -104,12 +130,29 @@ function insertQuotation() {
|
|||
|
||||
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);
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
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);
|
||||
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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
$lang->urllink_title = "제목";
|
||||
$lang->urllink_url = "URL";
|
||||
$lang->urllink_open_window = "새창열기";
|
||||
$lang->urllink_bold = " 글자 굵게";
|
||||
$lang->urllink_bold = "글자 굵게";
|
||||
|
||||
$lang->urllink_color = "링크 색상 ";
|
||||
$lang->urllink_color_blue = "파란색";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue