r7105 수정. onsubmit이 함수인 경우, 건드리지 않는다. 그 외 validate 결과를 따른다.

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7108 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2010-01-04 09:50:31 +00:00
parent 327997f9f3
commit b087b147a5

View file

@ -66,17 +66,20 @@ var Validator = xe.createApp('Validator', {
// hook form submit event
$('form')
.each(function(){
if (this.onsubmit) {
this['xe:onsubmit'] = this.onsubmit;
this.onsubmit = null;
if (this.onsubmit && !this.xe_js_filter_controlled) {
this.xe_js_filter_controlled = true;
if(!$.isFunction(this.onsubmit)) {
this['xe:onsubmit'] = this.onsubmit;
this.onsubmit = null;
}
}
})
.submit(function(){
var legacyFn = this['xe:onsubmit'];
var hasLegacyFn = $.isFunction(legacyFn);
var bResult = hasLegacyFn?legacyFn.apply(this):self.run(this);
var bResult = hasLegacyFn?false:self.run(this);
return false;
return bResult;
});
},
API_VALIDATE : function(sender, params) {