'; var email = 'jkl@daum.net'; var board_id = 9613; var current_url = document.location.href; var ticketData = document.setTicket; ticketData.title.value = title; ticketData.content.value = content; ticketData.email.value = email; ticketData.board_id.value = board_id; ticketData.current_url.value = current_url; ticketData.submit(); } else { swal('', '이전에 관리자에게 문의하였습니다.', 'warning') return; } } function likePost() { if (!checkLogin("")) { swal('로그인을 해주세요.', '', 'warning').then(function () { window.location.href = "/login"; }) return; } var board_id = 9613; var user_has_upvoted = $('#upvote').val(); switch (user_has_upvoted) { case '1': user_has_upvoted = '0'; break; case '0': user_has_upvoted = '1'; break; case '': user_has_upvoted = '1'; break; } $('#upvote').val(user_has_upvoted); upvoteChangeClass(user_has_upvoted); $.ajax({ url: url_b_u, type: 'post', data: {board_id: board_id, user_has_upvoted: user_has_upvoted}, dataType: 'json', success: function (result) { $('.likeCnt').text(result); }, error: function (jqXHR, textStatus, errorThrown) { console.log(jqXHR.responseText); console.log(textStatus); console.log(errorThrown); } }) } function getBoardTag() { var board_id = 9613; $.ajax({ url: url_g_b_i, type: 'post', data: {board_id: board_id}, }).success(function (response) { var tagArr = response.tag.split(','); for (z = 0; z < tagArr.length; z++) { tagArr[z] = tagArr[z].split("_")[0]; } var chk = document.getElementsByName("checkTag"); for (i = 0; i < chk.length; i++) { for (j = 0; j < tagArr.length; j++) { if (chk[i].value == tagArr[j]) { chk[i].checked = true; } } } }) } $(document).ajaxComplete(function () { var img = $('#replies_list img'); for (i = 0; i < img.length; i++) { if (img[i].width >= 600) { $('.content img').css("width", "100%"); } } $('#contentUpdate').on('click', function () { var content_item_id = $(this).parents(".items-thread").attr('data-id'); var content_text = $(this).parents(".post-display").children("#board_content").text(); var content_html = $(this).parents(".post-display").children("#board_content").html(); $('#content_item_id').val(content_item_id); $('#editor_content').summernote('code', content_html); $('#updateContent').modal('show'); }) $('.commentUpdate').on('click', function () { var comment_item_id = $(this).parents(".items-thread").attr('data-id'); var comment_text = $(this).parents(".post-display").children("#comment_content").text(); var comment_html = $(this).parents(".post-display").children("#comment_content").html(); $('#comment_item_id').val(comment_item_id); $('#editor_comment').summernote('code', comment_html); $('#updateComment').modal('show'); }) $('.commentDelete').on('click', function () { var board_id = 9613; var comment_item_id = $(this).parents(".items-thread").attr('data-id'); swal({ title: '삭제하시겠습니까?', text: "", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: '삭제', cancelButtonText: '취소', }).then(function (result) { if (result.value) { $.ajax({ url: url_cc_d, type: 'POST', data: {board_id: board_id, comment_id: comment_item_id}, }) .success(function (response) { swal('삭제되었습니다.', '', 'success').then(function () { titleUpdate(board_id); getCommentList(board_id); }); }) .fail(function () { swal('삭제실패', '관리자에게 문의하세요.', 'error'); }); } else if (result.dismiss === 'cancel') { swal('취소되었습니다.', '', 'error') } }); }); $('.commentChoice').on('click', function () { var board_id = 9613; var comment_item_id = $(this).parents(".items-thread").attr('data-id'); swal({ title: '해당 댓글을 채택하시겠습니까?', text: "", type: "info", showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: '채택', cancelButtonText: '취소', }).then(function (result) { if (result.value) { $.ajax({ url: url_cc_ch, type: 'POST', data: {board_id: board_id, comment_id: comment_item_id}, }) .success(function (response) { swal('채택하였습니다.', '', 'success').then(function () { getCommentList(board_id); }); }) .fail(function () { swal('채택실패', '관리자에게 문의하세요.', 'error'); }); } else if (result.dismiss === 'cancel') { swal('취소되었습니다.', '', 'error') } }) }) }); $(document).ready(function () { getCommentList(9613); getBoardTag(); upvoteChangeClass($('#upvote').val()); if (!$("#referer").val()) { $("#referer").val(document.referrer); } $('#contentDelete').on('click', function () { contentDelete() }) $('#contentLike').click(function () { likePost(); }) $('#notice_flag').change(function () { $.ajax({ url: url_u_n_f, type: 'post', data: { board_id: 9613, notice_flag: $("#notice_flag").prop('checked') ? "Y" : "N" }, error: function (jqXHR, textStatus, errorThrown) { console.log(jqXHR.responseText); console.log(textStatus); console.log(errorThrown); } }) }); $('#type-select').select2(); $('#type-select').val('AS').trigger('change'); });

[GTGear / A/S 요청] 이민재_ㅇㅇㄹㄴㄹ + 1

2021-04-28 15:56:40

댓글을 작성하시려면

이 필요합니다.

참여자

태그

연관글