1// javascript 2 3var base_dir = ''; 4 5$(function() { 6 initHeaderMenuButton(); 7 initPageTopButton(); 8 initSiteSearchForm(); 9 initOmikuji(); 10 initPamphlet(); 11 saveAccessLog(); 12}); 13 14// ----- ãããã¼é¨åã®ãã¿ã³ ----- 15function initHeaderMenuButton() { 16 $('a._my_popup_button').on('click', function(){ 17 $($(this).attr('href')).fadeToggle('fast'); 18 return false; 19 }); 20 $('._my_popup_menu').on('mouseleave', function(){ 21 $(this).fadeOut('fast'); 22 return false; 23 }); 24 25 // ã¹ããç¨ 26 $('#navbarSpMenu').on('shown.bs.collapse', function(){ 27 $('[aria-controls="navbarSpMenu"]').html('<i class="fa fa-times"></i>'); 28 }); 29 $('#navbarSpMenu').on('hidden.bs.collapse', function(){ 30 $('[aria-controls="navbarSpMenu"]').html('<i class="fa fa-bars"></i>'); 31 }); 32 33 $('._my_sp_menu_link').on('click', function(){ 34 var link = $(this); 35 var target = link.attr('href'); 36 if ($(target)) { 37 $(target).slideToggle('fast', function(){ 38 if ($(target).css('display') == 'none') { 39 link.removeClass('show'); 40 } 41 else { 42 link.addClass('show'); 43 } 44 }); 45 } 46 return false; 47 }); 48} 49 50// ----- ãã¼ã¸ã®ãããã«æ»ã ----- 51function initPageTopButton() { 52 var pagetop = $('._my_page_top'); 53 $(window).scroll(function () { 54 if ($(this).scrollTop() > 500) { 55 pagetop.fadeIn(); 56 } 57 else { 58 pagetop.fadeOut(); 59 } 60 }); 61 pagetop.click(function () { 62 $('body, html').animate({ scrollTop: 0 }, 500); 63 return false; 64 }); 65} 66 67// ----- ãµã¤ãå æ¤ç´¢ ----- 68function initSiteSearchForm() { 69 $('._my_site_search_form [type="submit"]').on('click', function(){ 70 if ($(this).closest('._my_site_search_form').find('input[type="text"]').val() == '') { 71 alert('æ¤ç´¢ãã¼ã¯ã¼ããå ¥åãã¦ãã ãã'); 72 $('._my_site_search_form input[type="text"]').focus(); 73 return false; 74 } 75 return true; 76 }); 77} 78 79 80 81// ----- ã¹ãã¼ããã©ã³ã®å¤å® ----- 82function isSmartphone() { 83 var ua = navigator.userAgent; 84 if (ua.search(/iphone/i) > 0 || 85 ua.search(/android/i) > 0 && ua.search(/mobile/i) > 0) { 86 return true; 87 } 88 return false; 89} 90 91// ----- ã¤ãã³ãã»ç¥ããã«ã¬ã³ãã¼ã®è¡¨ç¤º ----- 92function viewEventCalendar(ym) { 93 $.ajax({ 94 url : base_dir + '/parts/event_calendar.cgi', 95 type : 'GET' , 96 cache : false , 97 data : { 98 'Mode' : 'viewAjax' , 99 'ym' : ym 100 } , 101 dataType : 'html' 102 }).done(function(data){ 103 $("#event_calendar").html(data); 104 }).fail(function(jqXHR, textStatus) { 105 console.log('[viewEventCalendar] faild: ' + textStatus); 106 }); 107} 108 109// ----- ã¤ãã³ãã»ç¥ ãã¼ä»ãã«ã¬ã³ãã¼ã®è¡¨ç¤º ----- 110function viewEventBarCalendar(ym) { 111 $.ajax({ 112 url : base_dir + '/parts/event_calendar.cgi', 113 type : 'GET' , 114 cache : false , 115 data : { 116 'Mode' : 'top' , 117 'ym' : ym 118 } , 119 dataType : 'html' 120 }).done(function(data){ 121 $("#event_calendar").html(data); 122 }).fail(function(jqXHR, textStatus) { 123 console.log('[viewEventBarCalendar] faild: ' + textStatus); 124 }); 125} 126 127// ----- ãã¿ãã ----- 128function initOmikuji() { 129 $('._my_omikuji a').on('click', function() { 130 $.ajax({ 131 url : base_dir + '/parts/omikuji_view.cgi', 132 type : 'GET' , 133 cache : false , 134 data : { 135 'Mode' : 'viewAjax' 136 } , 137 dataType : 'html' 138 }).done(function(data){ 139 $("#omikuji_dailog .modal-body").html(data); 140 $('#omikuji_dailog').modal('show'); 141 }).fail(function(jqXHR, textStatus) { 142 console.log('[initOmikuji] faild: ' + textStatus); 143 }); 144 return false; 145 }); 146} 147 148// ----- ãã³ãã¬ããã®ã¯ãªã㯠----- 149function initPamphlet() { 150 $('._my_pamphlet_click').on('click', function() { 151 $.ajax({ 152 url : base_dir + '/parts/pamphlet_click.cgi', 153 type : 'GET' , 154 cache : false , 155 data : { 156 'Mode' : 'click', 157 'code' : $(this).data('code'), 158 'number' : $(this).data('number') 159 } , 160 dataType : 'html' 161 }).done(function(data){ 162 163 }).fail(function(jqXHR, textStatus) { 164 console.log('[initPamphlet] faild: ' + textStatus); 165 }); 166 }); 167} 168 169// ----- Google Mapsã®è¡¨ç¤º ----- 170var map; 171function initGoogleMap(mapid,lat,lng,zoom) { 172 directionsDisplay = new google.maps.DirectionsRenderer(); 173 var latlng = new google.maps.LatLng(lat,lng); 174 map = new google.maps.Map(document.getElementById(mapid), { 175 zoom: zoom, 176 center: latlng, 177 navigationControl : true , 178 scaleControl : true , 179 mapTypeId: google.maps.MapTypeId.ROADMAP 180 });
181 directionsDisplay.setMap(map); 182 183 var marker = new google.maps.Marker({ 184 position : latlng, 185 map : map 186 }); 187} 188 189// ----- ã¢ã¯ã»ã¹ãã°è¨é² ----- 190function saveAccessLog() { 191 var now = new Date(); 192 $('._my_footer_wrapper ._my_footer_copy').append('<img src="' + base_dir + '/parts/access_log.cgi?url=' + document.URL + '&t=' + now.getTime() + '" width="1" height="1" border="0" />'); 193}
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.