ItEr50S04ValidacionEProbasFuncionaisItEr49S04: Adding TaskRow component.
This component is intended to wrap the TaskComponents.
This commit is contained in:
parent
5588a25964
commit
c131b6e41b
4 changed files with 64 additions and 3 deletions
44
ganttzk/src/main/java/org/zkoss/ganttz/TaskRow.java
Normal file
44
ganttzk/src/main/java/org/zkoss/ganttz/TaskRow.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of NavalPlan
|
||||
*
|
||||
* Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
|
||||
* Desenvolvemento Tecnolóxico de Galicia
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.zkoss.ganttz;
|
||||
|
||||
import org.zkoss.zul.impl.XulElement;
|
||||
|
||||
/**
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
*
|
||||
*/
|
||||
public class TaskRow extends XulElement {
|
||||
|
||||
public static <T extends TaskComponent> T wrapInRow(T taskComponent) {
|
||||
TaskRow parent = new TaskRow();
|
||||
parent.appendChild(taskComponent);
|
||||
return taskComponent;
|
||||
}
|
||||
|
||||
public TaskList getTaskList() {
|
||||
return (TaskList) getParent();
|
||||
}
|
||||
|
||||
public TaskComponent getChild() {
|
||||
return (TaskComponent) getChildren().get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -79,6 +79,15 @@
|
|||
</mold>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<component-name>taskRow</component-name>
|
||||
<component-class>org.zkoss.ganttz.TaskRow</component-class>
|
||||
<mold>
|
||||
<mold-name>default</mold-name>
|
||||
<mold-uri>~./ganttz/row.dsp</mold-uri>
|
||||
</mold>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<component-name>task</component-name>
|
||||
<component-class>org.zkoss.ganttz.TaskComponent</component-class>
|
||||
|
|
|
|||
11
ganttzk/src/main/resources/web/ganttz/row.dsp
Normal file
11
ganttzk/src/main/resources/web/ganttz/row.dsp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
|
||||
<%@ taglib uri="http://www.zkoss.org/dsp/zk/core" prefix="z" %>
|
||||
|
||||
<c:set var="self" value="${requestScope.arg.self}"/>
|
||||
|
||||
<div id="${self.uuid}" class="row" z.valor="boxid="${self.uuid}">
|
||||
<c:forEach var="child" items="${self.children}">
|
||||
${z:redraw(child, null)}
|
||||
</c:forEach>
|
||||
<div id="deadline${self.uuid}" class="deadline"></div>
|
||||
</div>
|
||||
|
|
@ -673,9 +673,6 @@ zkTaskContainer.relocateAfterAdding = function(cmp) {
|
|||
|
||||
zkTaskContainer.relocateFirstAfterAdding = zkTask.relocateFirstAfterAdding;
|
||||
|
||||
zkTaskContainer.cleanup = function(cmp) {
|
||||
zkTask.cleanup(cmp);
|
||||
};
|
||||
|
||||
zkTaskContainer.init = function(cmp) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue