/* 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 = '
').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();
}
});