Changeset 2430 for trunk/framework/Web
- Timestamp:
- 04/18/2008 03:17:29 AM (9 months ago)
- Location:
- trunk/framework/Web
- Files:
-
- 2 modified
-
Javascripts/source/prado/validator/validation3.js (modified) (1 diff)
-
UI/WebControls/TCheckBoxList.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/framework/Web/Javascripts/source/prado/validator/validation3.js
r2423 r2430 608 608 this.options = options; 609 609 this.control = $(options.ControlToValidate); 610 if (!this.control && this.isListControlType()){611 this.control = $(options.ControlToValidate + '_c0').parentNode;612 }613 614 610 this.message = $(options.ID); 615 611 if(this.control && this.message) -
trunk/framework/Web/UI/WebControls/TCheckBoxList.php
r1850 r2430 361 361 362 362 /** 363 * Wether the list should be rendered inside a span or not 364 * 365 *@return boolean true if we need a span 366 */ 367 protected function getSpanNeeded () 368 { 369 if ($this->getRepeatLayout()===TRepeatLayout::Raw) 370 { 371 $id=$this->getID(); 372 // Check if we have a validator registered for this control 373 foreach ($this->getPage()->getValidators() as $v) 374 { 375 if ($v->getControlToValidate()===$id) 376 return true; 377 } 378 } 379 return false; 380 } 381 382 /** 363 383 * Renders the checkbox list control. 364 384 * This method overrides the parent implementation. … … 369 389 if($this->getItemCount()>0) 370 390 { 391 if ($needSpan=$this->getSpanNeeded()) 392 { 393 $writer->addAttribute('id', $this->getClientId()); 394 $writer->renderBeginTag('span'); 395 } 371 396 $this->_isEnabled=$this->getEnabled(true); 372 397 $repeatInfo=$this->getRepeatInfo(); … … 381 406 $this->setAccessKey($accessKey); 382 407 $this->setTabIndex($tabIndex); 408 if ($needSpan) 409 $writer->renderEndTag(); 383 410 } 384 411 //checkbox skipped the client control script in addAttributesToRender … … 435 462 return $options; 436 463 } 464 437 465 } 438 466
