/* jquery.js */ var loading = null; $(function() { loading = new loadings(); /*$(document).ajaxStart(function() { loading.show(); }); $(document).ajaxStop(function() { loading.hide(); }); $(document).ajaxError(function() { alert('¿äû ó¸® ½ÇÆÐ'); });*/ }); function loadings() { try { this.busy_obj = document.createElement('div'); this.busy_obj.style.position = 'absolute'; this.busy_obj.style.display = 'none'; this.busy_obj.style.backgroundColor = ''; this.busy_obj.style.top = '0px'; this.busy_obj.style.left = '0px'; this.busy_obj.style.width = '100%'; this.busy_obj.style.height = '0px'; this.busy_obj.innerHTML = '
'; document.body.appendChild(this.busy_obj); this.div_obj = document.createElement('div'); this.div_obj.id = 'loadings_div_obj'; this.div_obj.style.position = 'absolute'; this.div_obj.style.display = 'none'; this.div_obj.style.width = '100%'; this.div_obj.style.textAlign = 'center'; this.div_obj.style.zIndex = 99; document.body.appendChild(this.div_obj); this.img_obj = document.createElement('img'); this.img_obj.src = '/common_img/ing_b.gif'; this.div_obj.appendChild(this.img_obj); } catch(e) { this.busy_obj = null; this.div_obj = null; this.img_obj = null; } }; loadings.prototype.show = function() { if( !this.busy_obj ) {} else { $('body').fadeTo('fast', 0.5); //$(':submit').attr('disabled', true); var scrollHeight = document.body.scrollHeight; var clientWidth = document.body.clientWidth; var clientHeight = document.body.clientHeight; var scrollTop = document.body.scrollTop; //var div_width = parseInt(this.img_obj.width); var div_height = parseInt(this.img_obj.height); //div_width = div_width ? div_width : 0; div_height = div_height ? div_height : 0; //var set_x = ( clientWidth - div_width ) / 2; var set_y = ( clientHeight - div_height ) / 2 + scrollTop; //set_x = ( set_x < 0 ) ? 0 : set_x; set_y = ( set_y < 0 ) ? 0 : set_y; //this.div_obj.style.left = set_x + 'px'; this.div_obj.style.top = set_y + 'px'; this.div_obj.style.display = ''; if( scrollHeight >= clientHeight ) { this.busy_obj.style.height = scrollHeight + 'px'; } else { this.busy_obj.style.height = clientHeight + 'px'; } this.busy_obj.style.display = ''; } }; loadings.prototype.hide = function() { if( !this.busy_obj ) {} else { $('body').fadeTo('fast', 1); //$(':submit').attr('disabled', false); this.div_obj.style.display = 'none'; this.busy_obj.style.display = 'none'; } }; /* ui.datepicker.js */ /* jqModal.js */ (function($) { $('
').attr('id', 'loading') .css('display', 'none').addClass('jqmWindow') .html('').appendTo('body'); $('#loading').jqm({ modal: true }); $('
').attr('id', 'message') .css('display', 'none').addClass('jqmWindow') .appendTo('body'); })(jQuery); /* etc */ $(function() { $('a, input:radio, input:checkbox').focus(function() { this.blur(); }); $("input:text[number='true']").css('ime-mode', 'disabled').keydown(function(event) { if( event.shiftKey == true ) return false; if( event.keyCode >= 33 && event.keyCode <= 40 ) return true; if( event.keyCode >= 48 && event.keyCode <= 57 ) return true; if( event.keyCode >= 96 && event.keyCode <= 105 ) return true; if( event.keyCode == 8 ) return true; if( event.keyCode == 9 ) return true; if( event.keyCode == 13 ) return true; if( event.keyCode == 46 ) return true; if( $(this).is('[numbers]') ) { //alert(event.keyCode); var numbers = $.makeArray($(this).attr('numbers').split('')); if( $.inArray('-', numbers) >= 0 && $.inArray(event.keyCode, [109]) >= 0 ) return true; if( $.inArray('.', numbers) >= 0 && $.inArray(event.keyCode, [110, 190]) >= 0 ) return true; } return false; }).focus(function() { this.select(); }); $("input:text[number='true']").blur(function() { var number_regex = '0-9'; var numbers_regex = ''; if( $(this).is('[numbers]') ) { numbers_regex = '\\' + $.makeArray($(this).attr('numbers')).join('\\'); } var regex = new RegExp('[^' + number_regex + numbers_regex + ']', 'gi'); $(this).val($(this).val().replace(regex, '')); }); $("input:text[notnull='true'], input:password[notnull='true']").keydown(function(event) { if( event.keyCode == 32 ) return false; return true; }); $("input:text[notnull='true'], input:password[notnull='true']").blur(function() { $(this).val($(this).val().replace(/ /g, '')); }); $("input[thisselect='true'], textarea[thisselect='true']").focus(function() { this.select(); }); $("form[name='srch']").find(':text').focus(function() { this.select(); }); $('label').click(function() { $(this).prev(':radio').click(); $(this).prev(':checkbox').click(); }); if( $.browser.msie ) { $('input:text.box, input:password.box, textarea.box').focus(function() { $(this).addClass('box_focus'); }).blur(function() { $(this).removeClass('box_focus'); }); $('div.box :input').focus(function() { $(this).addClass('focus'); }).blur(function() { $(this).removeClass('focus'); }); } if( $.browser.mozilla || $.browser.safari ) { $('select').each(function() { $(this).attr('myclass', $(this).attr('class')) .addClass($(this).children('option:selected').attr('class')); }); $('select').change(function() { $(this).removeAttr('class').addClass($(this).attr('myclass')) .addClass($(this).children('option:selected').attr('class')); }); } if( !$.browser.safari ) { $('.colspan_fix').hide(); } });