1<!-- 2 // ç¥æ¥é¸æå¯è½ 1 / 鏿ä¸å¯è½ 0 3 // ãã®é¨åã®ã«ã¹ã¿ã ã¯ãgcalendar-holidays.js 118è¡ç® 4 var flag_holiday = 0; 5 6 // date picker 7 $(document).ready(function(){ 8 // æ¥æé¸æå¯å¦ 9 var SunEnd = 1; // 0ãªã鏿ä¸å¯è½ 10 11 // ææé¸æå¯å¦ 12 var MonEnd = 1; // 0ãªã鏿ä¸å¯è½ 13 14 // ç«æé¸æå¯å¦ 15 var TueEnd = 1; // 0ãªã鏿ä¸å¯è½ 16 17 // æ°´æé¸æå¯å¦ 18 var WedEnd = 1; // 0ãªã鏿ä¸å¯è½ 19 20 // æ¨æé¸æå¯å¦ 21 var ThuEnd = 1; // 0ãªã鏿ä¸å¯è½ 22 23 // éæé¸æå¯å¦ 24 var FriEnd = 1; // 0ãªã鏿ä¸å¯è½ 25 26 // åæé¸æå¯å¦ 27 var SatEnd = 1; // 0ãªã鏿ä¸å¯è½ 28 29 // 伿¥ç¹å¥æå® 30 // var holidays = [ '2014-4-30', '', '' ]; 31 var holidays = [ '', '', '' ]; 32 33 // 鱿å®ã§ã®å¤å®ï¼1ï½5ã®è©²å½é±ã®ä¼æ¥ã¨å¹³æ¥ã§åè»¢ï¼ 34 var SunPoint = '0'; // æ¥æ 35 var MonPoint = '0'; // ææ 36 var TuePoint = '0'; // ç«æ 37 var WedPoint = '0'; // æ°´æ 38 var ThuPoint = '0'; // æ¨æ 39 var FriPoint = '0'; // éæ 40 var SatPoint = '0'; // åæ 41 42 43 $('.datedata input').datepicker({ 44 showOn: "both", // button ã«ããã¨ãããªã¬ã¼ããã¿ã³ã®ã¿ã«ãªã 45 buttonImage: "./images/mfp_calendar.gif", 46 buttonImageOnly: false, 47 buttonText: 'ã«ã¬ã³ãã¼', 48 numberOfMonths: 1, 49 dateFormat: "yyå¹´mædæ¥(D)", 50 yearRange: "c-5:c+0", 51 minDate: 0, // ç´æåä»éå§æ¥ 52 //maxDate: "+2M +0D" // ç´æåä»çµäºæ¥ 53 //changeMonth: true, 54 //changeYear: true, 55 //beforeShowDay: $.datepicker.noWeekends 56 beforeShowDay: function(date) { 57 58 59 // 伿¥ç¹å¥æå® 60 for (var i = 0; i < holidays.length; i++) { 61 var htime = Date.parse(holidays[i]); // ç¥æ¥ã 'YYYY-MM-DD' ãã time ã¸å¤æ 62 var holiday = new Date(); 63 holiday.setTime(htime); // ä¸è¨ time ã Date ã¸è¨å® 64 65 // ç¥æ¥ 66 if (holiday.getYear() == date.getYear() && 67 holiday.getMonth() == date.getMonth() && 68 holiday.getDate() == date.getDate()) { 69// return [true, 'special-holiday']; 70 return [false, 'special-holiday']; 71 } 72 } 73 74 // æ¥ææ¥ 75 if (date.getDay() == 0) { 76 // 第ä½é±ã 77 judge = date.getDate(); 78 judge = (judge - 2) / 7; 79 judge = Math.floor(judge); // åãæ¨ã¦ 80 judge = judge + 2; 81 if( date.getDate() < 2) { 82 judge = 1; 83 } 84 if (SunEnd) { 85 if (judge == SunPoint) { 86 return [false, 'gcal-sunday']; 87 } else { 88 return [true, 'gcal-sunday']; 89 } 90 } else { 91 if (judge == SunPoint) { 92 return [true, 'gcal-sunday']; 93 } else { 94 return [false, 'gcal-sunday']; 95 } 96 } 97 } 98 // æææ¥ 99 if (date.getDay() == 1) { 100 // 第ä½é±ã 101 judge = date.getDate(); 102 judge = (judge - 3) / 7; 103 judge = Math.floor(judge); // åãæ¨ã¦ 104 judge = judge + 2; 105 if( date.getDate() < 3) { 106 judge = 1; 107 } 108 if (MonEnd) { 109 if (judge == MonPoint) { 110 return [false, '']; 111 } else { 112 return [true, '']; 113 } 114 } else { 115 if (judge == MonPoint) { 116 return [true, '']; 117 } else { 118 return [false, '']; 119 } 120 } 121 } 122 // ç«ææ¥ 123 if (date.getDay() == 2) { 124 // 第ä½é±ã 125 judge = date.getDate(); 126 judge = (judge - 4) / 7; 127 judge = Math.floor(judge); // åãæ¨ã¦ 128 judge = judge + 2; 129 if( date.getDate() < 4) { 130 judge = 1; 131 } 132 if (TueEnd) { 133 if (judge == TuePoint) { 134 return [false, '']; 135 } else { 136 return [true, '']; 137 } 138 } else { 139 if (judge == TuePoint) { 140 return [true, '']; 141 } else { 142 return [false, '']; 143 } 144 } 145 } 146 // æ°´ææ¥ 147 if (date.getDay() == 3) { 148 // 第ä½é±ã 149 judge = date.getDate(); 150 judge = (judge - 5) / 7; 151 judge = Math.floor(judge); // åãæ¨ã¦ 152 judge = judge + 2; 153 if( date.getDate() < 5) { 154 judge = 1; 155 } 156 if (WedEnd) { 157 if (judge == WedPoint) { 158 return [false, '']; 159 } else { 160 return [true, '']; 161 } 162 } else { 163 if (judge == WedPoint) { 164 return [true, '']; 165 } else { 166 return [false, '']; 167 } 168 } 169 } 170 // æ¨ææ¥ 171 if (date.getDay() == 4) { 172 // 第ä½é±ã 173 judge = date.getDate(); 174 judge = (judge - 6) / 7; 175 judge = Math.floor(judge); // åãæ¨ã¦ 176 judge = judge + 2; 177 if( date.getDate() < 6) { 178 judge = 1; 179 } 180 if (ThuEnd) { 181 if (judge == ThuPoint) { 182 return [false, '']; 183 } else { 184 return [true, '']; 185 } 186 } else { 187 if (judge == ThuPoint) { 188 return [true, '']; 189 } else { 190 return [false, '']; 191 } 192 } 193 } 194 // éææ¥ 195 if (date.getDay() == 5) { 196 // 第ä½é±ã 197 judge = date.getDate(); 198 judge = (judge - 7) / 7; 199 judge = Math.floor(judge); // åãæ¨ã¦ 200 judge = judge + 2; 201 if( date.getDate() < 7) { 202 judge = 1; 203 } 204 if (FriEnd) { 205 if (judge == FriPoint) { 206 return [false, '']; 207 } else { 208 return [true, '']; 209 } 210 } else { 211 if (judge == FriPoint) { 212 return [true, '']; 213 } else { 214 return [false, '']; 215 } 216 } 217 } 218 // åææ¥ 219 if (date.getDay() == 6) { 220 // 第ä½é±ã 221 judge = date.getDate(); 222 judge = (judge - 1) / 7; 223 judge = Math.floor(judge); // åãæ¨ã¦ 224 judge = judge + 1; 225 if (SatEnd) { 226 if (judge == SatPoint) { 227 return [false, 'gcal-saturday']; 228 } else { 229 return [true, 'gcal-saturday']; 230 } 231 } else { 232 if (judge == SatPoint) { 233 return [true, 'gcal-saturday']; 234 } else { 235 return [false, 'gcal-saturday']; 236 } 237 } 238 } 239 // å¹³æ¥ 240 return [true, '']; 241 }, 242 onSelect: function(dateText, inst) { 243 $("#date_val").val(dateText); 244 } 245 }); 246 247 248 249 // ã¤ã³ã©ã¤ã³ã§ã®ååèªã¿è¾¼ã¿æã§ç¥æ¥è¡¨ç¤ºåé¡ã¸ã®å¯¾ç 250 $(".ui-datepicker-next").trigger("click"); 251 $(".ui-datepicker-prev").trigger("click"); 252 }); 253 254//-->
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.