if (typeof(SIDEVIEW_JS) == 'undefined') // Çѹø¸¸ ½ÇÇà
{
if (typeof g4_is_member == 'undefined')
alert('g4_is_member º¯¼ö°¡ ¼±¾ðµÇÁö ¾Ê¾Ò½À´Ï´Ù. js/sideview.js');
if (typeof g4_path == 'undefined')
alert('g4_path º¯¼ö°¡ ¼±¾ðµÇÁö ¾Ê¾Ò½À´Ï´Ù. js/sideview.js');
var SIDEVIEW_JS = true;
// ¾Æ·¡ÀÇ ¼Ò½ºÄÚµå´Â daum.net Ä«ÆäÀÇ ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ Âü°íÇÏ¿´½À´Ï´Ù.
// ȸ¿øÀ̸§ Ŭ¸¯½Ã ȸ¿øÁ¤º¸µîÀ» º¸¿©ÁÖ´Â ·¹À̾î
function insertHead(name, text, evt)
{
var idx = this.heads.length;
var row = new SideViewRow(-idx, name, text, evt);
this.heads[idx] = row;
return row;
}
function insertTail(name, evt)
{
var idx = this.tails.length;
var row = new SideViewRow(idx, name, evt);
this.tails[idx] = row;
return row;
}
function SideViewRow(idx, name, onclickEvent)
{
this.idx = idx;
this.name = name;
this.onclickEvent = onclickEvent;
this.renderRow = renderRow;
this.isVisible = true;
this.isDim = false;
}
function renderRow()
{
if (!this.isVisible)
return "";
var str = "
"+this.onclickEvent+" |
";
return str;
}
function showSideView(curObj, mb_id, name, email, homepage)
{
var sideView = new SideView('nameContextMenu', curObj, mb_id, name, email, homepage);
sideView.showLayer();
}
function SideView(targetObj, curObj, mb_id, name, email, homepage)
{
this.targetObj = targetObj;
this.curObj = curObj;
this.mb_id = mb_id;
name = name.replace(/¡¦/g,"");
this.name = name;
this.email = email;
this.homepage = homepage;
this.showLayer = showLayer;
this.makeNameContextMenus = makeNameContextMenus;
this.heads = new Array();
this.insertHead = insertHead;
this.tails = new Array();
this.insertTail = insertTail;
this.getRow = getRow;
this.hideRow = hideRow;
this.dimRow = dimRow;
// ȸ¿øÀ̶ó¸é // (ºñȸ¿øÀÇ °æ¿ì °Ë»ö ¾øÀ½)
if (g4_is_member) {
// ÂÊÁöº¸³»±â
if (mb_id)
// ºÒ¿©¿ì ÀÚ¹Ù½ºÅ©¸³Æ®Ã¢ÀÌ ¶ß´Â ¿À·ù¸¦ ¼öÁ¤
this.insertTail("memo", "ÂÊÁöº¸³»±â");
// ¸ÞÀϺ¸³»±â »èÁ¦
// if (email)
// this.insertTail("mail", "¸ÞÀϺ¸³»±â");
// ȨÆäÀÌÁö
// if (homepage)
// this.insertTail("homepage", "ȨÆäÀÌÁö");
// ÀÚ±â¼Ò°³
// if (mb_id)
// this.insertTail("info", "ÀÚ±â¼Ò°³");
// ¹Ì´Ï°ø°£
if (mb_id)
this.insertTail("mb_id", "¹Ì´Ï°ø°£ ¹æ¹®");
}
// °Ô½ÃÆÇÅ×ÀÌºí ¾ÆÀ̵𰡠³Ñ¾î¿ÔÀ» °æ¿ì
if (g4_bo_table) {
if (mb_id) // ȸ¿øÀÏ °æ¿ì ¾ÆÀ̵ð·Î °Ë»ö
this.insertTail("mb_id", "¾ÆÀ̵ð·Î °Ë»ö");
else // ºñȸ¿øÀÏ °æ¿ì À̸§À¸·Î °Ë»ö
this.insertTail("name", "À̸§À¸·Î °Ë»ö");
}
if (g4_is_admin == "super") {
if (mb_id)
this.insertTail("new", "Àüü°Ô½Ã¹°");
}
// ÃÖ°í°ü¸®ÀÚÀÏ °æ¿ì
if (g4_is_admin == "super") {
// ȸ¿øÁ¤º¸º¯°æ
if (mb_id)
this.insertTail("modify", "ȸ¿øÁ¤º¸º¯°æ");
// Æ÷ÀÎÆ®³»¿ª
if (mb_id)
this.insertTail("point", "Æ÷ÀÎÆ® ³»¿ª");
// º°Æ÷ÀÎÆ® ³»¿ª
if (mb_id)
this.insertTail("point", "º°Æ÷ÀÎÆ® ³»¿ª");
}
}
function showLayer()
{
clickAreaCheck = true;
var oSideViewLayer = document.getElementById(this.targetObj);
var oBody = document.body;
if (oSideViewLayer == null) {
oSideViewLayer = document.createElement("DIV");
oSideViewLayer.id = this.targetObj;
oSideViewLayer.style.position = 'absolute';
oBody.appendChild(oSideViewLayer);
}
oSideViewLayer.innerHTML = this.makeNameContextMenus();
if (getAbsoluteTop(this.curObj) + this.curObj.offsetHeight + oSideViewLayer.scrollHeight + 5 > oBody.scrollHeight)
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) - oSideViewLayer.scrollHeight;
else
oSideViewLayer.style.top = getAbsoluteTop(this.curObj) + this.curObj.offsetHeight;
oSideViewLayer.style.left = getAbsoluteLeft(this.curObj) - this.curObj.offsetWidth + 14;
divDisplay(this.targetObj, 'block');
selectBoxHidden(this.targetObj);
}
function getAbsoluteTop(oNode)
{
var oCurrentNode=oNode;
var iTop=0;
while(oCurrentNode.tagName!="BODY") {
iTop+=oCurrentNode.offsetTop - oCurrentNode.scrollTop;
oCurrentNode=oCurrentNode.offsetParent;
}
return iTop;
}
function getAbsoluteLeft(oNode)
{
var oCurrentNode=oNode;
var iLeft=0;
iLeft+=oCurrentNode.offsetWidth;
while(oCurrentNode.tagName!="BODY") {
iLeft+=oCurrentNode.offsetLeft;
oCurrentNode=oCurrentNode.offsetParent;
}
return iLeft;
}
function makeNameContextMenus()
{
var str = "";
var i=0;
for (i=this.heads.length - 1; i >= 0; i--)
str += this.heads[i].renderRow();
var j=0;
for (j=0; j < this.tails.length; j++)
str += this.tails[j].renderRow();
str += "
";
return str;
}
function getRow(name)
{
var i = 0;
var row = null;
for (i=0; i
function selectBoxHidden(layer_id)
{
//var ly = eval(layer_id);
var ly = document.getElementById(layer_id);
// ·¹À̾î ÁÂÇ¥
var ly_left = ly.offsetLeft;
var ly_top = ly.offsetTop;
var ly_right = ly.offsetLeft + ly.offsetWidth;
var ly_bottom = ly.offsetTop + ly.offsetHeight;
// ¼¿·ºÆ®¹Ú½ºÀÇ ÁÂÇ¥
var el;
for (i=0; i= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) ||
(el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
(el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
(el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) ||
(el_top <= ly_bottom && el_left <= ly_left && el_right >= ly_right)
)
el.style.visibility = 'hidden';
}
}
}
}
// °¨Ãß¾îÁø ¼¿·ºÆ® ¹Ú½º¸¦ ¸ðµÎ º¸ÀÌ°Ô ÇÔ
function selectBoxVisible()
{
for (i=0; i