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 ,shoulderTitle = articlePaging.decodeURIComponentSafe(datas.shoulder_title)||"" 135 ,summary = articlePaging.decodeURIComponentSafe(datas.summary)||"" 136 ,userName = articlePaging.decodeURIComponentSafe(datas.user_name)||"" 137 ,link = "/news/articleView.html?idxno="+idxno 138 ,secName = articlePaging.decodeURIComponentSafe(datas.sectionTitle)||"" 139 ,pubDate = datas.pub_date||"" 140 ,viewDate = datas.viewDate||"" 141 ,viewTime = datas.viewTime||"" 142 ,imgIcons = datas.imgIcons||"" 143 ,pfile = datas.pfile||"" 144 ,$clone = $("#sample").clone(); 145 146 if (typeof $clone == "object") { 147 switch (articlePaging.vars.viewType) { 148 case "curation": // íë ì´ì 149 $clone.removeClass("blind").removeClass('dis-none').removeAttr("id").addClass("columns"); 150 if (defaultImgUrl) { // ì´ë¯¸ì§ê° ìì ê²½ì° 151 $clone.find(".panel-image").attr("style", "background-image:url("+defaultImgUrl+")").html(chAltTitle); 152 } else $clone.find(".list-image").remove(); // ì´ë¯¸ì§ê° ìì ê²½ì° 153 154 $clone.find("a").attr("href", link).attr("target","_top").end(). 155 find(".panel-block-title").html(chAltTitle).end(). 156 find(".panel-block-dated").html(viewDate.replace( /-/gi, '. ')).end(). 157 find(".panel-block-names").html(userName); 158 159 $(".curation-content>.curation-list").append($clone); 160 break; 161 162 default: // 기본í 163 $clone.removeClass("blind").removeAttr("id"); // sampleí기ìì 164 $('.linked', $clone).attr("href", link).attr("target","_top"); // ë§í¬ 165 $('.replace-titles', $clone).html(title); // ì 목 166 $('.replace-shoulder', $clone).html(shoulderTitle); // ì´ê¹¨ì 목 167 $('.icon', $clone).replaceWith(imgIcons); // ìì´ì½ 168 $('.replace-read', $clone).html(summary); // ë´ì© 169 $('.replace-section', $clone).html(secName); // ì¹ì 170 $('.replace-name', $clone).html(userName); // ì´ë¦ 171 $('.replace-date', $clone).html(viewDate + ' ' + viewTime); // ë ì§ 172 if(defaultImgUrl) $('.replace-thumb', $clone).attr("src", defaultImgUrl); // ì¸ë¤ì¼ 173 else $('a.thumb', $clone).parent('li.items').addClass('noimage').end().remove(); 174 175 // íë¡í ì¬ì§ 176 if (pfile!="") { 177 $(".replace-profile", $clone).html("<img src=\""+pfile+"\" alt=\""+userName+"\" \>"); 178 } 179 180 //ê³µì í기 ë²í¼ 181 if($('.replace-share', $clone).length) { 182 $.ajax({
183 type: "post", 184 dataType: "html", 185 url: "/news/articleListSnsShareEntity.inc.php", 186 data:{ 187 "idxno":idxno 188 ,"defaultImgUrl":defaultImgUrl 189 ,"title":title 190 ,"summary":summary 191 }, 192 success: function(html) { 193 $('.replace-share', $clone).replaceWith(html); 194 $dataList.append($clone); 195 } 196 }); 197 }else{ 198 $dataList.append($clone); 199 } 200 break; 201 } 202 } 203 } 204 $this.attr("data-page", tmpParams['page']); 205 } else { 206 alert(json.msg); 207 } 208 }, 209 error: function(e) { 210 alert('ì ì ì²ë¦¬ ëì§ ìììµëë¤.'); 211 }, 212 complete:function(e) { 213 // ë보기 ë§í¬ ë³´ì´ê¸° 214 if(articlePaging.vars.pagingType == "more") { 215 if(e.responseJSON.data.length <= 0) { 216 $this.html('ëì´ì 기ì¬ê° ììµëë¤').fadeOut(1000); 217 }else{ 218 $this.html('ë보기 <i class=\"icon-angle-down-min\"></i>'); 219 } 220 } 221 else $this.html(''); 222 223 if(typeof masonryProcess !== 'undefined' && $.isFunction(masonryProcess)) { 224 masonryProcess(); 225 } 226 227 articlePaging.vars.isCalling = false; 228 } 229 }); 230 } 231 232 ,decodeURIComponentSafe:function(str) { 233 return decodeURIComponent((str + '') 234 .replace(/%(?![\da-f]{2})/gi, function() { 235 return '%25'; 236 }).replace(/\+/g, '%20')); 237 } 238};
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.