mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
@@ -102,18 +102,18 @@ class Pjax extends Widget
|
||||
if ($view->title !== null) {
|
||||
echo Html::tag('title', Html::encode($view->title));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo Html::beginTag('div', $this->options);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
echo Html::endTag('div');
|
||||
|
||||
if (!$this->requiresPjax()) {
|
||||
echo Html::endTag('div');
|
||||
$this->registerClientScript();
|
||||
return;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ class Pjax extends Widget
|
||||
protected function requiresPjax()
|
||||
{
|
||||
$headers = Yii::$app->getRequest()->getHeaders();
|
||||
return $headers->get('X-Pjax') && ($selector = $headers->get('X-Pjax-Container')) === '#' . $this->getId();
|
||||
return $headers->get('X-Pjax') && $headers->get('X-Pjax-Container') === '#' . $this->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user