You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
5.2 KiB
HTML

<!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 http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>Debug</title>
<style type="text/css">
body { background-color:#F6F4F1; margin-top:0pt; margin-left:5pt; margin-right:0pt:100%;overflow:hidden; }
#title1 { margin-left:5pt; padding-top:5pt; height:22pt; color:#B3550A; font-size:9pt; font-family:; line-height:14pt; visibility:visible }
#main { text-align:center; visibility:visible; overflow-x:hidden; overflow-y:auto}
#sub { margin-top:5px; text-align:center; visibility:visible }
</style>
<script type="text/javascript" src="htmlCommon.js"></script>
<script>
try {
var domain = getParameter("domain");
if(domain) {
document.domain = domain;
}
} catch (e) {
//$l("exception:" + e.message);
}
window.onload = function () {
setTimeout(init,300);
};
window.document.onclick=flagCheck;
window.onblur=flagCount;
var flag = 0;
function flagCount() {
flag += 2;
}
function flagCheck() {
flag = 10;
}
function callFocus() {
if( flag++ < 6 ) {
focus();
window.setTimeout("callFocus();", 1);
}
}
function init() {
var obj = getPopupParam();
var str = "";
var cnt = 0;
var isHTML = false;
var isXML = false;
for ( var idx in obj ) {
if ( idx != "_config" && idx != "title" ) {
cnt ++;
}
}
// var layerY = (document.documentElement.clientHeight - 97)/parseInt(cnt,10);
var layerY = (700 - 97)/parseInt(cnt,10);
layerY = layerY + "px";
if ( obj["_config"] == "html" ) {
isHTML = true;
} else if ( obj["_config"] == "xml" ) {
isXML = true;
}
if ( typeof obj["title"] != "undefined" ) {
document.getElementById("title1").innerHTML = "<img src='images/bullet_info.gif' style='vertical-align:middle; margin-right:5px' /><b>" + obj["title"] + "</b>";
document.title = obj["title"];
}
var txtIdx = 0;
var txtArray = new Array();
for ( var idx in obj ) {
if ( idx != "_config" && idx != "title" ) {
if ( idx == "arguments" ) {
str = str + "<div style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; text-align:left; font-size:9pt; overflow: scroll; overflow-x: auto;'><b>" + idx + "</b><br /><br /><table style='width:100%'>"
for ( var i = 2 ; i < obj[idx].length ; i++ ) {
str = str + "<tr><td>" + obj[idx][i] + "</td></tr>"
}
str = str + "</table></div>"
} else {
if( isXML ) {
if( idx == 'html' ) {
str = str + "<textArea id='txt_" + txtIdx + "' style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; font-size:9pt; text-align:left;' readOnly='true'></textArea>"
txtArray[txtIdx] = idx + "\n\n" + obj[idx];
txtIdx++;
} else if( idx == 'information' ) {
str = str + "<textArea id='txt_" + txtIdx + "' style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; font-size:9pt; text-align:left;' readOnly='true'></textArea>"
txtArray[txtIdx] = obj[idx];
txtIdx++;
} else {
var detail, doc;
if( obj[idx].length > 0 && obj[idx].charAt(0) == "<" ) {
doc = opener.WebSquare.xml.parse(obj[idx]);
}
if(doc) {
detail = opener.WebSquare.xml.indent(doc, "html");
} else {
detail = obj[idx];
}
str = str + "<div contentEditable='true' style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; text-align:left; font-size:9pt; overflow: scroll; overflow-x: auto;'><b>" + idx + "</b><br />" + detail + "</div>"
}
} else if( isHTML ) {
str = str + "<div contentEditable='true' style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; font-size:9pt; text-align:left; overflow: scroll; overflow-x: auto;'><b>" + idx + "</b><br /><br />" + obj[idx] + "</div>"
} else {
str = str + "<textArea id='txt_" + txtIdx + "' style='height:" + layerY + "; width:98%; border:4px #d7d7d7; border-style:solid; font-size:9pt; text-align:left;' readOnly='true'></textArea>"
txtArray[txtIdx] = idx + "\n" + obj[idx];
txtIdx++;
}
}
}
}
document.getElementById("main").innerHTML = str;
for( var i = 0 ; i < txtIdx ; i++ ) {
document.getElementById("txt_" + i ).value = txtArray[i];
}
strTitle = "<img src='images/bullet_info.gif' style='vertical-align:middle; margin-right:5px' /><b>" + opener.WebSquare.language.getMessage( "E_debugMsg_DebugInfo" );
document.getElementById("title1").innerHTML = strTitle;
window.setTimeout("callFocus();", 1);
}
</script>
</head>
<body ondblclick="self.close()">
<div id="title1"><img src='images/bullet_info.gif' style='vertical-align:middle; margin-right:5px' /><b>Debug 정보입니다.</b></div>
<div id="main"></div>
<div id="sub">
<input type="button" class="Button1" value=" OK " onClick="self.close()" />
</div>
</body>
</html>