From: Marcin Haba Date: Sat, 28 Mar 2015 19:55:08 +0000 (+0100) Subject: baculum: Open jobs window just after restore start X-Git-Tag: Release-7.2.0~55 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16f4fc394b9965c0bbf86f7f83bf6d95b1b89cf2;p=bacula%2Fbacula baculum: Open jobs window just after restore start --- diff --git a/gui/baculum/protected/Class/BaculumPage.php b/gui/baculum/protected/Class/BaculumPage.php index 9ae54cb98c..c4f90affbd 100644 --- a/gui/baculum/protected/Class/BaculumPage.php +++ b/gui/baculum/protected/Class/BaculumPage.php @@ -41,12 +41,12 @@ class BaculumPage extends TPage return $this->Application->getModule($name); } - public function goToPage($pagePath,$getParameters=null) { + public function goToPage($pagePath,$getParameters = null) { $this->Response->redirect($this->Service->constructUrl($pagePath,$getParameters,false)); } - public function goToDefaultPage() { - $this->goToPage($this->Service->DefaultPage); + public function goToDefaultPage($getParameters = null) { + $this->goToPage($this->Service->DefaultPage, $getParameters); } public function setPrefixForSubdir() { diff --git a/gui/baculum/protected/Pages/Home.page b/gui/baculum/protected/Pages/Home.page index be63e8ad88..6660973a4f 100644 --- a/gui/baculum/protected/Pages/Home.page +++ b/gui/baculum/protected/Pages/Home.page @@ -99,4 +99,11 @@
+ diff --git a/gui/baculum/protected/Pages/Home.php b/gui/baculum/protected/Pages/Home.php index 84097554c6..23d7d8a4ec 100644 --- a/gui/baculum/protected/Pages/Home.php +++ b/gui/baculum/protected/Pages/Home.php @@ -27,6 +27,10 @@ class Home extends BaculumPage { public $jobs; + public $openWindow = null; + + public $windowIds = array('Storage', 'Client', 'Media', 'Pool', 'Job', 'JobRun'); + public function onInit($param) { parent::onInit($param); $isConfigExists = $this->getModule('configuration')->isApplicationConfig(); @@ -55,6 +59,7 @@ class Home extends BaculumPage $this->Director->dataBind(); $this->setJobs(); $this->setClients(); + $this->setWindowOpen(); } } @@ -106,5 +111,12 @@ class Home extends BaculumPage $this->Clients->dataBind(); } + + public function setWindowOpen() { + if (isset($this->Request['open']) && in_array($this->Request['open'], $this->windowIds)) { + $btn = $this->Request['open'] . 'Btn'; + $this->openWindow = $this->{$btn}->ClientID; + } + } } ?> diff --git a/gui/baculum/protected/Pages/RestoreWizard.php b/gui/baculum/protected/Pages/RestoreWizard.php index 22ddb2b403..b9223eecd1 100644 --- a/gui/baculum/protected/Pages/RestoreWizard.php +++ b/gui/baculum/protected/Pages/RestoreWizard.php @@ -410,7 +410,7 @@ class RestoreWizard extends BaculumPage $restoreProps['replace'] = $this->ReplaceFiles->SelectedValue; $ret = $this->getModule('api')->create(array('jobs', 'restore'), $restoreProps); - $this->goToDefaultPage(); + $this->goToDefaultPage(array('open' => 'Job')); } } ?>