]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/baculum/protected/Portlets/JobRunList.php
baculum: Assign Baculum copyright to Kern Sibbald
[bacula/bacula] / gui / baculum / protected / Portlets / JobRunList.php
index fba2ef7f7886370e8e1f062e57ed20666070eaaf..9ba125bfa40bf71a3d0397352d228fef92d94f97 100644 (file)
@@ -1,20 +1,23 @@
 <?php
-/**
- * Bacula® - The Network Backup Solution
- * Baculum - Bacula web interface
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
  *
- * Copyright (C) 2013-2014 Marcin Haba
+ * Copyright (C) 2013-2016 Kern Sibbald
  *
  * The main author of Baculum is Marcin Haba.
- * The main author of Bacula is Kern Sibbald, with contributions from many
- * others, a complete list can be found in the file AUTHORS.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
  *
  * You may use this file and others of this release according to the
  * license defined in the LICENSE file, which includes the Affero General
  * Public License, v3.0 ("AGPLv3") and some additional permissions and
  * terms pursuant to its AGPLv3 Section 7.
  *
- * Bacula® is a registered trademark of Kern Sibbald.
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
  */
 
 Prado::using('System.Web.UI.ActiveControls.TActiveDataGrid');
@@ -22,25 +25,57 @@ Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
 Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
 Prado::using('System.Web.UI.ActiveControls.TActivePanel');
 Prado::using('System.Web.UI.ActiveControls.TCallback');
+Prado::using('Application.Portlets.ISlideWindow');
 Prado::using('Application.Portlets.Portlets');
 
-class JobRunList extends Portlets {
+class JobRunList extends Portlets implements ISlideWindow {
 
-       public $ShowID, $windowTitle, $oldDirector;
+       public $ID;
+       public $buttonID;
+       public $windowTitle;
+       public $oldDirector;
+       private $jobStates;
+       private $jobTypes = array(
+               'B' => 'Backup',
+               'M' => 'Migrated',
+               'V' => 'Verify',
+               'R' => 'Restore',
+               'I' => 'Internal',
+               'D' => 'Admin',
+               'A' => 'Archive',
+               'C' => 'Copy',
+               'g' => 'Migration'
+       );
 
-       private $jobTypes = array('B' => 'Backup', 'M' => 'Migrated', 'V' => 'Verify', 'R' => 'Restore', 'I' => 'Internal', 'D' => 'Admin', 'A' => 'Archive', 'C' => 'Copy', 'g' => 'Migration');
+       public function setID($id) {
+               $this->ID = $id;
+       }
 
-       private $jobStates;
+       public function getID($hideAutoID = true) {
+               return $this->ID;
+       }
 
-       public function onLoad($param) {
-               parent::onLoad($param);
-               $this->prepareData();
+       public function setButtonID($id) {
+               $this->buttonID = $id;
+       }
+
+       public function getButtonID() {
+               return $this->buttonID;
        }
 
        public function setWindowTitle($param) {
                $this->windowTitle = $param;
        }
 
+       public function getWindowTitle() {
+               return $this->windowTitle;
+       }
+
+       public function onLoad($param) {
+               parent::onLoad($param);
+               $this->prepareData();
+       }
+
        public function prepareData($forceReload = false) {
                $allowedButtons = array('JobRunBtn');
                if($this->Page->IsPostBack || $this->Page->IsCallBack || $forceReload) {
@@ -75,7 +110,7 @@ class JobRunList extends Portlets {
                return $jobs;
        }
 
-    public function sortDataGrid($sender, $param) {
+       public function sortDataGrid($sender, $param) {
                $params = $this->getUrlParams(array('jobs', 'tasks'), $this->getPage()->JobRunWindow->ID);
                $data = $this->Application->getModule('api')->get($params)->output;
                $data = $this->prepareJobs($data);
@@ -83,14 +118,6 @@ class JobRunList extends Portlets {
                $this->DataGrid->dataBind();
        }
 
-       public function setShowID($ShowID) {
-               $this->ShowID = $this->getMaster()->ShowID = $ShowID;
-       }
-
-       public function getShowID() {
-               return $this->ShowID;
-       }
-
        public function configure($sender, $param) {
                if($this->Page->IsCallBack) {
                        $this->getPage()->JobRunConfiguration->configure($param->CallbackParameter);