Pjax container only required on first load.

Pjax inserts the response HTML into the container, it doesn't replace it.
So any subsequent pjax requests duplicate the container.
This commit is contained in:
Alex-Code
2014-02-24 15:56:31 +00:00
parent 97b60782c0
commit 72ff9c58df

View File

@ -102,8 +102,9 @@ class Pjax extends Widget
if ($view->title !== null) {
echo Html::tag('title', Html::encode($view->title));
}
} else {
echo Html::beginTag('div', $this->options);
}
echo Html::beginTag('div', $this->options);
}
/**
@ -111,9 +112,8 @@ class Pjax extends Widget
*/
public function run()
{
echo Html::endTag('div');
if (!$this->requiresPjax()) {
echo Html::endTag('div');
$this->registerClientScript();
return;
}