@@ -33,8 +33,8 @@ |
||
| 33 | 33 | { |
| 34 | 34 | $this->newPanel->Visible=true; |
| 35 | 35 | return $this->newPanel; |
| 36 | + } else { |
|
| 37 | + return $this->content->Text; |
|
| 36 | 38 | } |
| 37 | - else |
|
| 38 | - return $this->content->Text; |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -17,9 +17,10 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $count = intval($this->getViewState('count')); |
| 19 | 19 | $this->setViewState('count', ++$count); |
| 20 | - if($count > 10) |
|
| 21 | - $this->timer1->stopTimer(); |
|
| 22 | - else |
|
| 23 | - $this->label1->Text .= " ".$count; |
|
| 20 | + if($count > 10) { |
|
| 21 | + $this->timer1->stopTimer(); |
|
| 22 | + } else { |
|
| 23 | + $this->label1->Text .= " ".$count; |
|
| 24 | + } |
|
| 24 | 25 | } |
| 25 | 26 | } |
@@ -25,8 +25,9 @@ |
||
| 25 | 25 | public function onPreRender($param) |
| 26 | 26 | { |
| 27 | 27 | parent::onPreRender($param); |
| 28 | - if(trim($this->_status)) |
|
| 29 | - $this->label1->Text = $this->_status; |
|
| 28 | + if(trim($this->_status)) { |
|
| 29 | + $this->label1->Text = $this->_status; |
|
| 30 | + } |
|
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | public function enable_edit($sender, $param) |
@@ -6,8 +6,9 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | public function onLoad($param){ |
| 8 | 8 | parent::onLoad($param); |
| 9 | - if(!$this->IsPostBack) |
|
| 10 | - $this->datepicker->setTimeStamp(time()); |
|
| 9 | + if(!$this->IsPostBack) { |
|
| 10 | + $this->datepicker->setTimeStamp(time()); |
|
| 11 | + } |
|
| 11 | 12 | } |
| 12 | 13 | |
| 13 | 14 | public function testDatePicker($sender, $param){ |
@@ -38,10 +39,11 @@ discard block |
||
| 38 | 39 | |
| 39 | 40 | public function toggleMode ($sender, $param) |
| 40 | 41 | { |
| 41 | - if ($this->datepicker->getInputMode()==TDatePickerInputMode::DropDownList) |
|
| 42 | - $this->datepicker->setInputMode(TDatePickerInputMode::TextBox); |
|
| 43 | - else |
|
| 44 | - $this->datepicker->setInputMode(TDatePickerInputMode::DropDownList); |
|
| 42 | + if ($this->datepicker->getInputMode()==TDatePickerInputMode::DropDownList) { |
|
| 43 | + $this->datepicker->setInputMode(TDatePickerInputMode::TextBox); |
|
| 44 | + } else { |
|
| 45 | + $this->datepicker->setInputMode(TDatePickerInputMode::DropDownList); |
|
| 46 | + } |
|
| 45 | 47 | } |
| 46 | 48 | |
| 47 | 49 | } |
@@ -13,10 +13,11 @@ |
||
| 13 | 13 | public function setMessage($value) |
| 14 | 14 | { |
| 15 | 15 | $this->Message->Text = $value; |
| 16 | - if ($value != '') |
|
| 17 | - $this->setVisible(true); |
|
| 18 | - else |
|
| 19 | - $this->setVisible(false); |
|
| 16 | + if ($value != '') { |
|
| 17 | + $this->setVisible(true); |
|
| 18 | + } else { |
|
| 19 | + $this->setVisible(false); |
|
| 20 | + } |
|
| 20 | 21 | } |
| 21 | 22 | |
| 22 | 23 | public function setVisible($value) |
@@ -13,8 +13,7 @@ |
||
| 13 | 13 | $this->$panel->setAttribute('style', 'display: block;'); |
| 14 | 14 | $this->$panel->setVisible(true); |
| 15 | 15 | $this->$panel->render($param->NewWriter); |
| 16 | - } |
|
| 17 | - else |
|
| 16 | + } else |
|
| 18 | 17 | { |
| 19 | 18 | $this->$panel->setVisible(false); |
| 20 | 19 | } |
@@ -10,8 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | function addOptionsToList2($parent) |
| 12 | 12 | { |
| 13 | - for($i = 0; $i < 5; $i++) |
|
| 14 | - $this->list2->Items[$i] = $parent.' - item '.($i+1); |
|
| 13 | + for($i = 0; $i < 5; $i++) { |
|
| 14 | + $this->list2->Items[$i] = $parent.' - item '.($i+1); |
|
| 15 | + } |
|
| 15 | 16 | $this->list2->setEnabled(true); |
| 16 | 17 | } |
| 17 | 18 | |
@@ -29,7 +29,9 @@ |
||
| 29 | 29 | { |
| 30 | 30 | $list[] = $country; |
| 31 | 31 | $count++; |
| 32 | - if($count > 10) break; |
|
| 32 | + if($count > 10) { |
|
| 33 | + break; |
|
| 34 | + } |
|
| 33 | 35 | } |
| 34 | 36 | } |
| 35 | 37 | return $list; |
@@ -5,9 +5,11 @@ |
||
| 5 | 5 | function onLoad($param) |
| 6 | 6 | { |
| 7 | 7 | parent::onLoad($param); |
| 8 | - for($i=0;$i<100;$i++) //may try 10000, but may crash PHP. |
|
| 8 | + for($i=0;$i<100;$i++) { |
|
| 9 | + //may try 10000, but may crash PHP. |
|
| 9 | 10 | { |
| 10 | 11 | $label = new TLabel(); |
| 12 | + } |
|
| 11 | 13 | $label->Text=" this is a very long label with some text $i:"; |
| 12 | 14 | $this->Panel1->Controls[] = $label; |
| 13 | 15 | } |