1// global¤Ç¤Î¶¥¹ç¤òËɤ° 2if (typeof SummaryCalendar === "undefined") { 3 // ¥³¥ó¥¹¥È¥é¥¯¥¿ 4 var SummaryCalendar = function() 5 { 6 this.DOMAIN = location.hostname; 7 //alert¤Çɽ¼¨¤µ¤»¤ë¥á¥Ã¥»¡¼¥¸ 8 this.ALERT_MESSEAGE = '¥Ç¡¼¥¿¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿'; 9 //alert¤Çɽ¼¨¤µ¤»¤ë¥á¥Ã¥»¡¼¥¸ 10 this.NO_DATA_MESSAGE = 'ͽÌó¼õÉÕ½àÈ÷Ãæ¤Ç¤¹'; 11 // console.log 12 this.DEBUG = false; 13 }; 14 /** 15 * AlertMessage»ØÄê´Ø¿ô 16 * 17 * @params string message 18 * 19 * @return ¤Ê¤· 20 */ 21 SummaryCalendar.prototype.setAlertMessage = function(message) 22 { 23 SummaryCalendar.ALERT_MESSEAGE = message; 24 }; 25 26 /** 27 * AlertMessage¼èÆÀ´Ø¿ô 28 * 29 * @params ¤Ê¤· 30 * 31 * @return value string csv·Á¼°¤Îʸ»úÎó 32 */ 33 SummaryCalendar.prototype.getAlertMessage = function() 34 { 35 return SummaryCalendar.ALERT_MESSEAGE; 36 }; 37 38 /** 39 * NoData¼èÆÀ´Ø¿ô 40 * 41 * @params ¤Ê¤· 42 * 43 * @return value string 44 */ 45 SummaryCalendar.prototype.getNoDataMessage = function() 46 { 47 return SummaryCalendar.NO_DATA_MESSEAGE; 48 }; 49 50 /** 51 * ¶õ,undefined,nullȽÄê¤ò¹Ô¤¤¡¢Ãͤ¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ì¤Ðfalse¤òÊÖ¤¹ 52 * 53 * @params value string or integer 54 * 55 * @return true or false bool ȽÄê·ë²Ì 56 */ 57 SummaryCalendar.prototype.checkEmpty = function(value) 58 { 59 if (value == undefined) { 60 return true; 61 } 62 if (value == null) { 63 return true; 64 } 65 if (value == '') { 66 return true; 67 } 68 return false; 69 }; 70 71 /** 72 * ÇÛÎó¤òcsv¤ËÊÑ´¹¤¹¤ë´Ø¿ô 73 * 74 * @params array array csv¤ËÊÑ´¹¤·¤¿¤¤ÇÛÎó 75 * 76 * @return value string csv·Á¼°¤Îʸ»úÎó 77 */ 78 SummaryCalendar.prototype.arrayToCsv = function(array) 79 { 80 if (array == undefined) return ''; 81 var value = ''; 82 for (var i = 0; i < array.length; i++) { 83 if (i == (array.length - 1)) { 84 value += array[i]; 85 } else { 86 value += array[i] + ","; 87 } 88 } 89 return value; 90 }; 91 92 /** 93 * %s¤ò»ØÄꤷ¤¿Ê¸»úÎó¤ËÃÖ´¹¤¹¤ë 94 * 95 * @params template string %s¤ò´Þ¤àʸ»úÎó 96 * @params array array %s¤ËÂбþ¤¹¤ëʸ»ú 97 * 98 * @ return template string %s¤òÇÛÎó¤Îʸ»ú¤ËÊÑ´¹¤·¤¿¤â¤Î 99 */ 100 SummaryCalendar.prototype.sprintf = function(template, array) 101 { 102 for (var i = 0; i < array.length; i++) { 103 template = template.replace('%s', array[i]); 104 } 105 return template; 106 }; 107 108 /** 109 * ÇÛÎó¤Î½ÅÊ£Ãͤòºï½ü¤¹¤ë 110 * 111 * @params array array ½ÅÊ£Ãͤòºï½ü¤·¤¿¤¤ÇÛÎó 112 * 113 * @return array array ½ÅÊ£Ãͤòºï½ü¤·¤¿ÇÛÎó 114 */ 115 SummaryCalendar.prototype.uniqueArray = function(array) 116 { 117 var unique_array = array.filter(function(element, index, self) 118 { 119 return self.indexOf(element) === index; 120 }); 121 return unique_array; 122 }; 123 124 /** 125 * È󯱴ü½èÍý¤Ç¤Î¥Ç¡¼¥¿¼èÆÀ 126 * ¥³¡¼¥ë¤¹¤ë¦¤Çwhen,done,fail¤ò½¦¤¦Àß·× 127 * 128 * @params type string 'GET' or 'POST' 129 * @params url string ¼èÆÀ¤·¤¿¤¤¥ê¥½¡¼¥¹¤ÎURL 130 * @params data string ¼èÆÀ¤¹¤ëºÝ¤Î¥¯¥¨¥ê 131 * @params dataType string ¼èÆÀ¤·¤Æ¤¯¤ëºÝ¤Îdata¤Î¥¿¥¤¥× 132 * @params timeout integer ¥¿¥¤¥à¥¢¥¦¥ÈÀßÄê 133 * 134 * @return ¤Ê¤· 135 */ 136 SummaryCalendar.prototype.getData = function(type, url, data, dataType, timeout, mimeType) 137 { 138 if (SummaryCalendar.prototype.checkEmpty(type)) type = 'GET'; 139 if (SummaryCalendar.prototype.checkEmpty(url)) return false; 140 if (SummaryCalendar.prototype.checkEmpty(data)) data = ''; 141 if (SummaryCalendar.prototype.checkEmpty(dataType)) dataType = 'json'; 142 if (SummaryCalendar.prototype.checkEmpty(timeout)) timeout = 10000; 143 if (SummaryCalendar.prototype.checkEmpty(mimeType)) mimeType = 'application/json'; 144 145 return $.ajax({ 146 type: type, 147 url: url, 148 data: data, 149 dataType: dataType, 150 timeout: timeout, 151 async: true, 152 beforeSend: function(xhr){xhr.overrideMimeType(mimeType);} 153 }); 154 }; 155 156 /** 157 * »ØÄꤷ¤¿selector¤ÎtextÃͤò½ñ¤´¹¤¨¤ë 158 * 159 * @params selector string selector 160 * @params value integer or string ɽ¼¨¤·¤¿¤¤ÃÍ 161 * 162 * @return ¤Ê¤· 163 */ 164 SummaryCalendar.prototype.changeTextValue = function(selector, value) 165 { 166 $(selector).text(value); 167 }; 168 169 /** 170 * »ØÄꤷ¤¿selector¤ÎvalueÃͤò½ñ¤´¹¤¨¤ë 171 * 172 * @params selector string selector 173 * @params value integer or string ɽ¼¨¤·¤¿¤¤ÃÍ 174 * 175 * @return ¤Ê¤· 176 */ 177 SummaryCalendar.prototype.changeValue = function(selector, value) 178 { 179 $(selector).val(value); 180 }; 181 182 /** 183 * api¤ËÅϤ¹¥Ñ¥é¥á¡¼¥¿¤ÎÀ¸À® 184 * 185 * @params selector string selector 186 * @params flag bool ¥¯¥¨¥ê¥Ñ¥é¥á¡¼¥¿¤Ë¶õ¤ÎÃͤòÅϤ·¤¿¤¯¤Ê¤¤»þ¤Ïtrue 187 * 188 * @return string ¥¯¥¨¥ê²½¤·¤¿Ê¸»úÎó 189 */ 190 SummaryCalendar.prototype.convertSendData = function(selector, flag) 191 { 192 if (SummaryCalendar.prototype.checkEmpty(flag)) flag = true; 193 var params = ''; 194 if (flag) { 195 $(selector).each(function(){ 196 if ($(this).val() != '' && $(this).val() != undefined) { 197 params = params + $(this).attr('id') + '=' + $(this).val() + '&'; 198 } 199 }); 200 } else {
201 params = $(selector).serialize(); 202 } 203 return params; 204 } 205 206 /* 207 *AJAXÄÌ¿®¥¹¥Æ¡¼¥¿¥¹¤Î½èÍý 208 * 209 * @param string value 210 * @return bool 211 */ 212 SummaryCalendar.prototype.getAjaxStatus = function(value) 213 { 214 var message_arr = new Array(); 215 message_arr['100'] = "¥Ñ¥é¥á¡¼¥¿ÉÔÀµ"; 216 message_arr['200'] = "ÈÎÇäŹ̵¸ú"; 217 message_arr['300'] = "³ºÅö¥Ç¡¼¥¿¤Ê¤·"; 218 message_arr['400'] = "͸ú´ü¸ÂÀÚ¤ì"; 219 message_arr['900'] = "¥·¥¹¥Æ¥à¥¨¥é¡¼"; 220 message_arr['999'] = "¥á¥ó¥Æ¥Ê¥ó¥¹Ãæ"; 221 message_arr['000'] = "ok"; 222 if (value == "000"){ 223 return true; 224 } else { 225 //alert( message_arr[value]); 226 this.debugLog( message_arr[value]); 227 return false; 228 } 229 }; 230 /** 231 * ¥¹¥Þ¥Û¤« 232 * @param string baitai 233 * @return bool 234 */ 235 SummaryCalendar.prototype.isSMPbyBaitai = function(baitai) 236 { 237 if (this.checkEmpty(baitai) == false) { 238 if (baitai.indexOf('iphone') >= 0) { 239 return true; 240 } 241 } 242 // baitai¤¬¶õ¤Ê¤éUA¤ÇȽÄꤹ¤ë 243 var ua = navigator.userAgent; 244 if (ua.indexOf('iPhone') >= 0 || ua.indexOf('iPod') >= 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) { 245 return true; 246 } 247 return false 248 }; 249 /** 250 * ÆüÉÕ2·å²½ 251 * @param string day 252 * @return string day 253 */ 254 SummaryCalendar.prototype.setDay = function(day) 255 { 256 if (day !== "undefined") { 257 day = Number(day); 258 if (day < 10) { 259 day = "0"+day; 260 } 261 } 262 return day; 263 }; 264 /** 265 * debug 266 * @param string str 267 * @return NONE 268 */ 269 SummaryCalendar.prototype.debugLog = function(str) 270 { 271 //var DEBUG = false; 272 if (SummaryCalendar.DEBUG) { 273 console.log(str); 274 } 275 }; 276} 277 278// to summary_calendar.js 279// to iphone/summary_calendar.js 280
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.