diff --git a/ganttzk/src/main/java/org/zkoss/ganttz/TaskRow.java b/ganttzk/src/main/java/org/zkoss/ganttz/TaskRow.java new file mode 100644 index 000000000..f411280a4 --- /dev/null +++ b/ganttzk/src/main/java/org/zkoss/ganttz/TaskRow.java @@ -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 . + */ +package org.zkoss.ganttz; + +import org.zkoss.zul.impl.XulElement; + +/** + * @author Óscar González Fernández + * + */ +public class TaskRow extends XulElement { + + public static 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); + } + +} diff --git a/ganttzk/src/main/resources/metainfo/zk/lang-addon.xml b/ganttzk/src/main/resources/metainfo/zk/lang-addon.xml index 9bf865b9b..db0359088 100755 --- a/ganttzk/src/main/resources/metainfo/zk/lang-addon.xml +++ b/ganttzk/src/main/resources/metainfo/zk/lang-addon.xml @@ -79,6 +79,15 @@ + + taskRow + org.zkoss.ganttz.TaskRow + + default + ~./ganttz/row.dsp + + + task org.zkoss.ganttz.TaskComponent diff --git a/ganttzk/src/main/resources/web/ganttz/row.dsp b/ganttzk/src/main/resources/web/ganttz/row.dsp new file mode 100644 index 000000000..2c170f6d8 --- /dev/null +++ b/ganttzk/src/main/resources/web/ganttz/row.dsp @@ -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" %> + + + +
+ + ${z:redraw(child, null)} + +
+
\ No newline at end of file diff --git a/ganttzk/src/main/resources/web/js/ganttz/tasklist.js b/ganttzk/src/main/resources/web/js/ganttz/tasklist.js index e56aaabdc..8be5c1c97 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/tasklist.js +++ b/ganttzk/src/main/resources/web/js/ganttz/tasklist.js @@ -673,9 +673,6 @@ zkTaskContainer.relocateAfterAdding = function(cmp) { zkTaskContainer.relocateFirstAfterAdding = zkTask.relocateFirstAfterAdding; -zkTaskContainer.cleanup = function(cmp) { - zkTask.cleanup(cmp); -}; zkTaskContainer.init = function(cmp) { /*