Making JsHelper use its request object methods.

This commit is contained in:
mark_story 2010-05-15 00:51:26 -04:00
parent 4453c9122d
commit e6a743b163

View file

@ -199,7 +199,8 @@ class JsHelper extends AppHelper {
* scripts null will be returned. * scripts null will be returned.
*/ */
public function writeBuffer($options = array()) { public function writeBuffer($options = array()) {
$domReady = isset($this->params['isAjax']) ? !$this->params['isAjax'] : true; $domReady = $this->request->is('ajax');
// $domReady = isset($this->params['isAjax']) ? !$this->params['isAjax'] : true;
$defaults = array( $defaults = array(
'onDomReady' => $domReady, 'inline' => true, 'onDomReady' => $domReady, 'inline' => true,
'cache' => false, 'clear' => true, 'safe' => true 'cache' => false, 'clear' => true, 'safe' => true