1/** 2 * IEãã§ãã¯ã 3 * @return true - IE / false - IEä»¥å¤ 4 */ 5function checkIE() { 6 return (0 <= window.navigator.userAgent.indexOf("MSIE")); 7} 8 9/** 10 * <select:multiple>ã®ãªã¹ãã«é ç®ã追å ããã 11 * @param selectObj 12 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 13 * @param motoSelectObj 14 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 15 */ 16function setSelectionItem(selectObj, motoSelectObj) { 17 _setSelectionItem(selectObj, motoSelectObj, false); 18} 19 20/** 21 * <select:multiple>ã®ãªã¹ãã«å ¨é ç®ã追å ããã 22 * @param selectObj 23 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 24 * @param motoSelectObj 25 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 26 */ 27function copyAllSelectionItem(selectObj, motoSelectObj) { 28 _setSelectionItem(selectObj, motoSelectObj, true); 29} 30 31/** 32 * <select:multiple>ã®ãªã¹ãã«é ç®ã追å ããã 33 * @param selectObj 34 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 35 * @param motoSelectObj 36 * é ç®è¿½å å <select> ãªãã¸ã§ã¯ã 37 * @param isAll 38 * true : å ¨é ç®ã³ãã¼ / false : æå®é ç®ã³ãã¼ 39 */ 40function _setSelectionItem(selectObj, motoSelectObj, isAll) { 41 if (selectObj != null && motoSelectObj != null) { 42 if (selectObj.length != null && motoSelectObj.length != null) { 43 for (i = 0; i < motoSelectObj.length; i++) { 44 if (motoSelectObj.options[i].selected || isAll) { 45 var key = motoSelectObj.options[i].value; 46 var val = motoSelectObj.options[i].text; 47 var len = selectObj.options.length; 48 49 var add = true; 50 for (j = 0; j < selectObj.length; j++) { 51 // æ¢ã«è¿½å ããã¦ãããã追å ããªãï¼ï¼ 52 if (selectObj.options[j].value == key) { 53 add = false; 54 } 55 } 56 57 if (add) { 58 selectObj.options[len] = new Option(val, key); 59 } 60 } 61 } 62 } 63 } 64} 65 66/** 67 * <select:multiple>ã®ãªã¹ãã®å ¨é ç®ãåé¤ããã 68 * @param selectObj 69 * <select> ãªãã¸ã§ã¯ã 70 */ 71function clearAllSelectionItem(selectObj) { 72 __clearSelectionItem(selectObj, true); 73} 74 75/** 76 * <select:multiple>ã®ãªã¹ãã®æå®é ç®ãåé¤ããã 77 * @param selectObj 78 * <select> ãªãã¸ã§ã¯ã 79 */ 80function clearSelectionItem(selectObj) { 81 __clearSelectionItem(selectObj, false); 82} 83 84/** 85 * <select:multiple>ã®ãªã¹ãã®æå®é ç®ãåé¤ããã 86 * @param selectObj 87 * <select> ãªãã¸ã§ã¯ã 88 * @param index 89 * é åçªå· 90 */ 91function _clearSelectionItem(selectObj, index) { 92 if (selectObj != null) { 93 if (selectObj.length != null && selectObj.length != 0) { 94 selectObj.options[index] = null; 95 } 96 } 97} 98 99/** 100 * <select:multiple>ã®ãªã¹ãã®æå®é ç®ãåé¤ããã 101 * @param selectObj 102 * <select> ãªãã¸ã§ã¯ã 103 * @param isAll 104 * true : å ¨é ç®åé¤ / false : æå®é ç®åé¤ 105 */ 106function __clearSelectionItem(selectObj, isAll) { 107 if (selectObj != null) { 108 if (selectObj.length != null) { 109 // é åã®å¾æ¹ã«ãããã¼ã¿ããé ã«åé¤ï¼åæ¹ããã ã¨éä¸ã§é åçªå·å¤ãã£ã¦ãã¾ãçºï¼ 110 for (i = selectObj.length - 1; i >= 0; i--) { 111 if (selectObj.options[i].selected || isAll) { 112 _clearSelectionItem(selectObj, i); 113 } 114 } 115 } 116 } 117} 118 119/** 120 * <select:multiple>ã®ãªã¹ãæ°ãè¨ç®ããã 121 * @param selectObj 122 * <select> ãªãã¸ã§ã¯ã 123 */ 124function getSelectionItemNumber(selectObj) { 125 if (selectObj != null) { 126 if (selectObj.length != null) { 127 return selectObj.length; 128 } 129 } 130} 131 132/** 133 * <select:multiple>ã®ãªã¹ããéä¿¡æã«é¸æç¶æ ã«ããã 134 * @param selectObj 135 * <select> ãªãã¸ã§ã¯ã 136 */ 137function sendSelectionState(selectObj) { 138 selectionStateOn(selectObj); 139} 140 141/** 142 * <select:multiple>ã®ãªã¹ããé¸æç¶æ ã«ããã 143 * @param selectObj 144 * <select> ãªãã¸ã§ã¯ã 145 */ 146function selectionStateOn(selectObj) { 147 if (selectObj != null) { 148 if (selectObj.length != null) { 149 for (i = 0; i < selectObj.length; i++) { 150 if (selectObj.options) { 151 selectObj.options[i].selected = true; 152 } 153 } 154 } 155 } 156} 157 158/** 159 * <select:multiple>ã®ãªã¹ããé¸æç¶æ ã«ããã 160 * @param selectObj 161 * <select> ãªãã¸ã§ã¯ã 162 * @param appointAry 163 * é å夿°(new Array[]) 164 */ 165function selectionStateOnAppoint(selectObj, appointAry) { 166 if (selectObj != null) { 167 if (selectObj.length != null) { 168 if (appointAry != null) { 169 if (appointAry.length != null) { 170 for (i = 0; i < selectObj.length; i++) { 171 for (j = 0; j < appointAry.length; j++) { 172 if (selectObj.options[i].value == appointAry[j]) { 173 selectObj.options[i].selected = true; 174 break; 175 } 176 } 177 } 178 } 179 } 180 } 181 } 182} 183 184/** 185 * <select:multiple>ã®ãªã¹ããé¸æè§£é¤ç¶æ ã«ããã 186 * @param selectObj 187 * <select> ãªãã¸ã§ã¯ã 188 */ 189function selectionStateOff(selectObj) { 190 if (selectObj != null) { 191 if (selectObj.length != null) { 192 for (i = 0; i < selectObj.length; i++) { 193 if (selectObj.options) { 194 selectObj.options[i].selected = false; 195 } 196 } 197 } 198 } 199} 200 201/** 202 * <select:multiple>ã®ãªã¹ãã®é ç®ãã䏿¹ã®<select:multiple>ã®ãªã¹ãã«è©²å½ããé ç®ååé¤ããã 203 * @param targetSelectObj 204 * 鏿é ç® <select> ãªãã¸ã§ã¯ã 205 * @param removeSelectObj 206 * åé¤é ç® <select> ãªãã¸ã§ã¯ã 207 * @param targetAll
208 * å ¨å¯¾è±¡ãã©ã° = trueï¼å¼·å¶å ¨å¯¾è±¡ï¼falseï¼é¸æå¯¾è±¡ 209 */ 210function removeSelectionItem(selectObj, removeSelectObj, targetAll) { 211 if (targetAll) { 212 selectionStateOn(selectObj); 213 } 214 215 if (selectObj != null && removeSelectObj != null) { 216 if (selectObj.length != null && removeSelectObj.length != null) { 217 for (i = 0; i < selectObj.length; i++) { 218 if (selectObj.options[i].selected) { 219 var key = selectObj.options[i].value; 220 221 for (j = 0; j < removeSelectObj.length; j++) { 222 // 該å½ããããªã¹ãããåé¤ï¼ï¼ 223 if (removeSelectObj.options[j].value == key) { 224 _clearSelectionItem(removeSelectObj, j) 225 break; 226 } 227 } 228 } 229 } 230 } 231 } 232 233 if (targetAll) { 234 selectionStateOff(selectObj); 235 } 236} 237 238/** 239 * ãããã¢ããã¦ã£ã³ãã¦ã表示ããã 240 * @param url : URL 241 * @param isNew : true - æ°è¦ã¦ã£ã³ãã¦ä½æ / false - æ¢åã¦ã£ã³ãã¦å©ç¨ 242 */ 243var popWin = null; 244var popWinAry = new Array(0); 245function viewPopup(url, isNew) 246{ 247 var win = null; 248 var winId = "popWin" + (new Date).getTime(); 249 250 if (isNew) { 251 popWinAry[popWinAry.length] = window.open("",winId,"top=0,left=0,width=800 height=800 resizable=yes, scrollbars=yes"); 252 win = popWinAry[popWinAry.length-1]; 253 } else { 254 if (popWin != null) { 255 popWin.close(); 256 } 257 popWin = window.open("",winId,"top=0,left=0,width=600 height=800 resizable=yes, scrollbars=yes"); 258 win = popWin; 259 } 260 261 win.document.location.href = url; 262 win.focus(); 263} 264 265/** 266 * <select>ã®èæ¯è²ã夿´ããã 267 * @param obj : ãªãã¸ã§ã¯ã[select] 268 * @param color : 夿´è² 269 */ 270function changeSelectBgColor(obj, color) 271{ 272/* 273 if (obj) { 274 obj.style.height = '13px'; 275 _changeBgColor(obj, color); 276 } 277*/ 278} 279 280/** 281 * <input:text>ã®èæ¯è²ã夿´ããã 282 * @param obj : ãªãã¸ã§ã¯ã[input:text] 283 * @param color : 夿´è² 284 */ 285function changeTextBgColor(obj, color) 286{ 287 if (obj) { 288 obj.style.margin = '1 1 1 1'; 289 obj.style.height = '15px'; 290 _changeBgColor(obj, color); 291 } 292} 293 294/** 295 * <input:text>ã®èæ¯è²ã夿´ããã 296 * @param obj : ãªãã¸ã§ã¯ã[select or input:text] 297 * @param color : 夿´è² 298 */ 299function _changeBgColor(obj, color) 300{ 301 if (obj) { 302 var form = obj.form; 303 304 if (color == '') { 305 color = '#FFCCFF'; 306 } 307 308 obj.style.borderStyle = 'solid'; 309 obj.style.borderWidth = '1 1 1 1'; 310 obj.style.borderColor = '#7F9DB9'; 311 312 if (!(obj.value == '' || obj.value == '0')) { 313 obj.style.backgroundColor = color; 314 } else { 315 obj.style.backgroundColor = '#FFFFFF'; 316 } 317 } 318}
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.