mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
process response form on active connection completed
This commit is contained in:
parent
49b21b38d0
commit
8fd93b0219
1 changed files with 33 additions and 33 deletions
|
|
@ -193,7 +193,7 @@ class Page
|
||||||
$refresh,
|
$refresh,
|
||||||
function() use ($expire, $history)
|
function() use ($expire, $history)
|
||||||
{
|
{
|
||||||
// Redirect requested
|
// Force redirect by application router (not status code)
|
||||||
if ($location = $this->connection->getRedirect())
|
if ($location = $this->connection->getRedirect())
|
||||||
{
|
{
|
||||||
// Follow
|
// Follow
|
||||||
|
|
@ -207,40 +207,40 @@ class Page
|
||||||
return false; // stop
|
return false; // stop
|
||||||
}
|
}
|
||||||
|
|
||||||
// Response form requested
|
// Request completed
|
||||||
if ($request = $this->connection->getRequest())
|
|
||||||
{
|
|
||||||
// Update title
|
|
||||||
$this->title->set(
|
|
||||||
$this->connection->getTitle(),
|
|
||||||
$this->connection->getSubtitle(),
|
|
||||||
$this->connection->getTooltip()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Refresh header by new title if current page is active
|
|
||||||
if ($this === $this->container->tab->get())
|
|
||||||
{
|
|
||||||
$this->container->browser->header->setTitle(
|
|
||||||
$this->title->getValue(),
|
|
||||||
$this->title->getSubtitle()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show response form
|
|
||||||
$this->response->show(
|
|
||||||
$request['placeholder'],
|
|
||||||
$request['visible']
|
|
||||||
);
|
|
||||||
|
|
||||||
// Hide progressbar
|
|
||||||
$this->progressbar->hide();
|
|
||||||
|
|
||||||
return false; // stop
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop event loop on request completed
|
|
||||||
if ($this->connection->isCompleted())
|
if ($this->connection->isCompleted())
|
||||||
{
|
{
|
||||||
|
// Response form requested
|
||||||
|
if ($request = $this->connection->getRequest())
|
||||||
|
{
|
||||||
|
// Update title
|
||||||
|
$this->title->set(
|
||||||
|
$this->connection->getTitle(),
|
||||||
|
$this->connection->getSubtitle(),
|
||||||
|
$this->connection->getTooltip()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Refresh header by new title if current page is active
|
||||||
|
if ($this === $this->container->tab->get())
|
||||||
|
{
|
||||||
|
$this->container->browser->header->setTitle(
|
||||||
|
$this->title->getValue(),
|
||||||
|
$this->title->getSubtitle()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show response form
|
||||||
|
$this->response->show(
|
||||||
|
$request['placeholder'],
|
||||||
|
$request['visible']
|
||||||
|
);
|
||||||
|
|
||||||
|
// Hide progressbar
|
||||||
|
$this->progressbar->hide();
|
||||||
|
|
||||||
|
return false; // stop at this point, do not update page data
|
||||||
|
}
|
||||||
|
|
||||||
// Update title
|
// Update title
|
||||||
$this->title->set(
|
$this->title->set(
|
||||||
$this->connection->getTitle(),
|
$this->connection->getTitle(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue