@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | public function createNewHtmlWriter($type, $writer) |
| 73 | 73 | { |
| 74 | - return $this->_response->createNewHtmlWriter($type,$writer); |
|
| 74 | + return $this->_response->createNewHtmlWriter($type, $writer); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if(is_array($config)) |
| 78 | 78 | { |
| 79 | 79 | foreach($config['json'] as $id => $json) |
| 80 | - $this->_services[$id] = $json; |
|
| 80 | + $this->_services[$id]=$json; |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | else |
@@ -109,14 +109,14 @@ discard block |
||
| 109 | 109 | $service=Prado::createComponent($serviceConfig['class']); |
| 110 | 110 | if($service instanceof TJsonResponse) |
| 111 | 111 | { |
| 112 | - $properties = isset($serviceConfig['properties'])?$serviceConfig['properties']:array(); |
|
| 113 | - $this->createJsonResponse($service,$properties,$serviceConfig); |
|
| 112 | + $properties=isset($serviceConfig['properties']) ? $serviceConfig['properties'] : array(); |
|
| 113 | + $this->createJsonResponse($service, $properties, $serviceConfig); |
|
| 114 | 114 | } |
| 115 | 115 | else |
| 116 | - throw new TConfigurationException('jsonservice_response_type_invalid',$id); |
|
| 116 | + throw new TConfigurationException('jsonservice_response_type_invalid', $id); |
|
| 117 | 117 | } |
| 118 | 118 | else |
| 119 | - throw new TConfigurationException('jsonservice_class_required',$id); |
|
| 119 | + throw new TConfigurationException('jsonservice_class_required', $id); |
|
| 120 | 120 | } |
| 121 | 121 | else |
| 122 | 122 | { |
@@ -125,33 +125,33 @@ discard block |
||
| 125 | 125 | { |
| 126 | 126 | $service=Prado::createComponent($class); |
| 127 | 127 | if($service instanceof TJsonResponse) |
| 128 | - $this->createJsonResponse($service,$properties,$serviceConfig); |
|
| 128 | + $this->createJsonResponse($service, $properties, $serviceConfig); |
|
| 129 | 129 | else |
| 130 | - throw new TConfigurationException('jsonservice_response_type_invalid',$id); |
|
| 130 | + throw new TConfigurationException('jsonservice_response_type_invalid', $id); |
|
| 131 | 131 | } |
| 132 | 132 | else |
| 133 | - throw new TConfigurationException('jsonservice_class_required',$id); |
|
| 133 | + throw new TConfigurationException('jsonservice_class_required', $id); |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | else |
| 137 | - throw new THttpException(404,'jsonservice_provider_unknown',$id); |
|
| 137 | + throw new THttpException(404, 'jsonservice_provider_unknown', $id); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | 141 | * Renders content provided by TJsonResponse::getJsonContent() as |
| 142 | 142 | * javascript in JSON format. |
| 143 | 143 | */ |
| 144 | - protected function createJsonResponse($service,$properties,$config) |
|
| 144 | + protected function createJsonResponse($service, $properties, $config) |
|
| 145 | 145 | { |
| 146 | 146 | // init service properties |
| 147 | 147 | foreach($properties as $name=>$value) |
| 148 | - $service->setSubproperty($name,$value); |
|
| 148 | + $service->setSubproperty($name, $value); |
|
| 149 | 149 | $service->init($config); |
| 150 | 150 | |
| 151 | 151 | //send content if not null |
| 152 | 152 | if(($content=$service->getJsonContent())!==null) |
| 153 | 153 | { |
| 154 | - $response = $this->getResponse(); |
|
| 154 | + $response=$this->getResponse(); |
|
| 155 | 155 | $response->setContentType('application/json'); |
| 156 | 156 | $response->setCharset('UTF-8'); |
| 157 | 157 | //send content |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if($cache===null || !($cache instanceof ICache)) |
| 111 | 111 | { |
| 112 | 112 | if($this->_cacheModuleID!=='') |
| 113 | - throw new TConfigurationException('cachepagestatepersister_cachemoduleid_invalid',$this->_cacheModuleID); |
|
| 113 | + throw new TConfigurationException('cachepagestatepersister_cachemoduleid_invalid', $this->_cacheModuleID); |
|
| 114 | 114 | else |
| 115 | 115 | throw new TConfigurationException('cachepagestatepersister_cache_required'); |
| 116 | 116 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function setCacheTimeout($value) |
| 135 | 135 | { |
| 136 | - if(($value=TPropertyValue::ensureInteger($value))>=0) |
|
| 136 | + if(($value=TPropertyValue::ensureInteger($value)) >= 0) |
|
| 137 | 137 | $this->_timeout=$value; |
| 138 | 138 | else |
| 139 | 139 | throw new TInvalidDataValueException('cachepagestatepersister_timeout_invalid'); |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function save($data) |
| 175 | 175 | { |
| 176 | - $timestamp=(string)microtime(true); |
|
| 176 | + $timestamp=(string) microtime(true); |
|
| 177 | 177 | $key=$this->calculateKey($timestamp); |
| 178 | - $this->getCache()->add($key,$data,$this->_timeout); |
|
| 179 | - $this->_page->setClientState(TPageStateFormatter::serialize($this->_page,$timestamp)); |
|
| 178 | + $this->getCache()->add($key, $data, $this->_timeout); |
|
| 179 | + $this->_page->setClientState(TPageStateFormatter::serialize($this->_page, $timestamp)); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -186,13 +186,13 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | public function load() |
| 188 | 188 | { |
| 189 | - if(($timestamp=TPageStateFormatter::unserialize($this->_page,$this->_page->getRequestClientState()))!==null) |
|
| 189 | + if(($timestamp=TPageStateFormatter::unserialize($this->_page, $this->_page->getRequestClientState()))!==null) |
|
| 190 | 190 | { |
| 191 | 191 | $key=$this->calculateKey($timestamp); |
| 192 | 192 | if(($data=$this->getCache()->get($key))!==false) |
| 193 | 193 | return $data; |
| 194 | 194 | } |
| 195 | - throw new THttpException(400,'cachepagestatepersister_pagestate_corrupted'); |
|
| 195 | + throw new THttpException(400, 'cachepagestatepersister_pagestate_corrupted'); |
|
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function __construct() |
| 70 | 70 | { |
| 71 | - $this->_actions = new TList; |
|
| 71 | + $this->_actions=new TList; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | public function callClientFunction($function, $params=array()) |
| 89 | 89 | { |
| 90 | 90 | if(!is_array($params)) |
| 91 | - $params = array($params); |
|
| 91 | + $params=array($params); |
|
| 92 | 92 | |
| 93 | 93 | if(count($params) > 0) |
| 94 | 94 | { |
| 95 | - if ($params[0] instanceof ISurroundable) |
|
| 96 | - $params[0] = $params[0]->getSurroundingTagID(); |
|
| 95 | + if($params[0] instanceof ISurroundable) |
|
| 96 | + $params[0]=$params[0]->getSurroundingTagID(); |
|
| 97 | 97 | elseif($params[0] instanceof TControl) |
| 98 | - $params[0] = $params[0]->getClientID(); |
|
| 98 | + $params[0]=$params[0]->getClientID(); |
|
| 99 | 99 | } |
| 100 | 100 | $this->_actions->add(array($function => $params)); |
| 101 | 101 | } |
@@ -108,13 +108,13 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function jQuery($element, $method, $params=array()) |
| 110 | 110 | { |
| 111 | - if ($element instanceof ISurroundable) |
|
| 112 | - $element = $element->getSurroundingTagID(); |
|
| 111 | + if($element instanceof ISurroundable) |
|
| 112 | + $element=$element->getSurroundingTagID(); |
|
| 113 | 113 | elseif($element instanceof TControl) |
| 114 | - $element = $element->getClientID(); |
|
| 114 | + $element=$element->getClientID(); |
|
| 115 | 115 | |
| 116 | 116 | if(!is_array($params)) |
| 117 | - $params = array($params); |
|
| 117 | + $params=array($params); |
|
| 118 | 118 | |
| 119 | 119 | $this->_actions->add(array('Prado.Element.j' => array($element, $method, $params))); |
| 120 | 120 | } |
@@ -147,14 +147,14 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function select($control, $method='Value', $value=null, $type=null) |
| 149 | 149 | { |
| 150 | - $method = TPropertyValue::ensureEnum($method, |
|
| 150 | + $method=TPropertyValue::ensureEnum($method, |
|
| 151 | 151 | 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert'); |
| 152 | - $type = ($type===null) ? $this->getSelectionControlType($control) : $type; |
|
| 153 | - $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1; |
|
| 152 | + $type=($type===null) ? $this->getSelectionControlType($control) : $type; |
|
| 153 | + $total=$this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1; |
|
| 154 | 154 | |
| 155 | 155 | // pass the ID to avoid getting the surrounding elements (ISurroundable) |
| 156 | 156 | if($control instanceof TControl) |
| 157 | - $control = $control->getClientID(); |
|
| 157 | + $control=$control->getClientID(); |
|
| 158 | 158 | |
| 159 | 159 | $this->callClientFunction('Prado.Element.select', |
| 160 | 160 | array($control, $type.$method, $value, $total)); |
@@ -214,9 +214,9 @@ discard block |
||
| 214 | 214 | public function setAttribute($control, $name, $value) |
| 215 | 215 | { |
| 216 | 216 | // Attributes should be applied on Surrounding tag, except for 'disabled' attribute |
| 217 | - if ($control instanceof ISurroundable && strtolower($name)!=='disabled') |
|
| 217 | + if($control instanceof ISurroundable && strtolower($name)!=='disabled') |
|
| 218 | 218 | $control=$control->getSurroundingTagID(); |
| 219 | - $this->callClientFunction('Prado.Element.setAttribute',array($control, $name, $value)); |
|
| 219 | + $this->callClientFunction('Prado.Element.setAttribute', array($control, $name, $value)); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -226,25 +226,25 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function setListItems($control, $items) |
| 228 | 228 | { |
| 229 | - $options = array(); |
|
| 229 | + $options=array(); |
|
| 230 | 230 | if($control instanceof TListControl) |
| 231 | 231 | { |
| 232 | - $promptText = $control->getPromptText(); |
|
| 233 | - $promptValue = $control->getPromptValue(); |
|
| 232 | + $promptText=$control->getPromptText(); |
|
| 233 | + $promptValue=$control->getPromptValue(); |
|
| 234 | 234 | |
| 235 | 235 | if($promptValue==='') |
| 236 | - $promptValue = $promptText; |
|
| 236 | + $promptValue=$promptText; |
|
| 237 | 237 | |
| 238 | 238 | if($promptValue!=='') |
| 239 | - $options[] = array($promptText, $promptValue); |
|
| 239 | + $options[]=array($promptText, $promptValue); |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | foreach($items as $item) |
| 243 | 243 | { |
| 244 | 244 | if($item->getHasAttributes()) |
| 245 | - $options[] = array($item->getText(),$item->getValue(), $item->getAttributes()->itemAt('Group')); |
|
| 245 | + $options[]=array($item->getText(), $item->getValue(), $item->getAttributes()->itemAt('Group')); |
|
| 246 | 246 | else |
| 247 | - $options[] = array($item->getText(),$item->getValue()); |
|
| 247 | + $options[]=array($item->getText(), $item->getValue()); |
|
| 248 | 248 | } |
| 249 | 249 | $this->callClientFunction('Prado.Element.setOptions', array($control, $options)); |
| 250 | 250 | } |
@@ -422,16 +422,16 @@ discard block |
||
| 422 | 422 | { |
| 423 | 423 | if($content instanceof TControl) |
| 424 | 424 | { |
| 425 | - $boundary = $this->getRenderedContentBoundary($content); |
|
| 426 | - $content = null; |
|
| 425 | + $boundary=$this->getRenderedContentBoundary($content); |
|
| 426 | + $content=null; |
|
| 427 | 427 | } |
| 428 | 428 | else if($content instanceof THtmlWriter) |
| 429 | 429 | { |
| 430 | - $boundary = $this->getResponseContentBoundary($content); |
|
| 431 | - $content = null; |
|
| 430 | + $boundary=$this->getResponseContentBoundary($content); |
|
| 431 | + $content=null; |
|
| 432 | 432 | } |
| 433 | 433 | else |
| 434 | - $boundary = null; |
|
| 434 | + $boundary=null; |
|
| 435 | 435 | |
| 436 | 436 | $this->callClientFunction('Prado.Element.replace', array($element, $content, $boundary, $self)); |
| 437 | 437 | } |
@@ -456,11 +456,11 @@ discard block |
||
| 456 | 456 | { |
| 457 | 457 | if($writer instanceof THtmlWriter) |
| 458 | 458 | { |
| 459 | - $boundary = $this->getResponseContentBoundary($writer); |
|
| 460 | - $content = null; |
|
| 459 | + $boundary=$this->getResponseContentBoundary($writer); |
|
| 460 | + $content=null; |
|
| 461 | 461 | } else { |
| 462 | - $boundary = null; |
|
| 463 | - $content = $writer; |
|
| 462 | + $boundary=null; |
|
| 463 | + $content=$writer; |
|
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | $this->callClientFunction('Prado.Element.evaluateScript', array($content, $boundary)); |
@@ -476,11 +476,11 @@ discard block |
||
| 476 | 476 | { |
| 477 | 477 | if($content instanceof TControl) |
| 478 | 478 | { |
| 479 | - $boundary = $this->getRenderedContentBoundary($content); |
|
| 479 | + $boundary=$this->getRenderedContentBoundary($content); |
|
| 480 | 480 | } |
| 481 | 481 | elseif($content instanceof THtmlWriter) |
| 482 | 482 | { |
| 483 | - $boundary = $this->getResponseContentBoundary($content); |
|
| 483 | + $boundary=$this->getResponseContentBoundary($content); |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | $this->callClientFunction('Prado.Element.appendScriptBlock', array($boundary)); |
@@ -496,8 +496,8 @@ discard block |
||
| 496 | 496 | */ |
| 497 | 497 | private function getRenderedContentBoundary($control) |
| 498 | 498 | { |
| 499 | - $writer = $this->getResponse()->createHtmlWriter(); |
|
| 500 | - $adapter = $control->getPage()->getAdapter(); |
|
| 499 | + $writer=$this->getResponse()->createHtmlWriter(); |
|
| 500 | + $adapter=$control->getPage()->getAdapter(); |
|
| 501 | 501 | $adapter->registerControlToRender($control, $writer); |
| 502 | 502 | return $writer->getWriter()->getBoundary(); |
| 503 | 503 | } |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | */ |
| 562 | 562 | public function fadeTo($element, $value, $duration=500) |
| 563 | 563 | { |
| 564 | - $value = TPropertyValue::ensureFloat($value); |
|
| 564 | + $value=TPropertyValue::ensureFloat($value); |
|
| 565 | 565 | $this->visualEffect('fadeTo', $element, array($duration, $value)); |
| 566 | 566 | } |
| 567 | 567 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function setDecayRate($value) |
| 81 | 81 | { |
| 82 | - $decay = TPropertyValue::ensureFloat($value); |
|
| 82 | + $decay=TPropertyValue::ensureFloat($value); |
|
| 83 | 83 | if($decay < 0) |
| 84 | 84 | throw new TConfigurationException('callback_decay_be_not_negative', $this->getID()); |
| 85 | 85 | $this->setViewState('Decay', $decay); |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | protected function getTriggerOptions() |
| 92 | 92 | { |
| 93 | - $options = parent::getTriggerOptions(); |
|
| 94 | - $options['PropertyName'] = $this->getPropertyName(); |
|
| 95 | - $options['Interval'] = $this->getInterval(); |
|
| 96 | - $options['Decay'] = $this->getDecayRate(); |
|
| 93 | + $options=parent::getTriggerOptions(); |
|
| 94 | + $options['PropertyName']=$this->getPropertyName(); |
|
| 95 | + $options['Interval']=$this->getInterval(); |
|
| 96 | + $options['Decay']=$this->getDecayRate(); |
|
| 97 | 97 | return $options; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | protected function renderCustomScriptFile($writer) |
| 43 | 43 | { |
| 44 | - if(($scriptUrl = $this->getScriptUrl())!=='') |
|
| 44 | + if(($scriptUrl=$this->getScriptUrl())!=='') |
|
| 45 | 45 | { |
| 46 | 46 | if($this->getPage()->getIsCallback()) |
| 47 | 47 | { |
| 48 | - $cs = $this->getPage()->getClientScript(); |
|
| 48 | + $cs=$this->getPage()->getClientScript(); |
|
| 49 | 49 | $uniqueid=$this->ClientID.'_custom'; |
| 50 | 50 | if(!$cs->isScriptFileRegistered($uniqueid)) |
| 51 | 51 | $cs->registerScriptFile($uniqueid, $scriptUrl); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | if($this->getPage()->getIsCallback()) |
| 67 | 67 | { |
| 68 | - $extWriter= $this->getPage()->getResponse()->createHtmlWriter(); |
|
| 68 | + $extWriter=$this->getPage()->getResponse()->createHtmlWriter(); |
|
| 69 | 69 | $extWriter->write("/*<![CDATA[*/\n"); |
| 70 | 70 | $this->renderChildren($extWriter); |
| 71 | 71 | $extWriter->write("\n/*]]>*/"); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | parent::setDataSource($value); |
| 58 | 58 | if($this->getActiveControl()->canUpdateClientSide()) { |
| 59 | 59 | $this->renderPager(); |
| 60 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
| 60 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
@@ -94,10 +94,10 @@ discard block |
||
| 94 | 94 | public function render($writer) { |
| 95 | 95 | if($this->getHasPreRendered()) { |
| 96 | 96 | $this->renderRepeater($writer); |
| 97 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer); |
|
| 97 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(), $writer); |
|
| 98 | 98 | } |
| 99 | 99 | else { |
| 100 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
| 100 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | foreach($pager as $item) { |
| 112 | 112 | if($item->ControlToPaginate==$this->ID) { |
| 113 | 113 | $writer=$this->getResponse()->createHtmlWriter(); |
| 114 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
| 114 | + $this->getPage()->getAdapter()->registerControlToRender($item, $writer); |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @param THtmlWriter writer for the rendering purpose |
| 124 | 124 | */ |
| 125 | 125 | private function renderRepeater($writer) { |
| 126 | - $writer->addAttribute('id',$this->getSurroundingTagID()); |
|
| 126 | + $writer->addAttribute('id', $this->getSurroundingTagID()); |
|
| 127 | 127 | $writer->renderBeginTag($this->getSurroundingTag()); |
| 128 | 128 | parent::render($writer); |
| 129 | 129 | $writer->renderEndTag(); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * Set the handle id or css class |
| 33 | 33 | * @param string |
| 34 | 34 | */ |
| 35 | - public function setHandle ($value) |
|
| 35 | + public function setHandle($value) |
|
| 36 | 36 | { |
| 37 | 37 | $this->setViewState('DragHandle', TPropertyValue::ensureString($value), null); |
| 38 | 38 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * Get the handle id or css class |
| 42 | 42 | * @return string |
| 43 | 43 | */ |
| 44 | - public function getHandle () |
|
| 44 | + public function getHandle() |
|
| 45 | 45 | { |
| 46 | 46 | return $this->getViewState('DragHandle', null); |
| 47 | 47 | } |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function setRevert($value) |
| 73 | 73 | { |
| 74 | - if (strcasecmp($value,'true')==0 || $value===true) |
|
| 74 | + if(strcasecmp($value, 'true')==0 || $value===true) |
|
| 75 | 75 | $value=TDraggableRevertOptions::Revert; |
| 76 | - elseif (strcasecmp($value,'false')==0 || $value===false) |
|
| 76 | + elseif(strcasecmp($value, 'false')==0 || $value===false) |
|
| 77 | 77 | $value=TDraggableRevertOptions::None; |
| 78 | 78 | $this->setViewState('Revert', TPropertyValue::ensureEnum($value, 'TDraggableRevertOptions'), true); |
| 79 | 79 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return TDraggableGhostingOption to clone the element |
| 92 | 92 | */ |
| 93 | - public function getGhosting () |
|
| 93 | + public function getGhosting() |
|
| 94 | 94 | { |
| 95 | 95 | return $this->getViewState('Ghosting', TDraggableGhostingOptions::None); |
| 96 | 96 | } |
@@ -107,11 +107,11 @@ discard block |
||
| 107 | 107 | * o "False" or "None" means no Ghosting options |
| 108 | 108 | * |
| 109 | 109 | */ |
| 110 | - public function setGhosting ($value) |
|
| 110 | + public function setGhosting($value) |
|
| 111 | 111 | { |
| 112 | - if (strcasecmp($value,'true')==0 || $value===true) |
|
| 112 | + if(strcasecmp($value, 'true')==0 || $value===true) |
|
| 113 | 113 | $value=TDraggableGhostingOptions::Ghosting; |
| 114 | - elseif (strcasecmp($value,'false')==0 || $value===false) |
|
| 114 | + elseif(strcasecmp($value, 'false')==0 || $value===false) |
|
| 115 | 115 | $value=TDraggableGhostingOptions::None; |
| 116 | 116 | $this->setViewState('Ghosting', TPropertyValue::ensureEnum($value, 'TDraggableGhostingOptions'), TDraggableGhostingOptions::None); |
| 117 | 117 | } |
@@ -154,11 +154,11 @@ discard block |
||
| 154 | 154 | parent::addAttributesToRender($writer); |
| 155 | 155 | |
| 156 | 156 | $cs=$this->getPage()->getClientScript(); |
| 157 | - if ($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting) |
|
| 157 | + if($this->getGhosting()==TDraggableGhostingOptions::SuperGhosting) |
|
| 158 | 158 | $cs->registerPradoScript('dragdropextra'); |
| 159 | 159 | else |
| 160 | 160 | $cs->registerPradoScript('dragdrop'); |
| 161 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 161 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 162 | 162 | $options=TJavascript::encode($this->getPostBackOptions()); |
| 163 | 163 | $class=$this->getClientClassName(); |
| 164 | 164 | $code="new {$class}('{$this->getClientId()}', {$options}) "; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * This method overrides the parent implementation. |
| 171 | 171 | * @return string the javascript class name |
| 172 | 172 | */ |
| 173 | - protected function getClientClassName () |
|
| 173 | + protected function getClientClassName() |
|
| 174 | 174 | { |
| 175 | 175 | return 'Draggable'; |
| 176 | 176 | } |
@@ -181,17 +181,17 @@ discard block |
||
| 181 | 181 | */ |
| 182 | 182 | protected function getPostBackOptions() |
| 183 | 183 | { |
| 184 | - $options['ID'] = $this->getClientID(); |
|
| 184 | + $options['ID']=$this->getClientID(); |
|
| 185 | 185 | |
| 186 | - if (($handle=$this->getHandle())!== null) $options['handle']=$handle; |
|
| 187 | - if (($revert=$this->getRevert())===TDraggableRevertOptions::None) |
|
| 186 | + if(($handle=$this->getHandle())!==null) $options['handle']=$handle; |
|
| 187 | + if(($revert=$this->getRevert())===TDraggableRevertOptions::None) |
|
| 188 | 188 | $options['revert']=false; |
| 189 | - elseif ($revert==TDraggableRevertOptions::Revert) |
|
| 189 | + elseif($revert==TDraggableRevertOptions::Revert) |
|
| 190 | 190 | $options['revert']=true; |
| 191 | 191 | else |
| 192 | 192 | $options['revert']=strtolower($revert); |
| 193 | - if (($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint); |
|
| 194 | - switch ($this->getGhosting()) |
|
| 193 | + if(($constraint=$this->getConstraint())!==TDraggableConstraint::None) $options['constraint']=strtolower($constraint); |
|
| 194 | + switch($this->getGhosting()) |
|
| 195 | 195 | { |
| 196 | 196 | case TDraggableGhostingOptions::SuperGhosting: |
| 197 | 197 | $options['superghosting']=true; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function getClientSide() |
| 37 | 37 | { |
| 38 | 38 | if($this->_clientSide===null) |
| 39 | - $this->_clientSide = $this->createClientSide(); |
|
| 39 | + $this->_clientSide=$this->createClientSide(); |
|
| 40 | 40 | return $this->_clientSide; |
| 41 | 41 | } |
| 42 | 42 | |