@@ -463,14 +463,14 @@ |
||
463 | 463 | */ |
464 | 464 | public function getIsValid() |
465 | 465 | { |
466 | - return $this->_isValid; |
|
466 | + return $this->_isValid; |
|
467 | 467 | } |
468 | 468 | /** |
469 | 469 | * @param bool wether this control is valid. |
470 | 470 | */ |
471 | 471 | public function setIsValid($value) |
472 | 472 | { |
473 | - $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
473 | + $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | /** |
@@ -463,14 +463,14 @@ |
||
463 | 463 | */ |
464 | 464 | public function getIsValid() |
465 | 465 | { |
466 | - return $this->_isValid; |
|
466 | + return $this->_isValid; |
|
467 | 467 | } |
468 | 468 | /** |
469 | 469 | * @param bool wether this control is valid. |
470 | 470 | */ |
471 | 471 | public function setIsValid($value) |
472 | 472 | { |
473 | - $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
473 | + $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | /** |
@@ -417,12 +417,12 @@ |
||
417 | 417 | return false; |
418 | 418 | } |
419 | 419 | |
420 | - /** |
|
421 | - * Returns all table names in the database. |
|
422 | - * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema. |
|
423 | - * If not empty, the returned table names will be prefixed with the schema name. |
|
424 | - * @return array all table names in the database. |
|
425 | - */ |
|
420 | + /** |
|
421 | + * Returns all table names in the database. |
|
422 | + * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema. |
|
423 | + * If not empty, the returned table names will be prefixed with the schema name. |
|
424 | + * @return array all table names in the database. |
|
425 | + */ |
|
426 | 426 | public function findTableNames($schema='public') |
427 | 427 | { |
428 | 428 | if($schema==='') |
@@ -417,12 +417,12 @@ |
||
417 | 417 | return false; |
418 | 418 | } |
419 | 419 | |
420 | - /** |
|
421 | - * Returns all table names in the database. |
|
422 | - * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema. |
|
423 | - * If not empty, the returned table names will be prefixed with the schema name. |
|
424 | - * @return array all table names in the database. |
|
425 | - */ |
|
420 | + /** |
|
421 | + * Returns all table names in the database. |
|
422 | + * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema. |
|
423 | + * If not empty, the returned table names will be prefixed with the schema name. |
|
424 | + * @return array all table names in the database. |
|
425 | + */ |
|
426 | 426 | public function findTableNames($schema='public') |
427 | 427 | { |
428 | 428 | if($schema==='') |
@@ -124,9 +124,9 @@ |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * Sets the date format for a date validation |
|
128 | - * @param string the date format value |
|
129 | - */ |
|
127 | + * Sets the date format for a date validation |
|
128 | + * @param string the date format value |
|
129 | + */ |
|
130 | 130 | public function setDateFormat($value) |
131 | 131 | { |
132 | 132 | $this->setViewState('DateFormat', $value, ''); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Sets the horizontal alignment of the contents within the panel. |
104 | - * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
104 | + * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
105 | 105 | * @param string the horizontal alignment |
106 | 106 | */ |
107 | 107 | public function setHorizontalAlign($value) |
@@ -60,8 +60,8 @@ |
||
60 | 60 | * @param THtmlWriter the writer used for the rendering purpose |
61 | 61 | */ |
62 | 62 | protected function addAttributesToRender($writer) { |
63 | - $writer->addAttribute('id',$this->getClientID()); |
|
64 | - parent::addAttributesToRender($writer); |
|
63 | + $writer->addAttribute('id',$this->getClientID()); |
|
64 | + parent::addAttributesToRender($writer); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function __construct() |
33 | 33 | { |
34 | - parent::__construct(); |
|
35 | - $this->setAdapter(new TActiveControlAdapter($this)); |
|
34 | + parent::__construct(); |
|
35 | + $this->setAdapter(new TActiveControlAdapter($this)); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getActiveControl() |
42 | 42 | { |
43 | - return $this->getAdapter()->getBaseActiveControl(); |
|
43 | + return $this->getAdapter()->getBaseActiveControl(); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function setDataSource($value) |
54 | 54 | { |
55 | - parent::setDataSource($value); |
|
56 | - if($this->getActiveControl()->canUpdateClientSide()) { |
|
57 | - $this->renderPager(); |
|
58 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
59 | - } |
|
55 | + parent::setDataSource($value); |
|
56 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
57 | + $this->renderPager(); |
|
58 | + $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
59 | + } |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function getContainerID() |
67 | 67 | { |
68 | - return $this->ClientID.'_Container'; |
|
68 | + return $this->ClientID.'_Container'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function render($writer) |
78 | 78 | { |
79 | - if($this->getHasPreRendered()) { |
|
80 | - $this->renderDataList($writer); |
|
81 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
82 | - } |
|
83 | - else { |
|
84 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
85 | - } |
|
79 | + if($this->getHasPreRendered()) { |
|
80 | + $this->renderDataList($writer); |
|
81 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
82 | + } |
|
83 | + else { |
|
84 | + $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
85 | + } |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | */ |
93 | 93 | private function renderPager() |
94 | 94 | { |
95 | - $pager=$this->getPage()->findControlsByType('TActivePager', false); |
|
96 | - foreach($pager as $item) |
|
97 | - { |
|
98 | - if($item->ControlToPaginate==$this->ID) { |
|
99 | - $writer=$this->getResponse()->createHtmlWriter(); |
|
100 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
101 | - } |
|
102 | - } |
|
95 | + $pager=$this->getPage()->findControlsByType('TActivePager', false); |
|
96 | + foreach($pager as $item) |
|
97 | + { |
|
98 | + if($item->ControlToPaginate==$this->ID) { |
|
99 | + $writer=$this->getResponse()->createHtmlWriter(); |
|
100 | + $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
101 | + } |
|
102 | + } |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function renderDataList($writer) |
111 | 111 | { |
112 | - $writer->write('<span id="'.$this->getContainerID().'">'); |
|
113 | - parent::render($writer); |
|
114 | - $writer->write('</span>'); |
|
112 | + $writer->write('<span id="'.$this->getContainerID().'">'); |
|
113 | + parent::render($writer); |
|
114 | + $writer->write('</span>'); |
|
115 | 115 | } |
116 | 116 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function loadState() { |
98 | 98 | parent::loadState(); |
99 | - $this->getControl()->getOptions()->setControl($this->getControl()); |
|
99 | + $this->getControl()->getOptions()->setControl($this->getControl()); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | } |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | class TJuiEventParameter extends TCallbackEventParameter |
131 | 131 | { |
132 | 132 | /** |
133 | - * getControl |
|
134 | - * |
|
135 | - * Compatibility method to get a control from its clientside id |
|
136 | - * @return TControl control, or null if not found |
|
133 | + * getControl |
|
134 | + * |
|
135 | + * Compatibility method to get a control from its clientside id |
|
136 | + * @return TControl control, or null if not found |
|
137 | 137 | */ |
138 | 138 | public function getControl($id) |
139 | 139 | { |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | */ |
185 | 185 | protected function addStatesToTrack() |
186 | 186 | { |
187 | - parent::addStatesToTrack(); |
|
188 | - $states = $this->getStatesToTrack(); |
|
189 | - $states['JuiOptions'] = array('TMapCollectionDiff', array($this, 'updateJuiOptions')); |
|
187 | + parent::addStatesToTrack(); |
|
188 | + $states = $this->getStatesToTrack(); |
|
189 | + $states['JuiOptions'] = array('TMapCollectionDiff', array($this, 'updateJuiOptions')); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | */ |
196 | 196 | protected function updateJuiOptions($options) |
197 | 197 | { |
198 | - foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
199 | - $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });"; |
|
200 | - $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code); |
|
198 | + foreach ($options as $key => $value) $options[$key] = $key . ': ' . (is_string($value) ? "'{$value}'" : TPropertyValue::ensureString($value)); |
|
199 | + $code = "jQuery('#{$this->_control->getWidgetID()}').{$this->_control->getWidget()}('option', { " . implode(', ', $options) . " });"; |
|
200 | + $this->_control->getPage()->getClientScript()->registerEndScript(sprintf('%08X', crc32($code)), $code); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | } |
204 | 204 | \ No newline at end of file |