1jQuery(function($){ 2 3 var respond = $('#respond'); 4 var form = $('#commentform'); 5 6 // ì í¨ì± ì²´í¬ 7 form.bcp().validate_form(); 8 form.submit(function(){ 9 if( this.form_valid ){ 10 bcp.loading_overlay(); 11 } 12 }); 13 14 // í¼ë§ë§í¬ íì´ë¼ì´í¸ 15 if( comment_id = location.hash.replace(/#comment-(\d+)/, '$1') ){ 16 $('#comment-'+comment_id).addClass('current-comment'); 17 $('#li-comment-'+comment_id).addClass('current-comment-parent'); 18 } 19 20 // ë¹ê³µê° í목 ìì disabled í목 ì¶ê°. 21 $('.bcp_commtplus_private', form).append('<label class="disabled"><input type="checkbox" disabled="disabled" />' + $('.bcp_commtplus_private label', form).text() + '</label>'); 22 23 // 'ëµê¸'ë²í¼ í´ë¦ì ëì ëê¸ì´ ë¹ë¡ê·¸ì¸ ëê¸ì¸ ê²½ì° disabled í목ì¼ë¡ ì¤ìì¹ 24 $('.comment-reply-link').click(function(){ 25 $('.bcp_commtplus_private', form).filter(function(){ 26 $('input', this).removeAttr('checked'); 27 $(this).removeClass('disabled'); 28 if( $(this).parents('li.comment:eq(0)').hasClass('guest') ) 29 $(this).addClass('disabled'); 30 }); 31 }); 32 33 // ëµê¸ 'ì·¨ì' ë²í¼ í´ë¦ì ë¹ê³µê° í목 ì´ê¸°í 34 $('#cancel-comment-reply-link').click(function(){ 35 $('.bcp_commtplus_private', form).removeClass('disabled'); 36 }); 37 38 // ì¤ë§ì¼ ìì´ì½ í´ë¦ì textareaì ì½ì 39 $('.bcp_commtplus_smiles a').click(function(e){ 40 e.preventDefault(); 41 var smile = $(this).data('smile')+' '; 42 var textarea_id = $(this).parents('form.bcp_commtplus-form').length ? 'bcp_commtplus_comment' : 'comment'; 43 bcp.insert_to_textarea(smile, textarea_id); 44 }); 45 46 // sns ---------------------------------------------------------------------- 47 var sns_setup = function(){ 48 49 var loginby_input = $('input[name=sns_loginby]'); 50 51 var sns_buttons = $('.bcp_commtplus_loginby').removeClass('hidden').bcp().button_group(); 52 53 var select_service = function(service){ 54 $('a', sns_buttons).removeClass('selected'); 55 $('a.'+service, sns_buttons).addClass('selected'); 56 57 bcp.loading_overlay(); 58 59 var data = { 60 action: 'commtplus_sns', 61 action_scope: 'set_loginby', 62 service: service 63 } 64 $.post(bcp_vars.ajaxurl, data, function(rs){ 65 bcp_commtplus_sns_login_success(service); 66 }); 67 } 68 69 window.bcp_commtplus_sns_login_success = function(service){ 70 if( $('#comment').val() ) 71 bcp.set_cookie('comment-content-autosave', $('#comment').val()); 72 73 bcp.loading_overlay(); 74 location.reload(); 75 } 76 77 $('#loginform').live('login-success', function(){ 78 bcp_commtplus_sns_login_success('wp'); 79 }); 80 81 $('.wp', sns_buttons).click(function(e){ 82 e.preventDefault(); 83 if( !$(this).hasClass('selected') && $(this).data('accessable')==0 ){ 84 bcp.login_popup(); 85 } 86 }); 87 88 $('.fb', sns_buttons).click(function(e){ 89 e.preventDefault(); 90 if( !$(this).hasClass('selected') && $(this).data('accessable')==0 ){ 91 bcp.open_window($(this).data('auth_redirect'), {winnm:'íì´ì¤ë¶ ë¡ê·¸ì¸', width:600, height:400}); 92 } 93 }); 94 95 $('.twitter', sns_buttons).click(function(e){ 96 e.preventDefault(); 97 if( !$(this).hasClass('selected') && $(this).data('accessable')==0 ){ 98 bcp.open_window($(this).data('auth_redirect'), {winnm:'í¸ìí° ë¡ê·¸ì¸', width:800, height:680}); 99 } 100 }); 101 102 $('a', sns_buttons).click(function(e){ 103 e.preventDefault(); 104 var t = $(this); 105 if( !$(this).hasClass('selected') && t.data('accessable')==1 ){ 106 select_service( t.data('service') ); 107 } 108 }); 109 110 $('a.bcp_commtplus-sns-deletet-link').click(function(e){ 111 e.preventDefault(); 112 if( confirm('ì ë§ë¡ ëê¸ì ìì íìê² ìµëê¹?') ){ 113 bcp.loading_overlay(); 114 var row = $(this).parents('li.comment:eq(0)'); 115 var data = { 116 action: 'commtplus_sns', 117 action_scope: 'sns_delete_post', 118 comment_id: $(this).data('comment_id') 119 } 120 $.post(bcp_vars.ajaxurl, data, function(rs){ 121 location.reload(); 122 }); 123 } 124 }); 125 126 var autosaved_comment = bcp.get_cookie('comment-content-autosave'); 127 if( autosaved_comment ){ 128 $('#comment').val(autosaved_comment).focus(); 129 bcp.set_cookie('comment-content-autosave', null); 130 } 131 132 var setting_box = $('.bcp_commtplus_setting-box'); 133 134 $('.disconnect', setting_box).click(function(e){ 135 e.preventDefault(); 136 if( $(this).hasClass('loading') ) 137 return; 138 $(this).addClass('loading'); 139 var data = { 140 action: 'commtplus_sns', 141 action_scope: 'disconnect', 142 service: $(this).data('service') 143 } 144 $.post(bcp_vars.ajaxurl, data, function(rs){ 145 location.reload(); 146 }); 147 }); 148 149 $('a.bcp_commtplus_setting').click(function(e){ 150 e.preventDefault(); 151 setting_box.toggleClass('hidden'); 152 }); 153 } 154 155 if( $('.bcp_commtplus_loginby').length ) 156 sns_setup(); 157});
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.