mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@842 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
30278672bc
commit
4ea882e869
143 changed files with 0 additions and 0 deletions
68
modules/editor/components/url_link/tpl/popup.css
Normal file
68
modules/editor/components/url_link/tpl/popup.css
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:400px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.editor_title {
|
||||
font-size:10pt;
|
||||
font-weight:bold;
|
||||
clear:both;
|
||||
height:20px;
|
||||
background-color:#555555;
|
||||
color:#EFEFEF;
|
||||
vertical-align:middle;
|
||||
padding-top:5px;
|
||||
border-bottom:1px solid #000000;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.header {
|
||||
float:left;
|
||||
width:60px;
|
||||
clear:left;
|
||||
text-align:left;
|
||||
font-weight:bold;
|
||||
margin:5px;
|
||||
font-size:9pt;
|
||||
padding-left:20px;
|
||||
}
|
||||
|
||||
.body {
|
||||
float:left;
|
||||
width:290px;
|
||||
text-align:left;
|
||||
margin:5px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.editor_textarea {
|
||||
width:280px;
|
||||
height:50px;
|
||||
border:1px solid #AAAAAA;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.editor_input {
|
||||
width:280px;
|
||||
border:1px solid #AAAAAA;
|
||||
font-size:9pt;
|
||||
height:13px;
|
||||
}
|
||||
|
||||
.editor_button_area {
|
||||
border-top:1px solid #AAAAAA;
|
||||
text-align:center;
|
||||
background-color:#EEEEEE;
|
||||
padding:0px 0px 2px 0px;
|
||||
clear:both;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
height:18px;
|
||||
font-size:9pt;
|
||||
}
|
||||
46
modules/editor/components/url_link/tpl/popup.html
Normal file
46
modules/editor/components/url_link/tpl/popup.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
<form action="./" method="get" id="fo_component" onSubmit="return false">
|
||||
<div class="editor_window">
|
||||
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
||||
|
||||
<div class="header">{$lang->urllink_title}</div>
|
||||
<div class="body"><textarea name="text" class="editor_textarea"></textarea></div>
|
||||
|
||||
<div class="header">{$lang->urllink_url}</div>
|
||||
<div class="body"><input type="text" name="url" class="editor_input" value="{$manual_url}"/></div>
|
||||
|
||||
<div class="header">{$lang->urllink_open_window}</div>
|
||||
<div class="body"><input type="checkbox" name="open_window" value="Y" id="editor_open_window" /> <label for="editor_open_window">{$lang->about_url_link_open_window}</label></div>
|
||||
|
||||
<div class="header">{$lang->urllink_bold}</div>
|
||||
<div class="body"><input type="checkbox" name="bold" value="Y" id="editor_bold" /> <label for="editor_bold">{$lang->about_url_link_bold}</label></div>
|
||||
|
||||
<div class="header">{$lang->urllink_color}</div>
|
||||
<div class="body">
|
||||
<span>
|
||||
<input type="radio" name="color" value="blue" id="color_blue" />
|
||||
<label for="color_blue" class="editor_blue_text">{$lang->urllink_color_blue}</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="radio" name="color" value="red" id="color_red" />
|
||||
<label for="color_red" class="editor_red_text">{$lang->urllink_color_red}</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="radio" name="color" value="yellow" id="color_yellow" />
|
||||
<label for="color_yellow" class="editor_yellow_text">{$lang->urllink_color_yellow}</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="radio" name="color" value="green" id="color_green" />
|
||||
<label for="color_green" class="editor_green_text">{$lang->urllink_color_green}</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="editor_button_area">
|
||||
<input type="button" class="editor_button" value="{$lang->cmd_insert}" onclick="setText()" />
|
||||
<input type="button" class="editor_button" value="{$lang->cmd_close}" onclick="window.close()" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
121
modules/editor/components/url_link/tpl/popup.js
Normal file
121
modules/editor/components/url_link/tpl/popup.js
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 block이 있는지 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
function getText() {
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node) {
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
if(text==undefined) text = "";
|
||||
fo_obj.text.value = text;
|
||||
return;
|
||||
}
|
||||
|
||||
if(node.nodeName == "A") {
|
||||
var url = node.getAttribute("HREF");
|
||||
|
||||
var onclick_str = "";
|
||||
if(xIE4Up) {
|
||||
onclick_str = node.outerHTML;
|
||||
} else {
|
||||
if(node.getAttribute("onclick")) onclick_str = node.getAttribute("onclick");
|
||||
}
|
||||
|
||||
var className = "";
|
||||
if(typeof(node.className)) className = node.className;
|
||||
else className = node.getAttribute("class");
|
||||
var open_window = false;
|
||||
|
||||
if(url.indexOf("#")>-1 && onclick_str.indexOf("window.open")>-1) {
|
||||
open_window = true;
|
||||
|
||||
var s_s = "window.open('";
|
||||
var p_s = onclick_str.indexOf(s_s);
|
||||
url = onclick_str.substr(p_s+s_s.length);
|
||||
|
||||
var e_s = "')";
|
||||
var p_e = url.indexOf(e_s);
|
||||
url = url.substr(0, p_e);
|
||||
|
||||
}
|
||||
|
||||
var bold = false;
|
||||
var color = "";
|
||||
|
||||
if(className) {
|
||||
if(className.indexOf("bold")>-1) bold = true;
|
||||
|
||||
if(className.indexOf("blue")>0) color = "color_blue";
|
||||
else if(className.indexOf("red")>0) color = "color_red";
|
||||
else if(className.indexOf("yellow")>0) color = "color_yellow";
|
||||
else if(className.indexOf("green")>0) color = "color_green";
|
||||
}
|
||||
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
|
||||
fo_obj.text.value = xInnerHtml(node);
|
||||
fo_obj.url.value = url;
|
||||
if(open_window) fo_obj.open_window.checked = true;
|
||||
if(bold) fo_obj.bold.checked = true;
|
||||
if(color) xGetElementById(color).checked = true;
|
||||
|
||||
return;
|
||||
} else {
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
fo_obj.text.value = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 부모창의 위지윅에디터에 데이터를 삽입
|
||||
**/
|
||||
function setText() {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
|
||||
var text = fo_obj.text.value;
|
||||
var url = fo_obj.url.value;
|
||||
var open_window = false;
|
||||
var bold = false;
|
||||
var link_class = "";
|
||||
|
||||
if(!text) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!url) url = "#";
|
||||
|
||||
if(fo_obj.open_window.checked) open_window = true;
|
||||
if(fo_obj.bold.checked) bold= true;
|
||||
if(xGetElementById("color_blue").checked) link_class = "editor_blue_text";
|
||||
else if(xGetElementById("color_red").checked) link_class = "editor_red_text";
|
||||
else if(xGetElementById("color_yellow").checked) link_class = "editor_yellow_text";
|
||||
else if(xGetElementById("color_green").checked) link_class = "editor_green_text";
|
||||
|
||||
var link = "";
|
||||
if(open_window) {
|
||||
link = "<a href=\"#\" onclick=\"window.open('"+url+"');return false;\" ";
|
||||
} else {
|
||||
link = "<a href=\""+url+"\" ";
|
||||
}
|
||||
|
||||
if(bold || link_class) {
|
||||
var class_name = "";
|
||||
if(bold) class_name = "bold";
|
||||
if(link_class) class_name += " "+link_class;
|
||||
link += " class=\""+class_name+"\" ";
|
||||
}
|
||||
|
||||
link += ">"+text+"</a>";
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
opener.editorReplaceHTML(iframe_obj, link);
|
||||
|
||||
opener.focus();
|
||||
window.close();
|
||||
}
|
||||
|
||||
xAddEventListener(window, "load", getText);
|
||||
Loading…
Add table
Add a link
Reference in a new issue