diff options
-rw-r--r-- | framework/Web/Javascripts/js/prado.js | 5 | ||||
-rw-r--r-- | framework/Web/Javascripts/js/validator.js | 6 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/form.js | 7 | ||||
-rw-r--r-- | framework/Web/Javascripts/prado/validation.js | 8 |
4 files changed, 10 insertions, 16 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 36c1f658..794114d9 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -1681,10 +1681,7 @@ _381=Prado.Validation.ValidateValidationGroup(_379["ValidationGroup"]); _381=Prado.Validation.ValidateNonGroup(form); } if(!_381){ -if(_379["StopEvent"]){ -Event.stop(_378); -} -return; +return Event.stop(_378); } } if(_379["PostBackUrl"]&&_379["PostBackUrl"].length>0){ diff --git a/framework/Web/Javascripts/js/validator.js b/framework/Web/Javascripts/js/validator.js index b5321743..867efc22 100644 --- a/framework/Web/Javascripts/js/validator.js +++ b/framework/Web/Javascripts/js/validator.js @@ -144,10 +144,8 @@ var _42=Prado.Validation.validators; for(var i=0;i<_42.length;i++){ _42[i].enabled=!_42[i].control||undef(_42[i].control.form)||_42[i].control.form==_40; _42[i].visible=Prado.Validation.IsGroupValidation?_42[i].inActiveGroup():true; -if(Prado.Validation.HasTargetGroup||_42[i].group){ -if(_42[i].group!=Prado.Validation.CurrentTargetGroup){ -_42[i].enabled=false; -} +if(Prado.Validation.HasTargetGroup){ +_42[i].enabled=Prado.Validation.CurrentTargetGroup==_42[i].group; } _41&=_42[i].validate(); } diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js index d2286b23..5f4c80d8 100644 --- a/framework/Web/Javascripts/prado/form.js +++ b/framework/Web/Javascripts/prado/form.js @@ -117,8 +117,8 @@ Prado.PostBack = function(event,options) if(!valid)
{
- if(options['StopEvent']) Event.stop(event);
- return;
+ //if(options['StopEvent'])
+ return Event.stop(event);
}
}
@@ -141,7 +141,8 @@ Prado.PostBack = function(event,options) $('PRADO_POSTBACK_TARGET').value = options['EventTarget'];
$('PRADO_POSTBACK_PARAMETER').value = options['EventParameter'];
Event.fireEvent(form,"submit");
- if(options['StopEvent']) Event.stop(event);
+ if(options['StopEvent'])
+ Event.stop(event);
}
/*
diff --git a/framework/Web/Javascripts/prado/validation.js b/framework/Web/Javascripts/prado/validation.js index ba68becc..454f53f0 100644 --- a/framework/Web/Javascripts/prado/validation.js +++ b/framework/Web/Javascripts/prado/validation.js @@ -301,11 +301,8 @@ Prado.Validation.IsValid = function(form) //when group validation, only validators in the active group are visible.
validators[i].visible = Prado.Validation.IsGroupValidation ? validators[i].inActiveGroup() : true;
- if(Prado.Validation.HasTargetGroup || validators[i].group)
- {
- if(validators[i].group != Prado.Validation.CurrentTargetGroup)
- validators[i].enabled = false;
- }
+ if(Prado.Validation.HasTargetGroup)
+ validators[i].enabled = Prado.Validation.CurrentTargetGroup == validators[i].group
valid &= validators[i].validate();
}
@@ -314,6 +311,7 @@ Prado.Validation.IsValid = function(form) Prado.Validation.ShowSummary(form);
//reset all the group active status to false
Prado.Validation.UpdateActiveGroup();
+
return valid;
}
|