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

This commit is contained in:
zero 2007-03-16 12:35:40 +00:00
parent 38ac9fe8e9
commit 8f58bc503e
44 changed files with 19 additions and 42 deletions

View file

@ -1,11 +1,11 @@
<?php
/**
* @class colorpicker_bg
* @class emoticon
* @author zero (zero@nzeo.com)
* @brief 에디터에서 url링크하는 기능 제공. 단순 팝업.
**/
class colorpicker_bg extends EditorHandler {
class emoticon extends EditorHandler {
// upload_target_srl 는 에디터에서 필수로 달고 다녀야 함....
var $upload_target_srl = 0;
@ -14,7 +14,7 @@
/**
* @brief upload_target_srl과 컴포넌트의 경로를 받음
**/
function colorpicker_bg($upload_target_srl, $component_path) {
function emoticon($upload_target_srl, $component_path) {
$this->upload_target_srl = $upload_target_srl;
$this->component_path = $component_path;
}
@ -27,7 +27,7 @@
**/
function execute() {
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=colorpicker_bg', $this->upload_target_srl);
$url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=emoticon', $this->upload_target_srl);
$this->add('tpl', '');
$this->add('open_window', 'Y');
@ -44,6 +44,10 @@
Context::set("tpl_path", $tpl_path);
// 이모티콘을 모두 가져옴
$emoticon_list = FileHandler::readDir($tpl_path.'/images');
Context::set('emoticon_list', $emoticon_list);
require_once("./classes/template/TemplateHandler.class.php");
$oTemplate = new TemplateHandler();
return $oTemplate->compile($tpl_path, $tpl_file);

View file

@ -1,38 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add Emoticon</title>
<link rel='stylesheet' href='../css/editor.css' type='text/css' />
<script type='text/javascript' src='../../common/js/x.js'></script>
<script type='text/javascript' src='../../common/js/common.js'></script>
<script type='text/javascript' src='../js/editor.js'></script>
<script type='text/javascript'>
function editorPrintEmoticon() {
var html = '';
for(var i=1;i<=40;i++) {
var str = i;
if(i<10) str = '0'+i;
html += "<img src=\"./emoticon/msn0"+str+".gif\" onFocus=\"this.blur()\" style=\"margin:2px;width:19px;height:19px;cursor:pointer;border:1px solid;border-color:#CCCCCC;\" onMouseOver=\"this.style.borderColor='#ffffff'\" onMouseOut=\"this.style.borderColor='#CCCCCC'\" onClick=\"insertImage(this)\" />";
if(i%8==0) html += "<br />";
}
document.write(html);
}
function insertImage(obj) {
if(typeof(opener)=='undefined') return;
opener.editorInsertEmoticon(obj);
opener.editorFocus(opener.editorPrevSrl);
self.close();
}
xAddEventListener(window, 'load', setFixedPopupSize);
</script>
</head>
<body class="editor_pop_body">
<script type="text/javascript">
editorPrintEmoticon();
</script>
</body>
</html>

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 944 B

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 975 B

After

Width:  |  Height:  |  Size: 975 B

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 977 B

After

Width:  |  Height:  |  Size: 977 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 989 B

After

Width:  |  Height:  |  Size: 989 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 980 B

After

Width:  |  Height:  |  Size: 980 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 971 B

After

Width:  |  Height:  |  Size: 971 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 968 B

After

Width:  |  Height:  |  Size: 968 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 987 B

After

Width:  |  Height:  |  Size: 987 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 992 B

After

Width:  |  Height:  |  Size: 992 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

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

After

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

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

@ -0,0 +1,5 @@
<!--%import("popup.js")-->
<!--@foreach($emoticon_list as $emoticon)-->
<img src="images/{$emoticon}" alt="emoticon" onclick="insertImage(this)" style="cursor:pointer;" />
<!--@end-->

View file

@ -0,0 +1,6 @@
function insertImage(obj) {
if(typeof(opener)=='undefined') return;
opener.editorInsertEmoticon(obj);
opener.editorFocus(opener.editorPrevSrl);
}