git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-12 03:59:52 +00:00
commit 8326004cb2
2773 changed files with 91485 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

View 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;}

View 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&amp;act=dispEditorComponentInfo&amp;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>

View 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 = "&nbsp;";
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);