1// let L_MENU = ['ìì¤í ê´ë¦¬','ì 무 ê´ë¦¬','ííì´ì§ ê´ë¦¬','íìì ê³ ê´ë¦¬','ë©´íì ê³ ê´ë¦¬','êµì¡ ê´ë¦¬']; 2 3let COM_PAGE_ROWS = ['10', '30', '50', '100']; 4 5function cmmAjax(type, dataType, url, param, callback) { 6 $.ajax({ 7 type: type, 8 url: url, 9 data: param, 10 dataType: dataType, 11 success: function(data, status, xr) { 12 return callback(data); 13 }, 14 error: function(xhr, status, error) { 15 return callback(xhr) 16 } 17 }); 18} 19 20function cmmPageClass( page){ 21 22 let cnt = 0; 23 $("#pagination li").each(function(index, el){ 24 25 if($(this).attr('class') === 'first'){ 26 cnt++; 27 } 28 if($(this).attr('class') === 'prev') { 29 cnt++; 30 } 31 32 33 if(index >= cnt) { 34 $(this).removeClass("current"); 35 36 37 //console.log(index+"|"+page+"|"+cnt); 38 if (index === page+cnt - 1) { 39 40 41 $(this).addClass('current'); 42 43 } 44 } 45 // if($(this).attr('class') === 'next') return false; 46 // if($(this).attr('class') === 'last') return false; 47 48 }); 49 50 $("#pagination a").each(function(index, el){ 51 52 53 if(index >= cnt) { 54 $(this).removeAttr("onclick"); 55 //console.log(index+"|"+page+"|"+cnt); 56 if(index=== page+cnt - 1){ 57 58 $(this).attr('onclick', 'return false;'); 59 }else{ 60 61 $(this).attr('onclick','linkPage('+(index-cnt+1)+');return false;') 62 } 63 64 } 65 // console.log(el); 66 67 68 }); 69 70} 71 72function comPagination(data, div ){ 73 74 let page = '<span id="pagination">'; 75 let totalRecordCount = data.totalRecordCount; //ì ì²´ ê²ì물 ê±´ ì 76 let recordCountPerPage = data.recordCountPerPage; //í íì´ì§ë¹ ê²ìëë ê²ì물 ê±´ ì 77 let currentPageNo = data.currentPageNo; //íì¬íì´ì§ 78 let pageSize = data.pageSize; //íì´ì§ 리ì¤í¸ì ê²ìëë íì´ì§ ê±´ì 79 80 let totalPageCount = Math.floor(((totalRecordCount-1)/ recordCountPerPage) + 1); //íì´ì§ ê°ì 81 if(totalPageCount < 1){ 82 $('#'+div).html(''); 83 return false; 84 } 85 if(currentPageNo > totalPageCount) currentPageNo = totalPageCount; 86 let firstPageNoOnPageList = (Math.floor((currentPageNo-1)/pageSize)*pageSize + 1); //íì´ì§ 리ì¤í¸ì 첫 íì´ì§ ë²í¸(start page) 87 let lastPageNoOnPageList = firstPageNoOnPageList+pageSize-1; //íì´ì§ 리ì¤í¸ì ë§ì§ë§ íì´ì§ ë²í¸(end page)
88 let firstRecordIndex = (currentPageNo - 1) * recordCountPerPage; //íì´ì§ SQLì ì¡°ê±´ì ì ì¬ì©ëë ìì rownum(limitStart) 89 let lastRecordIndex = currentPageNo * recordCountPerPage; //íì´ì§ SQLì ì¡°ê±´ì ì ì¬ì©ëë ë§ì§ë§ rownum 90 91 if(lastPageNoOnPageList > totalPageCount){ 92 lastPageNoOnPageList = totalPageCount; 93 } 94 95 let existPrevPage = firstPageNoOnPageList !== 1; 96 let existNextPage = (lastPageNoOnPageList * recordCountPerPage) < totalRecordCount; 97 let prevPageNo = 1; 98 99 if(pageSize < totalPageCount){ 100 101 if(firstPageNoOnPageList-pageSize > 0){ 102 prevPageNo = (firstPageNoOnPageList-pageSize); 103 } 104 page = page + '<li class="first"><a href="?pageIndex=1" onclick="linkPage(1);return false; ">첫 íì´ì§</a></li>' + 105 '<li class="prev"><a href="?pageIndex='+prevPageNo+'" onclick="linkPage('+prevPageNo+'); return false; ">ì´ì íì´ì§</a></li>'; 106 } 107 108 for(let i = firstPageNoOnPageList; i <= lastPageNoOnPageList; i++){ 109 if(currentPageNo === i){ 110 page = page+ '<li class="current"><a onclick="return false;">'+(i)+'</a></li>'; 111 }else{ 112 page = page+ '<li><a href="?pageIndex='+(i)+'" onclick="linkPage('+(i)+');return false; ">'+(i)+'</a></li>'; 113 } 114 115 } 116 117 if(lastPageNoOnPageList < totalPageCount) { 118 page = page + '<li class="next"><a href="?pageIndex='+(lastPageNoOnPageList+1)+'" onclick="linkPage('+(lastPageNoOnPageList+1)+');return false; ">ë¤ì íì´ì§</a></li>' + 119 '<li class="last"><a href="?pageIndex='+totalPageCount+'" onclick="linkPage('+totalPageCount+');return false; ">ë íì´ì§</a></li>'; 120 } 121 page = page+'</span>'; 122 123 $('#'+div).html(page); 124} 125 126/* get request 를 ìí ajax í¨ì ì ì¸ start */ 127function getProgramListForAjax(url, asyncCallbackFn) { 128 fetch(url) 129 .then((response) => response.json()) 130 .then((data) => { 131 asyncCallbackFn(data); 132 }); 133}; 134/* get request 를 ìí ajax í¨ì ì ì¸ end */ 135function comListToArr(vData, vObj){ 136 const oData = []; 137 138 vData.forEach(function(el, index){ 139 oData.push(vData[index][vObj]); 140 }); 141 142 return oData; 143} 144 145 146 147const msgAsyncLayerPopUp = { 148 alert: function(c, callback){ 149 return new Promise((resolve) => { 150 let t1 = "ì림"; 151 let c1 = (c === null || c == "") ? "ë´ì©" : c; 152 let n = "cm-modal-alert"; 153 let tag = "<div class=\"modal-popup fade show small\" id=\"" + n + "\">" 154 tag +=" <div class=\"modal-dialog\">" 155 tag +=" <div class=\"modal-content\">" 156 tag +=" <div class=\"modal-header\">" 157 tag +=" <div class=\"header_inner\">" 158 tag +=" <h4 class=\"modal-title\">" + t1 + "</h4>" 159 tag +=" <span id=\"" + n + "-close\" class=\"close-btn btn-pop-close\">ë«ê¸°</span>" 160 tag +=" </div>" 161 tag +=" </div>" 162 tag +=" <div class=\"modal-body\">" 163 tag +=" <div class=\"modal_content\">" 164 tag +=" <p>" + c1 + "</p>" 165 tag +=" </div>" 166 tag +=" </div>" 167 tag +=" <div class=\"modal-footer\">" 168 tag +=" <button id=\"" + n + "-btn-close\" type=\"button\" class=\"btn-frame gray middle bg-black01\">íì¸</button>" 169 tag +=" </div>" 170 tag +=" </div>" 171 tag +=" </div>" 172 tag +=" </div>"; 173 174 $("#" + n).remove(); 175 $("body").append(tag); 176 $('body').css('overflow', 'hidden'); 177 $("#" + n + "-close").off(); 178 $("#" + n + "-btn-close").off(); 179 $("#"+ n).show(0); 180 $("#" + n + "-close").on("click", {layer:n}, function (e) { 181 e.stopImmediatePropagation(); 182 $("#" + e.data.layer).hide(0); 183 $('body').css('overflow', 'auto'); 184 resolve(); 185 }); 186 $("#" + n + "-btn-close").on("click", {layer:n}, function (e) { 187 e.stopImmediatePropagation(); 188 $("#" + e.data.layer).hide(0); 189 $('body').css('overflow', 'auto'); 190 resolve(); 191 }); 192 193 }).then(callback).catch(function() {}); 194 }, 195 confirm: function(c, callback){ 196 return new Promise((resolve) => { 197 let t1 = "ì í"; 198 let c1 = (c === null || c == "") ? "ë´ì©" : c; 199 let n = "cm-modal-confirm"; 200 let tag = "<div class=\"modal-popup fade show small\" id=\"" + n + "\">" 201 tag +=" <div class=\"modal-dialog\">" 202 tag +=" <div class=\"modal-content\">" 203 tag +=" <div class=\"modal-header\">" 204 tag +=" <div class=\"header_inner\">" 205 tag +=" <h4 class=\"modal-title\">" + t1 + "</h4>" 206 tag +=" <span id=\"" + n + "-close\" class=\"close-btn btn-pop-close\">ë«ê¸°</span>" 207 tag +=" </div>" 208 tag +=" </div>" 209 tag +=" <div class=\"modal-body\">" 210 tag +=" <div class=\"modal_content\">" 211 tag +=" <p>" + c1 + "</p>" 212 tag +=" </div>" 213 tag +=" </div>" 214 tag +=" <div class=\"modal-footer\">" 215 tag +=" <button id=\"" + n + "-btn-ok\" type=\"button\" class=\"btn-frame gray middle bg-black01\">ì</button>" 216 tag +=" " 217 tag +=" <button id=\"" + n + "-btn-close\" type=\"button\" class=\"btn-frame gray middle bg-black01\" style=\"background-color:#ED006D\">ìëì¤</button>" 218 tag +=" </div>" 219 tag +=" </div>" 220 tag +=" </div>" 221 tag +=" </div>"; 222 223 $("#" + n).remove(); 224 $("body").append(tag); 225 $('body').css('overflow', 'hidden'); 226 $("#" + n + "-close").off(); 227 $("#" + n + "-btn-close").off(); 228 $("#" + n + "-btn-ok").off(); 229 $("#"+ n).show(0); 230 $("#" + n + "-close").on("click", {layer:n}, function (e) { 231 e.stopImmediatePropagation(); 232 $("#" + e.data.layer).hide(0); 233 $('body').css('overflow', 'auto'); 234 resolve(false); 235 }); 236 $("#" + n + "-btn-close").on("click", {layer:n}, function (e) { 237 e.stopImmediatePropagation(); 238 $("#" + e.data.layer).hide(0); 239 $('body').css('overflow', 'auto'); 240 resolve(false); 241 }); 242 $("#" + n + "-btn-ok").on("click", {layer:n}, function (e) { 243 e.stopImmediatePropagation(); 244 $("#" + e.data.layer).hide(0); 245 $('body').css('overflow', 'auto'); 246 resolve(true); 247 }); 248 249 }).then(callback).catch(function() {}); 250 }, 251 open: function(n, t){ 252 // 253 }, 254 255}
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.