@@ -6,8 +6,9 @@ |
||
| 6 | 6 | { |
| 7 | 7 | parent::onLoad($param); |
| 8 | 8 | |
| 9 | - if(!$this->IsPostBack) |
|
| 10 | - $this->setViewState("clicks", 0); |
|
| 9 | + if(!$this->IsPostBack) { |
|
| 10 | + $this->setViewState("clicks", 0); |
|
| 11 | + } |
|
| 11 | 12 | } |
| 12 | 13 | |
| 13 | 14 | public function doClick($sender, $param) |
@@ -8,10 +8,11 @@ discard block |
||
| 8 | 8 | public function save( $sender, $param ) |
| 9 | 9 | { |
| 10 | 10 | $txt="Save callback called "; |
| 11 | - if ( $this->isValid ) |
|
| 12 | - $txt .= "DATA OK"; |
|
| 13 | - else |
|
| 14 | - $txt .= "DATA NOK"; |
|
| 11 | + if ( $this->isValid ) { |
|
| 12 | + $txt .= "DATA OK"; |
|
| 13 | + } else { |
|
| 14 | + $txt .= "DATA NOK"; |
|
| 15 | + } |
|
| 15 | 16 | $this->Result->Text.= ' --- ' . $txt; |
| 16 | 17 | } |
| 17 | 18 | |
@@ -20,10 +21,11 @@ discard block |
||
| 20 | 21 | //$c=$this->CheckCount; |
| 21 | 22 | $this->Result->Text="Check callback called (".++$this->CheckCount.")"; |
| 22 | 23 | //$this->CheckCount=$c; |
| 23 | - if ( $this->testField->getText() == 'Test' ) |
|
| 24 | - $param->isValid = true; |
|
| 25 | - else |
|
| 26 | - $param->isValid = false; |
|
| 24 | + if ( $this->testField->getText() == 'Test' ) { |
|
| 25 | + $param->isValid = true; |
|
| 26 | + } else { |
|
| 27 | + $param->isValid = false; |
|
| 28 | + } |
|
| 27 | 29 | } |
| 28 | 30 | |
| 29 | 31 | public function setCheckCount($value) |
@@ -7,7 +7,8 @@ |
||
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | public function onLoad($param) { |
| 10 | - if ($this->Request->contains('text')) |
|
| 11 | - $this->Result->setText($this->Request->itemAt('text')); |
|
| 10 | + if ($this->Request->contains('text')) { |
|
| 11 | + $this->Result->setText($this->Request->itemAt('text')); |
|
| 12 | + } |
|
| 12 | 13 | } |
| 13 | 14 | } |
@@ -6,8 +6,9 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function onLoad($param) |
| 8 | 8 | { |
| 9 | - if(!$this->IsPostBack) |
|
| 10 | - $this->VoteClick->Text = "BEFORE click"; |
|
| 9 | + if(!$this->IsPostBack) { |
|
| 10 | + $this->VoteClick->Text = "BEFORE click"; |
|
| 11 | + } |
|
| 11 | 12 | } |
| 12 | 13 | |
| 13 | 14 | public function onUpdateVoteClick($sender, $param) |
@@ -89,10 +89,11 @@ |
||
| 89 | 89 | $text = ''; |
| 90 | 90 | foreach ($this->DataViewer->SelectedIndices as $index) |
| 91 | 91 | { |
| 92 | - if($this->DataViewer->Items[$index]->Attributes['Group']) |
|
| 93 | - $text .= $index .'- "'.$this->DataViewer->Items[$index]->Attributes->Group.'", '; |
|
| 94 | - else |
|
| 95 | - $text .= $index.','; |
|
| 92 | + if($this->DataViewer->Items[$index]->Attributes['Group']) { |
|
| 93 | + $text .= $index .'- "'.$this->DataViewer->Items[$index]->Attributes->Group.'", '; |
|
| 94 | + } else { |
|
| 95 | + $text .= $index.','; |
|
| 96 | + } |
|
| 96 | 97 | } |
| 97 | 98 | $this->ALLog->setText($text); |
| 98 | 99 | } |
@@ -86,8 +86,7 @@ |
||
| 86 | 86 | { |
| 87 | 87 | if ($this->DatePicker->Date === ''){ |
| 88 | 88 | return ''; |
| 89 | - } |
|
| 90 | - else{ |
|
| 89 | + } else{ |
|
| 91 | 90 | return $this->TimeStamp; |
| 92 | 91 | } |
| 93 | 92 | } |
@@ -12,7 +12,9 @@ |
||
| 12 | 12 | public function selectItem ($sender, $param) |
| 13 | 13 | { |
| 14 | 14 | $this->lblResult->text="You have selected '".$sender->getSelectedItem()->getText()."'."; |
| 15 | - if (!$this->getIsValid()) $this->lblResult->text .= " But this is not valid !"; |
|
| 15 | + if (!$this->getIsValid()) { |
|
| 16 | + $this->lblResult->text .= " But this is not valid !"; |
|
| 17 | + } |
|
| 16 | 18 | } |
| 17 | 19 | |
| 18 | 20 | public function submit ($sender, $param) |
@@ -15,8 +15,9 @@ |
||
| 15 | 15 | public static function registerPackage(TControl $control, $name) |
| 16 | 16 | { |
| 17 | 17 | static $instance; |
| 18 | - if($instance===null) |
|
| 19 | - $instance=new self($control->getPage()); |
|
| 18 | + if($instance===null) { |
|
| 19 | + $instance=new self($control->getPage()); |
|
| 20 | + } |
|
| 20 | 21 | $instance->_packages[$name]=true; |
| 21 | 22 | } |
| 22 | 23 | |
@@ -38,10 +38,11 @@ |
||
| 38 | 38 | $base='ctl0_Content_'; |
| 39 | 39 | for($i = 0; $i < $total; $i++) |
| 40 | 40 | { |
| 41 | - if(in_array($i, $checks)) |
|
| 42 | - $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected()); |
|
| 43 | - else |
|
| 44 | - $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected()); |
|
| 41 | + if(in_array($i, $checks)) { |
|
| 42 | + $this->assertTrue($this->byId("{$base}list1_c{$i}")->selected()); |
|
| 43 | + } else { |
|
| 44 | + $this->assertFalse($this->byId("{$base}list1_c{$i}")->selected()); |
|
| 45 | + } |
|
| 45 | 46 | } |
| 46 | 47 | } |
| 47 | 48 | } |