1/** 2 * ê²ìí ê³µíµì¼ë¡ ì¬ì©ëë í¨ì. (ê²ìíìì ¯, ì§ëìì ¯, ìºë¦°ëìì ¯) 3 * 4 */ 5var BOARD_COMMON = function(){ 6 7 // site ìì ì¬ì©ë¨. 8 var _openReportModal = function() { 9 var board_code = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0]; 10 var post_code = arguments.length <= 1 || arguments[1] === undefined ? "" : arguments[1]; 11 var comment_code = arguments[2]; 12 var type = arguments[3]; 13 14 $.ajax({ 15 type : 'post', 16 data : {'board_code':board_code, 'post_code':post_code, 'comment_code':comment_code, 'type':type}, 17 url : '/dialog/open_report_modal.cm', 18 dataType : 'json', 19 success : function(res){ 20 if(res.msg === 'SUCCESS'){ 21 $.cocoaDialog.open({type : 'admin', custom_popup : res.html}); 22 23 //cocoaDialog 24 $('#cocoaSubModal').css('z-index',$('#cocoaModal').css('z-index') + 1); 25 26 }else{ 27 alert(res.msg) 28 } 29 } 30 }); 31 }; 32 33 var addReport = function(){ 34 var data = $('#report_form').serializeObject(); 35 $.ajax({ 36 type : 'post', 37 data : {'data':data}, 38 url : '/ajax/add_report.cm', 39 dataType : 'json', 40 success : function(res){ 41 if(res.msg === 'SUCCESS'){ 42 alert(LOCALIZE.ì¤ëª _ì ê³ ê°ì±ê³µì ì¼ë¡ì ìëììµëë¤()); 43 $.cocoaDialog.close(); 44 $('#doz_body').css('overflow-y','scroll'); 45 46 location.reload(); 47 }else{ 48 alert(res.msg); 49 } 50 } 51 }); 52 }; 53 var getOnlyPhotoReview = function(a,l){ 54 window.location.href = l + "&only_photo=" + a; 55 }; 56 57 var _addBlock = function (code, writer, type, bord_code) { 58 var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4]; 59 60 var alert_block_text = ''; 61 var alert_block = ''; 62 switch(type){ 63 case 'post': 64 alert_block_text = 'ê²ìê¸ì ì°¨ë¨íìê² ìµëê¹? ìì±ìì ë¤ë¥¸ ê¸ê³¼ ëê¸ë íì¸í ì ììµëë¤.'; 65 alert_block = 'ì¤ëª _ê²ìê¸ì°¨ë¨ìë´'; 66 break; 67 case 'comment': 68 alert_block_text = 'ëê¸ì ì°¨ë¨íìê² ìµëê¹? ìì±ìì ë¤ë¥¸ ëê¸ë íì¸í ì ììµëë¤.'; 69 alert_block = 'ì¤ëª _ëìì°¨ë¨ìë´'; 70 break; 71 } 72 if (confirm(getLocalizeString(alert_block, '', alert_block_text))){ 73 $.ajax({ 74 type : 'post', 75 data : { 76 'code' : code, 77 'writer' : writer, 78 'type' : type, 79 }, 80 url : '/ajax/add_block.cm', 81 dataType : 'json', 82 success : function(res){ 83 if(res.msg === 'SUCCESS'){ 84 //ëê¸ 85 $('._comment_body_' + writer).html("<p class='text-gray'><i aria-hidden='true' class='icon icon-exclamation' style='margin-right: 5px;'></i>" + getLocalizeString("ì¤ëª _ì°¨ë¨ëìì±ììëê¸ì ëë¤", "", "ì°¨ë¨ë ìì±ìì ëê¸ì ëë¤.") + "</p>"); 86 87 $('._block_'+ writer) 88 .text(getLocalizeString("ì¤ëª _ì°¨ë¨í´ì ", "", "ì°¨ë¨í´ì ")) 89 .removeAttr('onclick') 90 .off('click') 91 .on('click', function(e){ 92 e.preventDefault(); 93 BOARD_COMMON.deleteBlock(res.post_code, writer, 'comment', bord_code, current_page); 94 }); 95 96 //ê²ìê¸ 97 $('.margin-top-xxl._comment_body_' + writer).html("<p class='text-gray'><i aria-hidden='true' class='icon icon-exclamation' style='margin-right: 5px;'></i>" + getLocalizeString("ì¤ëª _ì°¨ë¨ëìì±ììê²ìê¸ì ëë¤", "", "ì°¨ë¨ë ìì±ìì ê²ìê¸ì ëë¤.") + "</p>"); 98 99 $('._board._block_'+ writer) 100 .text(getLocalizeString("ì¤ëª _ì°¨ë¨í´ì ", "", "ì°¨ë¨í´ì ")) 101 .removeAttr('onclick') 102 .off('click') 103 .on('click', function(e){ 104 e.preventDefault(); 105 BOARD_COMMON.deleteBlock(res.post_code, writer, 'post', bord_code, current_page); 106 }); 107 108 }else{ 109 alert(res.msg); 110 } 111 } 112 }); 113 } 114 }; 115 116 var _deleteBlock = function (post_code, writer, type, bord_code) { 117 var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4]; 118 119 var alert_block_text = ''; 120 var alert_block = ''; 121 switch(type){ 122 case 'post': 123 var page_number = $(".pagination [class='active']").text(); 124 current_page = page_number == "" ? '1' : page_number; 125 alert_block_text = 'ê²ìê¸ì ì°¨ë¨ í´ì íìê² ìµëê¹? ìì±ìì ë¤ë¥¸ ê¸ê³¼ ëê¸ì ë¤ì íì¸í ì ììµëë¤.'; 126 alert_block = 'ì¤ëª _ê²ìê¸ì°¨ë¨í´ì ìë´'; 127 break; 128 case 'comment': 129 alert_block_text = 'ëê¸ì ì°¨ë¨ í´ì íìê² ìµëê¹? ìì±ìì ë¤ë¥¸ ëê¸ì ë¤ì íì¸í ì ììµëë¤.'; 130 alert_block = 'ì¤ëª _ëìì°¨ë¨í´ì ìë´'; 131 break; 132 } 133 134 if(confirm(getLocalizeString(alert_block, '', alert_block_text))){ 135 $.ajax({ 136 type : 'post', 137 data : { 138 'writer' : writer, 139 'post_code' : post_code, 140 'bord_code' : bord_code, 141 'current_page' : current_page, 142 }, 143 url : '/ajax/delete_block.cm', 144 dataType : 'json', 145 success : function(res){ 146 if(res.msg === 'SUCCESS'){ 147 $('#comment_container').html(res.html); 148 149 //ê²ì물 ìë¨ 150 $('.margin-top-xxl._comment_body_' + writer).html(res.post_body); 151 152 $('._board._block_'+ writer) 153 .text(getLocalizeString("ì¤ëª _ì°¨ë¨", "", "ì°¨ë¨")) 154 .removeAttr('onclick') 155 .off('click') 156 .on('click', function(e){ 157 e.preventDefault(); 158 BOARD_COMMON.addBlock(res.code, writer, 'post', bord_code); 159 }); 160 }else{ 161 alert(res.msg) 162 } 163 } 164 }); 165 } 166 }; 167 return { 168 'openReportModal': function () { 169 var board_code = arguments.length <= 0 || arguments[0] === undefined ? "" : arguments[0]; 170 var post_code = arguments.length <= 1 || arguments[1] === undefined ? "" : arguments[1]; 171 var comment_code = arguments[2]; 172 var type = arguments[3]; 173
174 _openReportModal(board_code, post_code, comment_code, type); 175 }, 176 'addReport' : function(){ 177 addReport(); 178 }, 179 'getOnlyPhotoReview' : function(a,l){ 180 getOnlyPhotoReview(a,l); 181 }, 182 'addBlock': function (code, writer, type, bord_code) { 183 var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4]; 184 185 _addBlock(code, writer, type, bord_code, current_page); 186 }, 187 'deleteBlock': function (post_code, writer, type, bord_code) { 188 var current_page = arguments.length <= 4 || arguments[4] === undefined ? "" : arguments[4]; 189 190 _deleteBlock(post_code, writer, type, bord_code, current_page); 191 } 192 }; 193}();
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.