1function show_comment_list(type,widget_id,rno){ 2 $.ajax({ 3 type:'POST', 4 data:{'type':type,'widget_id':widget_id,'rno':rno}, 5 url:('/pc/backpg/comment_list.cm'), 6 dataType:'json', 7 async:false, 8 cache:false, 9 success:function(result){ 10 if(result.msg=='SUCCESS'){ 11 $('#comment_list_'+widget_id).parent().show(); 12 $('#comment_list_'+widget_id).html(result.html); 13 $('#comment_cnt_'+widget_id).html(result.comment_cnt); 14 if(result.can_comment_result=='NO_ADMIN'){ //ê´ë¦¬ìë§ ëê¸ ì°ê¸°ì¸ ê²½ì° 15 }else{ 16 show_comment_write(type,widget_id,rno,0, result.can_comment, result.can_comment_result, result.use_secret); 17 } 18 }else{ 19 if(result.msg!="NO_COMMENT") alert(result.msg); 20 } 21 } 22 }); 23} 24 25var comment_write_progress=false; 26function comment_write(type,widget_id,rno,comment_idx){ 27 if(comment_write_progress) return false; 28 var comment_body = $('#comment_write_' + widget_id + '_' + comment_idx); 29 if(comment_body.find('textarea').val()=='') { alert(GetLangMsg('SITE_BOARD49')); comment_body.find('textarea').focus(); return false; } //ëê¸ì ì ë ¥í´ì£¼ì¸ì 30 comment_write_progress=true; 31 32 var nick = ''; 33 if(comment_body.find('input._nick').length>0) nick = comment_body.find('input._nick').val(); 34 var password = ''; 35 if(comment_body.find('input._password').length>0) password = comment_body.find('input._password').val(); 36 37 var is_secret='N'; 38 if(comment_body.find('input._is_secret').length>0) is_secret = comment_body.find('input._is_secret').prop('checked')?'Y':'N'; 39 40 $.ajax({ 41 type:'POST', 42 data:{'article_idx':rno,'widget_id':widget_id,'is_secret':is_secret,'comment_idx':comment_idx,'body':comment_body.find('textarea').val(),'type':type, 'wnick':nick, 'password':password}, 43 url:('/pc/backpg/comment_write.cm'), 44 dataType:'json', 45 async:true, 46 cache:false, 47 success:function(result){ 48 comment_write_progress=false; 49 if(result.msg=='SUCCESS'){ 50 show_comment_list(type,widget_id,rno); 51 }else 52 alert(result.msg); 53 } 54 }); 55} 56 57var comment_delete_progress=false; 58function comment_delete(type,widget_id,rno,comment_idx){ 59 if(comment_delete_progress) return false; 60 if(!confirm(GetLangMsg('SITE_BOARD_ERR14'))) return false; 61 comment_delete_progress=true; 62 $.ajax({ 63 type:'POST', 64 data:{'article_idx':rno,'widget_id':widget_id,'comment_idx':comment_idx,'type':type}, 65 url:('/pc/backpg/comment_delete.cm'), 66 dataType:'json', 67 async:true, 68 cache:false, 69 success:function(result){ 70 comment_delete_progress=false; 71 if(result.msg=='SUCCESS'){ 72 if(type=='guestbook') 73 window.location.reload(); 74 else 75 show_comment_list(type,widget_id,rno); 76 }else 77 alert(result.msg); 78 } 79 }); 80} 81 82var current_comment_write=0; 83function show_comment_write(type,widget_id,rno,comment_idx,can_comment,can_comment_result,use_secret){ 84 if(current_comment_write>0) $('#comment_write_' + widget_id + '_' + current_comment_write).hide(); 85 current_comment_write = comment_idx; 86 var html = ''; 87 88 if(can_comment_result=='GUEST'){ 89 90 html += "<div class='comment_write' style='overflow:hidden;zoom:1;' id='comment_write_" + widget_id + '_' + comment_idx + "'>"; 91 if(use_secret=='Y') html += "<div style='padding-bottom: 8px'>"+GetLangMsg("ADMIN_RIGHT_BOARD21")+" <input type='checkbox' class='_is_secret'/></div> ";//ë¹ë°ëê¸ 92 if(comment_idx>0) html += '<div class="depth"><span class="cocoaicon brand_color">!</span></div>'; 93 html += "<div class='fleft mr7'><input type='text' class='_nick placeholder wid200' value='' maxlength='50' title='"+GetLangMsg("SITE_JOIN_FIELD_NICK")+"' placeholder="+GetLangMsg("SITE_JOIN_FIELD_NICK")+" /></div>";//ëë¤ì 94 html += '<div class="fleft"><input type="password" class="_password placeholder wid200" maxlength="20" value="" title="'+GetLangMsg("SITE_BOARD35")+'" placeholder="'+GetLangMsg("SITE_BOARD35")+'"/></div>'; //ë¹ë°ë²í¸ 95 html += "<div class='comment_btn'><a href='javascript:;' onclick=\"comment_write('" + type + "','" + widget_id + "'," + rno + "," + comment_idx + ")\">"+GetLangMsg("REGISTER")+"</a></div>"; //ë±ë¡ 96 html += "<div class='textwrap'>
96<textarea class='placeholder' title='"+GetLangMsg("BOARD_ERR1")+"' placeholder='"+GetLangMsg("BOARD_ERR1")+"'></textarea></div>"; //ëê¸ ë´ì©ì ì ë ¥í´ì£¼ì¸ì. 97 html += '</div>'; 98 }else if(can_comment=='Y'){ 99 html += "<div class='comment_write' id='comment_write_" + widget_id + '_' + comment_idx + "'>"; 100 if(comment_idx>0) html += '<div class="depth"><span class="cocoaicon brand_color">!</span></div>'; 101 html += "<div class='comment_btn'><a href='javascript:;' onclick=\"comment_write('" + type + "','" + widget_id + "'," + rno + "," + comment_idx + ")\">"+GetLangMsg("REGISTER")+"</a></div>"; //ë±ë¡ 102 if(use_secret=='Y') 103 html += "<div>"+GetLangMsg("ADMIN_RIGHT_BOARD21")+" <input type='checkbox' class='_is_secret' /></div> "; //ë¹ë°ëê¸ 104 html += "<div class='mt5'><textarea class='placeholder' title='"+GetLangMsg("BOARD_ERR1")+"' placeholder='"+GetLangMsg("BOARD_ERR1")+"'></textarea></div>"; 105 html += '</div>'; 106 } 107 108 109 if(comment_idx>0){ 110 $("#comment_list_"+widget_id+" div[id^='comment_write_']").remove(); 111 $('#comment_'+widget_id+'_'+comment_idx).parent().append(html).find('textarea').focus(); 112 }else{ 113 $('#comment_list_'+widget_id).append(html); 114 } 115 116 117 cocoa_placeholder(); //IE8ì´íë²ì PlaceHolder ì ì© 118 119} 120 121function comment_no_login(return_url){ 122 alert('ë§ê¸ì ìì±íë ¤ë©´ ë¡ê·¸ì¸ì í´ì£¼ì¸ì'); 123 pop_login(return_url); 124} 125 126/* 127 * ë¹íì ëê¸ ìì ì ì²´í¬ 128 */ 129var comment_delete_progress=false; 130 131var last_select_comment_idx = 0; 132function comment_delete_passwod_check(type, widget_id, rno, comment_idx){ 133 var $ohtmlEditform = $("<div id='comment_delete_password' class='password_box delete'><p class='txt'>ê²ì물 ìì±ì ë±ë¡íì ë¹ë°ë²í¸ë¥¼ ì ë ¥í´ì£¼ì¸ì.</p><p><input type='password' name='secret_pass' value='' placeholder='ë¹ë°ë²í¸'><a class='pc_btn ml10' href='javascript:;'>íì¸</a></p><span class='tail'></span></div>"); 134 var is_pwdbox = ($(".password_box.delete").length > 0); 135 136 $(".password_box.delete").remove(); 137 138 if(last_select_comment_idx == comment_idx && is_pwdbox){ 139 comment_idx = 0; 140 } else { 141 var $comment_wrap = $('#comment_li_' + comment_idx); 142 var $btn_del = $comment_wrap.find('.btn_del'); 143 // tail : 12, c_memo_btn divì topê° + ìì ë²í¼ì ëì´ 144 var pwd_form_top = 12 + $comment_wrap.find('.c_memo_btn').position().top + $btn_del.innerHeight(); 145 146 $ohtmlEditform.css('top', pwd_form_top); 147 148 // íì¸ ë²í¼ì ì´ë²¤í¸ ë¶ì¬ 149 $ohtmlEditform.find('.pc_btn').bind('click', function(){ 150 if(comment_delete_progress) return false; 151 comment_delete_progress=true; 152 $.ajax({ 153 type:'POST', 154 data:{'article_idx':rno,'widget_id':widget_id,'comment_idx':comment_idx,'type':type,'secret_pass':$ohtmlEditform.find("input[type='password']").val()}, 155 url:('/pc/backpg/comment_delete.cm'), 156 dataType:'json', 157 async:true, 158 cache:false, 159 success:function(result){ 160 // í¼ì ì¨ê¸°ê³ ë¹ë°ë²í¸ë¥¼ 공백ì¼ë¡ ì´ê¸°í 161 $(".password_box.delete").remove(); 162 comment_delete_progress=false; 163 if(result.msg=='SUCCESS'){ 164 if(type=='guestbook') 165 window.location.reload(); 166 else 167 show_comment_list(type,widget_id,rno); 168 }else{ 169 var msg = result.msg; 170 171 if(msg == 'no permission') 172 msg = 'ê¶íì´ ììµëë¤.'; 173 174 alert(msg); 175 } 176 } 177 }); 178 }); 179 180 $comment_wrap.find(".comment_item").append($ohtmlEditform); 181 } 182 183 last_select_comment_idx = comment_idx; 184} 185 186function comment_delete_passwod_check2(type,widget_id,rno,comment_idx){ 187 var edit_width = 300; 188 var ohtmlEditForm = $("<div title='ëê¸ ìì í기' id='comment_dial_box'><input type='password' name='secret_pass' id='secret_pass' placeholder='ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì' style='width:250px'/><div id='no_modify_password' style='display:none;'>ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì</div><div/>"); 189 if(!($("#comment_dial_box").length>0)){ 190 $('body').append(ohtmlEditForm); 191 ohtmlEditForm.dialog({ 192 height:180, 193 width:edit_width, 194 modal: true, 195 open: function( event, ui ) {}, 196 buttons: { 197 "ìì í기": function() { 198 if($("#secret_pass").val()!=""){ 199 if(comment_delete_progress) return false;
200 comment_delete_progress=true; 201 $.ajax({ 202 type:'POST', 203 data:{'article_idx':rno,'widget_id':widget_id,'comment_idx':comment_idx,'type':type,'secret_pass':$("#secret_pass").val()}, 204 url:('/pc/backpg/comment_delete.cm'), 205 dataType:'json', 206 async:true, 207 cache:false, 208 success:function(result){ 209 $("#secret_pass").val(""); 210 comment_delete_progress=false; 211 if(result.msg=='SUCCESS'){ 212 if(type=='guestbook') 213 window.location.reload(); 214 else 215 show_comment_list(type,widget_id,rno); 216 }else 217 alert(result.msg); 218 } 219 }); 220 $( this ).dialog( "close" ); 221 }else{ 222 223 } 224 }, 225 'ì·¨ìí기': function(){ 226 $( this ).dialog( "close" ); 227 } 228 } 229 }); 230 }else{ 231 $("#comment_dial_box").dialog("open"); 232 } 233} 234 235/* 236 * ë¹ë°ê¸ 보기 ë²í¼ í´ë¦ ì ì²ë¦¬ 237 */ 238var last_click_btn = ''; 239function comment_show_secret_passwod_check(idx){ 240 if(last_click_btn == idx){ 241 $("#secret_comment_password").hide(); 242 last_click_btn = ''; 243 } else { 244 last_click_btn = idx; 245 246 var $secret_password_wrap = $('#comment_li_' + idx); 247 var $secret_password_btn = $secret_password_wrap.find('.secret_pwd_btn'); 248 var $secret_comment_password = $('#secret_comment_password'); 249 250 // left ìì¹ë ë¹ë°ê¸ 보기 ë²í¼ì ë§ì¶°ì¼ íë¤. 251 var btn_left = $secret_password_btn.position().left + ($secret_password_btn.width()/2) + 85; 252 $("#secret_comment_password").css('left', btn_left - ($secret_comment_password.innerWidth() /2)); 253 254 // top ìì¹ë ë¹ë°ê¸ 보기 ë²í¼ì ë§ì¶°ì¼ íë¤. 255 var btn_top = $secret_password_btn.position().top + $secret_password_btn.height() + 35 + 5; 256 $("#secret_comment_password").css('top', $secret_password_wrap.position().top + btn_top); 257 258 $("#secret_comment_password").show(); 259 } 260}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.