1$(document).ready(function(){ 2 3 $("#go_main").find("a").attr("href","#cms-print"); 4 5 6 setTimeout(function(){ 7 $('html').removeClass('no-js') 8 }, 500); 9 10 // scrollert ì¤í 11 if($(document).find('.scrollert').length > 0){ 12 setTimeout(function(){ 13 $('.scrollert').scrollert({ 14 //axes: ['y'], 15 preventOuterScroll: false, 16 cssPrefix: 'scrollert', 17 eventNamespace: 'scrollert', 18 contentSelector: null 19 }); 20 }, 20); 21 22 $(window).resize(function () { 23 setTimeout(function () { 24 $('.scrollert').scrollert('update'); 25 }, 50); 26 }); 27 } 28 29 // AOS 30 if($('body').hasClass('aos')){ 31 AOS.init(); 32 } 33 34 // ê³µíµ common 35 App.ShareCommon.init(); 36 37 // ë©ë´ ì°ë tab 모ë°ì¼ select box 38 App.TabMenu.init(); 39 40 // ê´ë ¨ ì¬ì´í¸ 41 App.SelectBox2.init(); 42 43 // table scroll ì¤í 44 if($(document).find('.scrollbox').length > 0){ 45 App.TableScroll.init('sewc'); 46 } 47 48 /* ì´ë¯¸ì§ íëì¶ì */ 49 if($(document).find('.zoom').length > 0){ 50 App.imgZoom.init('sewc'); 51 } 52 53 //í´ë¦½ë³´ë url ë³µì¬ 54 if($(document).find('.share').length > 0){ 55 App.clipBoardCopy.init(); 56 } 57 58 // ë©ì¸íì´ì§ ë´ í ë°ì¤ 59 if($(document).has('.mini-tab-box').length > 0){ 60 App.mainTab.init(); 61 } 62 63}); 64 65 66//----------------------------------------------------------------------------------------- 67//Common 68//----------------------------------------------------------------------------------------- 69App.ShareCommon = function () { 70 var self, $this; 71 var scrollTop 72 return { 73 init: function () { 74 75 self = this; 76 77 // top ë²í¼ í´ë¦ 78 if($(document).has('.btn-top').length > 0){ 79 $('.btn-top').click(function(e){ 80 e.preventDefault(); 81 $(window).off('scroll'); 82 $('html, body').stop().animate({ 83 scrollTop : 0 84 }, 300); 85 }); 86 } 87 88 // cms ë ì´ì´íì 89 if($(document).has('.layer-popup-wrap').length > 0){ 90 91 // if($('.layer-popup-outer').find('.layer-popup-wrap.hide-important').length > 0){ 92 // $('.layer-popup-outer').removeClass('on'); 93 // }else{ 94 // $('.layer-popup-outer').addClass('on'); 95 // } 96 97 $('.btn-layer-close').click(function(){ 98 var layerLeng = $('.layer-popup-outer').find('.layer-popup-wrap:visible').length; 99 100 if(layerLeng === 0){ 101 $('.layer-popup-outer').removeClass('on'); 102 $('.layer-popup-outer').hide(); 103 } 104 }); 105 } 106 107 // 컨í ì¸ ë´ ë ì´ì´íì 108 $('.layer-popup-btn').click(self.conLayerPopupOpen); 109 $(document).on("click", '.con-popup-close-btn, .con-popup-chk-btn', self.conLayerPopupClose); 110 111 //ìëì° íì (PC) 112 if($(document).has('.window-popup').length > 0){ 113 self.windowPop; 114 $(window).resize(function(){ 115 self.windowPop; 116 }); 117 } 118 119 }, 120 tabSelect: function() { 121 // ìë¸íì´ì§ ì ê·¼ì± í title="ì íë¨" êµ¬ë¶ 122 if($(document).has('.tab-outer').length > 0){ 123 $('.tab-box ul li').each(function() { 124 if($(this).hasClass('active')){ 125 $(this).find('a').attr('title','ì íë¨'); 126 } 127 }); 128 } 129 }(), 130 131 132 windowPop: function() { 133 // ìëì° íì (pc) / ëë°ì´ì¤ììë ìì°½ì´ë¦¼ 134 $(document).on('click', '.window-popup', function(e){ 135 if($('body').hasClass('pc')){ 136 e.preventDefault(); 137 var popUrl = $(this).attr('href'); 138 $(this).attr('target', ''); 139 window.open(popUrl, 'popup', 'width=1400,height=780,scrollbars=yes'); 140 }else{ 141 $(this).attr('target', '_blank'); 142 } 143 }); 144 }(), 145 conLayerPopupOpen: function() { 146 var popupId = $(this).attr('href'); 147 148 $(this).addClass('lp-open'); // ë ì´ì´íì ë«ì í ë²í¼ì í¬ì»¤ì± ì ì§ ìí í´ëì¤ 149 150 $('.con-layer-popup-wrap' + popupId).addClass('on'); 151 $('.con-layer-popup-wrap' + popupId).children('div').attr('tabindex', 0).focus(); 152 153 $('body').addClass('over-hidden'); 154 }, 155 conLayerPopupClose: function() { 156 $(this).parents('.con-layer-popup-wrap').removeClass('on'); 157 $(this).parents('.con-layer-popup-wrap').children('div').removeAttr('tabindex'); 158 $('body').removeClass('over-hidden'); 159 160 $('.layer-popup-btn.lp-open').focus().removeClass('lp-open'); // ë ì´ì´íì ë²í¼ì¼ë¡ ë¤ì í¬ì»¤ì¤ 161 } 162 } 163}(); 164 165//----------------------------------------------------------------------------------------- 166//select box(related site box) 167//----------------------------------------------------------------------------------------- 168App.SelectBox2 = function(){ 169 var self; 170 var $relatedTitle, $relatedList; 171 return { 172 init: function(){ 173 self = this; 174 $relatedTitle = $(".related-site-title"); 175 $relatedList = $(".related-site"); 176 $relatedTitle.click(self.onClick); 177 178 $(".related-site-wrap").each(function(){ 179 var $thisBox = $(this); 180 181 $thisBox.find(".related-site-title").attr('title', 'ì¶ìë¨'); 182 183 184 $(document).mouseup(function(e){ 185 if($thisBox.has(e.target).length === 0){ 186 187 188 $thisBox.find(".related-site-title").removeClass("active"); 189 $thisBox.find(".related-site-box").hide(); 190 } 191 }); 192 193 }); 194 195 }, 196 onClick: function(e){ 197 e.preventDefault(); 198 $(".related-site-title").attr('title', 'ì¶ìë¨'); 199 $(this).attr('title', 'íì¥ë¨'); 200 $(this).siblings('.related-site-box').toggle(); 201 $(this).toggleClass("active", ""); 202 } 203 } 204}(); 205 206//------------------------------------------------------ 207//object-fit(IE) 208//------------------------------------------------------ 209App.ObjectFit = function () { 210 var self; 211 return { 212 init: function (param) { 213 if ('objectFit' in document.documentElement.style === false) { 214 var container = document.querySelectorAll(param); 215 for (var i = 0; i < container.length; i++) { 216 var imageSource = container[i].querySelector('img').src; 217 container[i].querySelector('img').style.display = 'none'; 218 container[i].style.backgroundSize = 'cover'; 219 container[i].style.backgroundImage = 'url(' + imageSource + ')'; 220 container[i].style.backgroundPosition = '50% 0'; 221 } 222 } 223 } 224 } 225}; 226 227//------------------------------------------------------ 228//table scroll 229//------------------------------------------------------ 230App.TableScroll = function(){ 231 return { 232 init: function(cmsId){ 233 // í ì´ë¸ì .scrollbox í´ëì¤ ì¬ì© ì ì¤í¬ë¡¤ ì´ë¯¸ì§ ì ì©
234 if($(document).has('.table-wrap.scrollbox').length > 0){ 235 var tableScrollImg = '<div class="msg-touch-help"><img src="/_res/' + cmsId + '/_share/img/common/ico-table-scroll.png" alt=""></div>'; 236 $('.table-wrap.scrollbox').append(tableScrollImg); // ìë¡ ì¶ê°(ë§í¬ì ìì± ì ì¤í¬ë¡¤ì´ë¯¸ì§ê° ììë í ì´ë¸ê¹ì§ 모ë ì¶ê°í기 ìí¨.) 237 } 238 239 $(".scrollbox").scroll(function() { 240 $(this).find(".msg-touch-help").fadeOut(); 241 }); 242 } 243 } 244}(); 245 246//------------------------------------------------------ 247//image zoom 248//------------------------------------------------------ 249App.imgZoom = function(){ 250 return { 251 init: function(cmsId){ 252 // ì´ë¯¸ì§ ë°ì¤ì .zoom í´ëì¤ ì¬ì© ì íë ì´ë¯¸ì§ ì ì© 253 if($(document).has('.img-box.zoom').length > 0){ 254 $('.img-box.zoom').each(function(){ 255 var imgSrc = $(this).find('img').attr('src'); 256 var imgZoomIn = '<a href="'+ imgSrc +'" class="zoom-in pc-hide" title="ìì°½ì´ë¦¼" target="_blank"><img src="/_res/' + cmsId + '/_share/img/common/btn-enlargement.gif" alt=""></a>'; 257 $(this).append(imgZoomIn); 258 }); 259 } 260 261 } 262 } 263}(); 264 265//----------------------------------------------------------------------------------------- 266//í´ë¦½ë³´ë url ë³µì¬ 267//----------------------------------------------------------------------------------------- 268App.clipBoardCopy = function () { 269 var self; 270 return { 271 init: function () { 272 273 // í´ë¦½ë³´ë ê°ì²´ ìì± 274 $('a#url-copy').click(function(){ 275 // 276 var url = ''; 277 var textarea = document.createElement("textarea"); 278 document.body.appendChild(textarea); 279 url = window.document.location.href; 280 textarea.value = url; 281 textarea.select(); 282 document.execCommand("copy"); 283 document.body.removeChild(textarea); 284 alert("URLì´ ë³µì¬ëììµëë¤.") 285 }); 286 287 }, 288 // URL ë³µì¬ 289 urlCopy : function(){ 290 291 if( $('.url-copy').length > 0 ) { 292 loadJavascript ( '/_custom/ewha/resource/js/clipboard.min.js'); 293 var $this = $('.url-copy'); 294 //e.preventDefault(); 295 296 $this.attr('data-clipboard-text', window.document.location.href); 297 298 var clipboard = new ClipboardJS('.url-copy'); 299 clipboard.on('success', function(e){ 300 alert('URLì´ ë³µì¬ëììµëë¤.'); 301 e.clearSelection(); 302 }); 303 304 clipboard.on('error', function(e){ 305 alert($m('í´ë¹ 기ë¥ì ì§ìíì§ ìë ë¸ë¼ì°ì ì ëë¤.')); 306 }); 307 } 308 } 309 } 310}(); 311 312//----------------------------------------------------------------------------------------- 313// ë©ì¸íì´ì§ í(ê³µíµ) 314//----------------------------------------------------------------------------------------- 315App.mainTab = function(){ 316 var self; 317 return { 318 init: function(){ 319 self = this; 320 $('.mini-tab-box').find('ul > li > a.mini-board-tab').attr('title', 'ì¶ìë¨'); 321 $('.mini-tab-box').find('ul > li.active > a.mini-board-tab').attr('title', 'íì¥ë¨'); 322 $('.mini-board-tab').on('click', function (e) { 323 if(!$(this).hasClass('link')){ 324 e.preventDefault(); 325 $(this).parent().siblings().removeClass('active'); 326 $(this).parent().addClass('active'); 327 $(this).parent().siblings().find('.mini-board-tab').attr('title','ì¶ìë¨'); 328 $(this).attr('title', 'íì¥ë¨'); 329 } 330 }); 331 } 332 } 333}(); 334 335//------------------------------------------------------ 336// ë©ë´ ì°ë tab 모ë°ì¼ select box 337//------------------------------------------------------ 338App.TabMenu = function () { 339 var self; 340 var $tabSel, $mTab; 341 return { 342 init: function () { 343 self = this; 344 $tabSel = $('.tab-sel'); 345 $mTab = $(".m-tab-box"); 346 347 var select_name = $tabSel.children('option:selected').text(); 348 $tabSel.siblings('label').text(select_name); 349 350 $tabSel.on('change', function () { 351 var url = $(this).val(); 352 if (url) { 353 window.location = url; // redirect 354 } 355 356 return false; 357 }); 358 359 $mTab.click(self.onClick); 360 }, 361 onClick: function(){ 362 $mTab.toggleClass("active"); 363 $tabSel.blur(function(){ 364 $mTab.removeClass("active"); 365 }); 366 } 367 } 368}(); 369 370//----------------------------------------------------------------------------------------- 371// ë ì´ì´íì í¬ì»¤ì± ê´ë ¨ ì ê·¼ì± - ì¤í문ì ë ì´ì´íì ì´ íìí 컨í ì¸ ë´ì ìì± 372//----------------------------------------------------------------------------------------- 373App.layerWai = function () { 374 var self; 375 var layerBox, layerBoxTabbable, layerBoxTabbableFirst, layerBoxTabbableLast; 376 return { 377 init: function (param) { 378 379 layerBox = param;
380 layerBoxTabbable = layerBox.find("button, input:not([type='hidden']), select, iframe, textarea, [href], [tabindex]:not([tabindex='-1'])"); 381 layerBoxTabbableFirst = layerBoxTabbable && layerBoxTabbable.first(); 382 layerBoxTabbableLast = layerBoxTabbable && layerBoxTabbable.last(); 383 384 var tabDisable; 385 386 layerBoxTabbable.length ? layerBoxTabbableFirst.focus().on("keydown", function(event) { 387 // ë ì´ì´ ì´ë¦¬ìë§ì ì´ì ë°ì ì ìë 첫ë²ì§¸ ììë¡ ì´ì ì´ë 388 if (event.shiftKey && (event.keyCode || event.which) === 9) { 389 // Shift + Tabí¤ : ì´ì ë°ì ì ìë 첫ë²ì§¸ ìììì ë§ì§ë§ ììë¡ ì´ì ì´ë 390 event.preventDefault(); 391 layerBoxTabbableLast.focus(); 392 } 393 }) : layerBox.attr("tabindex", "0").focus().on("keydown", function(event){ 394 tabDisable = true; 395 if ((event.keyCode || event.which) === 9) event.preventDefault(); 396 // Tabí¤ / Shift + Tabí¤ : ì´ì ë°ì ì ìë ììê° ìì ê²½ì° ë ì´ì´ ë°ì¼ë¡ ì´ì ì´ë ìëê² 397 }); 398 399 layerBoxTabbableLast.on("keydown", function(event) { 400 if (!event.shiftKey && (event.keyCode || event.which) === 9) { 401 // Tabí¤ : ì´ì ë°ì ì ìë ë§ì§ë§ ìììì 첫ë²ì§¸ ììì¼ë¡ ì´ì ì´ë 402 event.preventDefault(); 403 layerBoxTabbableFirst.focus(); 404 } 405 }); 406 } 407 } 408}();
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.