git-svn-id: http://xe-core.googlecode.com/svn/trunk@555 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-19 15:37:34 +00:00
parent 5627010587
commit 941ca74555
4 changed files with 47 additions and 35 deletions

View file

@ -29,7 +29,7 @@
.body {
float:left;
width:405px;
width:410px;
text-align:left;
margin:5px;
font-size:9pt;
@ -109,3 +109,15 @@ img.bg_preview_color {
border:1px solid #000000;
background-color:#FFFFFF;
}
.editor_color_box {
clear:both;
height:65px;
border:1px solid #DDDDDD;
padding:2px;
margin-bottom:3px;
}
.editor_color_input {
clear:both;
}

View file

@ -63,12 +63,12 @@
<div class="header">{$lang->quotation_border_color}</div>
<div class="body">
<div>
<div class="editor_color_box">
<script type="text/javascript">
printColor("border", "{$tpl_path}/images/blank.gif");
</script>
</div>
<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>
@ -81,12 +81,12 @@
<div class="header">{$lang->quotation_bg_color}</div>
<div class="body">
<div>
<div class="editor_color_box">
<script type="text/javascript">
printColor("bg", "{$tpl_path}/images/blank.gif");
</script>
</div>
<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>
@ -98,7 +98,7 @@
</div>
<div class="editor_button_area">
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertMultimedia()" />
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertQuotation()" />
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
</div>
</div>

View file

@ -3,54 +3,53 @@
* 있으면 가져와서 원하는 곳에 삽입
**/
function getQuotation() {
return;
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
if(typeof(opener)=="undefined") return;
var node = opener.editorPrevNode;
if(!node || node.nodeName != "DIV") return;
var url = node.getAttribute("src");
var caption = xInnerHtml(node);
var width = node.getAttribute("width");
var height = node.getAttribute("height");
var auto_start = node.getAttribute("auto_start");
xGetElementById("multimedia_url").value = url;
xGetElementById("multimedia_caption").value = caption;
xGetElementById("multimedia_width").value = width;
xGetElementById("multimedia_height").value = height;
if(auto_start=="true") xGetElementById("multimedia_auto_start").checked = true;
var use_folder = node.getAttribute("use_folder");
var opener = node.getAttribute("opener");
var closer = node.getAttribute("closer");
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");
}
function insertQuotation(obj) {
/* 추가 버튼 클릭시 부모창의 위지윅 에디터에 인용구 추가 */
function insertQuotation() {
if(typeof(opener)=="undefined") return;
var url = xGetElementById("_url").value;
var use_folder = "N";
if(xGetElementById("quotation_user").checked) use_folder = "Y";
var caption = xGetElementById("multimedia_caption").value;
var opener = xGetElementById("quotation_opener").value;
var closer = xGetElementById("quotation_closer").value;
if(!opener||!closer) use_folder = "N";
var width = xGetElementById("multimedia_width").value;
if(!width) width = 640;
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 height = xGetElementById("multimedia_height").value;
if(!height) height= 480;
var border_thickness = parserInt(xGetElementById("border_thickness").value,10);
var auto_start = "false";
if(xGetElementById("multimedia_auto_start").checked) auto_start = "true";
var border_color = "#"+xGetElementById("border_color_input").value;
if(!url) {
window.close();
return;
}
var bg_color = "#"+xGetElementById("bg_color_input").value;
var text = "<div editor_component=\"multimedia_link\" class=\"editor_multimedia\" src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" auto_start=\""+auto_start+"\">"+caption+"</div>";
var content = editorGetSelectedHtml(opener.editorPrevSrl);
var text = "<div editor_component=\"quotation\" class=\"editor_quotation\" style=\"width:100%\" use_folder=\""+use_folder+"\" opener=\""+opener+"\" closer=\""+closer+"\" border_style=\""+border_style+"\" border_thickness=\""+border_thickness+"\" border_color=\""+border_color+"\" bg_color=\""+bg_color+"\">"+content+"</div>";
alert(text);
return;
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
opener.editorFocus(opener.editorPrevSrl);

View file

@ -54,6 +54,7 @@
text-align:center;
background-color:#EEEEEE;
padding:0px 0px 2px 0px;
clear:both;
}
.editor_button {