1const regex = /\([^)]*\)/; 2const regId = /^[a-z0-9]{6,20}$/; 3const regIdChck = /[^a-z|^0-9]/; 4const regPswd = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,16}$/; 5const regPswdChck = /[^A-Za-z\d@$!%*#?&]/; 6const regTel = /[^0-9]/gi; 7const regEmailDomain = /^[0-9a-zA-Z]([-_\.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,4}$/i; 8const regEmail = /[^0-9a-zA-Z\.]/gi; 9const regEmailId = /[^0-9a-zA-Z\._-]/gi; 10 11$(document).ready(function() { 12 $('.sideMenu .sideButton').click(function(){ 13 $('.sideMenu').toggleClass('active'); 14 }) 15 $('.sitemap .shortcut').click(function(){ 16 $('.sitemap .shortcut').toggleClass('active'); 17 }); 18 $('.sitemap .related').click(function(){ 19 $('.sitemap .related').toggleClass('active'); 20 }); 21}); 22 23 24/** 25 * í¤ë > ë¡ê·¸ì¸í´ë¦ì íì¬ url ì ì¥ 26 * @returns 27 */ 28function getLoginForm(){ 29 30 const url = encodeURIComponent(window.location.pathname + (window.location.search != '' ? window.location.search : '')); 31 32 if(url != null){ 33 location.href="/nmc/user/login?url=" + url; 34 }else{ 35 location.href="/nmc/user/login"; 36 } 37} 38 39/** 40 * ì¤í¬ë¡¤ ë§ê¸° 41 * 42 * @param scroll boolean 43 * @returns 44 */ 45let scrollPosition = 0; 46function toggleBodyScoll(scroll) { 47 const body = document.querySelector('body'); 48 49 if(scroll) { 50 scrollPosition = window.pageYOffset; 51 body.style.overflow = 'hidden'; 52 body.style.position = 'fixed'; 53 body.style.width = '100%' 54 body.style.top = `-${scrollPosition}px`; 55 } else { 56 body.style.removeProperty('overflow'); 57 body.style.removeProperty('position'); 58 body.style.removeProperty('top'); 59 body.style.removeProperty('width'); 60 window.scrollTo(0, scrollPosition); 61 } 62} 63 64/** 65 * í´ë¦½ë³´ëì ë³µì¬ 66 * 67 * @param text 68 * @param itemName 69 * @returns 70 */ 71function copyToClipboard(text, itemName, obj) { 72 let copyElement = document.createElement('textarea'); 73 document.body.appendChild(copyElement); 74 copyElement.setAttribute('display', 'none'); 75 copyElement.value = text; 76 copyElement.select(); 77 copyElement.setSelectionRange(0, 9999); 78 document.execCommand('copy'); 79 copyElement.setSelectionRange(0, 0); 80 document.body.removeChild(copyElement); 81 82 let alertMsg = 'í´ë¦½ë³´ëì ' + ((itemName != undefined && itemName != '') ? itemName + (checkName(itemName) == 0 ? 'ê° ' : 'ì´ ') : '') + 'ë³µì¬ëììµëë¤.'; 83 84 if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) != true && $('#toastMessage').length < 1) { 85 let toastElement = ''; 86 toastElement += '<div id="toastMessage" style="display: none; position: fixed; top: 20px; left: 50%; transform: translate(-50%, 0); z-index: 9999; width: 100%;">'; 87 toastElement += ' <div style="display:flex; justify-content: center;">'; 88 toastElement += ' <span style="padding: 16px 24px; border-radius: 8px; background: rgba(0,0,0,0.7); color:#fff;">' + alertMsg + '</span>'; 89 toastElement += ' </div>'; 90 toastElement += '</div>'; 91 $('body').prepend(toastElement); 92 $('#toastMessage').fadeIn(500); 93 setTimeout(function(){ 94 $('#toastMessage').fadeOut(500); 95 setTimeout(function() { 96 $('#toastMessage').remove(); 97 }, 1000); 98 }, 2000); 99 } 100 101 if(obj != undefined || obj != null){ 102 $(obj).focus(); 103 } 104 105} 106 107/** íì¼ ë¤ì´ë¡ë 108 * 109 * @param atchFileId 110 * @param atchFileSn 111 * @returns 112 */ 113function downloadFile(atchFileId , atchFileSn) { 114 window.open('/common'+ '/file/download?atchFileId=' + atchFileId + '&atchFileSn=' + atchFileSn , 'hiddenFrame'); 115} 116 117function cancelJoin(siteId){ 118 if(confirm("íìê°ì ì ì·¨ìíìê² ìµëê¹? íì¬ ì ë³´ë ì ì¥ëì§ ììµëë¤.")){ 119 location.href='/' + siteId + '/main'; 120 } 121} 122 123/** 124 * ì¿ í¤ ì¤ì 125 * 126 * @param name ì¿ í¤ ì´ë¦ 127 * @param value ì¿ í¤ ê° 128 * @param expire ë§ë£ì¼ì 129 * @returns 130 */ 131function setCookie(name, value, expire) { 132 document.cookie = name + '=' + value + ';expires=' + expire + ';'; 133} 134 135/** 136 * ì¿ í¤ ì¡°í 137 * 138 * @param name ì¿ í¤ ì´ë¦ 139 * @returns 140 */ 141function getCookie(name) { 142 let cookieString = document.cookie.split(";"); 143 let cookieValue = null; 144 $.each(cookieString, function(idx, item) { 145 let cookieName = item.split("=")[0].trim(); 146 if(cookieName == name) { 147 cookieValue = item.split("=")[1].trim(); 148 return; 149 } 150 }); 151 return cookieValue; 152} 153 154/** 155 * ì§ë íì¶í기 156 * 157 * @param id íê·¸ ìì´ë 158 * @param name ìì¹ëª (ë¹ ë¥¸ê¸¸ì°¾ê¸°ì©) 159 * @param lat ìë 160 * @param lot ê²½ë 161 * @param telno ì íë²í¸ 162 * @returns 163 */ 164function getKakaoMap(id, name, lat, lot, telno) { 165 var mapContainer = document.getElementById('mapModal'); 166 var mapOption = { 167 center: new kakao.maps.LatLng(lat, lot), // ì§ë ì¤ì¬ì¢í 168 level: 4 // ì§ëì íë ë 벨 169 }; 170 171 var map = new kakao.maps.Map(mapContainer, mapOption); // ì§ë ìì± 172 173 var content = ''; 174 content += '<div class="map_info">'; 175 content += ' <div class="map_pin"></div>'; 176 content += ' <div class="map_infoWrap">'; 177 content += ' <div class="map_link">'; 178 content += ' <a href="https://map.kakao.com/link/to/' + name + ',' + lat + ',' + lot + '" target="_blank">ë¹ ë¥¸ê¸¸ 찾기<i></i></a>'; 179 content += ' </div>'; 180 if(telno != undefined && telno != null && telno.trim() != '') { 181 content += ' <div class="map_call">'; 182 content += ' <i></i>' + telno; 183 content += ' </div>'; 184 } 185 content += ' </div>'; 186 content += '</div>'; 187 188 // 커ì¤í ì¤ë²ë ì´ê° íìë ìì¹ì ëë¤ 189 var position = new kakao.maps.LatLng(lat, lot); 190 var customOverlay = new kakao.maps.CustomOverlay({ 191 position: position, 192 content: content 193 }); 194
195 customOverlay.setMap(map); // ì¤ë²ë ì´ ì§ë íì 196}
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.