Beispiel #1
0
 public function render($view, $data = NULL, $return = false)
 {
     if (isset($_POST['minimal'])) {
         echo CJSON::encode(parent::renderPartial($view, $data, true));
     } else {
         return parent::render($view, $data, $return);
     }
 }
 /**
  * Extends parent method.
  * Call renderPartial() instead of render() on ajax request.
  *
  * @param  $view
  * @param null $data
  * @param bool $return
  */
 public function render($view, $data = null, $return = false)
 {
     if (Yii::app()->request->isAjaxRequest === true) {
         parent::renderPartial($view, $data, $return, false);
     } else {
         parent::render($view, $data, $return);
     }
 }
 /**
  * override needed to, in case of ajax requests, use renderPartial and disable the jquery
  */
 public function render($view, $data = array(), $return = false)
 {
     if (!Yii::app()->getRequest()->getIsAjaxRequest()) {
         return parent::render($view, $data, $return);
     } else {
         Yii::app()->getClientScript()->corePackages['jquery'] = false;
         return parent::renderPartial($view, $data, false, true);
     }
 }