비표준 그누보드4 첫커밋

This commit is contained in:
whitedot
2012-10-05 15:12:27 +09:00
parent 8751c57ffc
commit a4b2e70e4d
899 changed files with 89562 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/color_picker.js" type="text/javascript"></script>
<title>컬러 선택</title>
</head>
<body>
<div id="color_picker_wrapper"></div>
<div style="padding:10px 0px 2px 3px;"><span>선택 색상:</span></div>
<div id="show_color" style="height:20px;border:1px solid #000;margin:0px 4px 0px 3px;background-color:#fff"></div>
<script type="text/javascript">drawColor("color_picker_wrapper");</script>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/flash.js" type="text/javascript"></script>
<title>플래쉬 동영상</title>
</head>
<body>
<form action="javascript:void%200" name="theForm">
<fieldset style="padding:5px">
<legend><span class="font-normal">&lt;플래쉬 임베디드 코드&gt;</플래쉬></span></legend>
<textarea name="embed" id="fm_embed" style="height:24px;width:460px;"></textarea>
</fieldset>
</form>
<div class="flash-player-wrapper" id="fm_player"></div>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,29 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/google_map.js" type="text/javascript"></script>
<!-- key 값을 설정하세요. -->
<!-- 1234-ABC를 구글에서 발급 받은 키로 고치십시오. -->
<!-- http://code.google.com/intl/ko-KR/apis/maps/signup.html -->
<script src="http://maps.google.co.kr/maps?file=api&amp;v=2&amp;sensor=true&amp;key=1234-ABC&hl=ko" type="text/javascript"></script>
<title>Google Maps</title>
</head>
<body onload="initMap(4)"onunload="GUnload()">
<div style="line-height: 1.6;padding-left:10px" class="fieldset">
<span class="font-normal">찾을 주소: </span>
<input type="text" name="address" id="fm_address" value="서울" />
<span id="map_search"></span>
<div class="font-normal" style="margin-left: 55px;color:#666">외국 주소는 해당 국가 언어로 입력하세요.</div>
</div>
<div id="map_canvas" style="width:512px; height:320px;border:1px #999 solid;text-align:center;margin-top:10px"></div>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

18
cheditor5/popup/icon.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/icon.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<fieldset>
<div id="imgBlock" class="emImgBlock"></div>
</fieldset>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,75 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/imageUpload.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/image.js" type="text/javascript"></script>
<script src="js/image_upload_flash.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
</head>
<body scroll="no">
<div id="uploadWindow">
<div id="container">
<div style="float:left;margin-top:4px;font-size:9pt;font-family:gulim,tahoma;color:#666">
<img src="../icons/imageUpload/mouse_drag_img.gif" width="19" height="16" alt="" style="vertical-align:middle" />
마우스로 드래그하여 순서를 바꾸세요.&nbsp;&nbsp;&nbsp;(<b><span id="imageCount">0</span></b>장 / 12장 사진)
</div>
<div style="float:right;margin:0px 0px 7px 0px">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="oFlash"></td>
<td><img src="../icons/imageUpload/remove_all.gif" class="button" style="margin-left:3px;vertical-align:middle" onclick="removeImage()" alt="" /></td>
</tr>
</table>
</div>
<div class="clear"></div>
<div id="imageListWrapper"></div>
<div id="imageInfoBox">
<div style="border-bottom:1px #ddd solid;padding:5px 5px 10px 5px">
<div style="text-align:center;">
<span style="font-weight:bold;font-size:9pt">사진 해상도</span>
</div>
<div style="text-align:left;font-size:9pt;margin-top:10px;line-height:1.4em">
<span>가로: </span><span style="color:#ff6600" id="selectedImageWidth">0</span> 픽셀<br />
<span>세로: </span><span style="color:#ff6600" id="selectedImageHeight">0</span> 픽셀
</div>
</div>
<div style="margin-top:10px">
<div style="text-align:center;margin-bottom:10px">
<span style="font-weight:bold;font-size:9pt">레이아웃</span>
</div>
<form name="alignment" id="fm_alignment">
<table border="0" cellpadding="2" cellspacing="0" align="center">
<tr>
<td align="center">
<img src="../icons/image_align_left.png" /><br />
<input type="radio" name="alignment" value="left" />
</td>
<td align="center">
<img src="../icons/image_align_center.png" hspace="5" /><br />
<input type="radio" name="alignment" value="center" checked="checked" />
</td>
<td align="center">
<img src="../icons/image_align_right.png" /><br />
<input type="radio" name="alignment" value="right" />
</td>
</tr>
</table>
</form>
<div style="text-align:center;margin-top:5px">
<span style="font-size:8pt;font-family:dotum,tahoma;color:#666">(전체 사진에 적용됨)</span>
</div>
</div>
</div>
</div>
<div class="clear"></div>
<div style="text-align:center;margin-top:10px" id="buttonWrapper"></div>
</div>
<div id="dragDropContent"></div>
<div id="removeImage"><img src="../icons/imageUpload/delete.png" width="16" height="16" alt="" /></div>
<div id="insertionMarker"></div>
</body>
</html>

View File

@ -0,0 +1,34 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/image_url.js" type="text/javascript"></script>
<script src="js/AC_OETags.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<div style="text-align:center" id="oFlash"></div>
<div id="imageSize" style="margin-bottom:3px;font-size:8pt;font-family:verdana;font-weight:bold;text-align:center">0 X 0</div>
<div id="tmpImage"></div>
<fieldset><legend><span class="normal">사진 URL</span></legend>
<div style="padding:5px" id="inputOutline">
<input type="text" name="imageUrl" id="fm_imageUrl" size="34" value="http://" />
</div>
</fieldset>
<div style="margin:10px 0px 10px 0px">
<fieldset><legend><span class="normal">레이아웃</span></legend>
<div style="padding:5px 0px 5px 5px; text-align:center">
<form id="fm_align" name="align">
<input type="radio" name="alignment" value="left" /><img src="../icons/image_align_left.png" width="16" height="16" alt="" align="middle" />
<input type="radio" name="alignment" value="center" checked="checked" /><img src="../icons/image_align_center.png" width="16" height="16" alt="" align="middle" />
<input type="radio" name="alignment" value="right" /><img src="../icons/image_align_right.png" width="16" height="16" alt="" align="middle" />
</form>
</div>
</fieldset>
</div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,247 @@
// Flash Player Version Detection - Rev 1.5
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
// Modified: chna@chcode.com
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function errMaxFileSize (MaxFileSize) {
alert("선택하신 파일 크기가 너무 큽니다. 최대 전송 크기는 "+MaxFileSize+" MB 입니다.");
}
function ControlVersion()
{
var version = 0;
var axo;
// var e;
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
version = "WIN 6,0,21,0";
axo.AllowScriptAccess = "always";
version = axo.GetVariable("$version");
} catch (e) {}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {}
}
if (!version)
{
try {
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
function GetSwfVer(){
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
if ( descArray[3] != "" ) {
tempArrayMinor = descArray[3].split("r");
} else {
tempArrayMinor = descArray[4].split("r");
}
var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
}
else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '';
if (isIE && isWin && !isOpera)
{
str += '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
var breakpoint=true;
for (var i in params) {
if (breakpoint) str += '>';
str += '<param name="' + i + '" value="' + params[i] + '" />';
breakpoint = false;
}
str += '</object>';
} else {
str += '<embed ';
for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';
str += '> </embed>';
}
document.getElementById('oFlash').innerHTML = str;
}
function chxupload_RUN() {
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}

View File

@ -0,0 +1,93 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var button = [
{ alt : "", img : 'cancel.gif', cmd : popupClose }
];
var colour = ["ffffcc","ffcc66","ff9900","ffcc99","ff6633","ffcccc","cc9999","ff6699","ff99cc","ff66cc","ffccff","cc99cc","cc66ff","cc99ff","9966cc","ccccff","9999cc","3333ff","6699ff","0066ff","99ccff","66ccff","99cccc","ccffff","99ffcc","66cc99","66ff99","99ff99","ccffcc","33ff33","66ff00","ccff99","99ff00","ccff66","cccc66","ffffff",
"ffff99","ffcc00","ff9933","ff9966","cc3300","ff9999","cc6666","ff3366","ff3399","ff00cc","ff99ff","cc66cc","cc33ff","9933cc","9966ff","9999ff","6666ff","3300ff","3366ff","0066cc","3399ff","33ccff","66cccc","99ffff","66ffcc","33cc99","33ff99","66ff66","99cc99","00ff33","66ff33","99ff66","99ff33","ccff00","cccc33","cccccc",
"ffff66","ffcc33","cc9966","ff6600","ff3300","ff6666","cc3333","ff0066","ff0099","ff33cc","ff66ff","cc00cc","cc00ff","9933ff","6600cc","6633ff","6666cc","3300cc","0000ff","3366cc","0099ff","00ccff","339999","66ffff","33ffcc","00cc99","00ff99","33ff66","66cc66","00ff00","33ff00","66cc00","99cc66","ccff33","999966","999999",
"ffff33","cc9900","cc6600","cc6633","ff0000","ff3333","993333","cc3366","cc0066","cc6699","ff33ff","cc33cc","9900cc","9900ff","6633cc","6600ff","666699","3333cc","0000cc","0033ff","6699cc","3399cc","669999","33ffff","00ffcc","339966","33cc66","00ff66","669966","00cc00","33cc00","66cc33","99cc00","cccc99","999933","666666",
"ffff00","cc9933","996633","993300","cc0000","ff0033","990033","996666","993366","cc0099","ff00ff","990099","996699","660099","663399","330099","333399","000099","0033cc","003399","336699","0099cc","006666","00ffff","33cccc","009966","00cc66","339933","336633","33cc33","339900","669933","99cc33","666633","999900","333333",
"cccc00","996600","663300","660000","990000","cc0033","330000","663333","660033","990066","cc3399","993399","660066","663366","330033","330066","333366","000066","000033","003366","006699","003333","336666","00cccc","009999","006633","009933","006600","003300","00cc33","009900","336600","669900","333300","666600","000000"];
var oEditor = null;
var setColor = null;
function init(dialog, argv) {
oEditor = this;
oEditor.dialog = dialog;
setColor = argv;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
setShowColor();
}
function setShowColor() {
var showColor = document.getElementById('show_color');
var color = setColor.selectedCell.getAttribute('bgcolor');
if (color) {
showColor.style.backgroundColor = color;
}
}
function drawColor(el)
{
var table = document.createElement('table');
table.cellPadding = 0;
table.cellSpacing = 0;
table.border = 0;
table.setAttribute('align', 'center');
var tr = table.insertRow(0);
var td = tr.insertCell(0);
td.style.backgroundColor = '#000';
var insideTable = document.createElement('table');
insideTable.border = 0;
insideTable.cellSpacing = 1;
insideTable.cellPadding = 0;
insideTable.align = 'center';
var showColor = document.getElementById('show_color');
var k = 0;
for (var i = 0; i < 6; i++) {
var tr2 = insideTable.insertRow(i);
for (var j = 0; j < 36; j++) {
var td2 = tr2.insertCell(j);
td2.setAttribute('bgColor', '#' + colour[k]);
td2.style.width = '9px';
td2.style.height = '9px';
td2.onclick = getColor;
td2.colour = '#' + colour[k];
td2.style.border = '1px solid #' + colour[k];
td2.onmouseover = function() {
this.style.border = '1px solid #fff';
showColor.style.backgroundColor=this.colour;
};
td2.onmouseout = function() {
this.style.border = '1px solid ' + this.colour ;
};
k++;
}
}
td.appendChild(insideTable);
document.getElementById(el).appendChild(table);
}
function getColor()
{
var color = this.getAttribute('bgColor');
setColor.func(color);
popupClose();
}
function popupClose() {
oEditor.popupWinClose();
}

View File

@ -0,0 +1,40 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
function Dialog(oEditor) {
this.oEditor = oEditor;
}
Dialog.prototype.setDialogCss = function() {
var head = document.getElementsByTagName('head')[0];
var css = head.appendChild(document.createElement('link'));
css.setAttribute('type', 'text/css');
css.setAttribute('rel', 'stylesheet');
css.setAttribute('media', 'all');
css.setAttribute('href', this.oEditor.config.cssPath + 'dialog.css');
};
Dialog.prototype.setDialogHeight = function(height) {
this.oEditor.dialog.style.height = (typeof height != 'undefined' ? height : document.body.scrollHeight) + 2 + 'px';
};
Dialog.prototype.showButton = function(button) {
var buttonUrl = this.oEditor.config.iconPath + 'button/';
var wrapper = document.getElementById("buttonWrapper");
for (var i=0; i < button.length; i++) {
var img = new Image();
img.alt = button[i].alt;
if (typeof button[i].hspace != 'undefined')
img.hspace = button[i].hspace;
img.className = "button";
img.src = buttonUrl + button[i].img;
img.onclick = button[i].cmd;
wrapper.appendChild(img);
}
};

View File

@ -0,0 +1,88 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var button = [
{ alt : "", img : 'play.gif', cmd : doPlay },
{ alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose }
];
var oEditor = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
}
function doPlay()
{
var elem = oEditor.trimSpace(document.getElementById("fm_embed").value);
var embed = null;
var div = document.createElement('DIV');
var pos = elem.toLowerCase().indexOf("embed");
if (pos != -1) {
var str = elem.substr(pos);
pos = str.indexOf(">");
div.innerHTML = "<" + str.substr(0, pos) + ">";
embed = div.firstChild;
}
else {
div.innerHTML = elem;
var object = div.getElementsByTagName('OBJECT')[0];
if (object && object.hasChildNodes()) {
var child = object.firstChild;
var movieHeight, movieWidth;
movieWidth = (isNaN(object.width) != true) ? object.width : 320;
movieHeight = (isNaN(object.height)!= true) ? object.height: 240;
var params = new Array();
do {
if ((child.nodeName == 'PARAM') && (typeof child.name != 'undefined') && (typeof child.value != 'undefined'))
{
params.push({key: (child.name == 'movie') ? 'src' : child.name, val: child.value});
}
child = child.nextSibling;
}
while (child);
if (params.length > 0) {
embed = document.createElement('embed');
embed.setAttribute("width", movieWidth);
embed.setAttribute("height", movieHeight);
for (var i=0; i<params.length; i++)
embed.setAttribute(params[i].key, params[i].val);
embed.setAttribute("type", "application/x-shockwave-flash");
}
}
}
if (embed != null) {
document.getElementById('fm_player').appendChild(embed);
}
}
function doSubmit()
{
var source = '' + oEditor.trimSpace(document.getElementById("fm_embed").value);
if (source != '') {
oEditor.insertFlash(source);
}
document.getElementById('fm_player').innerHTML = '';
popupClose();
}
function popupClose() {
document.getElementById('fm_player').innerHTML = '';
oEditor.popupWinClose();
}

View File

@ -0,0 +1,108 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var button = [
{ alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose }
];
var oEditor = null;
var googleMapKey = null;
var center_lat = 0;
var center_lng = 0;
var setZoom = 4;
var marker_lat = 0;
var marker_lng = 0;
var currentName = { '지도' : 'map',
'중첩' : 'hybrid',
'위성' : 'satellite',
'지형' : 'satellite' };
var mapType;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
googleMapKey = oEditor.googleMapKey;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
var buttonUrl = oEditor.config.iconPath + 'button/map_address.gif';
var search = new Image();
search.src = buttonUrl;
search.onclick = function() { initMap(14); };
search.className = 'button';
document.getElementById('map_search').appendChild(search);
dlg.setDialogHeight();
}
function doSubmit() {
var map = new Image();
if (marker_lat == 0) marker_lat = center_lat;
if (marker_lng == 0) marker_lng = center_lng;
var mapWidth = 512;
var mapHeight = 320;
map.setAttribute('width', mapWidth);
map.setAttribute('height',mapHeight);
map.style.border = '1px #000 solid';
map.src = "http://maps.google.com/maps/api/staticmap?center=" + center_lat + ',' + center_lng +
"&zoom=" + setZoom +
"&size=" + mapWidth + 'x' + mapHeight +
"&maptype=" + currentName[mapType] +
"&markers=" + marker_lat + ',' + marker_lng +
"&sensor=false";
oEditor.insertHtmlPopup(map);
oEditor.insertHtmlPopup(document.createElement('br'));
oEditor.setImageEvent(true);
popupClose();
}
function initMap(zoom) {
zoom = zoom ? zoom : 14;
var address = document.getElementById('fm_address').value;
var map = new GMap2(document.getElementById("map_canvas"));
var geocoder = new GClientGeocoder();
geocoder.getLatLng(address,
function (point) {
if (!point) {
alert(address + " 주소를 찾을 수 없습니다.");
}
else {
map.setCenter(point, zoom);
map.addControl(new GScaleControl());
map.enableDoubleClickZoom();
//map.enableContinuousZoom();
map.enableScrollWheelZoom();
map.setUIToDefault();
var marker = new GMarker(point, {draggable: true});
GEvent.addListener(marker, "dragend", function() {
marker_lat = marker.getLatLng().lat();
marker_lng = marker.getLatLng().lng();
});
map.addOverlay(marker);
}
});
GEvent.addListener(map, "maptypechanged", function() {
mapType = map.getCurrentMapType().getName();
});
GEvent.addListener(map, "moveend", function() {
center_lat = map.getCenter().lat();
center_lng = map.getCenter().lng();
setZoom = map.getZoom();
});
}
function popupClose() {
oEditor.popupWinClose();
}

View File

@ -0,0 +1,56 @@
// ================================================================
// CHEditor
// ----------------------------------------------------------------
// Author: Na Chang-Ho (chna@chcode.com)
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var oEditor = null;
var button = [ { alt : "", img : 'cancel.gif', cmd : popupClose } ];
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
showContents();
dlg.showButton(button);
dlg.setDialogHeight();
}
function insertIcon() {
this.removeAttribute("className");
this.removeAttribute("class");
this.style.margin = '1px 4px';
oEditor.insertHtmlPopup(this.cloneNode(false));
popupClose();
}
function popupClose() {
oEditor.popupWinClose();
}
function showContents() {
var block = document.getElementById('imgBlock');
var path = oEditor.config.iconPath + 'em/';
var num = 80;
for (var i=40; i<num; i++) {
if (i > 40 && (i % 10) == 0) {
var br = document.createElement('br');
block.appendChild(br);
}
var img = new Image();
img.src = path + (i+1) + ".gif";
img.style.width = '16px';
img.style.height = '16px';
img.style.margin = '5px 4px';
img.style.verticalAlign = 'middle';
img.setAttribute('alt', '');
img.setAttribute('border', 0);
img.className = 'handCursor';
img.onclick = insertIcon;
block.appendChild(img);
}
}

838
cheditor5/popup/js/image.js Normal file
View File

@ -0,0 +1,838 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var operaBrowser = false;
if (navigator.userAgent.indexOf('Opera') >= 0)
operaBrowser = 1;
var MSIE = navigator.userAgent.indexOf('MSIE') >= 0;
var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
var UploadScript = "";
var DeleteScript = "";
var AppID = "CHXImage";
var AppSRC = "";
var activeImage = false;
var readyToMove = false;
var moveTimer = -1;
var dragDropDiv;
var insertionMarker;
var hideTimer = null;
var offsetX_marker = 4;
var offsetY_marker = -3;
var firefoxOffsetX_marker = 4;
var firefoxOffsetY_marker = -2;
if (navigatorVersion == 8 && MSIE) {
offsetX_marker = 3;
offsetY_marker = -4;
}
var destinationObject = false;
var divXPositions = [];
var divYPositions = [];
var divWidth = [];
var divHeight = [];
var tmpLeft = 0;
var tmpTop = 0;
var eventDiff_x = 0;
var eventDiff_y = 0;
var modifyImages = [];
var uploadMaxNumber = 12;
var imageCompleted = 0;
var imageCompletedList = [];
var UploadButton = "";
var UploadImagePath = "";
var oEditor = null;
var button = [ { alt : "", img : 'imageUpload/submit.gif', cmd : doSubmit, hspace : 2 },
{ alt : "", img : 'imageUpload/cancel.gif', cmd : closeWindow, hspace : 2 } ];
var allowedMaxImgSize = 0;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
UploadImagePath = oEditor.config.iconPath + 'imageUpload';
UploadButton = oEditor.config.iconPath + 'imageUpload/add_image_button.gif';
AppSRC = oEditor.config.popupPath + 'flash/CHXImage';
UploadScript = oEditor.config.editorPath + 'imageUpload/upload.php';
DeleteScript = oEditor.config.editorPath + 'imageUpload/delete.php';
allowedMaxImgSize = oEditor.config.allowedMaxImgSize;
dlg.setDialogHeight(397);
dlg.showButton(button);
showContents();
initGallery();
showUploadWindow();
initEvent();
createInsertionMaker();
}
function createInsertionMaker() {
var wrapper = document.getElementById('insertionMarker');
var topIco = new Image();
topIco.src = UploadImagePath + '/marker_top.gif';
topIco.style.width = '6px';
topIco.style.height = '1px';
wrapper.appendChild(topIco);
var middleIco = new Image();
middleIco.src = UploadImagePath + '/marker_middle.gif';
middleIco.style.height = '100px';
middleIco.style.width = '6px';
wrapper.appendChild(middleIco);
var bottomIco = new Image();
bottomIco.src = UploadImagePath + '/marker_bottom.gif';
bottomIco.style.width = '6px';
bottomIco.style.height = '1px';
wrapper.appendChild(bottomIco);
}
function popupClose() {
// ----------------------------------------------------------------------------------
oEditor.popupWinClose();
}
function showContents() {
var spacer = function(id) {
var clear = document.createElement('DIV');
clear.style.height = '0px';
clear.style.width = '0px';
clear.className = 'clear';
clear.id = 'spacer' + id;
if (MSIE && navigatorVersion < 7) clear.style.display = 'inline';
return clear;
};
var spacerNo = 1;
for (var i=0; i<uploadMaxNumber; i++) {
if (i > 0 && ((i % 4) == 0)) {
document.getElementById('imageListWrapper').appendChild(spacer(spacerNo++));
}
var imgBox = document.createElement('DIV');
imgBox.id = 'imgBox' + i;
imgBox.className = 'imageBox';
var theImg = document.createElement('DIV');
theImg.id = 'img_' + i;
theImg.className = 'imageBox_theImage';
imgBox.appendChild(theImg);
document.getElementById('imageListWrapper').appendChild(imgBox);
if (i == 11) {
document.getElementById('imageListWrapper').appendChild(spacer(spacerNo));
}
}
if (MSIE && navigatorVersion < 7) {
document.getElementById('imageListWrapper').style.padding = '5px 2px 5px 2px';
document.getElementById('imageInfoBox').style.height = '302px';
document.getElementById('imageInfoBox').style.width = '124px';
}
else {
document.getElementById('imageListWrapper').style.padding = '5px 7px 7px 5px';
document.getElementById('imageInfoBox').style.height = '298px';
document.getElementById('imageInfoBox').style.width = '130px';
}
}
function openFiles() {
// ----------------------------------------------------------------------------------
var elem = MSIE ? document.getElementById(AppID) : document[AppID];
elem.AddFiles();
}
function setImageCount() {
imageCompleted++;
document.getElementById('imageCount').innerHTML = imageCompleted;
}
function getImageCount() {
return imageCompleted;
}
function resetImageCount(num) {
imageCompleted = num;
document.getElementById('imageCount').innerHTML = num;
}
function showDelete(event) {
// ----------------------------------------------------------------------------------
getDivCoordinates();
var self = this;
var button = document.getElementById('removeImage');
var L = divXPositions[self.parentNode.id];
var T = divYPositions[self.parentNode.id];
self.className = 'imageBox_theImage_over';
button.style.left = (L + 126) + 'px';
button.style.top = (T - 7) + 'px';
button.style.display = 'block';
button.onmouseover = function() {
self.className = 'imageBox_theImage_over';
document.getElementById('selectedImageWidth').innerHTML = imageCompletedList[self.id]['width'];
document.getElementById('selectedImageHeight').innerHTML = imageCompletedList[self.id]['height'];
};
document.getElementById('selectedImageWidth').innerHTML = imageCompletedList[self.id]['width'];
document.getElementById('selectedImageHeight').innerHTML = imageCompletedList[self.id]['height'];
button.onclick = function() {
create_request_object(DeleteScript + '?img=' + self.firstChild.src);
self.removeChild(self.firstChild);
self.onmouseover = null;
self.className = 'imageBox_theImage';
document.getElementById('removeImage').style.display = 'none';
if (self.parentNode.nextSibling && self.parentNode.nextSibling.id)
{
var wrapper = document.getElementById('imageListWrapper');
var moveobj = self.parentNode.nextSibling;
var target = self.parentNode;
while (moveobj != null) {
wrapper.insertBefore(moveobj, target);
moveobj = target.nextSibling;
}
}
resetSelectedImageSize();
reOrder();
};
if (hideTimer) clearTimeout(hideTimer);
hideTimer = setTimeout('hideDelete()', 3000);
}
function hideDelete(event) {
// ----------------------------------------------------------------------------------
document.getElementById('removeImage').style.display = 'none';
}
function resetSelectedImageSize() {
document.getElementById('selectedImageWidth').innerHTML = 0;
document.getElementById('selectedImageHeight').innerHTML = 0;
}
function startUpload(count) {
// ----------------------------------------------------------------------------------
var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < el.length; i++) {
var imgBox = el[i];
if (imgBox.className != 'imageBox_theImage')
continue;
if (count == 0) break;
if (imgBox.firstChild == null || typeof(imgBox.firstChild.src) == 'undefined') {
imgBox.style.backgroundImage = "url('"+UploadImagePath+"/wait.gif')";
count--;
}
}
}
function fileFilterError(file) {
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
"gif, png, jpg, 그림 파일만 전송할 수 있습니다.");
}
function uploadComplete(fileData) {
// ----------------------------------------------------------------------------------
fileData = fileData.replace(/^\s+/g, '').replace(/\s+$/g, '');
if (/^-ERR/.test(fileData)) {
alert(fileData);
popupClose();
}
if (imageCompleted >= uploadMaxNumber)
return;
var tmpData = eval('('+fileData+')');
if (typeof tmpData == 'undefined')
return;
var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < el.length; i++) {
var imgBox = el[i];
if (imgBox.className != 'imageBox_theImage')
continue;
if (tmpData['fileSize'] == 0) {
imgBox.style.backgroundImage = '';
alert(tmpData['origName'] + ' 파일은 잘못된 파일입니다.');
break;
}
if (imgBox.firstChild == null || typeof(imgBox.firstChild.src) == 'undefined') {
var tmpImg = new Image();
tmpImg.src = tmpData.fileUrl;
imgBox.appendChild(tmpImg);
if (MSIE) tmpImg.style.display = "none";
else tmpImg.style.visibility = 'hidden';
imgComplete(tmpImg, imgBox.id, tmpData);
break;
}
}
}
function imgComplete(img, boxId, dataObj) {
if (img.complete != true) {
var R = function() { imgComplete(img, boxId, dataObj);img=null;};
setTimeout(R, 100);
}
else {
img.border = 0;
img.alt = '';
var fixWidth = 120;
var fixHeight = 90;
var resizeW, resizeH;
imageCompletedList[boxId] = { width: img.width, height: img.height, info: dataObj };
if (img.width > fixWidth || img.height > fixHeight) {
if (img.width > img.height) {
resizeW = (img.width > fixWidth) ? fixWidth : img.width;
resizeH = Math.round((img.height * resizeW) / img.width);
}
else {
resizeH = (img.height > fixHeight) ? fixHeight : img.height;
resizeW = Math.round((img.width * resizeH) / img.height);
}
if (resizeH > fixHeight) {
resizeH = (img.height > fixHeight) ? fixHeight : img.height;
resizeW = Math.round((img.width * resizeH) / img.height);
}
}
else {
resizeW = img.width;
resizeH = img.height;
}
img.style.width = resizeW + 'px';
img.style.height = resizeH + 'px';
img.hspace = 2;
img.vspace = 2;
if (resizeW < fixWidth) {
var M = fixWidth - resizeW;
img.style.marginLeft = Math.round(M/2) + 'px';
}
if (resizeH < fixHeight) {
var M = fixHeight - resizeH;
img.style.marginTop = Math.round(M/2) + 'px';
}
var elem = document.getElementById(boxId);
elem.style.backgroundImage = "url('"+oEditor.config.iconPath+"dot.gif')";
elem.onmouseover = showDelete;
elem.onmouseout = function() {
this.className = 'imageBox_theImage';
resetSelectedImageSize();
};
if (MSIE) img.style.display = "block";
else img.style.visibility = 'visible';
setImageCount();
}
}
function errMaxFileSize (errFileName) {
alert("선택하신 '"+errFileName+"' 파일의 크기가 너무 큽니다.\n선택 가능한 파일의 최대 크기는 " +
allowedMaxImgSize+" 바이트입니다.");
}
function initEvent() {
//----------------------------------------------------------------------------------
CHXImageRUN (
"src", AppSRC,
"width", "93",
"FlashVars", "ServerURL="+UploadScript+"&UploadButton="+UploadButton+"&MaxFileSize="+allowedMaxImgSize,
"height", "22",
"align", "middle",
"id", AppID,
"quality", "high",
"bgcolor", "#ffffff",
"name", AppID,
"allowScriptAccess","Always",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
}
function showUploadWindow() {
// ----------------------------------------------------------------------------------
var uploadWindow = document.getElementById("uploadWindow");
var uploadWindowWidth = 700;
var winWidth = 0;
if (typeof(window.innerWidth) != 'undefined') {
winHeight = window.innerHeight;
winWidth = window.innerWidth;
}
else if (document.documentElement && typeof document.documentElement.clientWidth!='undefined'
&& document.documentElement.clientWidth != 0 )
{
winWidth = document.documentElement.clientWidth;
winHeight = document.documentElement.clientHeight;
}
else if (document.body && typeof document.body.clientWidth!='undefined') {
winWidth = document.body.clientWidth;
winHeight = document.body.clientHeight;
}
else {
alert('현재 브라우저를 지원하지 않습니다.');
return;
}
var left = winWidth / 2 - (uploadWindowWidth / 2) + 'px';
uploadWindow.style.left = left;
uploadWindow.style.display = "block";
uploadWindow.style.width = uploadWindowWidth + 'px';
if (modifyImages.length > 0) {
var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < modifyImages.length; i++) {
if (i > 7) break;
for (var j=0; j < el.length; j++) {
var imgBox = el[j];
if (imgBox.className != 'imageBox_theImage')
continue;
if (imgBox.firstChild && (imgBox.firstChild.src == modifyImages[i])) {
break;
}
if (imgBox.firstChild == null) {
var img = new Image();
img.src = modifyImages[i];
img.border = 0;
img.alt = '';
img.style.width = '120px';
img.style.height = '90px';
imgBox.appendChild(img);
imgBox.onmouseover = showDelete;
break;
}
}
}
}
}
function closeWindow() {
// ----------------------------------------------------------------------------------
if (removeImage())
popupClose();
}
function removeImage() {
// ----------------------------------------------------------------------------------
var images = [];
for (var i=0; i < uploadMaxNumber; i++) {
var theImage = document.getElementById('img_'+i);
if (theImage.hasChildNodes() && (typeof theImage.firstChild.src != 'undefined'))
images.push(theImage);
}
if (images.length > 0) {
if (!confirm('추가하신 사진이 있습니다. 사진 넣기를 취소하시겠습니까?')) {
return false;
}
for (var i=0; i<images.length; i++) {
var img = images[i];
if (img.firstChild != null) {
create_request_object(DeleteScript + '?img=' + img.firstChild.src);
img.removeChild(img.firstChild);
img.onmouseover = null;
img.parentNode.className = 'imageBox';
}
}
}
return true;
}
function cancelEvent() {
// ----------------------------------------------------------------------------------
return false;
}
function getTopPos(inputObj) {
// ----------------------------------------------------------------------------------
var returnValue = inputObj.offsetTop;
while ((inputObj = inputObj.offsetParent) != null) {
if (inputObj.tagName != 'HTML') {
returnValue += (inputObj.offsetTop - inputObj.scrollTop);
if (MSIE)
returnValue+=inputObj.clientTop;
}
}
return returnValue;
}
function getLeftPos(inputObj) {
// ----------------------------------------------------------------------------------
var returnValue = inputObj.offsetLeft;
while ((inputObj = inputObj.offsetParent) != null) {
if (inputObj.id != 'imageListWrapper') {
returnValue += inputObj.offsetLeft;
if (MSIE)
returnValue+=inputObj.clientLeft;
}
}
return returnValue;
}
function selectImage(e) {
// ----------------------------------------------------------------------------------
if (MSIE)
e = event;
var el = this.parentNode.firstChild.firstChild;
if (!el) return;
var obj = this.parentNode;
if (activeImage)
activeImage.className = 'imageBox';
obj.className = 'imageBoxHighlighted';
activeImage = obj;
readyToMove = true;
moveTimer = 0;
tmpLeft = e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
tmpTop = e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop);
startMoveTimer();
return false;
}
function startMoveTimer() {
// ----------------------------------------------------------------------------------
if (moveTimer >= 0 && moveTimer < 10) {
moveTimer++;
setTimeout('startMoveTimer()', 8);
}
if (moveTimer == 5) {
getDivCoordinates();
var subElements = dragDropDiv.getElementsByTagName('DIV');
if (subElements.length > 0) {
dragDropDiv.removeChild(subElements[0]);
}
dragDropDiv.style.display = 'block';
var newDiv = activeImage.cloneNode(true);
newDiv.className = 'imageBox';
newDiv.id = '';
newDiv.style.padding = '2px';
dragDropDiv.appendChild(newDiv);
dragDropDiv.style.top = tmpTop + 'px';
dragDropDiv.style.left = tmpLeft + 'px';
}
return false;
}
function reOrder() {
// ----------------------------------------------------------------------------------
var wrapper = document.getElementById('imageListWrapper');
var imgBox = wrapper.getElementsByTagName('DIV');
var imgNum = 0;
var breakLine = [];
var uploadImg = 0;
for (var i=0; i < imgBox.length; i++) {
if (imgBox[i].id.indexOf('imgBox') == -1) continue;
imgBox[i].className = 'imageBox';
imgBox[i].firstChild.className = 'imageBox_theImage';
if (imgBox[i].firstChild.firstChild != null) {
uploadImg++;
}
switch (imgNum) {
case 4 :
case 8 :
case 11 :
breakLine.push(imgBox[i].id);
break;
}
imgNum++;
}
for (var i=0; i<breakLine.length; i++) {
var spacer = document.getElementById('spacer' + (i+1));
wrapper.insertBefore(spacer, document.getElementById(breakLine[i]));
if (i==2) wrapper.appendChild(spacer);
}
resetImageCount(uploadImg);
}
function dragDropEnd() {
// ----------------------------------------------------------------------------------
readyToMove = false;
moveTimer = -1;
dragDropDiv.style.display = 'none';
insertionMarker.style.display = 'none';
if (destinationObject && destinationObject != activeImage) {
var parentObj = destinationObject.parentNode;
var chkObj = destinationObject.previousSibling;
var turn = false;
if (chkObj == null) {
chkObj = document.getElementById('imageListWrapper').firstChild;
turn = true;
}
if (chkObj.id.indexOf('spacer') != -1) {
chkObj = chkObj.previousSibling;
}
if (chkObj.firstChild.firstChild == null) {
reOrder();
return;
}
if (chkObj && chkObj.id != null) {
while (chkObj) {
if (chkObj.firstChild.firstChild != null) {
break;
}
chkObj = chkObj.previousSibling;
}
destinationObject = turn ? chkObj : chkObj.nextSibling;
}
parentObj.insertBefore(activeImage, destinationObject);
reOrder();
activeImage.className = 'imageBox';
activeImage = false;
destinationObject = false;
getDivCoordinates();
return false;
}
return true;
}
function dragDropMove(e) {
// ----------------------------------------------------------------------------------
if (moveTimer == -1)
return;
if(MSIE)
e = event;
var leftPos = e.clientX + document.documentElement.scrollLeft - eventDiff_x;
var topPos = e.clientY + document.documentElement.scrollTop - eventDiff_y;
dragDropDiv.style.top = topPos + 'px';
dragDropDiv.style.left = leftPos + 'px';
leftPos = leftPos + eventDiff_x;
topPos = topPos + eventDiff_y;
if (e.button != 1 && MSIE)
dragDropEnd();
var elementFound = false;
for (var prop in divXPositions) {
if (divXPositions[prop].className == 'clear')
continue;
if (divXPositions[prop] / 1 < leftPos / 1 &&
(divXPositions[prop] / 1 + divWidth[prop] * 0.7) > leftPos / 1 &&
divYPositions[prop] / 1 < topPos / 1 &&
(divYPositions[prop] / 1 + divWidth[prop]) > topPos / 1)
{
if (MSIE) {
offsetX = offsetX_marker;
offsetY = offsetY_marker;
}
else {
offsetX = firefoxOffsetX_marker;
offsetY = firefoxOffsetY_marker;
}
insertionMarker.style.top = divYPositions[prop] + offsetY + 'px';
insertionMarker.style.left = divXPositions[prop] + offsetX + 'px';
insertionMarker.style.display = 'block';
destinationObject = document.getElementById(prop);
elementFound = true;
break;
}
}
if (!elementFound) {
insertionMarker.style.display = 'none';
destinationObject = false;
}
return false;
}
function getDivCoordinates() {
// ----------------------------------------------------------------------------------
var imgBox = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < imgBox.length; i++) {
if (imgBox[i].className == 'imageBox' ||
imgBox[i].className == 'imageBoxHighlighted' && imgBox[i].id)
{
divXPositions[imgBox[i].id] = getLeftPos(imgBox[i]);
divYPositions[imgBox[i].id] = getTopPos(imgBox[i]);
divWidth[imgBox[i].id] = imgBox[i].offsetWidth;
divHeight[imgBox[i].id] = imgBox[i].offsetHeight;
}
}
}
function saveImageOrder() {
// ----------------------------------------------------------------------------------
var rData = [];
var objects = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < objects.length; i++) {
if (objects[i].className == 'imageBox' ||
objects[i].className == 'imageBoxHighlighted')
{
rData.push(objects[i].id);
}
}
return rData;
}
function initGallery() {
// ----------------------------------------------------------------------------------
var imgBox = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
for (var i=0; i < imgBox.length; i++) {
if (imgBox[i].className == 'imageBox_theImage') {
imgBox[i].onmousedown = selectImage;
}
}
document.body.onselectstart = cancelEvent;
document.body.ondragstart = cancelEvent;
document.body.onmouseup = dragDropEnd;
document.body.onmousemove = dragDropMove;
dragDropDiv = document.getElementById('dragDropContent');
insertionMarker = document.getElementById('insertionMarker');
getDivCoordinates();
}
function create_request_object(params) {
// ----------------------------------------------------------------------------------
var http_request = false;
if (window.XMLHttpRequest) {
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
}
}
else if (window.ActiveXObject) {
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {}
}
}
if (!http_request) {
return false;
}
http_request.onreadystatechange = function() { handle_response(http_request); };
http_request.open("GET", params, true);
http_request.send(null);
}
function handle_response (http_request) {
// ----------------------------------------------------------------------------------
if(http_request.readyState == 4){
if (http_request.status == 200) {
var response = http_request.responseText;
if (response) {
return true;
}
}
}
}
function doSubmit() {
// ----------------------------------------------------------------------------------
var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV');
var imageArray = [];
var num = 0;
var fm_align = document.getElementById('fm_alignment').alignment;
var img_align = 'top';
for (var i=0; i < fm_align.length; i++) {
if (fm_align[i].checked) {
img_align = fm_align[i].value;
break;
}
}
for (var i=0; i < el.length; i++) {
var imgBox = el[i];
if (imgBox.className != 'imageBox_theImage')
continue;
//----------------------------------------------------------------------------
//
if (imgBox.firstChild != null) {
imageArray[num] = new Object();
imageArray[num]['width'] = imageCompletedList[imgBox.id].width;
imageArray[num]['height'] = imageCompletedList[imgBox.id].height;
imageArray[num]['src'] = imgBox.firstChild.src;
imageArray[num]['info'] = imageCompletedList[imgBox.id].info;
if (img_align == 'break' ) {
imageArray[num]['alt'] = "break";
}
else {
imageArray[num]['alt'] = "";
imageArray[num]['align'] = img_align;
}
num++;
}
}
if (imageArray.length > 0)
oEditor.doInsertImage(imageArray);
popupClose();
}

View File

@ -0,0 +1,279 @@
// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
var version = 0;
var axo;
// var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
}
if (!version)
{
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
}
}
if (!version)
{
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
}
}
return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
}
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
}
} else if (versionRevision[0] == "b") {
versionRevision = versionRevision.substring(1);
}
flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera ) {
flashVer = ControlVersion();
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
}
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
}
}
return false;
}
}
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
if (isIE && isWin && !isOpera)
{
var str = '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
str += '>';
for (var i in params)
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
str += '</object>';
document.getElementById("oFlash").innerHTML = str;
}
else {
var oFlash = document.getElementById("oFlash");
var embed = document.createElement('embed');
for (var i in embedAttrs) {
embed.setAttribute(i, embedAttrs[i]);
}
oFlash.appendChild(embed);
}
}
function CHXImageRUN(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
ret.objAttrs[args[i]] = args[i+1];
break;
case "id":
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}

View File

@ -0,0 +1,188 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var AppWidth = "250";
var AppHeight = "175";
var AppID = "cheditorPreview";
var oEditor = null;
var button = [ { alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose } ];
var imageArray = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
imageArray = new Array();
var dlg = new Dialog(oEditor);
dlg.showButton(button);
CHXUploadRUN(oEditor.config.popupPath + 'flash/ImagePreview');
setWrapper();
showPreviewButton();
dlg.setDialogHeight();
}
function showPreviewButton() {
var img = new Image();
img.src = oEditor.config.iconPath + 'button/preview.gif';
img.style.verticalAlign = 'middle';
img.className = 'button';
img.alt = "";
img.onclick = doPreview;
document.getElementById("inputOutline").appendChild(img);
}
function CHEditorImagePreview () {
// ----------------------------------------------------------------------------------
// callBack function
document.getElementById(AppID).CHEditorImagePreview("1", "1");
}
function CHXUploadRUN(src) {
// ----------------------------------------------------------------------------------
// Preview
//
chxupload_RUN("src", src,
"width", AppWidth,
"height", AppHeight,
"align", "middle",
"id", AppID,
"classid", AppID,
"quality", "high",
"bgcolor", "#ebe9ed",
"name", AppID,
"allowScriptAccess","Always",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer");
}
function popupClose()
{
oEditor.popupWinClose();
}
function doSubmit ()
{
if (navigator.userAgent.toLowerCase().indexOf("msie") != -1)
document.getElementById(AppID).style.display = 'none';
var fm_align = document.getElementById('fm_align').alignment;
var align = '';
var i = 0;
for (; i<fm_align.length; i++) {
if (fm_align[i].checked) {
align = fm_align[i].value;
break;
}
}
imageArray[0]['align'] = align;
oEditor.doInsertImage(imageArray);
popupClose();
}
function previewImage (source) {
if (navigator.appName.indexOf("microsoft") != -1) {
window[AppID].CHEditorImagePreview(source, 0, 0);
}
else {
document[AppID].CHEditorImagePreview(source, 0, 0);
}
}
function checkImageComplete (img) {
if (img.complete != true) {
setTimeout("checkImageComplete(document.getElementById('"+img.id+"'))", 250);
}
else {
var txt = document.createTextNode(img.width + ' X ' + img.height);
document.getElementById('imageSize').innerHTML = '';
document.getElementById('imageSize').appendChild(txt);
var i = 0;
imageArray[i] = new Object();
imageArray[i]['width'] = img.width;
imageArray[i]['height'] = img.height;
imageArray[i]['src'] = img.src;
imageArray[i]['alt'] = img.src;
}
}
function chkImgFormat (url)
{
var imageName = getFilename(url);
var allowSubmit = false;
var extArray = new Array(".gif", ".jpg", ".jpeg", ".png");
extArray.join(" ");
if (imageName == "") return false;
var ext = imageName.slice(imageName.lastIndexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) {
allowSubmit = true;
break;
}
}
if (!allowSubmit) {
alert("사진은 GIF, JPG, PNG 형식만 넣을 수 있습니다.");
return false;
}
return imageName;
}
function doPreview () {
var imgurl = document.getElementById('fm_imageUrl').value;
var fileName = chkImgFormat(imgurl);
if (!fileName) return;
var img = new Image();
img.src = imgurl;
img.id = fileName;
document.getElementById('tmpImage').appendChild(img);
checkImageComplete(img);
previewImage(img.src);
}
function outputImageSize (w, h) {
var txt = document.createTextNode(w + ' X ' + h);
document.getElementById('imageSize').innerHTML = '';
document.getElementById('imageSize').appendChild(txt);
}
function showImageSize (w, h) {
outputImageSize(w, h);
}
function getFilename (file) {
while (file.indexOf("/") != -1) {
file = file.slice(file.indexOf("/") + 1);
}
return file;
}
function setWrapper () {
var wrapper = document.getElementById('tmpImage');
wrapper.style.width = '0px';
wrapper.style.height = '0px';
wrapper.style.overflow = 'hidden';
if (navigator.userAgent.toLowerCase().indexOf('opera') != -1)
wrapper.style.visibility = 'hidden';
else
wrapper.style.display = 'none';
}

132
cheditor5/popup/js/link.js Normal file
View File

@ -0,0 +1,132 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var oEditor = null;
var button = [ { alt : "", img : 'submit.gif', cmd : returnSelected },
{ alt : "", img : 'cancel.gif', cmd : popupClose } ];
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
resetValues();
getSelected();
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
}
function resetValues() {
document.getElementById('fm_link_value').value = 'http://';
document.getElementById("fm_title").value = '';
}
function popupClose() {
oEditor.popupWinClose();
}
function UpdateProtocol()
{
var protocolSel = document.getElementById("fm_protocol");
var selectedItem = protocolSel.selectedIndex;
var selectedItemValue = protocolSel.options[selectedItem].value;
//var selectedItemText = protocolSel.options[selectedItem].text;
var inputtedText = document.getElementById("fm_link_value").value;
var datum;
var protocol = inputtedText.split(":");
if (protocol[1]) {
datum = protocol[1].replace(/^\/\//, "");
datum = datum.replace(/\\/, "");
datum = datum.replace(/^\//, "");
}
else {
if(inputtedText.indexOf(":") > 0)
datum = "";
else {
datum = protocol[0];
datum = protocol[0].replace(/^\/\/\//, "//");
}
}
document.getElementById("fm_link_value").value = selectedItemValue + datum;
document.getElementById("fm_link_value").focus();
}
function returnSelected()
{
var text;
var target = '';
var title = '';
if (document.getElementById("fm_link_value").value != "") {
text = document.getElementById("fm_link_value").value;
}
else {
alert("링크 URL을 입력하여 주십시오.");
return false;
}
if (document.getElementById("fm_target").value != "") {
target = document.getElementById("fm_target").value;
}
if (document.getElementById("fm_title").value != "") {
title = document.getElementById("fm_title").value;
}
oEditor.hyperLink(text, target, title);
popupClose();
}
function getSelected() {
var rng = oEditor.range;
var link = null;
if (window.getSelection) {
link = oEditor.getElement(rng.startContainer, "A");
}
else {
link = rng.parentElement ? oEditor.getElement(rng.parentElement(), "A") : oEditor.getElement(rng.item(0), "A");
}
if (link == null || link.nodeName.toLowerCase() != 'a')
return;
var protocol = link.href.split(":");
if (protocol[0]) {
var protocolSel = document.getElementById("fm_protocol");
for (var i=0; i<protocolSel.length; i++) {
if (protocolSel[i].value.indexOf(protocol[0].toLowerCase()) != -1) {
var oldTarget = link.target;
var targetSel = document.getElementById("fm_target");
if (oldTarget) {
for (var j=0; j < targetSel.length; j++) {
if (targetSel[j].value == oldTarget.toLowerCase()) {
targetSel[j].selected = true;
break;
}
}
}
else {
targetSel[0].selected = true;
}
protocolSel[i].selected = true;
if (link.title) {
document.getElementById("fm_title").value = link.title;
}
break;
}
}
}
document.getElementById("fm_link_value").value = link.href;
}

View File

@ -0,0 +1,46 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var button = [
{ alt : "", img : 'play.gif', cmd : play },
{ alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose }
];
var oEditor = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
}
function play()
{
var file = document.getElementById("fm_linkurl");
if (!file.value)
return;
var mediaobj = "<embed src='"+file.value+"' autostart='true' loop='true'></embed>";
var obj = document.getElementById("play");
obj.innerHTML = mediaobj;
}
function doSubmit()
{
var file = document.getElementById("fm_linkurl");
var media = "<embed src='"+file.value+"' autostart='true' loop='true'></embed>";
oEditor.insertHtmlPopup(media);
popupClose();
}
function popupClose() {
oEditor.popupWinClose();
}

View File

@ -0,0 +1,158 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com 한국어
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var c = null;
var curView = null;
var S1 = ' “ ” 〈 〉 《 》 「 」 『 』 【 】 § ※ ☆ ★ ○ ● ■ △ ▲ ▽ ▼ → 〓 ◁ ◀ ▷ ▶ ♤ ♣ ⊙ ◈ ▣ ◐ ◑ ▧ ▦ ▩ ♨ ☏ ☎ ‡ ㉿ ↕ ↗ ↙ ↖ ↘ ㈜ № ㏇ ™ ㏂ ± × ÷ ≠ ≤ ≥ ∞ ∴ ♂ ♀ ∠ ⊥ ⌒ ∂ ∇ ≡ ≒ ≪ ≫ √ ∽ ∝ ∵ ∫ ∬ ∈ ∋ ⊆ ⊇ ⊂ ⊃ ∮ ∩ ∑ ∏ ∧ ¬ ⇒ ⇔ ∀ ∃';
var S2 = '─ │ ┌ ┐ ┘ └ ├ ┬ ┤ ┴ ┼ ━ ┃ ┏ ┓ ┛ ┗ ┣ ┳ ┫ ┻ ╋ ┠ ┯ ┨ ┷ ┿ ┝ ┰ ┥ ┸ ╂ ┒ ┑ ┚ ┙ ┖ ┕ ┎ ┍ ┞ ┟ ┡ ┢ ┦ ┧ ┩ ┪ ┭ ┮ ┱ ┲ ┵ ┶ ┹ ┺ ┽ ┾ ╀ ╁ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊';
var S3 = '½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ¹ ² ³ ⁴ ⁿ ₁ ₂ ₃ ₄ ⅱ ⅲ ⅳ ⅵ ⅶ ⅷ ⅸ Ⅱ Ⅲ Ⅳ Ⅵ Ⅶ Ⅷ Ⅸ ₩ ° ″ ℃ Å ¢ £ ¥ ¤ ℉ ‰ ㎕ ㎖ ㎗ ㎘ ㏄ ㎣ ㎤ ㎥ ㎦ ㎙ ㎚ ㎛ ㎜ ㎝ ㎞ ㎟ ㎠ ㎡ ㎢ ㏊ ㎍ ㎎ ㎏ ㏏ ㎈ ㎉ ㏈ ㎧ ㎨ ㎰ ㎱ ㎲ ㎳ ㎴ ㎵ ㎶ ㎷ ㎸ ㎹ ㎀ ㎁ ㎂ ㎃ ㎄ ㎺ ㎻ ㎼ ㎽ ㎾ ㎿ ㎐ ㎑ ㎒ ㎓ ㎔ Ω ㏀ ㏁ ㎊ ㎋ ㎌ ㏖ ㏅ ㎭ ㎮ ㎯ ㏛ ㎩ ㎪ ㎫ ㎬ ㏝ ㏐ ㏓ ㏉ ㏜ ㏆';
var S4 = 'ㅥ ㅦ ㅧ ㅨ ㅩ ㅪ ㅫ ㅬ ㅭ ㅮ ㅰ ㅯ ㅱ ㅲ ㅳ ㅴ ㅵ ㅶ ㅷ ㅸ ㅹ ㅺ ㅻ ㅼ ㅽ ㅾ ㅿ ㆀ ㆁ ㆂ ㆃ ㆄ ㆅ ㆆ ㆇ ㆈ ㆉ ㆊ ㆋ ㆌ ㆍ ㆎ';
var S5 = '㉠ ㉡ ㉢ ㉣ ㉤ ㉥ ㉦ ㉧ ㉨ ㉩ ㉪ ㉫ ㉬ ㉭ ㉮ ㉯ ㉰ ㉱ ㉲ ㉳ ㉴ ㉶ ㉶ ㉷ ㉸ ㉹ ㉺ ㉻ ㈀ ㈁ ㈂ ㈃ ㈄ ㈅ ㈆ ㈇ ㈈ ㈉ ㈊ ㈋ ㈌ ㈍ ㈎ ㈏ ㈐ ㈑ ㈒ ㈓ ㈔ ㈕ ㈖ ㈗ ㈘ ㈙ ㈚ ㈛ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱ ⒲ ⒳ ⒴ ⒵ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂';
var japan1 = 'ぁ か さ た ど び ぽ ょ ゑ あ が ざ だ な ぴ ま よ を ぃ き し ち に ふ み ら ん い ぎ じ ぢ ぬ ぶ む り ぅ く す っ ね ぷ め る う ぐ ず つ の へ も れ ぇ け せ づ は べ ゃ ろ え げ ぜ て ば ぺ や ゎ ぉ こ そ で ぱ ほ ゅ わ お ご ぞ と ひ ぼ ゆ ゐ';
var japan2 = 'ァ カ サ タ ド ビ ポ ョ ヱ ア ガ ザ ダ ナ ピ マ ヨ ヲ ィ キ シ チ ニ フ ミ ラ ン イ ギ ジ ヂ ヌ ブ ム リ ヴ ゥ ク ス ッ ネ プ メ ル ヵ ウ グ ズ ツ ヘ モ レ ヶ ェ ケ セ ヅ ハ ベ ャ ロ エ ゲ ゼ テ バ ペ ヤ ヮ ォ コ ソ デ パ ホ ュ ワ オ ゴ ゾ ト ヒ ボ ユ ヰ';
c = S1.split(' ');
var button = [ { alt : "", img : 'input.gif', cmd : inputChar },
{ alt : "", img : 'cancel.gif', cmd : popupClose } ];
var oEditor = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
setupEvent();
dlg.setDialogHeight();
}
function showTable() {
var k = 0;
var len = c.length;
var w = 9;
var h = 20;
var table = document.createElement('table');
table.border = 0;
table.cellSpacing = 1;
table.cellPadding = 0;
table.align = 'center';
for (var i=0; i < w; i++) {
var tr = table.insertRow(i);
for (var j = 0; j < h; j++) {
var td = tr.insertCell(j);
td.className = 'schar';
if ( len < k+1) {
td.appendChild(document.createTextNode('\u00a0'));
}
else {
td.style.cursor = 'pointer';
td.id = k;
td.onclick = function() { getchar(this.id); };
td.onmouseover = function() { hover(this, true); };
td.onmouseout = function() { hover(this, false); };
td.appendChild(document.createTextNode(c[k]));
}
k++;
}
}
var output = document.getElementById('output');
if (output.hasChildNodes()) {
for (var i=0; i<output.childNodes.length; i++) {
output.removeChild(output.firstChild);
}
}
output.appendChild(table);
}
function sp1 () {
c = S1.split(' ');
showTable();
}
function sp2 () {
c = S2.split(' ');
showTable();
}
function sp3 () {
c = S3.split(' ');
showTable();
}
function sp4 () {
c = S4.split(' ');
showTable();
}
function sp5 () {
c = S5.split(' ');
showTable();
}
function sp6 () {
c = japan1.split(' ').concat(japan2.split(' '));
showTable();
}
function hover(obj, val) {
obj.style.backgroundColor = val ? "#5579aa" : "#fff";
obj.style.color = val ? "#fff" : "#000";
}
function getchar(i) {
document.getElementById('fm_input').value = document.getElementById('fm_input').value + c[i];
}
function inputChar() {
oEditor.insertHtmlPopup(document.getElementById('fm_input').value);
oEditor.popupWinClose();
}
function popupClose() {
oEditor.popupWinClose();
}
function setupEvent() {
var el = document.body.getElementsByTagName('LABEL');
for (var i=0; i < el.length; i++) {
el[i].className = 'handCursor';
el[i].style.fontSize = '9pt';
el[i].style.margin = (i==0) ? '0px 0px 5px 5px' : '0px 0px 5px 0px';
el[i].onclick = function () {
document.getElementById(this.id).style.fontWeight = 'bold';
switch (this.id) {
case 's1' : sp1(); break;
case 's2' : sp2(); break;
case 's3' : sp3(); break;
case 's4' : sp4(); break;
case 's5' : sp5(); break;
default : sp6();
};
if (curView != this.id) {
document.getElementById(curView).style.fontWeight = 'normal';
}
curView = this.id;
} ;
}
if (curView == null) {
showTable();
curView = 's1';
document.getElementById(curView).style.fontWeight = 'bold';
document.getElementById('output').style.visibility = 'visible';
}
document.getElementById("fm_input").value = "";
}

161
cheditor5/popup/js/table.js Normal file
View File

@ -0,0 +1,161 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var oEditor = null;
var button = [ { alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose } ];
var colour = ["ffffcc","ffcc66","ff9900","ffcc99","ff6633","ffcccc","cc9999","ff6699","ff99cc","ff66cc","ffccff","cc99cc","cc66ff","cc99ff","9966cc","ccccff","9999cc","3333ff","6699ff","0066ff","99ccff","66ccff","99cccc","ccffff","99ffcc","66cc99","66ff99","99ff99","ccffcc","33ff33","66ff00","ccff99","99ff00","ccff66","cccc66","ffffff",
"ffff99","ffcc00","ff9933","ff9966","cc3300","ff9999","cc6666","ff3366","ff3399","ff00cc","ff99ff","cc66cc","cc33ff","9933cc","9966ff","9999ff","6666ff","3300ff","3366ff","0066cc","3399ff","33ccff","66cccc","99ffff","66ffcc","33cc99","33ff99","66ff66","99cc99","00ff33","66ff33","99ff66","99ff33","ccff00","cccc33","cccccc",
"ffff66","ffcc33","cc9966","ff6600","ff3300","ff6666","cc3333","ff0066","ff0099","ff33cc","ff66ff","cc00cc","cc00ff","9933ff","6600cc","6633ff","6666cc","3300cc","0000ff","3366cc","0099ff","00ccff","339999","66ffff","33ffcc","00cc99","00ff99","33ff66","66cc66","00ff00","33ff00","66cc00","99cc66","ccff33","999966","999999",
"ffff33","cc9900","cc6600","cc6633","ff0000","ff3333","993333","cc3366","cc0066","cc6699","ff33ff","cc33cc","9900cc","9900ff","6633cc","6600ff","666699","3333cc","0000cc","0033ff","6699cc","3399cc","669999","33ffff","00ffcc","339966","33cc66","00ff66","669966","00cc00","33cc00","66cc33","99cc00","cccc99","999933","666666",
"ffff00","cc9933","996633","993300","cc0000","ff0033","990033","996666","993366","cc0099","ff00ff","990099","996699","660099","663399","330099","333399","000099","0033cc","003399","336699","0099cc","006666","00ffff","33cccc","009966","00cc66","339933","336633","33cc33","339900","669933","99cc33","666633","999900","333333",
"cccc00","996600","663300","660000","990000","cc0033","330000","663333","660033","990066","cc3399","993399","660066","663366","330033","330066","333366","000066","000033","003366","006699","003333","336666","00cccc","009999","006633","009933","006600","003300","00cc33","009900","336600","669900","333300","666600","000000"];
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
}
function popupClose() {
oEditor.popupWinClose();
}
function drawColor(el)
{
var table = document.createElement('table');
table.cellPadding = 0;
table.cellSpacing = 0;
table.border = 0;
var tr = table.insertRow(0);
var td = tr.insertCell(0);
td.style.backgroundColor = '#000';
var insideTable = document.createElement('table');
insideTable.border = 0;
insideTable.cellSpacing = 1;
insideTable.cellPadding = 0;
insideTable.align = 'center';
var k = 0;
for (var i = 0; i < 6; i++) {
var tr2 = insideTable.insertRow(i);
for (var j = 0; j < 36; j++) {
var td2 = tr2.insertCell(j);
td2.setAttribute('bgColor', '#' + colour[k]);
td2.className = el;
td2.style.width = '9px';
td2.style.height = '9px';
td2.onclick = getColor;
k++;
}
}
td.appendChild(insideTable);
document.getElementById(el + '_wrapper').appendChild(table);
}
function getColor()
{
var color = this.bgColor;
var input = document.getElementById("id"+this.className);
input.style.backgroundColor = input.value = color.toUpperCase();
}
function doSubmit()
{
var rows = parseInt(document.getElementById("numrows").value);
if (isNaN(rows))
rows = 0;
var cols = parseInt(document.getElementById("numcols").value);
if (isNaN(cols))
cols = 0;
var border = parseInt(document.getElementById("bordersize").value);
if (isNaN(border))
border = 0;
var width = document.getElementById("width").value;
if (document.getElementById("widthtype").value == 'none')
width = null;
else {
width = isNaN(width) ? null : parseInt(width) + document.getElementById("widthtype").value;
}
var height = document.getElementById("height").value;
if (document.getElementById("heighttype").value == 'none')
height = null;
else {
height = isNaN(height) ? null : height + document.getElementById("heighttype").value;
}
var cellpd = parseInt(document.getElementById("cellpd").value);
if (isNaN(cellpd))
cellpd = 0;
var cellsp = parseInt(document.getElementById("cellsp").value);
if (isNaN(cellsp))
cellsp = 0;
var bgcolor = document.getElementById("idbgcolor").value;
bgcolor = oEditor.trimSpace(bgcolor);
if (bgcolor == '--' || bgcolor == '')
bgcolor = null;
var align = document.getElementById("talign").value;
if (align == 'none')
align = null;
var bordercolor = document.getElementById("idbordercolor").value;
bordercolor = oEditor.trimSpace(bordercolor);
if (bordercolor == '')
bordercolor = null;
if (rows < 1 || cols < 1) {
alert('테이블 행 또는 열 개수를 바르게 입력하여 주십시오.');
return;
}
if (rows > 0 && cols > 0) {
var table = document.createElement("table");
if (border) table.setAttribute("border", border);
if (width) table.setAttribute("width", width);
if (height) table.setAttribute("height", height);
if (align) table.setAttribute("align", align);
table.style.borderStyle = 'solid';
table.setAttribute("cellpadding", cellpd);
table.setAttribute("cellspacing", cellsp);
table.style.borderCollapse = "collapse";
if (bgcolor) table.setAttribute("bgcolor", bgcolor);
if (bordercolor) table.setAttribute("bordercolor", bordercolor);
//var ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
//var tdWidth = (cols > 1) ? parseInt(100 / cols) : null;
for (var i=0; i < rows; i++) {
var tr = table.insertRow(i);
for (var j=0; j < cols; j++) {
var td = tr.insertCell(j);
/*if (tdWidth)
td.setAttribute("width", tdWidth + "%");*/
td.innerHTML = '&nbsp;';
tr.appendChild(td);
}
}
oEditor.insertHtmlPopup(table.cloneNode(true));
}
popupClose();
}

View File

@ -0,0 +1,236 @@
// ================================================================
// CHEditor 5
// ----------------------------------------------------------------
// Homepage: http://www.chcode.com
// Copyright (c) 1997-2011 CHSOFT
// ================================================================
var oEditor = null;
var button = [ { alt : "", img : 'submit.gif', cmd : doSubmit },
{ alt : "", img : 'cancel.gif', cmd : popupClose } ];
var colour = ["ffffcc","ffcc66","ff9900","ffcc99","ff6633","ffcccc","cc9999","ff6699","ff99cc","ff66cc","ffccff","cc99cc","cc66ff","cc99ff","9966cc","ccccff","9999cc","3333ff","6699ff","0066ff","99ccff","66ccff","99cccc","ccffff","99ffcc","66cc99","66ff99","99ff99","ccffcc","33ff33","66ff00","ccff99","99ff00","ccff66","cccc66","ffffff",
"ffff99","ffcc00","ff9933","ff9966","cc3300","ff9999","cc6666","ff3366","ff3399","ff00cc","ff99ff","cc66cc","cc33ff","9933cc","9966ff","9999ff","6666ff","3300ff","3366ff","0066cc","3399ff","33ccff","66cccc","99ffff","66ffcc","33cc99","33ff99","66ff66","99cc99","00ff33","66ff33","99ff66","99ff33","ccff00","cccc33","cccccc",
"ffff66","ffcc33","cc9966","ff6600","ff3300","ff6666","cc3333","ff0066","ff0099","ff33cc","ff66ff","cc00cc","cc00ff","9933ff","6600cc","6633ff","6666cc","3300cc","0000ff","3366cc","0099ff","00ccff","339999","66ffff","33ffcc","00cc99","00ff99","33ff66","66cc66","00ff00","33ff00","66cc00","99cc66","ccff33","999966","999999",
"ffff33","cc9900","cc6600","cc6633","ff0000","ff3333","993333","cc3366","cc0066","cc6699","ff33ff","cc33cc","9900cc","9900ff","6633cc","6600ff","666699","3333cc","0000cc","0033ff","6699cc","3399cc","669999","33ffff","00ffcc","339966","33cc66","00ff66","669966","00cc00","33cc00","66cc33","99cc00","cccc99","999933","666666",
"ffff00","cc9933","996633","993300","cc0000","ff0033","990033","996666","993366","cc0099","ff00ff","990099","996699","660099","663399","330099","333399","000099","0033cc","003399","336699","0099cc","006666","00ffff","33cccc","009966","00cc66","339933","336633","33cc33","339900","669933","99cc33","666633","999900","333333",
"cccc00","996600","663300","660000","990000","cc0033","330000","663333","660033","990066","cc3399","993399","660066","663366","330033","330066","333366","000066","000033","003366","006699","003333","336666","00cccc","009999","006633","009933","006600","003300","00cc33","009900","336600","669900","333300","666600","000000"];
var modifyTable = null;
function init(dialog) {
oEditor = this;
oEditor.dialog = dialog;
var dlg = new Dialog(oEditor);
dlg.showButton(button);
dlg.setDialogHeight();
var rng = oEditor.range;
var selectionType = oEditor.getSelectionType(rng);
if (!oEditor.getBrowser().msie) {
var table = rng.startContainer;
if (selectionType == 3 && table.nodeName != 'TABLE' && table.nodeName != 'TD') {
isError();
return;
}
}
else {
if (rng.item) {
table = rng.item(0);
if (table.nodeName != 'TABLE') {
isError();
return;
}
}
else
table = rng.parentElement();
}
while (table && table.nodeName != 'TABLE')
table = table.parentNode;
if (table.nodeName != 'TABLE') {
isError();
return;
}
modifyTable = table;
var border = table.getAttribute('border');
if (isNaN(border)) border = 0;
document.getElementById("bordersize").value = border ? border : 0;
var el_size = table.getAttribute('width');
var fm_size = document.getElementById("width");
var el_type = 'none';
var fm_type = document.getElementById("widthtype");
if (el_size != null) {
el_type = (/\%$/.test(el_size)) ? '%' : 'px';
el_size = parseInt(el_size);
if (isNaN(el_size)) el_size = 0;
}
else {
el_size = 0;
}
fm_size.value = el_size;
fm_type.value = el_type;
el_size = table.getAttribute('height');
fm_size = document.getElementById("height");
el_type = 'none';
fm_type = document.getElementById("heighttype");
if (el_size != null) {
el_type = (/\%$/.test(el_size)) ? '%' : 'px';
el_size = parseInt(el_size);
if (isNaN(el_size)) el_size = 0;
}
else {
el_size = 0;
}
fm_size.value = el_size;
fm_type.value = el_type;
fm_type = table.getAttribute('align');
if (fm_type == null) fm_type = 'none';
document.getElementById("talign").value = fm_type;
var cellpd = table.getAttribute('cellpadding');
if (isNaN(cellpd)) cellpd = 0;
document.getElementById("cellpd").value = cellpd ? cellpd : 0;
var cellsp = table.getAttribute('cellspacing');
if (isNaN(cellsp)) cellsp = 0;
document.getElementById("cellsp").value = cellsp ? cellsp : 0;
var bgcolor = table.getAttribute('bgcolor');
var idbgcolor = document.getElementById("idbgcolor");
if (bgcolor) {
idbgcolor.value = bgcolor.toUpperCase();
idbgcolor.style.backgroundColor = idbgcolor.value;
}
else {
idbgcolor.value = '--';
}
var bordercolor = table.getAttribute('bordercolor');
var idbordercolor = document.getElementById("idbordercolor");
if (bordercolor) {
idbordercolor.value = bordercolor.toUpperCase();
idbordercolor.style.backgroundColor = idbordercolor.value;
}
else {
idbordercolor.value = '--';
}
}
function isError() {
alert('수정하실 테이블을 선택하십시오.');
popupClose();
}
function popupClose() {
oEditor.popupWinClose();
}
function drawColor(el)
{
var table = document.createElement('table');
table.cellPadding = 0;
table.cellSpacing = 0;
table.border = 0;
var tr = table.insertRow(0);
var td = tr.insertCell(0);
td.style.backgroundColor = '#000';
var insideTable = document.createElement('table');
insideTable.border = 0;
insideTable.cellSpacing = 1;
insideTable.cellPadding = 0;
insideTable.align = 'center';
var k = 0;
for (var i = 0; i < 6; i++) {
var tr2 = insideTable.insertRow(i);
for (var j = 0; j < 36; j++) {
var td2 = tr2.insertCell(j);
td2.setAttribute('bgColor', '#' + colour[k]);
td2.className = el;
td2.style.width = '9px';
td2.style.height = '9px';
td2.onclick = getColor;
k++;
}
}
td.appendChild(insideTable);
document.getElementById(el + '_wrapper').appendChild(table);
}
function getColor()
{
var color = this.bgColor;
var input = document.getElementById("id"+this.className);
input.style.backgroundColor = input.value = color.toUpperCase();
}
function doSubmit()
{
var border = parseInt(document.getElementById("bordersize").value);
if (isNaN(border)) border = 0;
modifyTable.removeAttribute('border');
if (border) modifyTable.setAttribute('border', border);
var width = document.getElementById("width").value;
if (document.getElementById("widthtype").value == 'none')
width = null;
else {
width = isNaN(width) ? null : parseInt(width) + document.getElementById("widthtype").value;
}
modifyTable.removeAttribute('width');
if (width) modifyTable.setAttribute('width', width);
var height = document.getElementById("height").value;
if (document.getElementById("heighttype").value == 'none')
height = null;
else {
height = isNaN(height) ? null : height + document.getElementById("heighttype").value;
}
modifyTable.removeAttribute('height');
if (height) modifyTable.setAttribute('height', height);
var cellpd = parseInt(document.getElementById("cellpd").value);
if (isNaN(cellpd)) cellpd = 0;
modifyTable.setAttribute('cellpadding', cellpd);
var cellsp = parseInt(document.getElementById("cellsp").value);
if (isNaN(cellsp)) cellsp = 0;
modifyTable.setAttribute('cellspacing', cellsp);
var bgcolor = document.getElementById("idbgcolor").value;
bgcolor = oEditor.trimSpace(bgcolor);
if (bgcolor == '' || bgcolor == '--') bgcolor = null;
modifyTable.removeAttribute('bgcolor');
if (bgcolor) modifyTable.setAttribute('bgcolor', bgcolor);
var align = document.getElementById("talign").value;
if (align == 'none') align = null;
modifyTable.removeAttribute('align');
if (align) modifyTable.setAttribute('align', align);
var bordercolor = document.getElementById("idbordercolor").value;
bordercolor = oEditor.trimSpace(bordercolor);
if (bordercolor == ''|| bordercolor == '--') bordercolor = null;
modifyTable.removeAttribute('bordercolor');
if (bordercolor) modifyTable.setAttribute('bordercolor', bordercolor);
popupClose();
}

71
cheditor5/popup/link.html Normal file
View File

@ -0,0 +1,71 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/link.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<form name="set" id="fm_set" action="">
<input type="hidden" value="" name="SelTxt" />
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<fieldset>
<table border="0" cellspacing="4">
<tr>
<td align="right" width="50"><span class="normal">유형:</span>
</td>
<td>
<select name="protocol" id="fm_protocol" onchange="UpdateProtocol()">
<option value="http://" selected="selected">http</option>
<option value="https://">https</option>
<option value="mailto:">mailto</option>
<option value="file://">file</option>
<option value="ftp://">ftp</option>
<option value="gopher://">gopher</option>
<option value="news:">news</option>
<option value="telnet:">telnet</option>
<option value="wias:">wias</option>
<option value="javascript:">javascript</option>
</select>
</td>
<td align="right"><span class="normal">타겟:</span>
</td>
<td>
<select name="target" id="fm_target">
<option value="">없음</option>
<option value="_self">_self</option>
<option value="_blank" selected="selected">_blank</option>
<option value="_parent">_parent</option>
<option value="_top">_top</option>
</select>
</td>
</tr>
<tr>
<td align="right"><span class="normal">URL:</span>
</td>
<td colspan="3">
<input type="text" name="link_value" id="fm_link_value" value="http://" size="40" />
</td>
</tr>
<tr>
<td align="right"><span class="normal">타이틀:</span>
</td>
<td colspan="3">
<input type="text" name="title" id="fm_title" value="" size="40" />
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</form>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/media.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<form action="" name="insertImage" style="display:inline">
<fieldset><legend><span class="font-normal">미디어 재생</span></legend>
<table border="0" cellpadding="0" cellspacing="0" width="240">
<tr>
<td align="center">
<div id="play" class="media-player-wrapper"></div>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset><legend><span class="font-normal">미디어 파일 URL</span></legend>
<table border="0" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td>
<span class="font-normal">URL 입력:</span>
</td>
</tr>
<tr>
<td>
<input type="text" name="linkurl" id="fm_linkurl" size="50" />
</td>
</tr>
</table>
</fieldset>
</form>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/symbol.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body style="line-height:100%">
<label id="s1">일반</label> <span class="font-normal">|</span>
<label id="s2">괘선</label> <span class="font-normal">|</span>
<label id="s3">숫자, 단위</label> <span class="font-normal">|</span>
<label id="s4">한글 고어</label> <span class="font-normal">|</span>
<label id="s5">원 문자</label> <span class="font-normal">|</span>
<label id="s6">일본어</label>
<div class="spacer5"></div>
<div id="output" style="visibility:hidden"></div>
<div class="spacer"></div>
<div class="font-normal" style="text-align:left">
선택한 문자: <input type="text" id="fm_input" style="border:1px #d4d4d4 solid;font-size:9pt;width:280px" readonly=true />
</div>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

116
cheditor5/popup/table.html Normal file
View File

@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/table.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<fieldset><legend style="color:#335ea8"><span class="font-normal">행/열 개수</span></legend>
<div style="margin:4px">
<table cellspacing="0" width="100%" border="0" cellpadding="2">
<tr>
<td width="20%"><span class="font-normal">열:</span>
</td>
<td width="30%"><input type="text" size="3" name="numcols" id="numcols" value="2" />
</td>
<td width="20%"><span class="font-normal">행:</span>
</td>
<td width="30%"><input type="text" size="3" name="numrows" id="numrows" value="2" />
</td>
</tr>
</table>
</div>
</fieldset>
<br />
<fieldset><legend style="color:#335ea8"><span class="font-normal">레이아웃 속성</span></legend>
<div style="margin:4px">
<table cellspacing="0" width="100%" border="0" cellpadding="2">
<tr>
<td width="20%"><span class="font-normal">가로:</span>
</td>
<td width="30%">
<input type="text" size="3" name="width" id="width" value="100" />
<select name="widthtype" id="widthtype">
<option value="none">없음</option>
<option value="%" selected="selected">%</option>
<option value="px">px</option>
</select>
</td>
<td width="20%"><span class="font-normal">높이:</span>
</td>
<td width="30%">
<input type="text" size="3" name="height" id="height" value="0" />
<select name="heighttype" id="heighttype">
<option value="none" selected="selected">없음</option>
<option value="%">%</option>
<option value="px">px</option>
</select>
</td>
</tr>
<tr>
<td><span class="font-normal">셀 패딩:</span>
</td>
<td><input type="text" size="3" name="cellpd" id="cellpd" value="3" />
</td>
<td><span class="font-normal">셀 간격:</span>
</td>
<td><input type="text" size="3" name="cellsp" id="cellsp" value="0" />
</td>
</tr>
<tr>
<td><span class="font-normal">테두리 두께:</span>
</td>
<td><input type="text" size="3" name="bordersize" id="bordersize" value="1" />
</td>
<td><span class="font-normal">정렬:</span>
</td>
<td><select id="talign" name="talign">
<option value="none" selected="selected">없음</option>
<option vlaue="left">왼쪽</option>
<option value="center">가운데</option>
<option value="right">오른쪽</option>
</select>
</td>
</tr>
</table>
</div>
</fieldset>
<br />
<fieldset><legend style="color:#335ea8"><span class="font-normal">색상</span></legend>
<div style="margin:4px">
<table cellspacing="0" width="100%" border="0" cellpadding="2">
<tr>
<td width="20%"><span class="font-normal">테두리 색상:</span>
</td>
<td width="80%">
<input type="text" size="10" name="idbordercolor" id="idbordercolor" value="#000000" style="background-color:#000;text-align:center" />
</td>
</tr>
<tr>
<td colspan="2" align="center" id="bordercolor_wrapper">
<script type="text/javascript">drawColor('bordercolor')</script>
</td>
</tr>
<tr>
<td width="20%"><span class="font-normal">바탕 색상:</span>
</td>
<td width="80%">
<input type="text" size="10" name="idbgcolor" id="idbgcolor" value="--" style="text-align:center" />
</td>
</tr>
<tr>
<td align="center" colspan="2" id="bgcolor_wrapper">
<script type="text/javascript">drawColor('bgcolor')</script>
</td>
</tr>
</table>
</div>
</fieldset>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>

View File

@ -0,0 +1,99 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/dialog.css" />
<script src="js/dialog.js" type="text/javascript"></script>
<script src="js/table_modify.js" type="text/javascript"></script>
<title>CHEditor</title>
</head>
<body>
<fieldset><legend style="color:#335ea8"><span class="font-normal">레이아웃 속성</span></legend>
<div style="margin:4px">
<table cellspacing="0" width="100%" border="0" cellpadding="2">
<tr>
<td width="20%"><span class="font-normal">가로:</span>
</td>
<td width="30%">
<input type="text" size="3" name="width" id="width" value="100" />
<select name="widthtype" id="widthtype">
<option value="none">없음</option>
<option value="%" selected="selected">%</option>
<option value="px">px</option>
</select>
</td>
<td width="20%"><span class="font-normal">높이:</span>
</td>
<td width="30%">
<input type="text" size="3" name="height" id="height" value="0" />
<select name="heighttype" id="heighttype">
<option value="none" selected="selected">없음</option>
<option value="%">%</option>
<option value="px">px</option>
</select>
</td>
</tr>
<tr>
<td><span class="font-normal">셀 패딩:</span>
</td>
<td><input type="text" size="3" name="cellpd" id="cellpd" value="3" />
</td>
<td><span class="font-normal">셀 간격:</span>
</td>
<td><input type="text" size="3" name="cellsp" id="cellsp" value="0" />
</td>
</tr>
<tr>
<td><span class="font-normal">테두리 두께:</span>
</td>
<td><input type="text" size="3" name="bordersize" id="bordersize" value="1" />
</td>
<td><span class="font-normal">정렬:</span>
</td>
<td><select id="talign" name="talign">
<option value="none" selected="selected">없음</option>
<option vlaue="left">왼쪽</option>
<option value="center">가운데</option>
<option value="right">오른쪽</option>
</select>
</td>
</tr>
</table>
</div>
</fieldset>
<br />
<fieldset><legend style="color:#335ea8"><span class="font-normal">색상</span></legend>
<div style="margin:4px">
<table cellspacing="0" width="100%" border="0" cellpadding="2">
<tr>
<td width="20%"><span class="font-normal">테두리 색상:</span>
</td>
<td width="80%">
<input type="text" size="10" name="idbordercolor" id="idbordercolor" style="text-align:center" />
</td>
</tr>
<tr>
<td colspan="2" align="center" id="bordercolor_wrapper">
<script type="text/javascript">drawColor('bordercolor')</script>
</td>
</tr>
<tr>
<td width="20%"><span class="font-normal">바탕 색상:</span>
</td>
<td width="80%">
<input type="text" size="10" name="idbgcolor" id="idbgcolor" style="text-align:center" />
</td>
</tr>
<tr>
<td align="center" colspan="2" id="bgcolor_wrapper">
<script type="text/javascript">drawColor('bgcolor')</script>
</td>
</tr>
</table>
</div>
</fieldset>
<div class="spacer"></div>
<div style="text-align:center" id="buttonWrapper"></div>
</body>
</html>