@@ -120,11 +120,9 @@ |
||
| 120 | 120 | { |
| 121 | 121 | $this->setChecked(true); |
| 122 | 122 | return true; |
| 123 | - } |
|
| 124 | - else |
|
| 123 | + } else |
|
| 125 | 124 | return false; |
| 126 | - } |
|
| 127 | - else if($this->getChecked()) |
|
| 125 | + } else if($this->getChecked()) |
|
| 128 | 126 | $this->setChecked(false); |
| 129 | 127 | return false; |
| 130 | 128 | } |
@@ -107,8 +107,7 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | if($this->getEnableClientScript() && $this->needPostBackScript()) |
| 109 | 109 | $this->renderClientControlScript($writer); |
| 110 | - } |
|
| 111 | - else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 110 | + } else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 112 | 111 | $writer->addAttribute('disabled','disabled'); |
| 113 | 112 | |
| 114 | 113 | parent::addAttributesToRender($writer); |
@@ -142,8 +141,7 @@ discard block |
||
| 142 | 141 | { |
| 143 | 142 | $group=$this->getValidationGroup(); |
| 144 | 143 | return $this->getPage()->getValidators($group)->getCount()>0; |
| 145 | - } |
|
| 146 | - else |
|
| 144 | + } else |
|
| 147 | 145 | return false; |
| 148 | 146 | } |
| 149 | 147 | |
@@ -136,15 +136,13 @@ discard block |
||
| 136 | 136 | $activeView=$views->itemAt($index); |
| 137 | 137 | else |
| 138 | 138 | throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id); |
| 139 | - } |
|
| 140 | - else if(($index=$this->getActiveViewIndex())>=0) |
|
| 139 | + } else if(($index=$this->getActiveViewIndex())>=0) |
|
| 141 | 140 | { |
| 142 | 141 | if($index<$views->getCount()) |
| 143 | 142 | $activeView=$views->itemAt($index); |
| 144 | 143 | else |
| 145 | 144 | throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index); |
| 146 | - } |
|
| 147 | - else |
|
| 145 | + } else |
|
| 148 | 146 | { |
| 149 | 147 | foreach($views as $index=>$view) |
| 150 | 148 | { |
@@ -320,8 +318,7 @@ discard block |
||
| 320 | 318 | $this->setActiveViewIndex($index); |
| 321 | 319 | $this->setActiveViewID($view->getID(false)); |
| 322 | 320 | $view->setActive(true); |
| 323 | - } |
|
| 324 | - else |
|
| 321 | + } else |
|
| 325 | 322 | $v->setActive(false); |
| 326 | 323 | } |
| 327 | 324 | } |
@@ -69,11 +69,9 @@ |
||
| 69 | 69 | $this->_forControl=$control->getClientID(); |
| 70 | 70 | parent::render($writer); |
| 71 | 71 | } |
| 72 | - } |
|
| 73 | - else |
|
| 72 | + } else |
|
| 74 | 73 | throw new TInvalidDataValueException('label_associatedcontrol_invalid',$aid); |
| 75 | - } |
|
| 76 | - else |
|
| 74 | + } else |
|
| 77 | 75 | parent::render($writer); |
| 78 | 76 | } |
| 79 | 77 | |
@@ -270,8 +270,7 @@ discard block |
||
| 270 | 270 | $cell->getControls()->add($listControl); |
| 271 | 271 | $cell->registerObject('DropDownList',$listControl); |
| 272 | 272 | $control=$listControl; |
| 273 | - } |
|
| 274 | - else |
|
| 273 | + } else |
|
| 275 | 274 | $control=$cell; |
| 276 | 275 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
| 277 | 276 | break; |
@@ -307,8 +306,7 @@ discard block |
||
| 307 | 306 | $value=$text; |
| 308 | 307 | $formatString=$this->getDataTextFormatString(); |
| 309 | 308 | $text=$this->formatDataValue($formatString,$text); |
| 310 | - } |
|
| 311 | - else |
|
| 309 | + } else |
|
| 312 | 310 | $text=$value; |
| 313 | 311 | if($sender instanceof TTableCell) |
| 314 | 312 | $sender->setText($text); |
@@ -323,8 +323,7 @@ discard block |
||
| 323 | 323 | $writer->addAttributes($attributes); |
| 324 | 324 | if($value!==null) |
| 325 | 325 | $attributes->add('value',$value); |
| 326 | - } |
|
| 327 | - else |
|
| 326 | + } else |
|
| 328 | 327 | $onclick=''; |
| 329 | 328 | if($needspan=$this->getSpanNeeded()) |
| 330 | 329 | { |
@@ -338,14 +337,12 @@ discard block |
||
| 338 | 337 | { |
| 339 | 338 | $this->renderLabel($writer,$clientID,$text); |
| 340 | 339 | $this->renderInputTag($writer,$clientID,$onclick); |
| 341 | - } |
|
| 342 | - else |
|
| 340 | + } else |
|
| 343 | 341 | { |
| 344 | 342 | $this->renderInputTag($writer,$clientID,$onclick); |
| 345 | 343 | $this->renderLabel($writer,$clientID,$text); |
| 346 | 344 | } |
| 347 | - } |
|
| 348 | - else |
|
| 345 | + } else |
|
| 349 | 346 | $this->renderInputTag($writer,$clientID,$onclick); |
| 350 | 347 | if($needspan) |
| 351 | 348 | $writer->renderEndTag(); |
@@ -98,8 +98,7 @@ |
||
| 98 | 98 | { |
| 99 | 99 | $this->renderLinkButtonHref($writer); |
| 100 | 100 | $this->renderClientControlScript($writer); |
| 101 | - } |
|
| 102 | - else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 101 | + } else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 103 | 102 | $writer->addAttribute('disabled','disabled'); |
| 104 | 103 | } |
| 105 | 104 | |
@@ -84,8 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $this->raiseBubbleEvent($this,new TDataListCommandEventParameter($this,$sender,$param)); |
| 86 | 86 | return true; |
| 87 | - } |
|
| 88 | - else |
|
| 87 | + } else |
|
| 89 | 88 | return false; |
| 90 | 89 | } |
| 91 | 90 | |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | $this->renderBeginTag($writer); |
| 131 | 130 | $this->renderContents($writer); |
| 132 | 131 | $this->renderEndTag($writer); |
| 133 | - } |
|
| 134 | - else |
|
| 132 | + } else |
|
| 135 | 133 | $this->renderContents($writer); |
| 136 | 134 | } |
| 137 | 135 | |
@@ -97,8 +97,7 @@ discard block |
||
| 97 | 97 | $this->_cachedActiveViewIndex=-1; |
| 98 | 98 | if($index>=0) |
| 99 | 99 | $this->activateView($views->itemAt($index),true); |
| 100 | - } |
|
| 101 | - else |
|
| 100 | + } else |
|
| 102 | 101 | throw new TInvalidDataValueException('multiview_activeviewindex_invalid',$index); |
| 103 | 102 | } |
| 104 | 103 | |
@@ -153,8 +152,7 @@ discard block |
||
| 153 | 152 | $view->onActivate(null); |
| 154 | 153 | $this->onActiveViewChanged(null); |
| 155 | 154 | } |
| 156 | - } |
|
| 157 | - else if($v->getActive()) |
|
| 155 | + } else if($v->getActive()) |
|
| 158 | 156 | { |
| 159 | 157 | $v->setActive(false); |
| 160 | 158 | if($triggerEvent) |
@@ -232,8 +230,7 @@ discard block |
||
| 232 | 230 | { |
| 233 | 231 | $this->setActiveView($view); |
| 234 | 232 | return true; |
| 235 | - } |
|
| 236 | - else |
|
| 233 | + } else |
|
| 237 | 234 | throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID); |
| 238 | 235 | case self::CMD_SWITCHVIEWINDEX: |
| 239 | 236 | $index=TPropertyValue::ensureInteger($param->getCommandParameter()); |