Changeset 2410
- Timestamp:
- 03/14/2008 09:42:39 AM (10 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
HISTORY (modified) (1 diff)
-
framework/Web/Javascripts/source/prado/validator/validation3.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r2408 r2410 2 2 ============================ 3 3 BUG: Ticket#636 - I18N catalogue problem (Christophe) 4 BUG: Ticket#671 - TActiveCustomValidator Callback Problem (Christophe) 4 5 BUG: Ticket#707 - TPropertyAccess sets property twice on object when using setters (Qiang) 5 6 BUG: Ticket#719 - TAutoCompleter should not trigger Validation if CausesValidation=False (Christophe) 7 BUG: Ticket#721 - TActiveCustomValidator + TValidationSummary problem (Christophe) 6 8 BUG: Ticket#736 - Files never created in clientscript.php (Qiang) 7 9 BUG: Ticket#744 - Callback error handling is improved (Qiang) -
trunk/framework/Web/Javascripts/source/prado/validator/validation3.js
r2408 r2410 411 411 } 412 412 413 var refresh = update || this.visible == false || this.options.Refresh != false; 414 413 var refresh = update || this.visible == false || this.options.Refresh != false; 414 // Also, do not refresh summary if at least 1 validator is waiting for callback response. 415 // This will avoid the flickering of summary if the validator passes its test 416 refresh = refresh && validators.any(function(v) { return !v.requestDispatched; }); 417 415 418 if(this.options.ShowSummary != false && refresh) 416 419 { … … 1151 1154 { 1152 1155 validatingValue : null, 1153 1156 invoker : null, 1157 1158 /** 1159 * Override the parent implementation to store the invoker, in order to 1160 * re-validate after the callback has returned 1161 * Calls evaluateIsValid() function to set the value of isValid property. 1162 * Triggers onValidate event and onSuccess or onError event. 1163 * @param HTMLElement element that calls for validation 1164 * @return boolean true if valid. 1165 */ 1166 validate : function(invoker) 1167 { 1168 this.invoker = invoker; 1169 1170 //try to find the control. 1171 if(!this.control) 1172 this.control = $(this.options.ControlToValidate); 1173 1174 if(!this.control || this.control.disabled) 1175 { 1176 this.isValid = true; 1177 return this.isValid; 1178 } 1179 1180 if(typeof(this.options.OnValidate) == "function") 1181 { 1182 if(this.requestDispatched == false) 1183 this.options.OnValidate(this, invoker); 1184 } 1185 1186 if(this.enabled && !this.control.getAttribute('disabled')) 1187 this.isValid = this.evaluateIsValid(); 1188 else 1189 this.isValid = true; 1190 1191 // Only update the message if the callback has already return ! 1192 if (!this.requestDispatched) 1193 this.updateValidationDisplay(invoker); 1194 1195 this.observeChanges(this.control); 1196 1197 return this.isValid; 1198 }, 1199 1154 1200 /** 1155 1201 * Calls custom validation function. … … 1159 1205 value = this.getValidationValue(); 1160 1206 if(!this.requestDispatched && (""+value) != (""+this.validatingValue)) 1161 //if((""+value) != (""+this.validatingValue))1162 1207 { 1163 1208 this.validatingValue = value; … … 1183 1228 this.options.onSuccess(request,data); 1184 1229 this.updateValidationDisplay(); 1230 this.manager.updateSummary(this.group); 1231 // Redispatch initial request if any 1232 if (this.invoker instanceof Prado.CallbackRequest) 1233 { 1234 this.invoker.dispatch(); 1235 } 1236 1185 1237 }, 1186 1238
