From 7949f7fe746dbbe3eeefbc123bbb2c551b091733 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 14 Apr 2006 05:14:34 +0000 Subject: Fixed #93 and #121 --- framework/Web/Javascripts/js/colorpicker.js | 2 +- framework/Web/Javascripts/js/prado.js | 293 +++++++++++++++------------- framework/Web/Javascripts/js/validator.js | 2 +- 3 files changed, 158 insertions(+), 139 deletions(-) (limited to 'framework/Web/Javascripts/js') diff --git a/framework/Web/Javascripts/js/colorpicker.js b/framework/Web/Javascripts/js/colorpicker.js index 5668be98..3dde7692 100644 --- a/framework/Web/Javascripts/js/colorpicker.js +++ b/framework/Web/Javascripts/js/colorpicker.js @@ -320,7 +320,7 @@ this.inputs=_65; var _67=Prado.WebUI.TColorPicker.UIImages; this.inputs["currentColor"]=SPAN({className:"currentColor"}); this.inputs["oldColor"]=SPAN({className:"oldColor"}); -var _68=TABLE({className:"inputs"},TBODY(null,TR(null,TD({className:"currentcolor",colSpan:2},this.inputs["currentColor"],this.inputs["oldColor"])),TR(null,TD(null,"H:"),TD(null,this.inputs["H"],"\u63b3")),TR(null,TD(null,"S:"),TD(null,this.inputs["S"],"%")),TR(null,TD(null,"V:"),TD(null,this.inputs["V"],"%")),TR(null,TD({className:"gap"},"R:"),TD({className:"gap"},this.inputs["R"])),TR(null,TD(null,"G:"),TD(null,this.inputs["G"])),TR(null,TD(null,"B:"),TD(null,this.inputs["B"])),TR(null,TD({className:"gap"},"#"),TD({className:"gap"},this.inputs["HEX"])))); +var _68=TABLE({className:"inputs"},TBODY(null,TR(null,TD({className:"currentcolor",colSpan:2},this.inputs["currentColor"],this.inputs["oldColor"])),TR(null,TD(null,"H:"),TD(null,this.inputs["H"],"\xc2\xb0")),TR(null,TD(null,"S:"),TD(null,this.inputs["S"],"%")),TR(null,TD(null,"V:"),TD(null,this.inputs["V"],"%")),TR(null,TD({className:"gap"},"R:"),TD({className:"gap"},this.inputs["R"])),TR(null,TD(null,"G:"),TD(null,this.inputs["G"])),TR(null,TD(null,"B:"),TD(null,this.inputs["B"])),TR(null,TD({className:"gap"},"#"),TD({className:"gap"},this.inputs["HEX"])))); var _69={selector:SPAN({className:"selector"}),background:SPAN({className:"colorpanel"}),slider:SPAN({className:"slider"}),hue:SPAN({className:"strip"})}; if(Prado.Browser().ie){ var _70="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"; diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index d142a070..a60372e8 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -1677,12 +1677,13 @@ Prado.PostBack=function(_379,_380){ var form=$(_380["FormID"]); var _381=true; if(_380["CausesValidation"]&&Prado.Validation){ +var _382=true; if(_380["ValidationGroup"]){ -Prado.Validation.SetActiveGroup(Event.element(_379),_380["ValidationGroup"]); +_382=Prado.Validation.ValidateValidationGroup(_380["ValidationGroup"]); }else{ -Prado.Validation.SetActiveGroup(null,null); +_382=Prado.Validation.ValidateNonGroup(form); } -if(Prado.Validation.IsValid(form)==false){ +if(!_382){ if(_380["StopEvent"]){ Event.stop(_379); } @@ -1693,13 +1694,13 @@ if(_380["PostBackUrl"]&&_380["PostBackUrl"].length>0){ form.action=_380["PostBackUrl"]; } if(_380["TrackFocus"]){ -var _382=$("PRADO_LASTFOCUS"); -if(_382){ -var _383=document.activeElement; +var _383=$("PRADO_LASTFOCUS"); if(_383){ -_382.value=_383.id; +var _384=document.activeElement; +if(_384){ +_383.value=_384.id; }else{ -_382.value=_380["EventTarget"]; +_383.value=_380["EventTarget"]; } } } @@ -1710,24 +1711,24 @@ if(_380["StopEvent"]){ Event.stop(_379); } }; -Prado.Element={setValue:function(_384,_385){ -var el=$(_384); +Prado.Element={setValue:function(_385,_386){ +var el=$(_385); if(el&&typeof (el.value)!="undefined"){ -el.value=_385; +el.value=_386; } -},select:function(_387,_388,_389){ -var el=$(_387); -var _390=_387.indexOf("[]")>-1; -if(!el&&!_390){ +},select:function(_388,_389,_390){ +var el=$(_388); +var _391=_388.indexOf("[]")>-1; +if(!el&&!_391){ return; } -_388=_390?"check"+_388:el.tagName.toLowerCase()+_388; -var _391=Prado.Element.Selection; -if(isFunction(_391[_388])){ -_391[_388](_390?_387:el,_389); +_389=_391?"check"+_389:el.tagName.toLowerCase()+_389; +var _392=Prado.Element.Selection; +if(isFunction(_392[_389])){ +_392[_389](_391?_388:el,_390); } -},click:function(_392){ -var el=$(_392); +},click:function(_393){ +var el=$(_393); if(!el){ return; } @@ -1743,25 +1744,25 @@ el.onclick(); } } } -},setAttribute:function(_394,_395,_396){ -var el=$(_394); -if(_395=="disabled"&&_396==false){ -el.removeAttribute(_395); +},setAttribute:function(_395,_396,_397){ +var el=$(_395); +if(_396=="disabled"&&_397==false){ +el.removeAttribute(_396); }else{ -el.setAttribute(_395,_396); +el.setAttribute(_396,_397); } -},setOptions:function(_397,_398){ -var el=$(_397); +},setOptions:function(_398,_399){ +var el=$(_398); if(el&&el.tagName.toLowerCase()=="select"){ while(el.length>0){ el.remove(0); } -for(var i=0;i<_398.length;i++){ -el.options[el.options.length]=new Option(_398[i][0],_398[i][1]); +for(var i=0;i<_399.length;i++){ +el.options[el.options.length]=new Option(_399[i][0],_399[i][1]); } } -},focus:function(_399){ -var obj=$(_399); +},focus:function(_400){ +var obj=$(_400); if(isObject(obj)&&isdef(obj.focus)){ setTimeout(function(){ obj.focus(); @@ -1769,22 +1770,22 @@ obj.focus(); } return false; }}; -Prado.Element.Selection={inputValue:function(el,_401){ +Prado.Element.Selection={inputValue:function(el,_402){ switch(el.type.toLowerCase()){ case "checkbox": case "radio": -return el.checked=_401; +return el.checked=_402; } -},selectValue:function(el,_402){ -$A(el.options).each(function(_403){ -_403.selected=_403.value==_402; +},selectValue:function(el,_403){ +$A(el.options).each(function(_404){ +_404.selected=_404.value==_403; }); -},selectIndex:function(el,_404){ +},selectIndex:function(el,_405){ if(el.type=="select-one"){ -el.selectedIndex=_404; +el.selectedIndex=_405; }else{ for(var i=0;i-1?this.radios[_448].value:this.options.caption; +this.setCaption(_456); +},setCaption:function(_457){ +this.caption.innerHTML=_457>-1?this.radios[_457].value:this.options.caption; }}; diff --git a/framework/Web/Javascripts/js/validator.js b/framework/Web/Javascripts/js/validator.js index e1d0806a..b5321743 100644 --- a/framework/Web/Javascripts/js/validator.js +++ b/framework/Web/Javascripts/js/validator.js @@ -144,7 +144,7 @@ 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){ +if(Prado.Validation.HasTargetGroup||_42[i].group){ if(_42[i].group!=Prado.Validation.CurrentTargetGroup){ _42[i].enabled=false; } -- cgit v1.2.3