[ad_1] '송해 장가가기 퍼포먼스'가 31일 서울 종로구 락희거리에서 열렸다. 이 퍼포먼스는 어르신을 위한 맞춤형 축제인 '락희거리축제'의 일환으로 열린 행사다. 이날 방송인 송해(91세)는 배우 전원주(79세)와 가상 혼례를 올렸다. if(isMobile() && document.referrer.indexOf('naver') > -1){ if (window.history && window.history.pushState) { window.history.pushState('', null, '#'); $(window).on('popstate', function() { location.href = "http://www.sisapress.com#p"; }); } } $(document).ready(function() { $("button.textControl").click(function() { if ($(this).hasClbad("plus")) { textControl($(".articleContentView"), true); textControl($(".articleContent .text1"), true); } else if ($(this).hasClbad("minus")) { textControl($(".articleContentView"), false); textControl($(".articleContent .text1"), false); } }); var articleSeq = $("#articleSeq").val(); $(".newsThumbList.type1").load("/journal/getRelationArticle/178360.json"); $(".newsThumbList .newsItem .img").css("height", $(".newsThumbList .newsItem .img").width()); // var start = checkLocationHash(); // $("#start").val(start); // $("#listMore").bind("click", function() { // listMore(this); // }); $("#relatedArticles").load("/journal/getRelationArticle/178360.json"); $("#partnerList").load("/journal/seoul/rss/call.json"); $(".arDetail img").css({'cursor':'pointer'}); $(".arDetail img").click(function(){ var u_ = $(this).attr("src").replace("/thumb","").replace("-1.",".").replace("-sample.",".").replace("-sampleM.","."); // $.fancybox.open(u_); window.open(u_); }); $(".arDetail a").attr("target", "_blank"); movePrintBtn(); mobileShowSNSBtn(); $(window).resize(function(){ mobileShowSNSBtn(); movePrintBtn(); }); $(window).scroll(function(){ movePrintBtn(); }); /* Facebook SDK CONFIG ( 사용할 서버에 맞춰서 appId 바꿔 쓰십시요. ) */ // appId 는 message/*/sns.properties 값을 가져와서 셋팅 var appId = '400622400061803'; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "http://connect.facebook.net/ko_KR/sdk.js#xfbml=1&version=v2.7&appId="+appId; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); //댓글작업부분 $("#comment-textarea").on("click", function() { var sessionInfo = ''; if (!sessionInfo) { location.href="http://www.sisapress.com/member/login"; } }); //댓글 글자수 카운트 $("#comment-textarea").on("focusout focusin keyup", function() { if ($(this).val().length > 0){ $(".dv-comment-login-wrap").css("display", "none"); $(this).siblings('.dv-textarea-count').children(".spn-text-count").text($(this).val().length); } else { $(this).siblings('.dv-textarea-count').children(".spn-text-count").text(0); $(".dv-comment-login-wrap").css("display", "block"); } }); //대댓글 볼러오눈 부분 var Data = {arSEQ: articleSeq, startIndex:0}; $.ajax({ data : Data, type:'POST', dataType : 'json', url : '/loadReComment', success : function (data){ for(var key in data.subCommentMap){ var comment = $("#commentTable").find(".dv-comment-list[id="+key+"]"); comment.find(".a-comment-recomment span").text(data.subCommentMap[key].length); for(var index in data.subCommentMap[key]){ var reCommentData = data.subCommentMap[key]; var reComment = ""; reComment += ''; if (reCommentData[index].memberSEQ == data.loginMemberSEQ) { reComment += ''; } reComment += ' '; reComment += ' '; reComment += ' '+ reCommentData[index].memberName +''; reComment += ' '; reComment += ' ' + reCommentData[index].regDate + ''; reComment += ' '; reComment += ' ' + reCommentData[index].comment + ''; reComment += ''; comment.find(".dv-comment-list-recomment").append(reComment); } } }, error:function(request, status, error){ console.log("error"); console.log("code:"+request.status+"n"+"message:"+request.responseText+"n"+"error:"+error); } }); $("#btn-comment-ok").click(makeComment); // $(".a-comment-recomment").click(makeRecomment); $("#orderByLatest").click(orderByLatest); $("#orderByLike").click(orderByLike); $("#orderByDislike").click(orderByDislike); $(".dv-btn-page-comment").click(moreComment); $(".dv-icon-like").click(likeClick); $(".dv-icon-dislike").click(dislikeClick); startIndex = $("#startIndex").val(); $("#startIndex").val(parseInt(startIndex) + 1); //댓글작업부분 }); function movePrintBtn(){ var contentWrapperPosi = $('.contentWrapper').position().top+190; if($(window).scrollTop() >= contentWrapperPosi){ $('.newsUtil').css('top', $(window).scrollTop() - contentWrapperPosi + 100); }else{ $('.newsUtil').css('top', $("#NPBW031").outerHeight(true)); } } function mobileShowSNSBtn(){ if($(window).width() < 753){ $('#mobileSNS').show(); }else{ $('#mobileSNS').hide(); } } function textControl(o, type) { var currentSize = o.css("fontSize"); /* 폰트사이즈를 알아낸다. */ console.log('currentSize:'+currentSize); var num = parseFloat(currentSize, 12); /* parseFloat()은 숫자가 아니면 숫자가 아니라는 뜻의 NaN을 반환한다. */ console.log('num:'+num); if (type) { num *= 1.4; } else { num /= 1.4; if (num < 12) { return false; } } console.log('num:'+num); var unit = currentSize.slice(-2); /* 끝에서부터 두자리의 문자를 가져온다. */ console.log('unit:'+unit); o.css("fontSize", num + unit); } function printPop() { var popUrl = "/journal/articlePrint/178360"; var popOption = "width=750, height=750, resizable=no, scrollbars=yes, status=no;"; window.open(popUrl, "print", popOption); } function searchAuth(auth) { location.href = '/search/all/journal/1/12?searchAuthName=' + auth; } function goTop(){ $("html, body").animate({scrollTop:0}, 500); } var faceBookLogin = false; $(document).ready(function(){ //이미지 크게 보기 //네이버 버튼 클릭 $('#naver').click(function() { naverAuthUrl = ""; var popOption = "width=460, height=500, resizable=no, scrollbars=no, status=no;"; //팝업창 옵션(optoin) window.open(naverAuthUrl,"",popOption); }); //페이스북 로그인 $("#facebook").click(function() { // alert("-====="); var refUrl = document.referrer; function faceBookLoginFunc() { FB.login(function(response) { if (response.authResponse) { FB.LoginStatus = 1; // console.log('Welcome! Fetching your information.... '); FB.api('/me?fields=email,name', function(user) { // console.log("JSON.stringify(user)============="+JSON.stringify(user)); // console.log("user.name============="+user.email); if(user.email == "undefined"){ alert("이메일"); } var url = "/member/login/facebook"; var data = "&snsToken=518016708361860&memberNm="+user.name+"&memberEmail="+user.email+"&facebookId="+user.id; var email = ""; for (i = 0, iMax = user.email.length; i < iMax; i += 1) { if(i % 3 == 2) email += "*"; else email += user.email.charAt(i); } $.ajax({ type : "POST", data : data, url : url, dataType : "json", success : function(data){ if(data.result){ if(data.result){ if(data.join){ alert("로그인 되었습니다."); //location.href = "/grazia"; location.href = refUrl; }else{ alert("페이스북 이메일로 통합회원을 가입하세요."); location.href = "/member/join1"; } }else{ alert("이메일정보가 정확하지 않습니다."); //location.href = "/grazia"; location.href = refUrl; } }else{ $("#email").val(user.email); $("form[name='loginForm']").attr('action', "/mypage/orders"); $("#ordersForm").submit(); } }, error : function(response, textStatus, error){ // console.log(response); // console.log(textStatus); // console.log(error.message); // alert('error'); } }); }); } else { // console.log('User cancelled login or did not fully authorize.'); } }, {scope : 'email'}); } try { if (FB.LoginStatus == 1) { FB.logout(function(response) { FB.LoginStatus = 0; faceBookLoginFunc(); }); } else { faceBookLoginFunc(); } } catch(ex) {}; }); var appid = "400622400061803"; window.fbAsyncInit = function() { FB.init({ // appId : '1015553101822660', //테스트 // appId : '1482816438691268', //서버 appId : appid, //서버1 // appId : '1015553101822660', //cms xfbml : true, // parse social plugins on this page status : true, // check login status cookie : true, // enable cookies to allow the server to access the sessio version : 'v2.5' // use version 2.2 }); // Now that we've initialized the JavaScript SDK, we call // FB.getLoginStatus(). This function gets the state of the // person visiting this page and can return one of three states to // the callback you provide. They can be: // // 1. Logged into your app ('connected') // 2. Logged into Facebook, but not your app ('not_authorized') // 3. Not logged into Facebook and can't tell if they are logged into // your app or not. // // These three cases are handled in the callback function. FB.getLoginStatus(function(response) { statusChangeCallback(response); }); }; // Load the SDK asynchronously (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "http://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); }); //This is called with the results from from FB.getLoginStatus(). function statusChangeCallback(response) { // The response object is returned with a status field that lets the // app know the current login status of the person. // Full docs on the response object can be found in the documentation // for FB.getLoginStatus(). if (response.status === 'connected') { // Logged into your app and Facebook. testAPI(); } else if (response.status === 'not_authorized') { // The person is logged into Facebook, but not your app. // document.getElementById('status').innerHTML = 'Please log ' + // 'into this app.'; } else { // The person is not logged into Facebook, so we're not sure if // they are logged into this app or not. // document.getElementById('status').innerHTML = 'Please log ' + // 'into Facebook.'; } } // Here we run a very simple test of the Graph API after login is // successful. See statusChangeCallback() for when this call is made. function testAPI() { FB.api('/me', function(response) { // console.log('Successful login for: ' + response.name); // console.log('Successful login for: ' + JSON.stringify(response)); // document.getElementById('status').innerHTML = 'Thanks for logging in, ' + response.name + '!'; }); } function generateState() { // CSRF 방지를 위한 state token 생성 코드 // state token은 추후 검증을 위해 세션에 저장 되어야 합니다. var oDate = new Date(); return oDate.getTime(); } [ad_2] Source link