issue 1351 capcha addon enhancement (without filterFuction)

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10236 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-02-28 06:04:53 +00:00
parent 70c43df807
commit 9d27269134
8 changed files with 146 additions and 77 deletions

View file

@ -1764,11 +1764,15 @@ var Validator = xe.createApp('Validator', {
this.onsubmit = null;
}
})
.submit(function(){
.submit(function(e){
var legacyFn = this['xe:onsubmit'];
var hasLegacyFn = $.isFunction(legacyFn);
var bResult = hasLegacyFn?legacyFn.apply(this):self.run(this);
if(!bResult)
{
e.stopImmediatePropagation();
}
return bResult;
});
},