1//================================================================================================= 2// íë¡ì í¸ : 3// ì²ë¦¬ë´ì© : Ajax를 jQueryì ì°ë 4// ì ì± ì : 2013-04-23 ì´ìë¨ 5//================================================================================================= 6 7if (typeof(AJAX_JS) == 'undefined') 8{ 9 var AJAX_JS = true; 10 11 //------------------------------------------------------------------------------------- 12 // postë¡ ì ì¡íê³ jsonì¼ë¡ 리í´ë°ê¸° 2023-07-14 ê°ëì¸ 13 // $.getJSON() ì 기본ì¼ë¡ ì¡´ì¬í¨ 14 // ------------------------------------------------------------------------------------ 15 $.postJSON = function(url, data,success) 16 { 17 if( !url){ url = ''; } 18 if( !data){ data = ''; } 19 if( !success){ success = function(e){}; } 20 return $.ajax({url:url,data:data,dataType:'json',type:'post',success : success}) 21 } 22 23 //------------------------------------------------------------------------------------- 24 // í¨ìëª : $.dialog 25 // 기 ë¥ : ë¤ì´ìë¡ê·¸ì°½ 26 // ìì±ì¼ : 2013-04-23 ì´ìë¨ 27 // ì°¸ ì¡° : pFile:ì¤ííì¼ëª , pData:íë¼ë©í, pW:í, pH:ëì´ 28 // ------------------------------------------------------------------------------------ 29 $.dialog = function(pFile, pData, pW, pH) 30 { 31 var scrollTop = $(window).scrollTop(); 32 var winLeft = parseInt($(window).width() - pW) / 2; 33 var winTop = parseInt($(window).height() - pH) / 2 + scrollTop; // ìë¨31,íë¨4 를 ëì´ì í¬í¨ 34 35 pSkin = "Txt"; 36 37 $.dialogRemove(); 38 $('<div id="idAjaxHeader"></div>').css({'height':$(document).height()+"px"}).appendTo('body'); 39 $('<div id="idAjaxBody">'+ 40 ' <div id="idAjaxDisplay"></div>'+ 41 ' <div class="ssClear"></div>') 42 .css({ 43 'position' : 'absolute', 44 'top' : winTop+'px', 45 'left' : winLeft+'px', 46 'border' : '0', 47 'width' : parseInt(pW) +'px', 48 'height' : parseInt(pH) +'px', 49 'text-align' : 'center', 50 'background' : '#4b4f52', 51 'z-index' : '998' 52 }).appendTo('body'); 53 54 $('#idAjaxDisplay').css({'width' : pW+'px', 'height' : pH+'px', 'text-align' : 'center', 'overflow' : 'hidden'}); 55 $.insert_old('#idAjaxDisplay', pFile, pData); 56 57 //$("#idAjaxBody ").draggable(); 58 // í´ëì¤ê° draggableì¸ ììì ëëê·¸ 기본 í¨ì를 ì ì©íë¤. 59 $("#idAjaxBody").draggable({ 60 cursor : "move", // cursorìµì ì ëëê·¸ íë ëì ë§ì°ì¤ í¬ì¸í°ì 모ìì ë³íìí´ 61 stack : "#idAjaxBody", // stackìµì ì ëëê·¸ ëìì´ ëë ììë¤ì ìëì¼ë¡ ê¹ì´ ì¤ì ì í´ì¤. ëëê·¸ ëë ììê° ê°ì¥ ìì ì¬ë¼ì´ 62 opacity : 0.7, // ëëê·¸ íë ëì ë¶í¬ëª ëë 0.7 63 containment : 'window', 64 scroll : false, 65 handle : '.xmClose' //ëëê·¸ ì¡ì ì ìë ìì 66 }); 67 68 $("#idAjaxBody").bind("dragstart",function(event, ui){ 69 if ( typeof(Fld_Obj) !== "undefined" && Fld_Obj != null ) 70 { 71 Calendar_Reset(); 72 } 73 }); 74 }; 75 76 //------------------------------------------------------------------------------------- 77 // í¨ìëª : $.dialogRemove 78 // 기 ë¥ : ë¤ì´ìë¡ê·¸ì°½ ìì 기 79 // ìì±ì¼ : 2013-04-23 ì´ìë¨ 80 // ì°¸ ì¡° : 81 // ------------------------------------------------------------------------------------ 82 $.dialogRemove = function() 83 { 84 $("#idAjaxBody").remove(); 85 $("#idAjaxClose").remove(); 86 $("#idAjaxHeader").remove(); 87 if ( typeof(Fld_Obj) !== "undefined" && Fld_Obj != null ) 88 { 89 Calendar_Reset(); 90 } 91 return true; 92 }; 93 94 //------------------------------------------------------------------------------------- 95 // í¨ìëª : $.insert 96 // 기 ë¥ : íì´ì§ insert 97 // ìì±ì¼ : 2013-04-23 ì´ìë¨ 98 // ì°¸ ì¡° : pDiv:DIVëª , pFile:ì¤ííì¼ëª , pData:íë¼ë©í 99 // ------------------------------------------------------------------------------------ 100 $.insert = function(pDiv, pFile, pData) 101 { 102 var pHeight = $(pDiv).height(); 103 var h = (pHeight-16)/2; 104 var html = '<div style="height:'+pHeight+'px;"><div style="padding-top:'+h+'px;text-align:center;"><img src="/images/ajax_small.gif" width="16" height="16" /></div></div>'; 105 $(pDiv).html(html); 106 107 $.post(pFile,pData, function(rtn) 108 { 109 }, "json") 110 .done(function(rtn ) 111 { 112 //console.log(rtn); 113 if( rtn.status == "OK" ) 114 { 115 //alert(rtn.msg); 116 //$(pDiv).html(rtn.data); 117 } 118 else 119 { 120 alert(rtn.msg); 121 } 122 }) 123 .fail(function(jqXHR, textStatus, errorThrown) 124 { 125 //console.log(jqXHR.responseText); 126 alert(jqXHR.responseText); 127 }) 128 .always(function(rtn) 129 { 130 //console.log(rtn); 131 $(pDiv).html(rtn.data); 132 }); 133 }; 134 135 $.insert_old = function(pDiv, pFile, pData) 136 { 137 var pHeight = $(pDiv).height(); 138 var h = (pHeight-16)/2; 139 var html = '<div style="height:'+pHeight+'px;"><div style="padding-top:'+h+'px;text-align:center;"><img src="/images/ajax_small.gif" width="16" height="16" /></div></div>'; 140 $(pDiv).html(html); 141 142 $.post(pFile,pData, function(rtn) 143 { 144 }) 145 .done(function(rtn ) 146 { 147 //console.log(rtn);
148 $(pDiv).html(rtn); 149 }) 150 .fail(function(jqXHR, textStatus, errorThrown) 151 { 152 //console.log(jqXHR.responseText); 153 alert(jqXHR.responseText); 154 }) 155 .always(function(rtn) 156 { 157 //console.log(rtn); 158 }); 159 }; 160 161 //------------------------------------------------------------------------------------- 162 // í¨ìëª : $.dialog 163 // 기 ë¥ : ë¤ì´ìë¡ê·¸ì°½ 164 // ìì±ì¼ : 2013-04-23 ì´ìë¨ 165 // ì°¸ ì¡° : pFile:ì¤ííì¼ëª , pData:íë¼ë©í, pW:í, pH:ëì´ 166 // ------------------------------------------------------------------------------------ 167 $.dialog_div = function(pDiv, pW, pH) 168 { 169 var scrollTop = $(window).scrollTop(); 170 var winLeft = parseInt($(window).width() - pW) / 2; 171 var winTop = parseInt($(window).height() - pH) / 2 + scrollTop; // ìë¨31,íë¨4 를 ëì´ì í¬í¨ 172 var html = '<img src="/images/ajax_small.gif" width="16" height="16" style="width:16px;height:16px;margin-top:'+parseInt((pH/2)-8)+'px" />'; 173 174 pSkin = "Txt"; 175 176 $.dialogRemove_div(pDiv); 177 $('<div id="idAjaxHeader" style="width:100%; top:0; left:0; overflow:hidden; position:absolute; background:#000; filter:Alpha(opacity=70); opacity:0.7; -moz-opacity:0.7; z-index:9997;"></div>').css({'height':$('body').height()+"px"}).appendTo('body'); 178 $('<div id="idAjaxBody">'+ 179 ' <div id="idAjaxDisplay"></div>'+ 180 ' <div class="ssClear"></div>') 181 .css({ 182 'position' : 'absolute', 183 'top' : winTop+'px', 184 'border' : '0', 185 'width' : parseInt(pW) +'px', 186 'height' : parseInt(pH) +'px', 187 'text-align' : 'center', 188 'z-index' : '9998' 189 }).appendTo('body'); 190 191 //'left' : winLeft+'px', 192 193 $('#idAjaxDisplay').css({'width' : pW+'px', 'height' : pH+'px', 'text-align' : 'center', 'overflow' : 'hidden'}).html(html); 194 195 $('#idAjaxDisplay').html(''); 196 $('#'+pDiv).show(); 197 $('#'+pDiv).appendTo('#idAjaxDisplay'); 198 199 //$("#idAjaxBody ").draggable(); 200 // í´ëì¤ê° draggableì¸ ììì ëëê·¸ 기본 í¨ì를 ì ì©íë¤. 201 $("#idAjaxBody").draggable({ 202 cursor : "move", // cursorìµì ì ëëê·¸ íë ëì ë§ì°ì¤ í¬ì¸í°ì 모ìì ë³íìí´ 203 stack : "#idAjaxBody", // stackìµì ì ëëê·¸ ëìì´ ëë ììë¤ì ìëì¼ë¡ ê¹ì´ ì¤ì ì í´ì¤. ëëê·¸ ëë ììê° ê°ì¥ ìì ì¬ë¼ì´ 204 opacity : 0.7, // ëëê·¸ íë ëì ë¶í¬ëª ëë 0.7 205 containment : 'window', 206 scroll : false, 207 handle : '.xmClose' //ëëê·¸ ì¡ì ì ìë ìì 208 }); 209 210 $("#idAjaxBody").bind("dragstart",function(event, ui){ 211 if ( typeof(Fld_Obj) !== "undefined" && Fld_Obj != null ) 212 { 213 Calendar_Reset(); 214 } 215 }); 216 }; 217 218 //------------------------------------------------------------------------------------- 219 // í¨ìëª : $.dialogRemove 220 // 기 ë¥ : ë¤ì´ìë¡ê·¸ì°½ ìì 기 221 // ìì±ì¼ : 2013-04-23 ì´ìë¨ 222 // ì°¸ ì¡° : 223 // ------------------------------------------------------------------------------------ 224 $.dialogRemove_div = function(pDiv) 225 { 226 $("#idAjaxBody").remove(); 227 $("#idAjaxClose").remove(); 228 $("#idAjaxHeader").remove(); 229 $("#"+pDiv).hide(); 230 231 if ( typeof(Fld_Obj) !== "undefined" && Fld_Obj != null ) 232 { 233 Calendar_Reset(); 234 } 235 return true; 236 }; 237 238 239 //------------------------------------------------------------------------------------- 240 // í¨ìëª : 241 // 기 ë¥ : í´ëì¤ëª ì¼ë¡ input boxì ì«ìë§ ì ë ¥ 242 // ìì±ì¼ : 2014-01-28 ê°ëì¸ 243 //------------------------------------------------------------------------------------- 244 245 $(document).ready(function() 246 { 247 // ì«ìì½¤ë§ ìëì ë ¥ 248 $(document).on('keyup keydown',".pc_comma_input", function () 249 { 250 var t_val = $(this).val(); 251 $(this).val(InComma(t_val)); 252 }); 253 254 $(document).on('focus','.pc_comma_input,.ss_num_only',function() 255 { 256 var num = $(this).val(); 257 if(num == 0) 258 { 259 $(this).val(''); 260 } 261 }); 262 263 $(document).on('blur','.pc_comma_input,.ss_num_only',function() 264 { 265 var num = $(this).val(); 266 if(!num) 267 { 268 $(this).val(0); 269 } 270 }); 271 272 // ì íë²í¸ ìëíì´íë£ê¸° 273 if($(".pc_tel_input").length>0) 274 { 275 $(".pc_tel_input").attr('maxlength','14'); 276 } 277 if($(".pc_fax_input").length>0) 278 { 279 $(".pc_fax_input").attr('maxlength','14'); 280 } 281 $(document).on("keyup blur",'.pc_tel_input, .pc_fax_input',function() 282 { 283 var str = $(this).val(); 284 var string = ""; 285
286 string = autoHypenPhone(str) 287 $(this).val(string); 288 }); 289 290 // ë ì§ ì ë ¥ì© datepicker 291 if($(".pc_date_input").length>0) 292 { 293 $(".pc_date_input").datepicker(this); 294 $(".pc_date_input").attr('maxlength','10'); 295 } 296 297 // ë ì ì ë ¥ì© datepicker 298 if(typeof($.monthpicker) !== 'undefined' && $(".pc_month_input").length>0) 299 { 300 $(".pc_month_input").attr('maxlength','7'); 301 $(".pc_month_input").monthpicker(this); 302 } 303 304 // ë ì§, ë ì ì ë ¥ì ì«ìì '-' ë§ì ë ¥ 305 $(document).on('keyup blur',".pc_date_input, .pc_month_input", function () 306 { 307 var t_val = $(this).val(); 308 t_val = t_val.replace(/[^0-9\-]/g, ''); 309 t_val = autoHypenDate(t_val); 310 //console.log(t_val); 311 312 $(this).val(t_val); 313 }); 314 315 // ì¬ì ìë±ë¡ë²í¸ ìëíì´íë£ê¸° 316 if($(".pc_biz_input").length>0) 317 { 318 $(".pc_biz_input").attr('maxlength','12'); 319 } 320 $(document).on("keyup blur",'.pc_biz_input',function() 321 { 322 var str = $(this).val(); 323 var string = ""; 324 325 string = autoHypenBizNo(str) 326 $(this).val(string); 327 }); 328 329 // ë²ì¸ë±ë¡ë²í¸ ìëíì´íë£ê¸° 330 $(document).on("keyup blur",'.pc_biz_input2',function() 331 { 332 var str = $(this).val(); 333 var string = ""; 334 335 string = autoHypenBizNo2(str) 336 $(this).val(string); 337 }); 338 339 // ë ì§ ìëíì´íë£ê¸° 340 if($(".pc_date_input2").length>0) 341 { 342 $(".pc_date_input2").attr('maxlength','10'); 343 } 344 345 $(document).on("keyup blur",'.pc_date_input2',function() 346 { 347 var str = $(this).val(); 348 var string = ""; 349 350 string = autoHypenDate(str) 351 $(this).val(string); 352 }); 353 354 //---------------------------------------------------------------------------- 355 // input í목ì class ë¡ ss_num_only ì§ì íë¤.(ì«ìë§íì©) 356 //---------------------------------------------------------------------------- 357 $(document).on("keypress keyup",'.ss_num_only', function(event) 358 { 359 if(event.type == "keypress") 360 { 361 $(this).css('imeMode','disabled'); 362 363 if(event.which && event.which != 45 && event.which != 46 && (event.which < 48 || event.which > 57) ) 364 { 365 event.preventDefault(); 366 } 367 } 368 else 369 { 370 if( $(this).val() != null && $(this).val() != '' ) 371 { 372 $(this).val( $(this).val().replace(/[^0-9.-]/g, '') ); 373 } 374 else 375 { 376 $(this).val(''); 377 } 378 } 379 }); 380 381 //---------------------------------------------------------------------------- 382 // input í목ì class ë¡ ss_num_coma ì§ì íë¤.(ì«ìíì© + ì«ì 3ì리ìë§ë¤ ì»´ë§ì°ê¸°) 383 //---------------------------------------------------------------------------- 384 $(document).on("focusin keypress keyup",'.ss_num_coma', function(event) 385 { 386 console.log(event.type); 387 388 if(event.type == "keypress") 389 { 390 $(this).css('imeMode','disabled'); 391 392 if(event.which && event.which != 45 && event.which != 46 && (event.which < 48 || event.which > 57 ) ) 393 { 394 event.preventDefault(); 395 } 396 } 397 else if(event.type == "focusin") 398 { 399 var num = $(this).val(); 400 if(num == "0") 401 { 402 $(this).val(''); 403 } 404 } 405 else 406 { 407 if( $(this).val() != null && $(this).val() != '' ) 408 { 409 var tmps = $(this).val().replace(/[^0-9.+-]/g, ''); 410 411 // ììì ìì¹ë¥¼ 기ì¤ì¼ë¡ ì«ì를 ë¶ë¦¬ 412 const parts = tmps.split('.'); 413 414 // ììì ì´ìì ë¶ë¶ìë§ ì¼í ì¶ê° 415 parts[0] = parts[0].replace(/^([-+]?\d+)(\d{3})/, '$1,$2') 416 .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'); 417 418 // ë¤ì í©ì³ì ê²°ê³¼ ìì± 419 const result = parts.join('.'); 420 421 $(this).val(result); 422 } 423 else 424 { 425 $(this).val(''); 426 } 427 } 428 }); 429 430 //---------------------------------------------------------------------------- 431 // ì«ì ì ë ¥ =>
431 ì«ì, ììì , - ì ë ¥ê°ë¥ 432 //---------------------------------------------------------------------------- 433 $(document).on("keydown",".ss_numeric", function(e) 434 { 435 if(event.type == "keypress") 436 { 437 $(this).css('imeMode','disabled'); 438 439 if(event.which && event.which != 45 && event.which != 46 && (event.which < 48 || event.which > 57) ) 440 { 441 event.preventDefault(); 442 } 443 } 444 else 445 { 446 if( $(this).val() != null && $(this).val() != '' ) 447 { 448 $(this).val( $(this).val().replace(/[^0-9.-]/g, '') ); 449 } 450 else 451 { 452 $(this).val(''); 453 } 454 } 455 }); 456 //---------------------------------------------------------------------------- 457 }); 458 459 // monthpicker ì í 460 if(typeof($.monthpicker) !== 'undefined') 461 { 462 $.monthpicker.regional['ko'] = { 463 monthNames: ['1ì(JAN)', '2ì(FEB)', '3ì(MAR)', '4ì(APR)', '5ì(MAY)', '6ì(JUN)', '7ì(JUL)', '8ì(AUG)', '9ì(SEP)', '10ì(OCT)', '11ì(NOV)', '12ì(DEC)'], 464 //monthNamesShort: ['1ì', '2ì', '3ì', '4ì', '5ì', '6ì', '7ì', '8ì', '9ì', '10ì', '11ì', '12ì'], 465 monthNamesShort: ['1ì(JAN)', '2ì(FEB)', '3ì(MAR)', '4ì(APR)', '5ì(MAY)', '6ì(JUN)', '7ì(JUL)', '8ì(AUG)', '9ì(SEP)', '10ì(OCT)', '11ì(NOV)', '12ì(DEC)'], 466 showOn: "focus", 467 //buttonImage: "/images/cal.gif", 468 //buttonImageOnly: true, 469 changeYear: true, 470 yearRange: 'c-2:c+2', 471 dateFormat: 'yy-mm' 472 }; 473 $.monthpicker.setDefaults($.monthpicker.regional['ko']); 474 } 475 476 // datepicker ì í 477 $.datepicker.regional['ko'] = { 478 dateFormat: "yy-mm-dd", 479 changeMonth: true, 480 changeYear: true, 481 yearRange: 'c-80:c+80', // Range of years to display in drop-down 482 showButtonPanel: true, /* ë²í¼ í¨ë ì¬ì© */ 483 showOtherMonths: true, /* ì´ì /ë¤ì ë¬ ì¼ì ë³´ì´ê¸° */ 484 selectOtherMonths: true, /* ì´ì /ë¤ì ë¬ ì¼ ì íí기 */ 485 //showOn: "both", 486 //buttonText: "ë¬ë ¥", 487 //buttonImage: "/images/cal.gif", 488 //buttonImageOnly: true, 489 prevText: 'ì´ì ë¬', 490 nextText: 'ë¤ìë¬', 491 closeText: 'ë«ê¸°', 492 currentText: 'ì¤ë', 493 dayNames : ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 494 dayNamesShort: ['ì¼','ì','í','ì','목','ê¸','í '], 495 dayNamesMin: ['ì¼', 'ì', 'í', 'ì', '목', 'ê¸', 'í '], 496 monthNames : ['1ì', '2ì', '3ì', '4ì', '5ì', '6ì', '7ì', '8ì', '9ì', '10ì', '11ì', '12ì'], 497 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'] , 498 showMonthAfterYear: true, /* ë ê³¼ ë¬ì ìì¹ ë°ê¾¸ê¸° */ 499 beforeShow: function( input ) { 500 setTimeout(function() { 501 var buttonPane = $( input ) 502 .datepicker( "widget" ) 503 .find( ".ui-datepicker-buttonpane" ); 504 505 $( "<button>", { 506 text: "Clear", 507 click: function() { 508 //Code to clear your date field (text box, read only field etc.) I had to remove the line below and add custom code here 509 $.datepicker._clearDate( input ); 510 } 511 }).appendTo( buttonPane ).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all"); 512 }, 1 ); 513 }, 514 onChangeMonthYear: function( year, month, instance ) { 515 setTimeout(function() { 516 var buttonPane = $( instance ) 517 .datepicker( "widget" ) 518 .find( ".ui-datepicker-buttonpane" ); 519 520 $( "<button>", { 521 text: "Clear", 522 click: function() { 523 //Code to clear your date field (text box, read only field etc.) I had to remove the line below and add custom code here 524 $.datepicker._clearDate( instance.input ); 525 } 526 }).appendTo( buttonPane ).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all"); 527 }, 1 ); 528 } 529 }; 530 $.datepicker.setDefaults($.datepicker.regional['ko']); 531 $.datepicker._gotoToday = function(id) { $(id).datepicker('setDate', new Date()).datepicker('hide').blur();} // ì¤ë í´ë¦ì ì¤ëë ì§ ì ë ¥ 532 533 // ë ì ë¬ë ¥ì© 534 var datepicker_month = { 535 currentText: "ì´ë²ë¬", 536 changeMonth: true, 537 changeYear: true, 538 //showOn: 'both', 539 //buttonText: "ë¬ë ¥", 540 //buttonImage: "/images/cal.gif", 541 showButtonPanel: true, 542 yearRange: 'c-99:c+99', 543 showOtherMonths: true, 544 selectOtherMonths: true, 545 monthNames : ['1ì', '2ì', '3ì', '4ì', '5ì', '6ì', '7ì', '8ì', '9ì', '10ì', '11ì', '12ì'], 546 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'] , 547 showMonthAfterYear: true /* ë ê³¼ ë¬ì ìì¹ ë°ê¾¸ê¸° */ 548 }; 549 550 datepicker_month.beforeShow = function () { 551 var selectDate = $(this).val().split("-"); 552 var year = Number(selectDate[0]);
553 var month = Number(selectDate[1]) - 1; 554 $(this).datepicker( "option", "defaultDate", new Date(year, month, 1) ); 555 $(this).datepicker( "option", "dateFormat", "yy-mm"); 556 $(this).datepicker('setDate', new Date(year, month, 1)); 557 }; 558 559 datepicker_month.onChangeMonthYear = function (year, month, inst) { 560 $(this).val($.datepicker.formatDate('yy-mm', new Date(year, month - 1, 1))); 561 $(this).trigger('change'); // ì²´ì¸ì§ì´ë²¤í¸ ìëë°ì 2021-05-29 562 }; 563 564 /* 565 ì¬ì©ë² 2019-04-09 ê°ëì¸ 566 $("#month_dt").datepicker(datepicker_month).focus(function () { $(".ui-datepicker-calendar").hide();}); 567 */ 568 569 // ì ë í¸ë°ì¤ë¥¼ 콤보ë°ì¤ì²ë¼ ë§ë¤ê¸° 2021-07-12 ê°ëì¸ 570 $.widget("custom.combobox", 571 { 572 _create: function() { 573 this.wrapper = $("<span>").addClass("custom-combobox").insertAfter(this.element); 574 this.element.hide(); 575 this._createAutocomplete(); 576 this._createShowAllButton(); 577 }, 578 _createAutocomplete: function() { 579 var selected = this.element.children(":selected"), value = selected.val() ? selected.text() : ""; 580 this.input = $("<input>") 581 .appendTo(this.wrapper) 582 .val(value) 583 .attr("title", "") 584 .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left") 585 .autocomplete({ 586 delay: 0, 587 minLength: 0, 588 source: $.proxy(this, "_source"), 589 // íê¸ í목 커ìë¡ ì íì ì¤ë¥ë°©ì§ 590 focus: function(event, ui) { 591 return false; 592 }, 593 select: function(event, ui) { 594 // ì ííìë ì²ë¦¬ê° ì¬ê¸°ì ìµëë¤. 595 } 596 }) 597 .tooltip({ 598 classes: {"ui-tooltip": "ui-state-highlight"} 599 }); 600 this._on( this.input, { 601 autocompleteselect: function( event, ui ) { 602 ui.item.option.selected = true; 603 this._trigger( "select", event, {item: ui.item.option}); 604 }, 605 autocompletechange: "_removeIfInvalid" 606 }); 607 }, 608 _createShowAllButton: function() { 609 var input = this.input, wasOpen = false; 610 $("<a>") 611 .attr("tabIndex", -1) 612 .attr("title", "모ë보기") 613 .tooltip() 614 .appendTo( this.wrapper ) 615 .button({ 616 icons: {primary: "ui-icon-triangle-1-s"}, 617 text: false 618 }) 619 .removeClass( "ui-corner-all" ) 620 .addClass("custom-combobox-toggle ui-corner-right") 621 .on("mousedown", function() { 622 wasOpen = input.autocomplete("widget").is(":visible"); 623 }) 624 .on("click", function() { 625 input.trigger( "focus" ); 626 // ì´ë¯¸ ë³´ì¬ì§ê³ ìë¤ë©´ ë«ìµëë¤. 627 if(wasOpen) { 628 return; 629 } 630 // 모ë ê²°ê³¼ ì¶ë ¥ì ìí´ì ë¹ë¬¸ìì´ì ë³´ë ëë¤. 631 input.autocomplete("search", ""); 632 } 633 ); 634 }, 635 _source: function(request, response) { 636 var matcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); 637 response( this.element.children("option").map(function() { 638 var text = $(this).text(); 639 if(this.value && (!request.term || matcher.test(text))) { 640 return { 641 label: text, 642 value: text, 643 option: this 644 }; 645 } 646 })); 647 }, 648 _removeIfInvalid: function(event, ui) {
649 // ìì´í ì ì íí©ëë¤. ì무ê²ë íì§ ììµëë¤. 650 if(ui.item) { 651 return; 652 } 653 // ì¼ì¹íëê²ì ì°¾ìµëë¤. (ëì문ì를 구ë¶íì§ ììµëë¤.) 654 var value = this.input.val(), valueLowerCase = value.toLowerCase(), valid = false; 655 this.element.children( "option" ).each(function() { 656 if($(this).text().toLowerCase() === valueLowerCase) { 657 this.selected = valid = true; 658 return false; 659 } 660 }); 661 // ì¼ì¹íëê²ì ì°¾ì¼ë©´ ì무ê²ë íì§ ììµëë¤. 662 if(valid) { 663 return; 664 } 665 // ë¹ê° í목ì ìì í©ëë¤. 666 this.input 667 .val("") 668 .attr("title", value + " ì¼ì¹íë íëª©ì´ ììµëë¤.") 669 .tooltip("open"); 670 this.element.val(""); 671 this._delay(function() { 672 this.input.tooltip("close").attr("title", ""); 673 }, 2500); 674 //this.input.autocomplete("instance").term = ""; 675 }, 676 _destroy: function() { 677 this.wrapper.remove(); 678 this.element.show(); 679 } 680 }); 681 682 // ì¬ì©ë°©ë² 683 //$("#company_no").combobox(); 684 685 686} 687 688 689 690
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.