\ Comments will be moderated at 06:00-18:00 (UTC+7). Multiple duplicate comments, immoral, unlawful, obscene, threatening, libelous, anything related to the Thai Royal family, self-advertising, or racist comments will be ignored. For full policies, please view www.bangkokpost.com/policy (section 1.1.1).\ \

\
\ view more comments\ \ \
\ ' ); $('.open-comment').click(function() { // Add event click on body for close comment box $('body').on('click', function(e) { if ($(e.target).closest('#popup-comment').length == 0) { if (_t._is_open) { _t.close_popup_comment(); } else { _t.open_popup_comment(); } } }); }); $('#close-comment').click(function() { _t.close_popup_comment(); }); if ($(window).width() < 768) { $('.open-comment').click(function() { $('#popup-comment').addClass('boxOpen'); }); $('#close-comment').click(function() { $('#popup-comment').removeClass('boxOpen'); }); } $('a.open-comment').hover(function() { $('.open-comment i').removeClass('icon-comment') $('.open-comment i').addClass('icon-comment-article-hover') }, function() { $('.open-comment i').removeClass('icon-comment-article-hover') $('.open-comment i').addClass('icon-comment') }); }, open_popup_comment: function() { var _t = this; $('#popup-comment').addClass('boxOpen'); _t._is_open = true; }, close_popup_comment: function() { var _t = this; _t._is_open = false; $('#popup-comment').removeClass('boxOpen'); $("body").unbind("click"); }, show_comment: function() { var _t = this; if (_t.first_access) { _t.get_comment(); _t.get_template_post_comment(); } }, get_comment: function() { var _t = this; if (typeof(_t.get_commnet_ajax_requrest) == 'object') { _t.get_commnet_ajax_requres_t.abort(); } _t.get_commnet_ajax_requrest = $.get("/comment/process", { 'use_id': _t.use_id, act: 'get_comment', order: _t.order, paging: _t.paging }, function(data) { // console.log(data); if (_t.paging == 0) { var isFirst = true; } else { var isFirst = false; } _t.paging = data.paging; var _html = _t.get_template_comment(data); if (isFirst) { $('#comment_container').html(_html); } else { $('#comment_container').append(_html); } if (_t.first_access) { // _t.goToComment(); _t.first_access = false; } _t.get_commnet_ajax_requrest = false; }, 'JSON'); }, show_form_comment_thankyou: function(mode) { var _t = this; mode = (mode == undefined) ? 'comment' : mode; if (mode == 'comment') { var _elm = $('.box-add-comment'); _elm.hide(); _elm.html(_t.get_template_thankyou()); _elm.fadeIn(500); _t.time_interval = setInterval(function() { _t.hide_form_comment_thankyou() }, 5000); } else if (mode == 'reply') { var _elm = $('.box-reply'); _elm.hide(); _elm.html(_t.get_template_thankyou()); _elm.fadeIn(500); _t.time_interval = setInterval(function() { _t.hide_form_comment_thankyou('reply') }, 5000); } }, hide_form_comment_thankyou: function(mode) { var _t = this; mode = (mode == undefined) ? 'comment' : mode; if (mode == 'comment') { var _elm = $('.box-add-comment'); _elm.hide(); _t.get_template_post_comment(); _elm.fadeIn(500); } else if (mode == 'reply') { var _elm = $('.box-reply'); _elm.slideUp(function() { // Animation complete. _elm.remove(); }); } clearInterval(_t.time_interval); }, get_template_thankyou: function() { var _html = '
\
Thank you for sharing your comment\
Please be aware that all comments will be looked at by the web moderating team and we reserve the right to approve or reject comments at our discretion.\ '; return _html; }, post_comment: function(mode) { var _t = this; mode = (mode == undefined) ? 'comment' : 'reply'; global_comment_src = (typeof(global_comment_src) == 'undefined') ? '' : global_comment_src; if (mode == 'comment') { txt_comment = $('#body_comment').val(); // check_facebook = ($('#check_facebook')[0].checked == true) ? 1 : 0; $.post("/comment/process", { 'use_id': _t.use_id, 'src': 'CON', act: 'post_comment', body_comment: txt_comment, content_headline: _t.content_headline, content_url: _t.content_url }, function(data) { if (data.status == 'success') { _t.show_form_comment_thankyou(); return true; } }, 'JSON'); } else if (mode == 'reply') { txt_comment = $('#body_reply').val(); // check_facebook_reply = ($('#check_facebook_reply')[0].checked == true) ? 1 : 0; $.post("/comment/process", { 'use_id': _t.use_id, 'src': 'CON', act: 'post_comment', body_comment: txt_comment, content_headline: _t.content_headline, content_url: _t.content_url, parent_id: _t.reply_for_comment_id }, function(data) { if (data.status == 'success') { _t.show_form_comment_thankyou('reply'); return true; } }, 'JSON'); } }, clear_form_comment: function() { $('#body_comment').val(''); }, validate_comment: function(mode) { var _t = this; mode = (mode == undefined) ? 'comment' : mode; if (mode == 'comment') { txt_comment = $('#body_comment').val(); txt_comment = txt_comment.replace(/^\s+|\s+$/gm, ''); if (txt_comment == '') { return false; } // if ($('#check_comment_agree')[0].checked != true) { //alert('Please check agreement.'); // $('#check_comment_agree').parent().next().children().show(); // return false; // } // if ($('#check_facebook')[0].checked == true && !is_facebook_login) { // goProcessFacebook('post_comment_v2'); // return false; // } _t.post_comment(); } else if (mode == 'reply') { txt_comment = $('#body_reply').val(); txt_comment = txt_comment.replace(/^\s+|\s+$/gm, ''); if (txt_comment == '') { return false; } // if ($('#check_reply_agree')[0].checked != true) { //alert('Please check agreement.'); // $('#check_reply_agree').parent().next().children().show(); // return false; // } // if ($('#check_facebook_reply')[0].checked == true && !is_facebook_login) { // goProcessFacebook('post_comment_reply'); // return false; // } _t.post_comment('reply'); } }, get_template_post_comment: function() { var _t = this; // เชค member login จาก g_member g_member.get_member_login(function() { var _elm = $('.box-add-comment'); if (g_member.is_member_login) { _elm.html( '