@@ -88,11 +88,11 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function setText($value) |
| 90 | 90 | { |
| 91 | - if(parent::getText() === $value) |
|
| 91 | + if (parent::getText() === $value) |
|
| 92 | 92 | return; |
| 93 | 93 | |
| 94 | 94 | parent::setText($value); |
| 95 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 95 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 96 | 96 | $this->getPage()->getCallbackClient()->update( |
| 97 | 97 | $this->getDefaultLabelID(), $value); |
| 98 | 98 | } |
@@ -106,11 +106,11 @@ discard block |
||
| 106 | 106 | public function setChecked($value) |
| 107 | 107 | { |
| 108 | 108 | $value = TPropertyValue::ensureBoolean($value); |
| 109 | - if(parent::getChecked() === $value) |
|
| 109 | + if (parent::getChecked() === $value) |
|
| 110 | 110 | return; |
| 111 | 111 | |
| 112 | 112 | parent::setChecked($value); |
| 113 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 113 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 114 | 114 | $this->getPage()->getCallbackClient()->check($this, $value); |
| 115 | 115 | } |
| 116 | 116 | |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | * @param string checkbox id |
| 133 | 133 | * @param string onclick js |
| 134 | 134 | */ |
| 135 | - protected function renderInputTag($writer,$clientID,$onclick) |
|
| 135 | + protected function renderInputTag($writer, $clientID, $onclick) |
|
| 136 | 136 | { |
| 137 | - parent::renderInputTag($writer,$clientID,$onclick); |
|
| 137 | + parent::renderInputTag($writer, $clientID, $onclick); |
|
| 138 | 138 | if ($this->getAutoPostBack()) |
| 139 | 139 | $this->getActiveControl()->registerCallbackClientScript( |
| 140 | 140 | $this->getClientClassName(), $this->getPostBackOptions()); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | * @param string checkbox id |
| 166 | 166 | * @param string label text |
| 167 | 167 | */ |
| 168 | - protected function renderLabel($writer,$clientID,$text) |
|
| 168 | + protected function renderLabel($writer, $clientID, $text) |
|
| 169 | 169 | { |
| 170 | 170 | $writer->addAttribute('id', $this->getDefaultLabelID()); |
| 171 | 171 | parent::renderLabel($writer, $clientID, $text); |
@@ -176,10 +176,10 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | protected function getDefaultLabelID() |
| 178 | 178 | { |
| 179 | - if($attributes=$this->getViewState('LabelAttributes',null)) |
|
| 179 | + if ($attributes = $this->getViewState('LabelAttributes', null)) |
|
| 180 | 180 | return TCheckBox::getLabelAttributes()->itemAt('id'); |
| 181 | 181 | else |
| 182 | - return $this->getClientID().'_label'; |
|
| 182 | + return $this->getClientID() . '_label'; |
|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | |
@@ -88,13 +88,15 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function setText($value) |
| 90 | 90 | { |
| 91 | - if(parent::getText() === $value) |
|
| 92 | - return; |
|
| 91 | + if(parent::getText() === $value) { |
|
| 92 | + return; |
|
| 93 | + } |
|
| 93 | 94 | |
| 94 | 95 | parent::setText($value); |
| 95 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 96 | - $this->getPage()->getCallbackClient()->update( |
|
| 96 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 97 | + $this->getPage()->getCallbackClient()->update( |
|
| 97 | 98 | $this->getDefaultLabelID(), $value); |
| 99 | + } |
|
| 98 | 100 | } |
| 99 | 101 | |
| 100 | 102 | /** |
@@ -106,12 +108,14 @@ discard block |
||
| 106 | 108 | public function setChecked($value) |
| 107 | 109 | { |
| 108 | 110 | $value = TPropertyValue::ensureBoolean($value); |
| 109 | - if(parent::getChecked() === $value) |
|
| 110 | - return; |
|
| 111 | + if(parent::getChecked() === $value) { |
|
| 112 | + return; |
|
| 113 | + } |
|
| 111 | 114 | |
| 112 | 115 | parent::setChecked($value); |
| 113 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 114 | - $this->getPage()->getCallbackClient()->check($this, $value); |
|
| 116 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 117 | + $this->getPage()->getCallbackClient()->check($this, $value); |
|
| 118 | + } |
|
| 115 | 119 | } |
| 116 | 120 | |
| 117 | 121 | /** |
@@ -135,9 +139,10 @@ discard block |
||
| 135 | 139 | protected function renderInputTag($writer,$clientID,$onclick) |
| 136 | 140 | { |
| 137 | 141 | parent::renderInputTag($writer,$clientID,$onclick); |
| 138 | - if ($this->getAutoPostBack()) |
|
| 139 | - $this->getActiveControl()->registerCallbackClientScript( |
|
| 142 | + if ($this->getAutoPostBack()) { |
|
| 143 | + $this->getActiveControl()->registerCallbackClientScript( |
|
| 140 | 144 | $this->getClientClassName(), $this->getPostBackOptions()); |
| 145 | + } |
|
| 141 | 146 | } |
| 142 | 147 | |
| 143 | 148 | /** |
@@ -176,10 +181,11 @@ discard block |
||
| 176 | 181 | */ |
| 177 | 182 | protected function getDefaultLabelID() |
| 178 | 183 | { |
| 179 | - if($attributes=$this->getViewState('LabelAttributes',null)) |
|
| 180 | - return TCheckBox::getLabelAttributes()->itemAt('id'); |
|
| 181 | - else |
|
| 182 | - return $this->getClientID().'_label'; |
|
| 184 | + if($attributes=$this->getViewState('LabelAttributes',null)) { |
|
| 185 | + return TCheckBox::getLabelAttributes()->itemAt('id'); |
|
| 186 | + } else { |
|
| 187 | + return $this->getClientID().'_label'; |
|
| 188 | + } |
|
| 183 | 189 | } |
| 184 | 190 | } |
| 185 | 191 | |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setText($value) |
| 57 | 57 | { |
| 58 | - if(parent::getText() === $value) |
|
| 58 | + if (parent::getText() === $value) |
|
| 59 | 59 | return; |
| 60 | 60 | |
| 61 | 61 | parent::setText($value); |
| 62 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 62 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 63 | 63 | $this->getPage()->getCallbackClient()->update($this, $value); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function setForControl($value) |
| 73 | 73 | { |
| 74 | - if(parent::getForControl() === $value) |
|
| 74 | + if (parent::getForControl() === $value) |
|
| 75 | 75 | return; |
| 76 | 76 | |
| 77 | 77 | parent::setForControl($value); |
| 78 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 78 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 79 | 79 | { |
| 80 | - $id=$this->findControl($value)->getClientID(); |
|
| 80 | + $id = $this->findControl($value)->getClientID(); |
|
| 81 | 81 | $this->getPage()->getCallbackClient()->setAttribute($this, 'for', $id); |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * @param THtmlWriter the writer used for the rendering purpose |
| 88 | 88 | */ |
| 89 | 89 | protected function addAttributesToRender($writer) { |
| 90 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 90 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 91 | 91 | parent::addAttributesToRender($writer); |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -55,12 +55,14 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setText($value) |
| 57 | 57 | { |
| 58 | - if(parent::getText() === $value) |
|
| 59 | - return; |
|
| 58 | + if(parent::getText() === $value) { |
|
| 59 | + return; |
|
| 60 | + } |
|
| 60 | 61 | |
| 61 | 62 | parent::setText($value); |
| 62 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 63 | - $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 63 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 64 | + $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 65 | + } |
|
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | /** |
@@ -71,8 +73,9 @@ discard block |
||
| 71 | 73 | */ |
| 72 | 74 | public function setForControl($value) |
| 73 | 75 | { |
| 74 | - if(parent::getForControl() === $value) |
|
| 75 | - return; |
|
| 76 | + if(parent::getForControl() === $value) { |
|
| 77 | + return; |
|
| 78 | + } |
|
| 76 | 79 | |
| 77 | 80 | parent::setForControl($value); |
| 78 | 81 | if($this->getActiveControl()->canUpdateClientSide()) |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setValue($value) |
| 57 | 57 | { |
| 58 | - if(parent::getValue() === $value) |
|
| 58 | + if (parent::getValue() === $value) |
|
| 59 | 59 | return; |
| 60 | 60 | |
| 61 | 61 | parent::setValue($value); |
| 62 | - if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 62 | + if ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 63 | 63 | $this->getPage()->getCallbackClient()->setValue($this, $value); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | protected function addAttributesToRender($writer) |
| 112 | 112 | { |
| 113 | 113 | parent::addAttributesToRender($writer); |
| 114 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 114 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 115 | 115 | $this->getActiveControl()->registerCallbackClientScript( |
| 116 | 116 | $this->getClientClassName(), $this->getPostBackOptions()); |
| 117 | 117 | } |
@@ -55,12 +55,14 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function setValue($value) |
| 57 | 57 | { |
| 58 | - if(parent::getValue() === $value) |
|
| 59 | - return; |
|
| 58 | + if(parent::getValue() === $value) { |
|
| 59 | + return; |
|
| 60 | + } |
|
| 60 | 61 | |
| 61 | 62 | parent::setValue($value); |
| 62 | - if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 63 | - $this->getPage()->getCallbackClient()->setValue($this, $value); |
|
| 63 | + if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) { |
|
| 64 | + $this->getPage()->getCallbackClient()->setValue($this, $value); |
|
| 65 | + } |
|
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | /** |
@@ -62,11 +62,11 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function setText($value) |
| 64 | 64 | { |
| 65 | - if(parent::getText() === $value) |
|
| 65 | + if (parent::getText() === $value) |
|
| 66 | 66 | return; |
| 67 | 67 | |
| 68 | 68 | parent::setText($value); |
| 69 | - if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 69 | + if ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 70 | 70 | $this->getPage()->getCallbackClient()->setValue($this, $value); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | protected function addAttributesToRender($writer) |
| 119 | 119 | { |
| 120 | 120 | parent::addAttributesToRender($writer); |
| 121 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 121 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 122 | 122 | $this->getActiveControl()->registerCallbackClientScript( |
| 123 | 123 | $this->getClientClassName(), $this->getPostBackOptions()); |
| 124 | 124 | } |
@@ -62,12 +62,14 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function setText($value) |
| 64 | 64 | { |
| 65 | - if(parent::getText() === $value) |
|
| 66 | - return; |
|
| 65 | + if(parent::getText() === $value) { |
|
| 66 | + return; |
|
| 67 | + } |
|
| 67 | 68 | |
| 68 | 69 | parent::setText($value); |
| 69 | - if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) |
|
| 70 | - $this->getPage()->getCallbackClient()->setValue($this, $value); |
|
| 70 | + if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) { |
|
| 71 | + $this->getPage()->getCallbackClient()->setValue($this, $value); |
|
| 72 | + } |
|
| 71 | 73 | } |
| 72 | 74 | |
| 73 | 75 | /** |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function setText($value) |
| 52 | 52 | { |
| 53 | - if(parent::getText() === $value) |
|
| 53 | + if (parent::getText() === $value) |
|
| 54 | 54 | return; |
| 55 | 55 | |
| 56 | 56 | parent::setText($value); |
| 57 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 57 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 58 | 58 | $this->getPage()->getCallbackClient()->update($this, $value); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function setImageUrl($value) |
| 66 | 66 | { |
| 67 | - if(parent::getImageUrl() === $value) |
|
| 67 | + if (parent::getImageUrl() === $value) |
|
| 68 | 68 | return; |
| 69 | 69 | |
| 70 | 70 | parent::setImageUrl($value); |
| 71 | - if($this->getActiveControl()->canUpdateClientSide() && $value !== '') |
|
| 71 | + if ($this->getActiveControl()->canUpdateClientSide() && $value !== '') |
|
| 72 | 72 | { |
| 73 | 73 | $textWriter = new TTextWriter; |
| 74 | 74 | $renderer = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $textWriter); |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function setNavigateUrl($value) |
| 85 | 85 | { |
| 86 | - if(parent::getNavigateUrl() === $value) |
|
| 86 | + if (parent::getNavigateUrl() === $value) |
|
| 87 | 87 | return; |
| 88 | 88 | |
| 89 | 89 | parent::setNavigateUrl($value); |
| 90 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 90 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 91 | 91 | { |
| 92 | 92 | //replace & with & and urldecode the url (setting the href using javascript is literal) |
| 93 | 93 | $url = urldecode(str_replace('&', '&', $value)); |
@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function setTarget($value) |
| 103 | 103 | { |
| 104 | - if(parent::getTarget() === $value) |
|
| 104 | + if (parent::getTarget() === $value) |
|
| 105 | 105 | return; |
| 106 | 106 | |
| 107 | 107 | parent::setTarget($value); |
| 108 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 108 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 109 | 109 | $this->getPage()->getCallbackClient()->setAttribute($this, 'target', $value); |
| 110 | 110 | } |
| 111 | 111 | } |
@@ -50,12 +50,14 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function setText($value) |
| 52 | 52 | { |
| 53 | - if(parent::getText() === $value) |
|
| 54 | - return; |
|
| 53 | + if(parent::getText() === $value) { |
|
| 54 | + return; |
|
| 55 | + } |
|
| 55 | 56 | |
| 56 | 57 | parent::setText($value); |
| 57 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 58 | - $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 58 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 59 | + $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 60 | + } |
|
| 59 | 61 | } |
| 60 | 62 | |
| 61 | 63 | /** |
@@ -64,8 +66,9 @@ discard block |
||
| 64 | 66 | */ |
| 65 | 67 | public function setImageUrl($value) |
| 66 | 68 | { |
| 67 | - if(parent::getImageUrl() === $value) |
|
| 68 | - return; |
|
| 69 | + if(parent::getImageUrl() === $value) { |
|
| 70 | + return; |
|
| 71 | + } |
|
| 69 | 72 | |
| 70 | 73 | parent::setImageUrl($value); |
| 71 | 74 | if($this->getActiveControl()->canUpdateClientSide() && $value !== '') |
@@ -83,8 +86,9 @@ discard block |
||
| 83 | 86 | */ |
| 84 | 87 | public function setNavigateUrl($value) |
| 85 | 88 | { |
| 86 | - if(parent::getNavigateUrl() === $value) |
|
| 87 | - return; |
|
| 89 | + if(parent::getNavigateUrl() === $value) { |
|
| 90 | + return; |
|
| 91 | + } |
|
| 88 | 92 | |
| 89 | 93 | parent::setNavigateUrl($value); |
| 90 | 94 | if($this->getActiveControl()->canUpdateClientSide()) |
@@ -101,12 +105,14 @@ discard block |
||
| 101 | 105 | */ |
| 102 | 106 | public function setTarget($value) |
| 103 | 107 | { |
| 104 | - if(parent::getTarget() === $value) |
|
| 105 | - return; |
|
| 108 | + if(parent::getTarget() === $value) { |
|
| 109 | + return; |
|
| 110 | + } |
|
| 106 | 111 | |
| 107 | 112 | parent::setTarget($value); |
| 108 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 109 | - $this->getPage()->getCallbackClient()->setAttribute($this, 'target', $value); |
|
| 113 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 114 | + $this->getPage()->getCallbackClient()->setAttribute($this, 'target', $value); |
|
| 115 | + } |
|
| 110 | 116 | } |
| 111 | 117 | } |
| 112 | 118 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getAutoPostBack() |
| 39 | 39 | { |
| 40 | - return $this->getViewState('AutoPostBack',true); |
|
| 40 | + return $this->getViewState('AutoPostBack', true); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function setAutoPostBack($value) |
| 50 | 50 | { |
| 51 | - $this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),true); |
|
| 51 | + $this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), true); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | protected function getDatePickerOptions() |
| 59 | 59 | { |
| 60 | 60 | $options = parent::getDatePickerOptions(); |
| 61 | - $options['CausesValidation']=$this->getCausesValidation(); |
|
| 62 | - $options['ValidationGroup']=$this->getValidationGroup(); |
|
| 61 | + $options['CausesValidation'] = $this->getCausesValidation(); |
|
| 62 | + $options['ValidationGroup'] = $this->getValidationGroup(); |
|
| 63 | 63 | $options['EventTarget'] = $this->getUniqueID(); |
| 64 | 64 | $options['ShowCalendar'] = $this->getShowCalendar(); |
| 65 | 65 | $options['AutoPostBack'] = $this->getAutoPostBack(); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | /** |
| 81 | 81 | * @return TBaseActiveCallbackControl standard callback control options. |
| 82 | 82 | */ |
| 83 | - public function getActiveControl(){ |
|
| 83 | + public function getActiveControl() { |
|
| 84 | 84 | return $this->getAdapter()->getBaseActiveControl(); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -88,22 +88,22 @@ discard block |
||
| 88 | 88 | * Client-side Text property can only be updated after the OnLoad stage. |
| 89 | 89 | * @param string text content for the textbox |
| 90 | 90 | */ |
| 91 | - public function setText($value){ |
|
| 92 | - if(parent::getText() === $value) |
|
| 91 | + public function setText($value) { |
|
| 92 | + if (parent::getText() === $value) |
|
| 93 | 93 | return; |
| 94 | 94 | |
| 95 | 95 | parent::setText($value); |
| 96 | - if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){ |
|
| 97 | - $cb=$this->getPage()->getCallbackClient(); |
|
| 96 | + if ($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) { |
|
| 97 | + $cb = $this->getPage()->getCallbackClient(); |
|
| 98 | 98 | $cb->setValue($this, $value); |
| 99 | - if ($this->getInputMode()==TDatePickerInputMode::DropDownList) |
|
| 99 | + if ($this->getInputMode() == TDatePickerInputMode::DropDownList) |
|
| 100 | 100 | { |
| 101 | 101 | $s = Prado::createComponent('System.Util.TDateTimeStamp'); |
| 102 | 102 | $date = $s->getDate($this->getTimeStampFromText()); |
| 103 | - $id=$this->getClientID(); |
|
| 104 | - $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'day', 'Value', $date['mday'], 'select'); |
|
| 105 | - $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon']-1, 'select'); |
|
| 106 | - $cb->select($id.TControl::CLIENT_ID_SEPARATOR.'year', 'Value', $date['year'], 'select'); |
|
| 103 | + $id = $this->getClientID(); |
|
| 104 | + $cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'day', 'Value', $date['mday'], 'select'); |
|
| 105 | + $cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'month', 'Value', $date['mon'] - 1, 'select'); |
|
| 106 | + $cb->select($id . TControl::CLIENT_ID_SEPARATOR . 'year', 'Value', $date['year'], 'select'); |
|
| 107 | 107 | |
| 108 | 108 | } |
| 109 | 109 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * This method is mainly used by framework and control developers. |
| 116 | 116 | * @param TCallbackEventParameter the event parameter |
| 117 | 117 | */ |
| 118 | - public function raiseCallbackEvent($param){ |
|
| 118 | + public function raiseCallbackEvent($param) { |
|
| 119 | 119 | $this->onCallback($param); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * handler can be invoked. |
| 127 | 127 | * @param TCallbackEventParameter event parameter to be passed to the event handlers |
| 128 | 128 | */ |
| 129 | - public function onCallback($param){ |
|
| 129 | + public function onCallback($param) { |
|
| 130 | 130 | $this->raiseEvent('OnCallback', $this, $param); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | protected function renderClientControlScript($writer) |
| 144 | 144 | { |
| 145 | 145 | $cs = $this->getPage()->getClientScript(); |
| 146 | - if(!$cs->isEndScriptRegistered('TDatePicker.spacer')) |
|
| 146 | + if (!$cs->isEndScriptRegistered('TDatePicker.spacer')) |
|
| 147 | 147 | { |
| 148 | 148 | $spacer = $this->getAssetUrl('spacer.gif'); |
| 149 | 149 | $code = "Prado.WebUI.TDatePicker.spacer = '$spacer';"; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | $options = TJavaScript::encode($this->getDatePickerOptions()); |
| 154 | 154 | $code = "new Prado.WebUI.TActiveDatePicker($options);"; |
| 155 | - $cs->registerEndScript("prado:".$this->getClientID(), $code); |
|
| 155 | + $cs->registerEndScript("prado:" . $this->getClientID(), $code); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -89,8 +89,9 @@ |
||
| 89 | 89 | * @param string text content for the textbox |
| 90 | 90 | */ |
| 91 | 91 | public function setText($value){ |
| 92 | - if(parent::getText() === $value) |
|
| 93 | - return; |
|
| 92 | + if(parent::getText() === $value) { |
|
| 93 | + return; |
|
| 94 | + } |
|
| 94 | 95 | |
| 95 | 96 | parent::setText($value); |
| 96 | 97 | if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){ |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function setAlternateText($value) |
| 60 | 60 | { |
| 61 | - if(parent::getAlternateText() === $value) |
|
| 61 | + if (parent::getAlternateText() === $value) |
|
| 62 | 62 | return; |
| 63 | 63 | |
| 64 | 64 | parent::setAlternateText($value); |
| 65 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 65 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 66 | 66 | $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function setImageAlign($value) |
| 77 | 77 | { |
| 78 | - if(parent::getImageAlign() === $value) |
|
| 78 | + if (parent::getImageAlign() === $value) |
|
| 79 | 79 | return; |
| 80 | 80 | |
| 81 | 81 | parent::setImageAlign($value); |
| 82 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 82 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 83 | 83 | $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -88,11 +88,11 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function setImageUrl($value) |
| 90 | 90 | { |
| 91 | - if(parent::getImageUrl() === $value) |
|
| 91 | + if (parent::getImageUrl() === $value) |
|
| 92 | 92 | return; |
| 93 | 93 | |
| 94 | 94 | parent::setImageUrl($value); |
| 95 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 95 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 96 | 96 | $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function setDescriptionUrl($value) |
| 103 | 103 | { |
| 104 | - if(parent::getDescriptionUrl() === $value) |
|
| 104 | + if (parent::getDescriptionUrl() === $value) |
|
| 105 | 105 | return; |
| 106 | 106 | |
| 107 | 107 | parent::setDescriptionUrl($value); |
| 108 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 108 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 109 | 109 | $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | protected function addAttributesToRender($writer) |
| 152 | 152 | { |
| 153 | 153 | parent::addAttributesToRender($writer); |
| 154 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 154 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 155 | 155 | $this->getActiveControl()->registerCallbackClientScript( |
| 156 | 156 | $this->getClientClassName(), $this->getPostBackOptions()); |
| 157 | 157 | } |
@@ -58,12 +58,14 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function setAlternateText($value) |
| 60 | 60 | { |
| 61 | - if(parent::getAlternateText() === $value) |
|
| 62 | - return; |
|
| 61 | + if(parent::getAlternateText() === $value) { |
|
| 62 | + return; |
|
| 63 | + } |
|
| 63 | 64 | |
| 64 | 65 | parent::setAlternateText($value); |
| 65 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 66 | - $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); |
|
| 66 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 67 | + $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); |
|
| 68 | + } |
|
| 67 | 69 | } |
| 68 | 70 | |
| 69 | 71 | /** |
@@ -75,12 +77,14 @@ discard block |
||
| 75 | 77 | */ |
| 76 | 78 | public function setImageAlign($value) |
| 77 | 79 | { |
| 78 | - if(parent::getImageAlign() === $value) |
|
| 79 | - return; |
|
| 80 | + if(parent::getImageAlign() === $value) { |
|
| 81 | + return; |
|
| 82 | + } |
|
| 80 | 83 | |
| 81 | 84 | parent::setImageAlign($value); |
| 82 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 83 | - $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); |
|
| 85 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 86 | + $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); |
|
| 87 | + } |
|
| 84 | 88 | } |
| 85 | 89 | |
| 86 | 90 | /** |
@@ -88,12 +92,14 @@ discard block |
||
| 88 | 92 | */ |
| 89 | 93 | public function setImageUrl($value) |
| 90 | 94 | { |
| 91 | - if(parent::getImageUrl() === $value) |
|
| 92 | - return; |
|
| 95 | + if(parent::getImageUrl() === $value) { |
|
| 96 | + return; |
|
| 97 | + } |
|
| 93 | 98 | |
| 94 | 99 | parent::setImageUrl($value); |
| 95 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 96 | - $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); |
|
| 100 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 101 | + $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); |
|
| 102 | + } |
|
| 97 | 103 | } |
| 98 | 104 | |
| 99 | 105 | /** |
@@ -101,12 +107,14 @@ discard block |
||
| 101 | 107 | */ |
| 102 | 108 | public function setDescriptionUrl($value) |
| 103 | 109 | { |
| 104 | - if(parent::getDescriptionUrl() === $value) |
|
| 105 | - return; |
|
| 110 | + if(parent::getDescriptionUrl() === $value) { |
|
| 111 | + return; |
|
| 112 | + } |
|
| 106 | 113 | |
| 107 | 114 | parent::setDescriptionUrl($value); |
| 108 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 109 | - $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); |
|
| 115 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 116 | + $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); |
|
| 117 | + } |
|
| 110 | 118 | } |
| 111 | 119 | |
| 112 | 120 | /** |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function setText($value) |
| 97 | 97 | { |
| 98 | - if(parent::getText() === $value) |
|
| 98 | + if (parent::getText() === $value) |
|
| 99 | 99 | return; |
| 100 | 100 | |
| 101 | 101 | parent::setText($value); |
| 102 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 102 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 103 | 103 | $this->getPage()->getCallbackClient()->update($this, $value); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | protected function addAttributesToRender($writer) |
| 119 | 119 | { |
| 120 | 120 | parent::addAttributesToRender($writer); |
| 121 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 121 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 122 | 122 | |
| 123 | - if($this->getEnabled(true)) |
|
| 123 | + if ($this->getEnabled(true)) |
|
| 124 | 124 | { |
| 125 | 125 | $this->getActiveControl()->registerCallbackClientScript( |
| 126 | 126 | $this->getClientClassName(), $this->getPostBackOptions()); |
@@ -134,15 +134,15 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function setEnabled($value) |
| 136 | 136 | { |
| 137 | - if(parent::getEnabled() === $value) |
|
| 137 | + if (parent::getEnabled() === $value) |
|
| 138 | 138 | return; |
| 139 | 139 | |
| 140 | 140 | parent::setEnabled($value); |
| 141 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 141 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 142 | 142 | { |
| 143 | - if($this->getEnabled(true)) |
|
| 143 | + if ($this->getEnabled(true)) |
|
| 144 | 144 | { |
| 145 | - $nop = "javascript:;//".$this->getClientID(); |
|
| 145 | + $nop = "javascript:;//" . $this->getClientID(); |
|
| 146 | 146 | $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop); |
| 147 | 147 | |
| 148 | 148 | $this->getActiveControl()->registerCallbackClientScript( |
@@ -95,12 +95,14 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function setText($value) |
| 97 | 97 | { |
| 98 | - if(parent::getText() === $value) |
|
| 99 | - return; |
|
| 98 | + if(parent::getText() === $value) { |
|
| 99 | + return; |
|
| 100 | + } |
|
| 100 | 101 | |
| 101 | 102 | parent::setText($value); |
| 102 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 103 | - $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 103 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 104 | + $this->getPage()->getCallbackClient()->update($this, $value); |
|
| 105 | + } |
|
| 104 | 106 | } |
| 105 | 107 | |
| 106 | 108 | /** |
@@ -134,8 +136,9 @@ discard block |
||
| 134 | 136 | */ |
| 135 | 137 | public function setEnabled($value) |
| 136 | 138 | { |
| 137 | - if(parent::getEnabled() === $value) |
|
| 138 | - return; |
|
| 139 | + if(parent::getEnabled() === $value) { |
|
| 140 | + return; |
|
| 141 | + } |
|
| 139 | 142 | |
| 140 | 143 | parent::setEnabled($value); |
| 141 | 144 | if($this->getActiveControl()->canUpdateClientSide()) |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | protected function getContainerID() |
| 55 | 55 | { |
| 56 | - return $this->ClientID.'_Container'; |
|
| 56 | + return $this->ClientID . '_Container'; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -64,13 +64,13 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function render($writer) |
| 66 | 66 | { |
| 67 | - if($this->getHasPreRendered()) { |
|
| 67 | + if ($this->getHasPreRendered()) { |
|
| 68 | 68 | $this->renderMultiView($writer); |
| 69 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 70 | - $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
| 69 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 70 | + $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer); |
|
| 71 | 71 | } |
| 72 | 72 | else |
| 73 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
| 73 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function setActiveViewIndex($value) |
| 94 | 94 | { |
| 95 | - if(parent::getActiveViewIndex() === $value) |
|
| 95 | + if (parent::getActiveViewIndex() === $value) |
|
| 96 | 96 | return; |
| 97 | 97 | |
| 98 | 98 | parent::setActiveViewIndex($value); |
| 99 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 100 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 99 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 100 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -106,11 +106,11 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function setActiveView($value) |
| 108 | 108 | { |
| 109 | - if(parent::getActiveView() === $value) |
|
| 109 | + if (parent::getActiveView() === $value) |
|
| 110 | 110 | return; |
| 111 | 111 | |
| 112 | 112 | parent::setActiveView($value); |
| 113 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 114 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 113 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
| 114 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
| 115 | 115 | } |
| 116 | 116 | } |
@@ -66,11 +66,12 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | if($this->getHasPreRendered()) { |
| 68 | 68 | $this->renderMultiView($writer); |
| 69 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 70 | - $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
| 69 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 70 | + $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
| 71 | + } |
|
| 72 | + } else { |
|
| 73 | + $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
| 71 | 74 | } |
| 72 | - else |
|
| 73 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
| 74 | 75 | } |
| 75 | 76 | |
| 76 | 77 | /** |
@@ -92,12 +93,14 @@ discard block |
||
| 92 | 93 | */ |
| 93 | 94 | public function setActiveViewIndex($value) |
| 94 | 95 | { |
| 95 | - if(parent::getActiveViewIndex() === $value) |
|
| 96 | - return; |
|
| 96 | + if(parent::getActiveViewIndex() === $value) { |
|
| 97 | + return; |
|
| 98 | + } |
|
| 97 | 99 | |
| 98 | 100 | parent::setActiveViewIndex($value); |
| 99 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 100 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 101 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 102 | + $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 103 | + } |
|
| 101 | 104 | } |
| 102 | 105 | |
| 103 | 106 | /** |
@@ -106,11 +109,13 @@ discard block |
||
| 106 | 109 | */ |
| 107 | 110 | public function setActiveView($value) |
| 108 | 111 | { |
| 109 | - if(parent::getActiveView() === $value) |
|
| 110 | - return; |
|
| 112 | + if(parent::getActiveView() === $value) { |
|
| 113 | + return; |
|
| 114 | + } |
|
| 111 | 115 | |
| 112 | 116 | parent::setActiveView($value); |
| 113 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
| 114 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 117 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
| 118 | + $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 119 | + } |
|
| 115 | 120 | } |
| 116 | 121 | } |