Exemplo n.º 1
0
 function __construct($parent = null, $name, $class)
 {
     global $SYS;
     parent::__construct($name, $parent);
     $this->MainClass = $class;
     $this->tasks = newObject($this->MainClass);
     $F = new wPane("{$class}gspane", $this);
     $F->visibility = "visible";
     $this->statusBox = new wMutableLabel("statusBox", $F, "-----");
     $this->statusBox->setCSS("text-align", "left");
     $this->statusBox->setCSS("width", "500px");
     $this->statusBox->setCSS("padding-top", "10px");
     $this->statusBox->setCSS("font-weight", "bold");
     $this->tabPane = new wTabbedPane("name", $F);
     $LayOut = new wLayoutTable("{$name}", $this->tabPane);
     //$LayOut->setCSS("width","100%");
     $LayOut->setHorizontal();
     $LayOut->fixedSizes = array("", "100%");
     /* Grid */
     $grid = new wGrid("grid{$class}{$this->id}", $LayOut);
     $grid->DataURL = "?oDataRequest=" . get_class($this) . "&instance={$this->MainClass}";
     $grid->setWidth(595);
     //$grid->actionOnSelectID="xajax_wForm.requestloadFromId(value,'form{$class}{$this->id}','{$this->MainClass}')";
     $grid->actionOnSelectID = "xajax_wForm.requestloadFromId(value,'form{$class}{$this->id}','{$this->MainClass}');xajax_GSControlPanel.updateURIS('{$class}',value)";
     /* Form */
     $form = new wForm("form{$class}{$this->id}", $LayOut);
     $form->setCSS("margin-left", "5px");
     $form->setCSS("width", "100%");
     /* Data */
     $grid->setDataModelFromCore($this->tasks);
     $form->setDataModelFromCore($this->tasks);
     $form->createDefaultButtons();
     $form->doAfterSave("aj_ReloadGrid");
     $form->doAfterDelete("aj_GridDelete");
     $this->dGrid = $grid;
     $this->dForm = $form;
     $this->aForms[sizeof($this->aForms)] = $form;
     $this->grids["{$class}"] = $grid;
 }
$layout->fixedSizes = array("75px", "100%");
$buttonPanel = new wPane("buttonPane", $layout);
$buttonTareas = new wImage("Tareas", $buttonPanel);
$buttonTareas->label = "Definición de Tareas";
$buttonTareas->src = $SYS["ROOT"] . "/Apps/GlobalSche/local/Img/tareas.png";
$buttonTareas->addListener("onclick", "activateWindowTasks");
$buttonTareas->setCSS("border", "1px solid gray");
$buttonSche = new wImage("Planificaciones", $buttonPanel);
$buttonSche->label = "Planificaciones disponibles";
$buttonSche->src = $SYS["ROOT"] . "/Apps/GlobalSche/local/Img/planificaciones.png";
$buttonSche->addListener("onclick", "activateScheTasks");
$buttonHost = new wImage("Hosts", $buttonPanel);
$buttonHost->label = "Hosts";
$buttonHost->src = $SYS["ROOT"] . "/Apps/GlobalSche/local/Img/host.png";
$buttonHost->addListener("onclick", "activateHostWindow");
$mainPanel = new wPane("rootFakedWindow", $layout);
$mainPanel->setCSS("background-color", "white");
$mainPanel->setCSS("border", "1px");
$mainPanel->setCSS("width", "100%");
$mainPanel->setCSS("min-height", "660px");
$mainPanel->setCSS("position", "relative");
/* Tareas */
$FormWindow = new wWindow("FormWindow", $mainPanel, false);
$FormWindow->title = "Tareas Definidas";
$FormWindow->setCSS("display", "none");
$FormWindow->setCSS("width", "1100px");
$GSPAnel = new GSControlPanel($FormWindow, "Tareas", "gtask");
$GSPAnel->addTab("Pasos", "gstep", "gtask_id");
$TestTaskButton = new wButton("runTestTask", $GSPAnel->aForms[1]->buttonPane);
$TestTaskButton->label = "Probar";
$TestTaskButton->addListener("onclick", "runTestTask");