diff --git a/navalplanner-gantt-zk/src/main/java/org/zkoss/ganttz/ListDetails.java b/navalplanner-gantt-zk/src/main/java/org/zkoss/ganttz/ListDetails.java
index 0ee6bd888..a2b8c5e34 100644
--- a/navalplanner-gantt-zk/src/main/java/org/zkoss/ganttz/ListDetails.java
+++ b/navalplanner-gantt-zk/src/main/java/org/zkoss/ganttz/ListDetails.java
@@ -56,7 +56,7 @@ public class ListDetails extends HtmlMacroComponent {
taskDetail.afterCompose();
Task task = new Task();
getPlanner().addTask(task);
- task.setColor("yellow");
+ task.setColor("#007bbe");
task.setId(newId);
}
diff --git a/navalplanner-gantt-zk/src/main/resources/web/ganttz/task.dsp b/navalplanner-gantt-zk/src/main/resources/web/ganttz/task.dsp
index 563d983a6..6099299eb 100755
--- a/navalplanner-gantt-zk/src/main/resources/web/ganttz/task.dsp
+++ b/navalplanner-gantt-zk/src/main/resources/web/ganttz/task.dsp
@@ -7,5 +7,6 @@
\ No newline at end of file
diff --git a/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/dependency.js b/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/dependency.js
index 827fbef9a..edf08a758 100644
--- a/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/dependency.js
+++ b/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/dependency.js
@@ -17,6 +17,12 @@ zkDependency.draw = function(dependency) {
this.origin(dependency).offsetWidth - zkTask.CORNER_WIDTH);
orig[1] = orig[1] + zkTask.HEIGHT;
dest[1] = dest[1] + zkTask.HALF_HEIGHT;
+
+ if ( ( orig[1] > dest[1] ) ) {
+
+ orig[1] = orig[1] - zkTask.HEIGHT;
+ }
+
zkPlanner.drawArrow(dependency, orig, dest);
}
diff --git a/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/task.js b/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/task.js
index 4265e5780..456bf24ad 100755
--- a/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/task.js
+++ b/navalplanner-gantt-zk/src/main/resources/web/js/ganttz/task.js
@@ -42,8 +42,39 @@ zkTask.init = function(cmp) {
handles : [ 'r' ],
proxy : true
});
+
+ // Configure the task element to be resizable
+ cmp2 = document.getElementById('completion'+cmp.id);
+
+ var resize2 = new YAHOO.util.Resize(cmp2, {
+ handles : [ 'r' ],
+ proxy : true,
+ maxWidth: cmp.clientWidth - 2
+ });
+
+
+ resize2.on('resize', function(ev) {
+
+ zkau.send( {
+ uuid : cmp2.id,
+ cmd : "updateProgress",
+ data : [ cmp2.style.width ],
+ });
+ }, zkTask, true);
+
+
resize.on('resize', function(ev) {
+ cmp2 = document.getElementById('completion'+cmp.id);
+ resize2 = new YAHOO.util.Resize(cmp2, {
+ handles : [ 'r' ],
+ proxy : true,
+ maxWidth: cmp.clientWidth - 2
+ });
+ if ( (cmp.clientWidth) < (cmp2.clientWidth) ) {
+ cmp2.style.width = cmp.clientWidth - 2 + 'px';
+ }
+
zkau.send( {
uuid : cmp.id,
cmd : "updateSize",
@@ -52,6 +83,7 @@ zkTask.init = function(cmp) {
}, zkTask, true);
+
// Listen to mousemove events
YAHOO.util.Event.on(document.body, 'mousemove', function(e) {
var arrPos = YAHOO.util.Event.getXY(e);
@@ -67,12 +99,12 @@ zkTask.setAttr = function(cmp, nm, val) {
switch (nm) {
- case "style.top":
- case "style.width":
- case "style.left": {
- zkau.setAttr(cmp, nm, val);
- return true;
- }
+ case "style.top":
+ case "style.width":
+ case "style.left": {
+ zkau.setAttr(cmp, nm, val);
+ return true;
+ }
}
};
@@ -103,9 +135,9 @@ zkTask.createArrow = function(cmp) {
function updateArrow() {
var origin = zkPlanner.findPos(cmp);
origin[0] = origin[0]
- + Math.max(0, cmpNode.offsetWidth - zkTask.CORNER_WIDTH);
+ + Math.max(0, cmpNode.offsetWidth - zkTask.CORNER_WIDTH);
origin[1] = origin[1] - listtasksNode.offsetTop
- + listdependenciesNode.offsetTop + zkTask.HEIGHT;
+ + listdependenciesNode.offsetTop + zkTask.HEIGHT;
var destination = zkPlanner.findPosForMouseCoordinates(xMouse, yMouse);
zkPlanner.drawArrow(arrow, origin, destination);
}
@@ -128,9 +160,9 @@ zkTask.createArrow = function(cmp) {
}
parentNode.removeChild(arrow);
YAHOO.util.Event.removeListener(document.body, 'click',
- mouseClickListener);
+ mouseClickListener);
YAHOO.util.Event.removeListener(document.body, 'mousemove',
- mousemoveListener);
+ mousemoveListener);
};
YAHOO.util.Event.on(document.body, 'mousemove', mousemoveListener);
YAHOO.util.Event.on(document.body, 'click', mouseClickListener);
@@ -142,11 +174,11 @@ zkTask.isOverTask = function(cmp, arrow) {
var ganttPanelNode = document.getElementById("ganttpanel");
arrayTasks = zkTask.getElementsByAttribute(listtasksNode, "div", "z.type",
- "ganttz.task.Task");
+ "ganttz.task.Task");
/* Cursor relative positions to #listtasks (439,160) and ganttPanel scroll */
var xpos = zkTask.xMouse - listtasksNode.offsetLeft
- + ganttPanelNode.scrollLeft;
+ + ganttPanelNode.scrollLeft;
var ypos = zkTask.yMouse - listtasksNode.offsetTop;
/*
* This way of getting cursor coordinates, is unable to calculate scrollbar
@@ -158,14 +190,14 @@ zkTask.isOverTask = function(cmp, arrow) {
var task = arrayTasks[i];
YAHOO.log(" zkTask.xMouse (" + zkTask.xMouse + "," + zkTask.yMouse
- + ") " + "task.pos (" + xpos + "," + ypos + ") "
- + "task.offsetLeft (" + task.offsetLeft + "," + task.offsetTop
- + ") " + "task.idTask-" + task.toString());
+ + ") " + "task.pos (" + xpos + "," + ypos + ") "
+ + "task.offsetLeft (" + task.offsetLeft + "," + task.offsetTop
+ + ") " + "task.idTask-" + task.toString());
if (((xpos) > (task.offsetLeft))
- && ((xpos) < (task.offsetLeft + task.offsetWidth))
- && (ypos > (task.offsetTop))
- && (ypos < (task.offsetTop + task.offsetHeight))) {
+ && ((xpos) < (task.offsetLeft + task.offsetWidth))
+ && (ypos > (task.offsetTop))
+ && (ypos < (task.offsetTop + task.offsetHeight))) {
return task;
}
}
@@ -173,24 +205,24 @@ zkTask.isOverTask = function(cmp, arrow) {
};
zkTask.getElementsByAttribute = function(oElm, strTagName, strAttributeName,
- strAttributeValue) {
+ strAttributeValue) {
var arrElements = (strTagName == "*" && oElm.all) ? oElm.all : oElm
- .getElementsByTagName(strTagName);
+ .getElementsByTagName(strTagName);
var arrReturnElements = new Array();
var oAttributeValue = (typeof strAttributeValue != "undefined") ? new RegExp(
- "(^|\\s)" + strAttributeValue + "(\\s|$)")
- : null;
+ "(^|\\s)" + strAttributeValue + "(\\s|$)")
+ : null;
var oCurrent;
var oAttribute;
for ( var i = 0; i < arrElements.length; i++) {
oCurrent = arrElements[i];
oAttribute = oCurrent.getAttribute
- && oCurrent.getAttribute(strAttributeName);
+ && oCurrent.getAttribute(strAttributeName);
if (typeof oAttribute == "string" && oAttribute.length > 0) {
if (typeof strAttributeValue == "undefined"
- || (oAttributeValue && oAttributeValue.test(oAttribute))) {
+ || (oAttributeValue && oAttributeValue.test(oAttribute))) {
arrReturnElements.push(oCurrent);
}
}
@@ -209,42 +241,42 @@ YAHOO.extend(YAHOO.example.DDRegion, YAHOO.util.DD, {
cont : null,
init : function() {
//Call the parent's init method
- YAHOO.example.DDRegion.superclass.init.apply(this, arguments);
- this.initConstraints();
-
- myEvent.on(window, 'resize', function() {
+ YAHOO.example.DDRegion.superclass.init.apply(this, arguments);
this.initConstraints();
- }, this, true);
-},
-initConstraints : function() {
- //Get the top, right, bottom and left positions
- var region = myDom.getRegion(this.cont);
+ myEvent.on(window, 'resize', function() {
+ this.initConstraints();
+ }, this, true);
+ },
+ initConstraints : function() {
- // Get the element we are working on
- var el = this.getEl();
+ //Get the top, right, bottom and left positions
+ var region = myDom.getRegion(this.cont);
- // Get the xy position of it
- var xy = myDom.getXY(el);
+ // Get the element we are working on
+ var el = this.getEl();
- // Get the width and height
- var width = parseInt(myDom.getStyle(el, 'width'), 10);
- var height = parseInt(myDom.getStyle(el, 'height'), 10);
+ // Get the xy position of it
+ var xy = myDom.getXY(el);
- // Set left to x minus left
- var left = xy[0] - region.left;
+ // Get the width and height
+ var width = parseInt(myDom.getStyle(el, 'width'), 10);
+ var height = parseInt(myDom.getStyle(el, 'height'), 10);
- // Set right to right minus x minus width
- var right = region.right - xy[0] - width;
+ // Set left to x minus left
+ var left = xy[0] - region.left;
- // Set top to y minus top
- var top = xy[1] - region.top;
+ // Set right to right minus x minus width
+ var right = region.right - xy[0] - width;
- // Set bottom to bottom minus y minus height
- var bottom = region.bottom - xy[1] - height;
+ // Set top to y minus top
+ var top = xy[1] - region.top;
- // Set the constraints based on the above calculations
- this.setXConstraint(left, right);
- this.setYConstraint(top, bottom);
-}
+ // Set bottom to bottom minus y minus height
+ var bottom = region.bottom - xy[1] - height;
+
+ // Set the constraints based on the above calculations
+ this.setXConstraint(left, right);
+ this.setYConstraint(top, bottom);
+ }
});
diff --git a/navalplanner-webapp/src/main/webapp/WEB-INF/web.xml b/navalplanner-webapp/src/main/webapp/WEB-INF/web.xml
index 234f349ed..65d2b36ba 100644
--- a/navalplanner-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/navalplanner-webapp/src/main/webapp/WEB-INF/web.xml
@@ -85,7 +85,7 @@
- myhello.zul
+ /planner/main.zul
diff --git a/navalplanner-webapp/src/main/webapp/common/layout/template.zul b/navalplanner-webapp/src/main/webapp/common/layout/template.zul
index a2bf30cfd..53dd2de4a 100644
--- a/navalplanner-webapp/src/main/webapp/common/layout/template.zul
+++ b/navalplanner-webapp/src/main/webapp/common/layout/template.zul
@@ -24,7 +24,7 @@
diff --git a/navalplanner-webapp/src/main/webapp/myhello.zul b/navalplanner-webapp/src/main/webapp/myhello.zul
deleted file mode 100644
index 9ef4dcd69..000000000
--- a/navalplanner-webapp/src/main/webapp/myhello.zul
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${c:l('task.name')}
- ${c:l('task.start')}
-
-
- ${c:l('task.end')}
-
-
- ${c:l('task.notes')}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/navalplanner-webapp/src/main/webapp/planner/css/productionmanagement.css b/navalplanner-webapp/src/main/webapp/planner/css/productionmanagement.css
index 3641d09dc..8fe04e099 100644
--- a/navalplanner-webapp/src/main/webapp/planner/css/productionmanagement.css
+++ b/navalplanner-webapp/src/main/webapp/planner/css/productionmanagement.css
@@ -115,7 +115,7 @@ Height: is recalculated on number of tasks */
/*
.extra_padding {
- padding: 6px;
+padding: 6px;
} */
.logo {
@@ -136,4 +136,26 @@ Height: is recalculated on number of tasks */
height:90px;
}
-table {margin:0px; padding:0px; border:0px;}
+table {
+ margin:0px;
+ padding:0px;
+ border:0px;
+}
+
+.completion {
+ display: none;
+ width: 80%;
+ top: -16px;
+ margin-top:0px;
+ height: 20px;
+ background-color: #FFCC99;
+ z-index:5;
+ border:0px;
+}
+
+.row span {
+ position:relative;
+ z-index:5;
+ color:#BBBBBB;
+ white-space:nowrap;
+}
\ No newline at end of file
diff --git a/navalplanner-webapp/src/main/webapp/planner/main.zul b/navalplanner-webapp/src/main/webapp/planner/main.zul
index f7a39c83d..8949d4c7e 100644
--- a/navalplanner-webapp/src/main/webapp/planner/main.zul
+++ b/navalplanner-webapp/src/main/webapp/planner/main.zul
@@ -14,13 +14,13 @@
-
+
-
+
-
+
-
+