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/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
8326004cb2
2773 changed files with 91485 additions and 0 deletions
BIN
modules/editor/components/url_link/icon.gif
Normal file
BIN
modules/editor/components/url_link/icon.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,015 B |
17
modules/editor/components/url_link/info.xml
Normal file
17
modules/editor/components/url_link/info.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component version="0.1">
|
||||
<title xml:lang="ko">링크 생성</title>
|
||||
<title xml:lang="jp">リンク生成</title>
|
||||
<title xml:lang="zh-CN">链接</title>
|
||||
<title xml:lang="en">Create Link</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">에디터에 링크를 추가하거나 링크의 속성을 변경할 수 있습니다.</description>
|
||||
<description xml:lang="jp">エディターにリンクを追加したり、属性を変更したりすることができます。</description>
|
||||
<description xml:lang="zh-CN">插入链接或编辑链接属性。</description>
|
||||
<description xml:lang="en">It can add a link to editor or modify the attribution of link.</description>
|
||||
</author>
|
||||
</component>
|
||||
21
modules/editor/components/url_link/lang/en.lang.php
Normal file
21
modules/editor/components/url_link/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief editor module > language pack of url_link component
|
||||
**/
|
||||
|
||||
$lang->urllink_title = "Title";
|
||||
$lang->urllink_url = "URL";
|
||||
$lang->urllink_open_window = "Open New Window";
|
||||
$lang->urllink_bold = "Bold Text";
|
||||
|
||||
$lang->urllink_color = "Link Color";
|
||||
$lang->urllink_color_blue = "Blue";
|
||||
$lang->urllink_color_red = "Red";
|
||||
$lang->urllink_color_yellow = "Yellow";
|
||||
$lang->urllink_color_green = "Green";
|
||||
|
||||
$lang->about_url_link_open_window = "Make the link to open as a new window";
|
||||
$lang->about_url_link_bold = "Make the link text bold";
|
||||
?>
|
||||
21
modules/editor/components/url_link/lang/jp.lang.php
Normal file
21
modules/editor/components/url_link/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa
|
||||
* @brief ウィジウィグエディターモジュール > urllink コンポネント言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->urllink_title = "タイトル";
|
||||
$lang->urllink_url = "URL";
|
||||
$lang->urllink_open_window = "新しい窓で開く";
|
||||
$lang->urllink_bold = "太字にする";
|
||||
|
||||
$lang->urllink_color = "リンクカラー ";
|
||||
$lang->urllink_color_blue = "青";
|
||||
$lang->urllink_color_red = "赤";
|
||||
$lang->urllink_color_yellow = "黄";
|
||||
$lang->urllink_color_green = "緑";
|
||||
|
||||
$lang->about_url_link_open_window = "チェックするとリンクをクリックした時に、新しいウィンドウで開きます。";
|
||||
$lang->about_url_link_bold = "チェックするとリンクの文字列が太字で表示されます。";
|
||||
?>
|
||||
21
modules/editor/components/url_link/lang/ko.lang.php
Normal file
21
modules/editor/components/url_link/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 위지윅에디터(editor) 모듈 > urllink 컴포넌트의 언어팩
|
||||
**/
|
||||
|
||||
$lang->urllink_title = "제목";
|
||||
$lang->urllink_url = "URL";
|
||||
$lang->urllink_open_window = "새창열기";
|
||||
$lang->urllink_bold = "글자 굵게";
|
||||
|
||||
$lang->urllink_color = "링크 색상 ";
|
||||
$lang->urllink_color_blue = "파란색";
|
||||
$lang->urllink_color_red = "붉은색";
|
||||
$lang->urllink_color_yellow = "노란색";
|
||||
$lang->urllink_color_green = "녹색";
|
||||
|
||||
$lang->about_url_link_open_window = "선택하시면 링크 선택시 새창으로 열립니다";
|
||||
$lang->about_url_link_bold = "선택하시면 링크의 글자가 굵게 표시됩니다";
|
||||
?>
|
||||
21
modules/editor/components/url_link/lang/zh-CN.lang.php
Normal file
21
modules/editor/components/url_link/lang/zh-CN.lang.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file /modules/editor/components/urllink/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 网页编辑器(editor) 模块 > urllink组建语言包
|
||||
**/
|
||||
|
||||
$lang->urllink_title = "文本";
|
||||
$lang->urllink_url = "URL";
|
||||
$lang->urllink_open_window = "新窗口";
|
||||
$lang->urllink_bold = "粗体";
|
||||
|
||||
$lang->urllink_color = "链接颜色 ";
|
||||
$lang->urllink_color_blue = "蓝色";
|
||||
$lang->urllink_color_red = "红色";
|
||||
$lang->urllink_color_yellow = "黄色";
|
||||
$lang->urllink_color_green = "绿色";
|
||||
|
||||
$lang->about_url_link_open_window = "将在新窗口中打开链接。";
|
||||
$lang->about_url_link_bold = "用粗体显示文本。";
|
||||
?>
|
||||
4
modules/editor/components/url_link/tpl/popup.css
Normal file
4
modules/editor/components/url_link/tpl/popup.css
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../../modules/admin/tpl/css/admin.css);
|
||||
|
||||
.link_color { float:left; margin-right:2em; }
|
||||
65
modules/editor/components/url_link/tpl/popup.html
Normal file
65
modules/editor/components/url_link/tpl/popup.html
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<!--%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" id="fo_component" onSubmit="return false">
|
||||
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="tableType5">
|
||||
<col width="100" />
|
||||
<col />
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_title}</th>
|
||||
<td><input type="text" name="text" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_url}</th>
|
||||
<td><input type="text" name="url" class="inputTypeText w100" value="{$manual_url}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_open_window}</th>
|
||||
<td><input type="checkbox" name="open_window" value="Y" id="editor_open_window" /> <label for="editor_open_window">{$lang->about_url_link_open_window}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_bold}</th>
|
||||
<td><input type="checkbox" name="bold" value="Y" id="editor_bold" /> <label for="editor_bold">{$lang->about_url_link_bold}</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_color}</th>
|
||||
<td>
|
||||
<div class="link_color">
|
||||
<input type="radio" name="color" value="none" id="color_none" />
|
||||
<label for="color_none">{$lang->not_exists}</label>
|
||||
</div>
|
||||
<div class="link_color">
|
||||
<input type="radio" name="color" value="blue" id="color_blue" />
|
||||
<label for="color_blue" class="editor_blue_text">{$lang->urllink_color_blue}</label>
|
||||
</div>
|
||||
<div class="link_color">
|
||||
<input type="radio" name="color" value="red" id="color_red" />
|
||||
<label for="color_red" class="editor_red_text">{$lang->urllink_color_red}</label>
|
||||
</div>
|
||||
<div class="link_color">
|
||||
<input type="radio" name="color" value="yellow" id="color_yellow" />
|
||||
<label for="color_yellow" class="editor_yellow_text">{$lang->urllink_color_yellow}</label>
|
||||
</div>
|
||||
<div class="link_color">
|
||||
<input type="radio" name="color" value="green" id="color_green" />
|
||||
<label for="color_green" class="editor_green_text">{$lang->urllink_color_green}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="popFooter" class="tCenter">
|
||||
<a href="#" onclick="setText()" 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&act=dispEditorComponentInfo&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>
|
||||
108
modules/editor/components/url_link/tpl/popup.js
Normal file
108
modules/editor/components/url_link/tpl/popup.js
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* 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 = "";
|
||||
text = text.replace(/<([^>]*)>/ig,'').replace(/</ig,'<').replace(/>/ig,'>').replace(/&/ig,'&');
|
||||
fo_obj.text.value = text;
|
||||
return;
|
||||
}
|
||||
|
||||
if(node.nodeName == "A") {
|
||||
var url = node.getAttribute("HREF");
|
||||
var text = node.text.replace(/</ig,'<').replace(/>/ig,'>').replace(/&/ig,'&');
|
||||
|
||||
var open_window = false;
|
||||
var bold = false;
|
||||
var color = "";
|
||||
var className = node.className;
|
||||
|
||||
var selectedHtml = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
if(selectedHtml.indexOf("window.open")>0) open_window = true;
|
||||
|
||||
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 = text;
|
||||
fo_obj.url.value = url.replace('&','&');
|
||||
if(open_window) fo_obj.open_window.checked = true;
|
||||
if(bold) fo_obj.bold.checked = true;
|
||||
if(color) xGetElementById(color).checked = true;
|
||||
|
||||
return;
|
||||
} else if(node.nodeName == "IMG") {
|
||||
alert(1);
|
||||
} else {
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
fo_obj.text.value = text.replace(/<([^>]*)>/ig,'').replace(/</ig,'<').replace(/>/ig,'>').replace(/&/ig,'&');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 부모창의 위지윅에디터에 데이터를 삽입
|
||||
**/
|
||||
function setText() {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
|
||||
var text = fo_obj.text.value;
|
||||
text.replace(/&/ig,'&').replace(/</ig,'<').replace(/>/ig,'>');
|
||||
var url = fo_obj.url.value;
|
||||
url = url.replace(/&/ig,'&');
|
||||
var open_window = false;
|
||||
var bold = false;
|
||||
var link_class = "";
|
||||
var link = "";
|
||||
|
||||
if(!text) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
if(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";
|
||||
else link_class = "";
|
||||
|
||||
link = "<a href=\""+url+"\" ";
|
||||
if(open_window) link += "onclick=\"window.open(this.href);return false;\" ";
|
||||
|
||||
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>";
|
||||
} else {
|
||||
link = text;
|
||||
}
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
opener.editorReplaceHTML(iframe_obj, link);
|
||||
|
||||
opener.focus();
|
||||
window.close();
|
||||
}
|
||||
|
||||
xAddEventListener(window, "load", getText);
|
||||
35
modules/editor/components/url_link/url_link.class.php
Normal file
35
modules/editor/components/url_link/url_link.class.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* @class url_link
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공.
|
||||
**/
|
||||
|
||||
class url_link extends EditorHandler {
|
||||
|
||||
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
|
||||
var $upload_target_srl = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief upload_target_srl과 컴포넌트의 경로를 받음
|
||||
**/
|
||||
function url_link($upload_target_srl, $component_path) {
|
||||
$this->upload_target_srl = $upload_target_srl;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue