var CPostDetail = Class.create(); CPostDetail.prototype = { initialize: function(post_uid,now_tab) { this.post_uid = post_uid; this.now_tab = now_tab; }, reloadMixupList: function() { param ='post_uid='+this.post_uid+'&type='+this.now_tab; this.xmlRequest = new Ajax.Request( '/inc/ajax/postdetail/get_mixup_id_list.html', { method: 'get', parameters: param, onComplete: (function() { if(this.xmlRequest.transport.responseText) { if(this.xmlRequest.transport.responseText=="0") { alert('데이터 전송에 문제가 있었습니다'); } else { $('mixup_id_list').update(this.xmlRequest.transport.responseText); //new Effect.Highlight($('mixup_id_list').getElementsByClassName('list_table')[0],{duration:1}); new Effect.Highlight($('mixup_id_list_inner'),{duration:1}); } } }).bind(this) }); }, chkCommentForm: function(t) { if(t.comment_ta.value.length<10) { alert('10자이상 입력하셔야 합니다'); return false; } param ='type=post_detail&contents='+encodeURIComponent(t.comment_ta.value)+'&post_uid='+t.post_uid.value+'&par_uid='+t.par_uid.value; this.xmlRequest = new Ajax.Request( '/inc/ajax/postlist/proc_add_post_comment.html', { method: 'post', parameters: param, onComplete: (function() { if(!this.xmlRequest.transport.responseText) { alert('리플저장에 문제가 있었습니다.\n다시 시도해 주세요.'); } else { //스티링을 추가할 element 지정 if(parseInt(t.par_uid.value)) { var tarel = $('comment_sub'+t.par_uid.value); $('reply_submit_sub'+t.par_uid.value).remove(); } else { var tarel = $('reply_list'); $('comment_ta').value = ''; } tarel.insert(this.xmlRequest.transport.responseText); } }).bind(this) }); return false; }, delComment: function(comment_uid, post_uid, list_uid) { if(!confirm('정말 삭제 하시겠습니까?')) return; param ='comment_uid='+comment_uid; this.xmlRequest = new Ajax.Request( '/inc/ajax/postlist/proc_del_post_comment.html', { method: 'post', parameters: param, onComplete: (function() { if(this.xmlRequest.transport.responseText=="1") { var tar_el = $('comment_body'+comment_uid); tar_el.update('리플이 삭제되었습니다.'); new Effect.Highlight(tar_el); } else { alert('리플삭제에 문제가 있었습니다.\n다시 시도해 주세요.'); } }).bind(this) }); }, addCommentForm: function(comment_uid, post_uid, member_uid) { if($('reply_submit_sub'+comment_uid)) return; var form_str = ""; form_str += "