protected function renderBody()
 {
     $contents = parent::renderBody();
     $options = TJavascript::toList(array('revert' => $this->getRevert()));
     $script = "new Draggable('{$this->ClientID}', {$options});";
     $contents .= TJavascript::render($script);
     return $contents;
 }
 /**
  * Appends the callback javascript statement to the input button html.
  * @return string TActiveButton html output.
  */
 public function render()
 {
     $contents = parent::render();
     $js = $this->Page->getCallbackReference($this, null, null, $this->getRequestOptions());
     $script = $this->Page->getClientEventScript($this, "click", $js);
     $contents .= TJavascript::render($script);
     return $contents;
 }