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