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() {
<com:Application.Portlets.Console ID="Console" />
</div>
<div id="bottom"></div>
+ <script type="text/javascript">
+ document.observe("dom:loaded", function() {
+ <%=(!is_null($this->openWindow) ?
+ '$("' . $this->openWindow . '").click(); window.history.pushState("", "", "/");'
+ : '')%>
+ });
+ </script>
</com:TContent>
{
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();
$this->Director->dataBind();
$this->setJobs();
$this->setClients();
+ $this->setWindowOpen();
}
}
$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;
+ }
+ }
}
?>
$restoreProps['replace'] = $this->ReplaceFiles->SelectedValue;
$ret = $this->getModule('api')->create(array('jobs', 'restore'), $restoreProps);
- $this->goToDefaultPage();
+ $this->goToDefaultPage(array('open' => 'Job'));
}
}
?>