' + this.comment + ' ';
if (this.isnew) {
html += ' ';
}
if (modperm) {
html += ' ';
html += '';
}
if (delperm) {
html += ' ';
}
html += '';
html += '
';
html += '
' + this.dateStr + '
';
html += '
';
html += '
';
// 꼬리말 꼬리말 레이어
html += '
';
html += '
';
html += '
';
html += '
';
html += '꼬리말에 코멘트 쓰기';
html += '
';
html += '
꼬리말에 코멘트란? 꼬리말에 대한 답변입니다.
';
html += ' ';
html += '현재 0/최대 300byte (한글 150자, 영문 300자) ';
html += '
';
html += '';
html += '';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
html += '
';
return html;
};
this.renderRowCommentComment = function() {
var html = '';
var mine = 'XG7r8V9Ogzs0' == this.e_userid;
var modperm = mine;
var delperm = mine;
html += '
';
html += '' + this.comment + ' ';
if (this.isnew) {
html += ' ';
}
if (modperm) {
html += ' ';
html += '';
}
if (delperm) {
html += '';
}
html += '
';
html += '
' + this.dateStr + '
';
html += '
';
html += '
';
html += '
';
html += '
';
return html;
};
this.renderRowCommentDelete = function() {
var html = '';
html += '
꼬리말이 삭제되었습니다.
';
return html;
}
this.viewMember = function (obj) {
showSideView(obj, this.e_userid, this.profile_userid, this.nickName);
};
this.viewModify = function () {
/* var emo = '';
modifySeqEmo = this.seq;
if (this.parseq == 0) {
document.getElementById("_emo" + this.seq).innerHTML = emo;
}
*/ var cmt = '
';
cmt += '
';
document.getElementById("_cmt" + this.seq).innerHTML = cmt;
};
}
var comments = new Array();
var idx = 0;
comments[idx] = new ShortComment(idx, 1, 0, '01', false, '세무직수험생', '', '-V.8NK_Cn7g0', '신림동에 7만원짜리 독서실이면 거의 무너져가는 곳이거나 산꼭대기근처인데...', '2006/02/24');
idx++;
comments[idx] = new ShortComment(idx, 2, 0, '01', false, '한국코끼리', '', 'XG7r8V9Ogzs0', '아님니다. 탑스터디라고 있는데 싼 가격때문에 많이들 이용함니다. 스터디형 책상이구요 주인아저씨가 엄청 친절해요~ 가 보시면 좋을텐데...) ^*^&', '2006/02/24');
idx++;
comments[idx] = new ShortComment(idx, 3, 0, '01', false, '몽그림', '', 'p_ABDvBChKQ0', '음 광고가 아직도 살아있네 - -^', '2006/02/24');
idx++;
comments[idx] = new ShortComment(idx, 4, 0, '01', false, '수석합격은내꺼', '', 'jGJRW-Ghq9Q0', '23만원 짜리 방은 화장실 따린 원룸인가요? 원룸은 얼마인가요?', '2006/02/24');
idx++;
comments[idx] = new ShortComment(idx, 5, 0, '01', false, '영혼', '', 'q2Xmo6xeP8E0', 'ㅋㅋ무너지는 정도는 아니구요~~모 좀 높은 곳에 위치해 있다는 요정도로 해두죠~하지만..사람들 무지 많답니다. 근데..탑스터디는 어디있나요? 얼만데요? 제가 공부하는곳이 스터디형인데. 10마넌이거든요 ㅠㅠ', '2006/02/24');
idx++;
comments[idx] = new ShortComment(idx, 6, 0, '01', true, '한국코끼리', '', 'XG7r8V9Ogzs0', '탑스터디는 넥서스 법학원근처에요 명륜당독서실인근 7만원인데.....스터디형 책상이구 모 싼맛에 가서 공부하는거죠 시험 앞두고는 좀 비사더라도 좋은데 가서 공부하고....', '2006/02/25');
idx++;
comments[idx] = new ShortComment(idx, 7, 0, '01', true, '한국코끼리', '', 'XG7r8V9Ogzs0', '23만원짜리 방은 화장실은 공용이에요 30만원이하 짜리 방이면 아마 화장실 별도 없을거에요 참고하시구 한번 구경 오세요 ^*^& 아!! 23만원짜리 방은 방화문이에요~! 나무문 보다는 조금더 조용하지요~', '2006/02/25');
idx++;
comments[idx] = new ShortComment(idx, 8, 3, '01', true, '한국코끼리', '', 'XG7r8V9Ogzs0', '싸고 깨끗한 방을 찾는게 수험생들에게 가장 필요로 하기때문에 광고이지만 너그러이 봐주세요,,,,', '2006/02/25');
idx++;
function showShortComment() {
var html = '
';
var prevSeq = 0;
var idx = 0;
for (var i = 0; i < comments.length; i++) {
if (comments[i].parseq == 0) {
// 부모 꼬리말이 삭제된 꼬리말 댓글
html += showShortCommentComment(prevSeq, comments[i].seq);
}
if (comments[i].parseq == 0) {
prevSeq = comments[i].seq;
var rank = '';
// 부모 꼬리말
html += comments[i].renderRow(rank);
// 부모 꼬리말이 삭제되지 않은 꼬리말 댓글
for (var j = i + 1; j < comments.length; j++) {
if (comments[j].parseq != 0 && comments[j].parseq == comments[i].seq) {
html += comments[j].renderRowCommentComment();
}
}
}
}
// 부모 꼬리말 모두 삭제된 경우, 자식 꼬리말 뿌려주기
if (comments.length > 0) {
html += showShortCommentComment(prevSeq, comments[comments.length - 1].seq + 1);
}
html += '
';
document.getElementById("shortCommentPlaceHolder").innerHTML = html;
}
function showShortCommentComment(beginSeq, endSeq) {
// 부모 꼬리말이 삭제된 꼬리말 댓글
var html = '';
for (var l = beginSeq + 1; l < endSeq; l++) {
var isNoteDelete = 0;
for (var k = 0; k < comments.length; k++) {
if (comments[k].parseq != 0 && comments[k].parseq == l) {
if (isNoteDelete == 0) {
html += comments[k].renderRowCommentDelete();
isNoteDelete = 1;
}
html += comments[k].renderRowCommentComment();
}
}
}
return html;
}
showShortComment();