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

This commit is contained in:
zero 2007-03-30 13:52:25 +00:00
parent 30278672bc
commit 4ea882e869
143 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<?php
/**
* @class html_editor
* @author zero (zero@nzeo.com)
* @brief 직접 html code를 수정할 있는 컴포넌트
**/
class html_editor extends EditorHandler {
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
var $upload_target_srl = 0;
var $component_path = '';
/**
* @brief upload_target_srl과 컴포넌트의 경로를 받음
**/
function html_editor($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';
Context::set("tpl_path", $tpl_path);
require_once("./classes/template/TemplateHandler.class.php");
$oTemplate = new TemplateHandler();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,023 B

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<component version="0.1">
<title xml:lang="ko">HTML 코드 수정</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<description xml:lang="ko">에디터에서 HTML 코드를 직접 수정하거나 추가할 수 있습니다.\n보안 문제로 인하여 가능한 끄는 것이 좋습니다.</description>
</author>
</component>

View file

@ -0,0 +1,46 @@
@charset "utf-8";
.editor_window {
width:400px;
background-color:#F3F3F3;
text-align:center;
}
.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;
}
.editor_textarea {
width:385px;
height:400px;
border:1px solid #888888;
clear:both;
font-size:9pt;
margin:10px 0px 10px 0px;
}
.editor_button_area {
border-top:1px solid #AAAAAA;
text-align:center;
background-color:#EEEEEE;
padding:2px 0px 2px 0px;
clear:both;
height:25px;
}
.editor_button {
margin-top:4px;
background-color:#FFFFFF;
border:1px solid #AAAAAA;
height:18px;
font-size:9pt;
}

View file

@ -0,0 +1,15 @@
<!--%import("popup.css")-->
<!--%import("popup.js")-->
<div class="editor_window">
<form action='./' method='post' id='fo' onSubmit="return false" style="display:inline">
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&amp;act=viewComponentInfo&amp;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><textarea name="text" id='editor' class="editor_textarea"></textarea></div>
<div class="editor_button_area">
<input type='button' class="editor_button" value='{$lang->cmd_insert}' onclick='insertHtml()' />
<input type='button' class="editor_button" value='{$lang->cmd_close}' onclick='window.close();' />
</div>
</form>
</div>

View file

@ -0,0 +1,20 @@
function setText() {
if(typeof(opener)=='undefined') return;
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
xGetElementById("editor").value = text;
xGetElementById("editor").focus();
}
function insertHtml() {
var text = xGetElementById("editor").value;
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
opener.editorFocus(opener.editorPrevSrl);
window.close();
}
xAddEventListener(window, 'load', setText);