|
window.naver=window.naver||{};window.naver.tlist={init:function(b){var d=this;this.option={mode:"default",layerBaseId:"tlist_layer",layerDimmedId:"tlist_collectionLayerBg",layerIntroId:"tlist_layerIntro",layerPutId:"tlist_layerContentCollection",layerListCreateId:"tlist_layerContentAddingCollection",layerPutCompleteId:"tlist_layerPutCompleteCollection",layerListCreateCompleteId:"tlist_layerListCreateComplete",layerClaimId:"tlist_layerClaim",layerClaimCompleteId:"tlist_layerClaimComplete",utilBoxId:"tlist_util_box",buttxxonSelector:".__TLIST_PUT",claimSelector:".__TLIST_CLAIM",serviceCode:"NONE",serviceName:"지식리스트",cacheBustingParam:"",eventBeforeShow:null,eventAfterHide:null,eventAfterOnlyCreateComplete:null,apiUrl:{get:"/tlist/api/themeList.nhn?format=json&type=get",create:"/tlist/api/themeList.nhn?format=json&type=create",put:"/tlist/api/themeList.nhn?format=json&type=put",claim:"/tlist/api/themeList.nhn?format=json&type=claim",count:"/tlist/api/themeList.nhn?format=json&type=count"},domain:"http://terms.naver.com",cookieNameViewIntro:"tlist.layer.intro.read",isMobile:false,nclicker:clickcr};if(b){for(var c in b){if(b.hasOwnProperty(c)){this.option[c]=b[c];}}}if(this.option.isMobile){this.loginUrl="https://nid.naver.com/nidlogin.login?svctype=262144&url="+encodeURIComponent(document.URL);}switch(this.option.mode){default:var a=[];if(typeof tljindo=="undefined"){a.push(this.option.domain+"/tlist/api/js/tljindo.js?"+this.option.cacheBustingParam);a.push(this.option.domain+"/tlist/api/js/tljindo_component.js?"+this.option.cacheBustingParam);}a.push(this.option.domain+"/tlist/api/js/naver.tlist.module.js?"+this.option.cacheBustingParam);this.loadScript(a,function(){var g=new naver.tlist.ServiceDefault();g.attach({beforeShow:function(h){if(d.option.eventBeforeShow){d.option.eventBeforeShow(h);}},afterHide:function(h){if(d.option.eventAfterHide){d.option.eventAfterHide(h);}}});g.init(d.option);var e=new naver.tlist.OnlyCreateList();e.attach({beforeShow:function(h){if(d.option.eventBeforeShow){d.option.eventBeforeShow(h);}},afterHide:function(h){if(d.option.eventAfterHide){d.option.eventAfterHide(h);}}});e.init(d.option,{layerBaseId:"tlist_layer_only_create",layerDimmedId:"tlist_collectionLayerBg_only_create",layerIntroId:"layerIntro_only_create",layerPutId:"layerContentCollection_only_create",layerListCreateId:"layerContentAddingCollection_only_create",layerPutCompleteId:"layerPutCompleteCollection_only_create",layerListCreateCompleteId:"layerListCreateComplete_only_create",buttxxonSelector:".__TLIST_CREATE"});var f=new naver.tlist.Claim();f.attach({beforeShow:function(h){if(d.option.eventBeforeShow){d.option.eventBeforeShow(h);}},afterHide:function(h){if(d.option.eventAfterHide){d.option.eventAfterHide(h);}}});f.init(d.option);naver.tlist._oUtilBox=new naver.tlist.UtilBox();naver.tlist._oUtilBox.init(d.option);});break;}},_oUtilBox:null,update:function(a){naver.tlist._oUtilBox.update();},loadScript:function(d,c){var b=(d.constructor===Array)?d:[d];var a="__callback_"+Math.floor(Math.random()*1000);b.push(a);this._htLoadUrlList=(this._htLoadUrlList||{});this._fLoadScriptCallback=this._fLoadScriptCallback||{};this._fLoadScriptCallback[a]=c;this._htLoadUrlList[a]=b.reverse();this._createScriptElement(a);},_createScriptElement:function(d){var b=document.createDocumentFragment();var c=null;var e=function(){naver.tlist._xxonLoadScript(this);};var g=this._htLoadUrlList[d].pop();var f=(g.indexOf("?")>-1)?true:false;var a=(new Date().getTime())+"";var c=document.createElement("SCRIPT");c.src=g+((f)?"&":"?")+"dummy="+a;c.charset="utf-8";c.type="text/javascript";c.setAttribute("data-seqId",d);if(typeof c.addEventListener!=="undefined"){c.addEventListener("load",e);c.addEventListener("error",e);}else{if(this._bIe8()){c.[안내]태그제한으로등록되지않습니다-onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){naver.tlist._xxonLoadScript(this);this.[안내]태그제한으로등록되지않습니다-onreadystatechange=null;}};}else{c.[안내]태그제한으로등록되지않습니다-xxonload=e;c.[안내]태그제한으로등록되지않습니다-xxonError=e;}}b.appendChild(c);document.body.appendChild(b);b=c=e=null;},_xxonLoadScript:function(a){var b=a.getAttribute("data-seqId");if(!this._bIe){document.body.removeChild(a);}if(this._htLoadUrlList[b].length>1){this._createScriptElement(b);return;}if(typeof this._fLoadScriptCallback[b]==="function"){this._fLoadScriptCallback[b]();}delete this._fLoadScriptCallback[b];delete this._htLoadUrlList[b];},_bIe:(navigator.userAgent.toLowerCase().indexOf("msie")!=-1)?true:false,trim:function(a){if(a==null||a===undefined){return"";}else{return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"");}},_bIe8:function(){var c=navigator.userAgent.toLowerCase();var d=false;var b=null;var a;if(c.indexOf("msie")>-1){b=c.match(/msie\s([^\;]*)/i);if(b!==null&&b.length>1){if(Number(b[1])<9){d=true;}}}return d;},ajaxRequest:function(b,a,c){a=a||{};var d=new jindo.$Ajax(b,{type:a.sReqType||"xhr",method:a.sMethod||"get",timeout:a.nTimeout||10,xxonload:function(g){if(a.fnSuccess){a.fnSuccess(g);}else{var f=g.status();if(f=="200"){var e=g.text();jindo.$(a.elementId).innerHTML=e;}}},xxonerror:function(e){if(a.fnError){a.fnError(e);}},ontimeout:function(e){if(a.fnTimeout){a.fnTimeout(e);}}});d.request(c||{});},bindEventCancelBubble:function(a){var b=tljindo.$Element(window.document.body);if(b){b.delegate("keydown","*",tljindo.$Fn(function(c){c.stop(tljindo.$Event.CANCEL_BUBBLE);},this).bind());}},unbindEventCancelBubble:function(a){var b=tljindo.$Element(window.document.body);if(b){b.undelegate("keydown","*",tljindo.$Fn(function(c){c.stop(tljindo.$Event.CANCEL_BUBBLE);},this));}},hideAllLayer:function(a){if(naver.tlist._htLayer){for(var c=0,b=naver.tlist._htLayer.length;c<b;c++){naver.tlist._htLayer[c].hide(a);}}},isLoginError:function(a){if(a!==undefined&&a=="200"){return true;}else{return false;}},isAPIError:function(a){if(a!==undefined&&a=="0"){return false;}else{return true;}},isBlockError:function(a){if(a!==undefined&&a=="302"){return true;}else{return false;}},isOverflowStringLengthError:function(a){if(a!==undefined&&a=="303"){return true;}else{return false;}},countListField:function(c,b,e,a){var d=c.text().length;if(d>e){alert(e+"자 이내로 입력하세요.");c.text(c.text().substring(0,e));a.text(e);}else{a.text(d);}},loginUrl:"https://nid.naver.com/nidlogin.login?url="+encodeURIComponent(document.URL),isLogin:false,TEMPLATE_CONTAINER:'<div class="layer_wrap" id="{=layerBaseId}" style="display:none"><div id="{=layerDimmedId}" class="dimmed" style="display:none"></div></div>',TEMPLATE_PUT_LIST:'<div class="layer_use add" id="{=layerPutId}" style="display:none"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3>지식리스트에 담기</h3></div><div class="layer_cont"><a href="#" class="btn_create3 __BTN_CREATE_LIST">새 지식리스트 만들기 <span class="ico_add"></span></a><div class="lst_add"><ul class="__ITEM_LIST"></ul></div><dl class="lst_form"><dt>큐레이터 한마디 <span>(선택사항)</span></dt><dd><textarea name="reason" maxlength="500" class="cmt __REASON" title="큐레이터 한마디"></textarea><span class="txt_length"><em class="__REASON_CNT">0</em>/500자</span><p class="dsc">이 글을 지식리스트에 담은 이유를 남겨주세요.</p></dd></dl></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>확인</strong></a><a href="#" class="__BTN_CANCEL"><span>취소</span></a></div></div>',TEMPLATE_TLIST_ITEM:'<li{if putCount > 0} class="on"{/if}><input type="checkbox" name="checkedCollectionList" value="{=listId}" id="tlist_item_{=listId}"{if putCount > 0} checked{/if}><span class="ico_check"></span><label for="tlist_item_{=listId}">{=title}{if createType == "USER_TEMP"} <span>(비공개)</span>{/if}</label></li>',TEMPLATE_CREATE_LIST:'<div class="layer_use create" id="{=layerListCreateId}" style="display:none"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3>새 지식리스트 만들기</h3></div><div class="layer_cont"><dl class="lst_form"><dt>제목</dt><dd><textarea name="title" maxlength="40" class="tit __TITLE" id="{=layerBaseId}_curation_title" title="제목"></textarea><span class="txt_length"><em class="__TITLE_CNT">0</em>/40자</span><p class="dsc">두 단어 이상을 사용하여 명확하게 작성하면 다른 사용자들이 더 쉽게 이해할 수 있습니다. <em>ex) 이순신(X), 이순신 장군의 해전사(O)</em></p></dd><dt>설명 <span>(선택사항)</span></dt><dd><textarea name="title" maxlength="500" class="txt __DESC" id="{=layerBaseId}_curation_dsc" title="설명"></textarea><span class="txt_length"><em class="__DESC_CNT">0</em>/500자</span></dd></dl></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>확인</strong></a><a href="#" class="__BTN_CANCEL"><span>취소</span></a></div></div>',TEMPLATE_PUT_COMPLETE:'<div class="layer_use add done" id="{=layerPutCompleteId}" style="display:none"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3>지식리스트에 담기</h3></div><div class="layer_cont"><h4><em class="__COMPLETE_CNT">2</em><em>개</em> 지식리스트에 담았습니다.</h4><ul class="lst_add __COMPLETE_LIST"></ul></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>확인</strong></a><a href="#" class="btn_view __BTN_MOVE"><span>지식리스트 보기</span></a></div></div>',TEMPLATE_PUT_COMPLETE_ITEM:"<li>{=title}</li>",TEMPLATE_INTRO:'<div class="layer_use" id="{=layerIntroId}" style="display:none"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3>지식리스트 Beta</h3></div><div class="layer_cont"><h4>유용한 지식리스트를 만들어<br>지식백과 사용자들과 공유해보세요!</h4><ul class="step"><li><strong>1단계</strong><span>새 지식리스트 만들기</span></li><li><strong>2단계</strong><span>주제와 관련된 글을 찾아 지식리스트에 담기</span></li><li><strong>3단계</strong><span>5개 이상의 글을 담으면 운영자의 검토 후 다른 사용자에게 공개될 수 있습니다.</span></li></ul></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>확인</strong></a></div></div>',TEMPLATE_CREATE_LIST_COMPLETE:'<div class="layer_use create done" id="{=layerListCreateCompleteId}" style="display:none"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3>새 지식리스트 만들기 완료</h3></div><div class="layer_cont"><h4><em class="__TITLE"></em><br>지식리스트를 만들었습니다.</h4><div class="box"><ul><li>5개 이상의 글을 담으면 운영자의 검토 후 다른 사용자에게 공개될 수 있습니다.</li><li>건전한 지식 공유 목적에 어긋나는 지식리스트는 비공개 또는 삭제 등 이용제한될 수 있습니다. 자세한 사항은 <a href="/tlist/guide.nhn" target="_blank" [안내]태그제한으로등록되지않습니다-xxonclick="clickcr(this,\'kly_new.policy\',\'\',event);">운영원칙</a>을 참고하시기 바랍니다.</li></ul></div></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>{=btnConfirmLabel}</strong></a></div></div>',TEMPLATE_CLAIM:'<div class="layer_use report" id="{=layerClaimId}" style="display: none;"><iframe width="100%" height" class="i_radio __CLAIM_REASON_CODE"><label for="r2">주제에 맞지 않음</label></dd><dd><input name="reason" type="radio" id="r3" value="ETC" class="i_radio __CLAIM_REASON_CODE"><label for="r3">기타</label></dd><dd><textarea name="desc" maxlength="40" class="cmt __CLAIM_REASON" title="신고내용"></textarea></dd></dl></div><div class="layer_bottom"><a href="#" class="btn_confirm __BTN_CONFIRM"><strong>확인</strong></a><a href="#" class="__BTN_CANCEL"><span>취소</span></a></div></div>',TEMPLATE_CLAIM_COMPLETE:'<div class="layer_use report done" id="{=layerClaimCompleteId}" style="display: none;"><iframe width="100%" height="100%" frameborder="0" title="버그픽스용" class="bug_fix"></iframe><div class="layer_top"><h3</h3></div><div class="layer_cont"><h4><em class="__TITLE"></em><br>지식리스트를 신고하였습니다.</h4></div><div class="layer_bottom"><a href="#" class="__BTN_
첫댓글 ㅋ
ㅋㅋㅋㅋㅋㅋㅋ
이게뭐야
ㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎㅎ