summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/validator.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/js/validator.js')
-rw-r--r--framework/Web/Javascripts/js/validator.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/js/validator.js b/framework/Web/Javascripts/js/validator.js
index f77534a7..959dd193 100644
--- a/framework/Web/Javascripts/js/validator.js
+++ b/framework/Web/Javascripts/js/validator.js
@@ -128,9 +128,13 @@ switch(this.options.ControlType)
return this.trim($F(control));else
{this.observeDatePickerChanges();return Prado.WebUI.TDatePicker.getDropDownDate(control).getTime();}
case'THtmlArea':if(typeof tinyMCE!="undefined")
-tinyMCE.triggerSave();return this.trim($F(control));default:if(this.isListControlType())
+tinyMCE.triggerSave();return this.trim($F(control));case'TRadioButton':if(this.options.GroupName)
+return this.getRadioButtonGroupValue();default:if(this.isListControlType())
return this.getFirstSelectedListValue();else
-return this.trim($F(control));}},observeDatePickerChanges:function()
+return this.trim($F(control));}},getRadioButtonGroupValue:function()
+{name=this.control.name;value="";$A(document.getElementsByName(name)).each(function(el)
+{if(el.checked)
+value=el.value;});return value;},observeDatePickerChanges:function()
{if(Prado.Browser().ie)
{var DatePicker=Prado.WebUI.TDatePicker;this.observeChanges(DatePicker.getDayListControl(this.control));this.observeChanges(DatePicker.getMonthListControl(this.control));this.observeChanges(DatePicker.getYearListControl(this.control));}},getSelectedValuesAndChecks:function(elements,initialValue)
{var checked=0;var values=[];var isSelected=this.isCheckBoxType(elements[0])?'checked':'selected';elements.each(function(element)