1// select_box 2$(function() { 3 4 // PCslide_modal 5 const selectBtn = $('.select').children('button'); 6 const selectList = $('.select_list'); 7 const selectListLink = $('.select_list > a'); 8 9 selectBtn.on('click', function (e) { 10 e.preventDefault(); 11 $(this).next().fadeToggle(200); 12 return false; 13 }); 14 15 selectListLink.on('click', function () { 16 $(this).parent().fadeOut(200); 17 }); 18 19 $(document).on('click', function (e) { 20 if (!$(e.target).closest(selectList).length && !$(e.target).closest(selectBtn).length) { 21 selectList.fadeOut(200); 22 } 23 }); 24}); 25 26$(function() { 27 28 // SPslide_modal 29 const modal = $('.modal_sns_sp.modal'); 30 const modalInquiry = $('.modal_inquiry'); 31 const modalContWrap = $('#modal_cont_wrap'); 32 const modalClose = $('#modal_close'); 33 const modalInquiryClose = $('.modal_inquiry_close'); 34 const modalCont = $('#modal_cont'); 35 const modalInquiryCont = $('.modal_inquiry_cont'); 36 const modalBg = $('#modal_bg'); 37 const modalInquiryBg = $('.modal_inquiry_bg'); 38 const modalReviewDelete = $('.review_delete_action'); 39 const modalReviewEditSp = $('#modal_edit_review'); 40 const modalReviewDeleteSp = $('#modal_delete_review'); 41 const modalReviewDeleteSpModal = $('#modal_mypage_sp'); 42 const modalReviewDeleteSpModalClose = $('#delete_dialog_close'); 43 const modalReviewDeleteSpModalCancel = $('#delete_dialog_cancel'); 44 const MODAL_REVIEW_REPORT_SP = $('#report_car_review'); 45 const MODAL_REVIEW_REPORT_SP_MODAL = $('#modal_mypage_sp'); 46 const MODAL_REVIEW_REPORT_SP_MODAL_CLOSE = $('#report_dialog_close'); 47 const MODAL_REVIEW_REPORT_SP_MODAL_CANCEL = $('#report_dialog_cancel'); 48 const MODAL_REVIEW_REPORT_FINISH_SP_MODAL_CROSS = $('#report_finish_dialog_cross'); 49 const MODAL_REVIEW_REPORT_FINISH_SP_MODAL_CLOSE = $('#report_finish_dialog_close_btn'); 50 const MODAL_REVIEW_REPORT_FAILED_SP_MODAL_CROSS = $('#report_failed_dialog_cross'); 51 const MODAL_REVIEW_REPORT_FAILED_SP_MODAL_CLOSE = $('#report_failed_dialog_close_btn'); 52 let scrollPosition; 53 54 modal.on('click', function(e) { 55 e.preventDefault(); 56 share_title = $(this).attr('data-title'); 57 share_text = $(this).attr('data-text'); 58 share_url = $(this).attr('data-url'); 59 id = $(this).attr('popup-modal-id'); 60 $('#modal_bg').fadeIn(); 61 $('#modal_cont_wrap').slideDown(300); 62 $('#modal_cont').fadeIn(); 63 $('#share_title').val(share_title); 64 $('#share_text').val(share_text); 65 $('#share_url').val(share_url); 66 $('#delete_review_id').val(id); 67 $('#report_review_id').val(id); 68 if($(window).scrollTop() > 0){ 69 scrollPosition = $(window).scrollTop(); 70 } 71 if(scrollPosition > 0){ 72 $('body').addClass('fixed').css({'top': -scrollPosition}); 73 } 74 }); 75 modalContWrap.on('click', function(e) { 76 e.stopPropagation(); 77 $('#modal_bg').fadeOut(); 78 $('#modal_cont').fadeIn(200); 79 $('#delete_review_id').val(""); 80 $('#modal_cont_wrap').slideUp(300); 81 $('body').removeClass('fixed').css({'top': 0}); 82 scroll_back(scrollPosition); 83 }); 84 modalClose.on('click', function(e) { 85 e.stopPropagation(); 86 $('#modal_bg').fadeOut(); 87 $('#modal_cont_wrap').slideUp(300); 88 $('body').removeClass('fixed').css({'top': 0}); 89 $('#delete_review_id').val(""); 90 scroll_back(scrollPosition); 91 }); 92 modalBg.on('click', function(e) { 93 e.stopPropagation(); 94 $(this).fadeOut(); 95 $('#modal_cont_wrap').slideUp(300); 96 $('body').removeClass('fixed').css({'top': 0}); 97 $('#delete_review_id').val(""); 98 $('#delete_modal_cont').fadeOut(); 99 $('#report_review_id').val(""); 100 $('#report_modal_cont').fadeOut(); 101 $('#report_finish_review_id').val(""); 102 $('#report_finish_modal_cont').fadeOut(); 103 scroll_back(scrollPosition); 104 });
105 modalCont.on('click', function() { 106 $('#modal_bg').fadeOut(); 107 $('#modal_cont_wrap').slideUp(300); 108 $('#delete_review_id').val(""); 109 $('body').removeClass('fixed').css({'top': 0}); 110 scroll_back(scrollPosition); 111 }); 112 113 modalReviewEditSp.on('click', function() { 114 window.location.href = '/goonet/php/car_review/input.php?review_id=' + id; 115 return false; 116 }); 117 118 modalReviewDeleteSp.on('click', function() { 119 modalReviewDeleteSpModal.fadeIn(); 120 $('#modal_cont_wrap').slideUp(300); 121 $('#delete_modal_cont').css('z-index', '1001'); 122 $('#delete_modal_cont').fadeIn(200); 123 $('#delete_dialog_action').attr('popup-modal-delete-review_id', id); 124 return false; 125 }); 126 127 modalReviewDeleteSpModalClose.on('click', function() { 128 $('#modal_bg').fadeOut(); 129 $('#delete_modal_cont').fadeOut(); 130 $('body').removeClass('fixed').css({'top': 0}); 131 scroll_back(scrollPosition); 132 }); 133 134 modalReviewDeleteSpModalCancel.on('click', function() { 135 $('#modal_bg').fadeOut(); 136 $('#delete_modal_cont').fadeOut(); 137 $('body').removeClass('fixed').css({'top': 0}); 138 scroll_back(scrollPosition); 139 }); 140 141 modalInquiry.on('click', function(e) { 142 var thisInquiryContWrap = $(this).parent().next().find('.modal_inquiry_cont_wrap'); 143 var thisInquiryBg = thisInquiryContWrap.next(); 144 var thisInquiryCont = thisInquiryContWrap.find('.modal_inquiry_cont'); 145 e.preventDefault(); 146 thisInquiryBg.fadeIn(); 147 thisInquiryContWrap.slideDown(300); 148 thisInquiryCont.fadeIn(); 149 if($(window).scrollTop() > 0){ 150 scrollPosition = $(window).scrollTop(); 151 } 152 if(scrollPosition > 0){ 153 $('body').addClass('fixed').css({'top': -scrollPosition}); 154 } 155 }); 156 modalInquiryClose.on('click', function(e) { 157 var thisInquiryContWrap = $(this).closest('.modal_inquiry_cont_wrap'); 158 var thisInquiryBg = thisInquiryContWrap.next(); 159 var thisInquiryCont = thisInquiryContWrap.find('.modal_inquiry_cont'); 160 e.stopPropagation(); 161 thisInquiryBg.fadeOut(); 162 thisInquiryContWrap.slideUp(300); 163 $('body').removeClass('fixed').css({'top': 0}); 164 scroll_back(scrollPosition); 165 }); 166 modalInquiryBg.on('click', function(e) { 167 var thisInquiryContWrap = $(this).prev(); 168 e.stopPropagation(); 169 $(this).fadeOut(); 170 thisInquiryContWrap.slideUp(300); 171 $('body').removeClass('fixed').css({'top': 0}); 172 scroll_back(scrollPosition); 173 }); 174 175 MODAL_REVIEW_REPORT_SP.on('click', function() { 176 MODAL_REVIEW_REPORT_SP_MODAL.fadeIn(); 177 $('#modal_cont_wrap').slideUp(300); 178 $('#report_modal_cont').css('z-index', '1001'); 179 $('#report_modal_cont').fadeIn(200); 180 $('#report_dialog_action').attr('popup-modal-report-review_id', id); 181 return false; 182 }); 183 184 MODAL_REVIEW_REPORT_SP_MODAL_CLOSE.on('click', function() { 185 modalReportCloseSp('report_modal_cont'); 186 }); 187 MODAL_REVIEW_REPORT_SP_MODAL_CANCEL.on('click', function() { 188 modalReportCloseSp('report_modal_cont'); 189 }); 190 MODAL_REVIEW_REPORT_FINISH_SP_MODAL_CROSS.on('click', function() { 191 modalReportCloseSp('report_finish_modal_cont'); 192 }); 193 MODAL_REVIEW_REPORT_FINISH_SP_MODAL_CLOSE.on('click', function() { 194 modalReportCloseSp('report_finish_modal_cont'); 195 }); 196 MODAL_REVIEW_REPORT_FAILED_SP_MODAL_CROSS.on('click', function() { 197 modalReportCloseSp('report_failed_modal_cont'); 198 }); 199 MODAL_REVIEW_REPORT_FAILED_SP_MODAL_CLOSE.on('click', function() { 200 modalReportCloseSp('report_failed_modal_cont'); 201 }); 202 function modalReportCloseSp(modal_elm_id){ 203 $('#modal_bg').fadeOut(); 204 $('#' + modal_elm_id).fadeOut(); 205 $('body').removeClass('fixed').css({'top': 0}); 206 scroll_back(scrollPosition); 207 } 208 209 $('#report_dialog_action').on('click', function(e) { 210 let reported_review_id = $('#report_dialog_action').attr('popup-modal-report-review_id'); 211 $('#report_dialog_action').attr('disabled', 'disabled'); 212 $('#report_dialog_action').addClass('sending'); 213 e.preventDefault(); 214 215 $.ajax({
216 type: "POST", 217 url: '/goonet/php/car_review/ajax_violation_report.php', 218 data: {"reported_review_id" : reported_review_id}, 219 dataType: "json", 220 }).done(function(data) { 221 if(data.status === '900'){ 222 window.location.href = '/goonet/php/car_review/login.php'; 223 return false; 224 } 225 if(data.status == 200){ 226 changeStateOfReportFnSp (true, reported_review_id) 227 }else{ 228 changeStateOfReportFnSp (false, reported_review_id) 229 } 230 }).fail(function(data) { 231 changeStateOfReportFnSp (false, reported_review_id) 232 }); 233 234 function changeStateOfReportFnSp (report_status, reported_review_id) { 235 $('#report_modal_cont').hide(); 236 if(report_status) { 237 $('#report_finish_modal_cont').show(); 238 $('#report_finish_modal_cont').css('z-index', 1001); 239 }else{ 240 $('#report_failed_modal_cont').show(); 241 $('#report_failed_modal_cont').css('z-index', 1001); 242 } 243 $('#report_dialog_action').removeAttr('disabled'); 244 $('#report_dialog_action').removeClass('sending'); 245 246 }; 247 248 }); 249 250 // PC modal 251 const modalPc = $('.modal_sns_pc.modal'); 252 const modalMypagePc = $('.modal_mypage_pc.modal'); 253 const modalClosePc = $('.modal_sns_pc .modal_close'); 254 const modalMypageClosePc = $('.modal_mypage_pc .modal_close'); 255 const modalMypageCancelPc = $('.modal_mypage_pc .cancel'); 256 const modalBgPc = $('.modal_sns_pc .modal_bg'); 257 const modalBgMypagePc = $('.modal_mypage_pc .modal_bg'); 258 const modalContPc = $('.modal_sns_pc .modal_cont'); 259 const modalContMypagePc = $('.modal_mypage_pc .modal_cont'); 260 const MODAL_REPORT_PC = $('.modal_report_pc.modal'); 261 const MODAL_REPORT_CLOSE_PC = $('.modal_report_pc .modal_close'); 262 const MODAL_REPORT_BG_PC = $('.modal_report_pc .modal_bg'); 263 const MODAL_REPORT_CONT_PC = $('.modal_report_pc .modal_cont'); 264 const MODAL_REPORT_SEND_BTN_PC = $('.modal_report_pc .button_send'); 265 const MODAL_REPORT_CLOSE_BTN_PC = $('.modal_report_pc .button_close'); 266 const MODAL_REPORT_FINISH_CLOSE_BTN_PC = $('.modal_report_pc .button_report_finish'); 267 const MODAL_REPORT_FAILED_CLOSE_BTN_PC = $('.modal_report_pc .button_report_failed'); 268 269 modalPc.on('click', function(e) { 270 id = $(this).attr('popup-modal-id'); 271 e.preventDefault(); 272 $('#modal_bg' + id).fadeIn(); 273 $('#modal_cont' + id).fadeIn(200); 274 scrollPosition = $(window).scrollTop(); 275 $('body').addClass('fixed').css({'top': -scrollPosition}); 276 }); 277 278 modalMypagePc.on('click', function(e) { 279 id = $(this).attr('popup-modal-id'); 280 e.preventDefault(); 281 $('#modal_bg' + id).fadeIn(); 282 $('#modal_cont' + id).fadeIn(200); 283 scrollPosition = $(window).scrollTop(); 284 $('body').addClass('fixed'); 285 }); 286 287 modalContPc.on('click', function(e) { 288 e.stopPropagation(); 289 }); 290 291 modalClosePc.on('click', function() { 292 modalBgPc.fadeOut(); 293 modalContPc.fadeOut(200); 294 $('body').removeClass('fixed').css({'top': 0}); 295 window.scrollTo(0, scrollPosition); 296 }); 297 298 modalMypageClosePc.on('click', function() { 299 modalBgMypagePc.fadeOut(); 300 modalContMypagePc.fadeOut(200); 301 $('body').removeClass('fixed').css({'top': 0}); 302 window.scrollTo(0, scrollPosition); 303 }); 304 305 modalMypageCancelPc.on('click', function() { 306 modalBgMypagePc.fadeOut(); 307 modalContMypagePc.fadeOut(200); 308 $('body').removeClass('fixed').css({'top': 0}); 309 window.scrollTo(0, scrollPosition); 310 }); 311 modalBgPc.on('click', function() { 312 $(this).fadeOut(); 313 modalContPc.fadeOut(200); 314 $('body').removeClass('fixed').css({'top': 0}); 315 window.scrollTo(0, scrollPosition); 316 return false; 317 });
318 modalBgMypagePc.on('click', function() { 319 $(this).fadeOut(); 320 modalContMypagePc.fadeOut(200); 321 $('body').removeClass('fixed').css({'top': 0}); 322 window.scrollTo(0, scrollPosition); 323 return false; 324 }); 325 326 modalReviewDelete.on('click', function() { 327 delete_review_id = $(this).attr('popup-modal-delete-review_id'); 328 $('#del_review_id').val(delete_review_id); 329 $('#form_del').submit(); 330 }); 331 332 // Êó¹ð 333 MODAL_REPORT_PC.on('click', function(e) { 334 let id = $(this).attr('popup-modal-id'); 335 e.preventDefault(); 336 $('.modal_report.modal_report_pc #modal_report_bg' + id).fadeIn(); 337 $('.modal_report.modal_report_pc #modal_report_cont' + id).fadeIn(200); 338 scrollPosition = $(window).scrollTop(); 339 $('body').addClass('fixed').css({'top': -scrollPosition}); 340 }); 341 342 MODAL_REPORT_SEND_BTN_PC.on('click', function(e) { 343 let target_modal = $(e.target).parents('.modal_cont'); 344 let reported_review_id = target_modal.attr('id').match(/\d+$/)[0]; 345 target_modal.find('.button_send').attr('disabled', 'disabled'); 346 target_modal.find('.button_send').addClass('sending'); 347 e.preventDefault(); 348 349 $.ajax({
350 type: "POST", 351 url: '/goonet/php/car_review/ajax_violation_report.php', 352 data: {"reported_review_id" : reported_review_id}, 353 dataType: "json", 354 }).done(function(data) { 355 if(data.status === '900'){ 356 window.location.href = '/goonet/php/car_review/login.php'; 357 return false; 358 } 359 if(data.status === '200'){ 360 changeStateOfReportFn(true, reported_review_id); 361 362 }else{ 363 changeStateOfReportFn(false, reported_review_id); 364 } 365 }).fail(function(data) { 366 changeStateOfReportFn(false, reported_review_id); 367 }); 368 369 function changeStateOfReportFn (report_status, reported_review_id) { 370 $('.modal_report.modal_report_pc #modal_report_cont' + reported_review_id).hide(); 371 if(report_status){ 372 $('.modal_report.modal_report_pc #modal_report_finish_cont' + reported_review_id).show(); 373 }else{ 374 $('.modal_report.modal_report_pc #modal_report_failed_cont' + reported_review_id).show(); 375 } 376 target_modal.find('.button_send').removeAttr('disabled'); 377 target_modal.find('.button_send').removeClass('sending'); 378 } 379 380 }) 381 MODAL_REPORT_CONT_PC.on('click', function(event) { 382 event.stopPropagation(); 383 }); 384 MODAL_REPORT_CLOSE_PC.on('click', function(event) { 385 modalReportClose(); 386 event.stopPropagation(); 387 event.preventDefault(); 388 return false; 389 }); 390 MODAL_REPORT_CLOSE_BTN_PC.on('click', function(event){ 391 modalReportClose(); 392 event.stopPropagation(); 393 event.preventDefault(); 394 return false; 395 }); 396 MODAL_REPORT_FINISH_CLOSE_BTN_PC.on('click', function(event){ 397 modalReportClose(); 398 event.stopPropagation(); 399 event.preventDefault(); 400 return false; 401 }); 402 MODAL_REPORT_FAILED_CLOSE_BTN_PC.on('click', function(){ 403 modalReportClose(); 404 event.stopPropagation(); 405 event.preventDefault(); 406 return false; 407 }); 408 MODAL_REPORT_BG_PC.on('click', function(event){ 409 modalReportClose(); 410 event.stopPropagation(); 411 event.preventDefault(); 412 return false; 413 }); 414 415 function scroll_back(position){ 416 if(position !==undefined && position > 0){ 417 console.log('position:' + position); 418 window.scrollTo(0, position); 419 } 420 } 421 function modalReportClose(){ 422 MODAL_REPORT_BG_PC.fadeOut(); 423 $('.modal_cont').fadeOut(200); 424 $('body').removeClass('fixed').css({'top': 0}); 425 window.scrollTo(0, scrollPosition); 426 } 427 428}); 429
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.