1/******************/ 2/** ê¸°ì¬ íì´ì§ **/ 3/******************/ 4 5var articlePaging = { 6 vars:{ 7 pagingType : null 8 ,viewType : null 9 ,params : null 10 ,nowPage : null 11 ,device : "pc" 12 ,empty : false 13 ,isCalling : false 14 } 15 16 // ë보기 17 ,evtMoreList:function() { 18 $(".list-btn-more").on("click", function() { 19 var $this = $(this); 20 articlePaging.vars.nowPage = $this.attr("data-page"); 21 articlePaging.callData(); 22 }); 23 } 24 25 // ì¤í¬ë¡¤ 26 ,evtScrollList:function() { 27 var $target = $(".list-btn-more"), scroll_stop = false; 28 29 $target.on("click", function() { 30 var $this = $(this); 31 articlePaging.vars.nowPage = $this.attr("data-page"); 32 articlePaging.callData(); 33 }); 34 35 // ì¤í¬ë¡¤ ëì ë¤ë¤ë¥´ë©´ ì¬í¸ì¶ 36 var $window = $(window) 37 ,$document = $(document) 38 ,$elem = $(".list-page"); 39 40 $window.scroll(function() { 41 var docViewTop = $window.scrollTop(); 42 var docViewBottom = docViewTop + $window.height(); 43 var elemTop = $elem.offset().top; 44 var elemBottom = elemTop + $elem.height(); 45 //console.log(elemBottom + "<=" + docViewBottom + " && " + elemTop + ">=" + docViewTop); 46 if ((elemBottom <= docViewBottom) && (elemTop >= docViewTop) && scroll_stop == false && articlePaging.vars.isCalling == false) { 47 scroll_stop = true; 48 setTimeout(function() { 49 $target.trigger("click"); 50 scroll_stop = false; 51 }, 400); 52 } 53 /* ì본 ë´ì© - 모ë°ì¼ ë문ì .list-page ììê° ì¤í¬ë¡¤ì ë¤ë¤ë¥´ë©´ íì´ì§ í´ë¦íëë¡ ë³ê²½í¨ 54 if($window.scrollTop()>=($document.height()-$window.height())){ 55 $target.trigger("click"); 56 }*/ 57 }); 58 } 59 60 // ë°ì´í° í¸ì¶ 61 ,callData:function() { 62 if(articlePaging.vars.empty || this.vars.isCalling!==false) return false; 63 64 var $this = $(".list-btn-more") 65 $dataList = $("#section-list > ul") 66 ,tmpParams = this.vars.params 67 ,nowPage = this.vars.nowPage; 68 69 // ì¤í ì¤ ìí íì 70 this.vars.isCalling = true; 71 72 // íì´ì§ ì¦ê° 73 tmpParams['page'] = parseInt(nowPage)+1; 74 75 // íì´ì§ ì íì íì¸ (v11-fl-v2) 76 var pageNum=this.vars.params['list_per_page']||0, 77 limitNum=this.vars.params['list_page_limit']||0, 78 limit=parseInt(pageNum)*parseInt(limitNum); 79 80 if (limit>0 && tmpParams['page'] > limitNum) { 81 alert("ìì ì ì¸ ìë¹ì¤ ì´ìì ìí´ ë´ì¤ ê²ì 결과를 "+limit+"ê±´ê¹ì§ ì ê³µí©ëë¤."); 82 return false; 83 } 84 85 // ë보기 ë¡ë© 86 $this.html('<i class=\"icon-spinner animate-spin\"></i>'); 87 88 $.ajax({ 89 type: "GET", 90 dataType: "json", 91 url: "/news/ajaxArticlePaging.php", 92 data:{ 93 "total":tmpParams['total'] 94 ,"list_per_page":tmpParams['list_per_page'] 95 ,"page_per_page":tmpParams['page_per_page'] 96 ,"page":tmpParams['page'] 97 ,"sc_section_code":tmpParams['sc_section_code'] 98 ,"sc_sub_section_code":tmpParams['sc_sub_section_code'] 99 ,"sc_serial_code":tmpParams['sc_serial_code'] 100 ,"sc_area":tmpParams['sc_area'] 101 ,"sc_level":tmpParams['sc_level'] 102 ,"sc_article_type":tmpParams['sc_article_type'] 103 ,"sc_view_level":tmpParams['sc_view_level'] 104 ,"sc_sdate":tmpParams['sc_sdate'] 105 ,"sc_edate":tmpParams['sc_edate'] 106 ,"sc_serial_number":tmpParams['sc_serial_number'] 107 ,"sc_word":tmpParams['sc_word'] 108 ,"sc_word2":tmpParams['sc_word2'] 109 ,"sc_andor":tmpParams['sc_andor'] 110 ,"sc_order_by":tmpParams['sc_order_by'] 111 ,"view_type":tmpParams['view_type'] 112 ,"sc_multi_code":tmpParams['sc_multi_code'] 113 ,"sc_is_image":tmpParams['sc_is_image'] 114 ,"sc_is_movie":tmpParams['sc_is_movie'] 115 ,"sc_user_name":tmpParams['sc_user_name'] 116 ,"box_idxno":tmpParams['box_idxno'] 117 }, 118 success: function(json) { 119 if (json.result == 'success') { 120 121 //console.log(json.data); 122 123 if(json.data.length <= 0) { 124 articlePaging.vars.empty = true; 125 return false; 126 } 127 128 for(var i=0;i<json.data.length;i++) { 129 var datas = json.data[i] 130 ,idxno = datas.idxno 131 ,defaultImgUrl = decodeURIComponent(datas.default_img_url)||""
132 ,title = articlePaging.decodeURIComponentSafe(datas.title)||"" 133 ,chAltTitle = articlePaging.decodeURIComponentSafe(datas.chAltTitle)||"" 134 ,summary = articlePaging.decodeURIComponentSafe(datas.summary)||"" 135 ,userName = articlePaging.decodeURIComponentSafe(datas.user_name)||"" 136 ,link = "/news/articleView.html?idxno="+idxno+"&page="+(tmpParams["page"]||"")+"&total="+(tmpParams["total"]||"") 137 ,secName = articlePaging.decodeURIComponentSafe(datas.sectionTitle)||"" 138 ,pubDate = datas.pub_date||"" 139 ,viewDate = datas.viewDate||"" 140 ,viewTime = datas.viewTime||"" 141 ,imgIcons = datas.imgIcons||"" 142 ,pfile = datas.pfile||"" 143 ,$clone = $("#sample").clone(); 144 145 if (typeof $clone == "object") { 146 switch (articlePaging.vars.viewType) { 147 case "curation": // íë ì´ì 148 $clone.removeClass("blind").removeClass('dis-none').removeAttr("id").addClass("columns"); 149 if (defaultImgUrl) { // ì´ë¯¸ì§ê° ìì ê²½ì° 150 $clone.find(".panel-image").attr("style", "background-image:url("+defaultImgUrl+")").html(chAltTitle); 151 } else $clone.find(".list-image").remove(); // ì´ë¯¸ì§ê° ìì ê²½ì° 152 153 $clone.find("a").attr("href", link).attr("target","_top").end(). 154 find(".panel-block-title").html(chAltTitle).end(). 155 find(".panel-block-dated").html(viewDate.replace( /-/gi, '. ')).end(). 156 find(".panel-block-names").html(userName); 157 158 $(".curation-content>.curation-list").append($clone); 159 break; 160 161 default: // 기본í 162 $clone.removeClass("blind").removeAttr("id"); // sampleí기ìì 163 $('.linked', $clone).attr("href", link).attr("target","_top"); // ë§í¬ 164 $('.replace-titles', $clone).html(title); // ì 목 165 $('.icon', $clone).replaceWith(imgIcons); // ìì´ì½ 166 $('.replace-read', $clone).html(summary); // ë´ì© 167 $('.replace-section', $clone).html(secName); // ì¹ì 168 $('.replace-name', $clone).html(userName); // ì´ë¦ 169 $('.replace-date', $clone).html(viewDate + ' ' + viewTime); // ë ì§ 170 if(defaultImgUrl) $('.replace-thumb', $clone).attr("src", defaultImgUrl); // ì¸ë¤ì¼ 171 else $('a.thumb', $clone).parent('li.items').addClass('noimage').end().remove(); 172 173 // íë¡í ì¬ì§ 174 if (pfile!="") { 175 $(".replace-profile", $clone).html("<img src=\""+pfile+"\" alt=\""+userName+"\" \>"); 176 } 177 178 //ê³µì í기 ë²í¼ 179 if($('.replace-share', $clone).length) { 180 $.ajax({
181 type: "post", 182 dataType: "html", 183 url: "/news/articleListSnsShareEntity.inc.php", 184 data:{ 185 "idxno":idxno 186 ,"defaultImgUrl":defaultImgUrl 187 ,"title":title 188 ,"summary":summary 189 }, 190 success: function(html) { 191 $('.replace-share', $clone).replaceWith(html); 192 $dataList.append($clone); 193 } 194 }); 195 }else{ 196 $dataList.append($clone); 197 } 198 break; 199 } 200 } 201 } 202 $this.attr("data-page", tmpParams['page']); 203 } else { 204 alert(json.msg); 205 } 206 }, 207 error: function(e) { 208 alert('ì ì ì²ë¦¬ ëì§ ìììµëë¤.'); 209 }, 210 complete:function(e) { 211 // ë보기 ë§í¬ ë³´ì´ê¸° 212 if(articlePaging.vars.pagingType == "more") { 213 if(e.responseJSON.data.length <= 0) { 214 $this.html('ëì´ì 기ì¬ê° ììµëë¤').fadeOut(1000); 215 }else{ 216 $this.html('ë보기 <i class=\"icon-angle-down-min\"></i>'); 217 } 218 } 219 else $this.html(''); 220 221 if(typeof masonryProcess !== 'undefined' && $.isFunction(masonryProcess)) { 222 masonryProcess(); 223 } 224 225 articlePaging.vars.isCalling = false; 226 } 227 }); 228 } 229 230 ,decodeURIComponentSafe:function(str) { 231 return decodeURIComponent((str + '') 232 .replace(/%(?![\da-f]{2})/gi, function() { 233 return '%25'; 234 }).replace(/\+/g, '%20')); 235 } 236};
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.