svn commit: r701076 - in /ofbiz/trunk: framework/images/webapp/images/ specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ specialpurpose/projectmgr/webapp/projectmgr/project/ specialpurpose/projectmgr/widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r701076 - in /ofbiz/trunk: framework/images/webapp/images/ specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/ specialpurpose/projectmgr/webapp/projectmgr/project/ specialpurpose/projectmgr/widget/

hansbak-2
Author: hansbak
Date: Thu Oct  2 04:01:18 2008
New Revision: 701076

URL: http://svn.apache.org/viewvc?rev=701076&view=rev
Log:
a first new version of a html only ganntchart because the old dojo chart did not work in firefox3

Added:
    ofbiz/trunk/framework/images/webapp/images/bluebar.gif   (with props)
    ofbiz/trunk/framework/images/webapp/images/busy.gif   (with props)
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy   (with props)
Modified:
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml

Added: ofbiz/trunk/framework/images/webapp/images/bluebar.gif
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/bluebar.gif?rev=701076&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/images/webapp/images/bluebar.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: ofbiz/trunk/framework/images/webapp/images/busy.gif
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/busy.gif?rev=701076&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/framework/images/webapp/images/busy.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh?rev=701076&r1=701075&r2=701076&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh Thu Oct  2 04:01:18 2008
@@ -1,72 +0,0 @@
-/*
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-  
-import java.util.*;
-import java.lang.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.base.util.*;
-import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.entity.util.*;
-import org.ofbiz.base.util.*;
-import org.ofbiz.entity.condition.*;
-import java.sql.Timestamp;
-
-LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-projectId = parameters.get("projectId");
-userLogin = session.getAttribute("userLogin");
-
-
-ganttList = new LinkedList(); // resulting list
-
-//project info
-result = dispatcher.runSync("getProject", UtilMisc.toMap("projectId", projectId, "userLogin", userLogin));
-project = result.get("projectInfo");
-if (project != null && project.get("startDate") != null)
-    context.put("chartStart",project.get("startDate"));
-else
-    context.put("chartStart", UtilDateTime.nowTimestamp()); // default todays date
-if (project != null && project.get("completionDate") != null )        
-    context.put("chartEnd",project.get("completionDate"));
-else
-    context.put("chartEnd", UtilDateTime.addDaysToTimestamp(UtilDateTime.nowTimestamp(), 14)); // default 14 days long
-
-if (project == null) return;
-
-// phase list
-result = dispatcher.runSync("getProjectPhaseList", UtilMisc.toMap("userLogin", userLogin, "projectId", projectId));
-phases = result.get("phaseList");
-if (phases != null) {
-    p = phases.iterator();
-    while (p.hasNext()) {
-        phase = p.next();
-        ganttList.add(phase);
-        tasks = delegator.findByAnd("WorkEffort", UtilMisc.toMap("workEffortParentId", phase.get("phaseId")));
-        if (tasks != null) {
-            t = tasks.iterator();
-            while (t.hasNext()) {
-                task = t.next();
-                ganttList.add(task);
-            }
-        }
-    }
-    // add sort?
-    context.put("tasks", ganttList);
-}
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy?rev=701076&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy (added)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy Thu Oct  2 04:01:18 2008
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.*;
+import java.lang.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.*;
+import org.ofbiz.base.util.*;
+
+projectId = parameters.projectId;
+userLogin = parameters.userLogin;
+
+ganttList = new LinkedList();
+result = dispatcher.runSync("getProjectPhaseList", [userLogin : userLogin , projectId : projectId]);
+phases = result.get("phaseList");
+if (phases){
+ phases.each { phase ->
+ tasks = delegator.findByAnd("WorkEffort", ["workEffortParentId" : phase.phaseId]);
+ if (tasks){
+ tasks.each { task ->
+ ganttList.add(task);
+ }
+ }
+ }
+}
+context.phases = phases;
+context.tasks = ganttList;
+

Propchange: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl?rev=701076&r1=701075&r2=701076&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/project/gantChart.ftl Thu Oct  2 04:01:18 2008
@@ -1,311 +1,106 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<script language="javascript">
-
-            dojo.require("dojo.collections.Store");
-            dojo.require("dojo.charting.Chart");
-            dojo.require('dojo.json');
-            dojo.require("dojo.date.common");
-            dojo.require("dojo.event.*");
-            dojo.require("dojo.io.*");
-
-            var interv = dojo.date.dateParts.DAY;
-            
-
-            //  our sample data for our gantt chart.
-
-        var json = [];
-
-        // Convert the database data to json
-        <#if tasks?has_content>
-          <#list tasks as taskNode>
-                <#if taskNode.estimatedStartDate?exists>
-                   var dtStart = new Date("${taskNode.estimatedStartDate?string.short}");
-                   <#else>
-                   var dtStart = new Date("${chartStart?string.short}");
-                </#if>
-                <#if taskNode.estimatedCompletionDate?exists>
-                    var dtEnd = new Date("${taskNode.estimatedCompletionDate?string.short}");
-                   <#else>
-                   var dtEnd = new Date("${chartEnd?string.short}");
-                </#if>
-              <#if taskNode.phaseName?exists>
-                  json.push({high: dtEnd.getTime(), low: dtStart.getTime(), task: "${taskNode.phaseName}", type: "p"});
-              <#elseif taskNode.workEffortName?exists>
-                  json.push({high: dtEnd.getTime(), low: dtStart.getTime(), task: "${taskNode.workEffortName}", type: "t"});
-              </#if>
-          </#list>
-        </#if>
-
-            //Parameters
-            var chartStart = new Date("${chartStart?string.short}");
-            var dEnd = new Date("${chartEnd?string.short}");
-//          var duration = 14;      //Duration of the chart
-            //Calculated parameters
-            var nbDays = dojo.date.diff(chartStart, dtEnd, interv);
-
-            var store = new dojo.collections.Store();
-            store.setData(json);
-
-            //  define the chart.
-            var s1 = new dojo.charting.Series({
-                dataSource:store,
-                bindings:{ id:"id", high:"high", low:"low", label:"task", type:"type" },
-                label:"Project tasks"
-            });
-
-            //  test the evaluate
-/*
-            var data = s1.evaluate();
-            var a=[];
-            for(var i=0; i<data.length; i++){
-                a.push("{ high:"+data[i].high +", low:"+data[i].low + ", label:"+data[i].label + "}");
-            }
-            alert("Data evaluation:\n"+a.join("\n"));
-*/          
-
-            //////////////////////
-            var data = s1.evaluate();
-            
-            
-            //create the y-axis with task labels
-            var yB2 = new dojo.charting.Axis();
-            //Range is calculated to nbTasks * 10
-            yB2.range={upper:parseInt(data.length * 30),lower:0};
-            yB2.origin="min";
-            yB2.showTicks = true;
-            yB2.showLines = true;
-            
-            for(var i=data.length-1; i>=0; i--){
-                yB2.labels.push({ label: data[i].label, value: parseInt((data.length - i)*30) });
-            }
-
-            //create the first x-axis (day-based)
-            var xB = new dojo.charting.Axis();
-            xB.range={upper:dtEnd.getTime(), lower:chartStart.getTime()};
-            //setting the origin to more than y-axis.upper cause it to appear above the chart
-            xB.origin = parseInt(yB2.range.upper + 30);
-            xB.showTicks = true;
-            xB.showLines = false;
-            
-            var dtStart = chartStart;
-            for(var i = 0; i < nbDays; i++){
-                xB.labels.push({ label: dateFormat(dtStart, '!ddd'), value: dtStart.getTime() });
-                dtStart = dojo.date.add(dtStart, interv, 1);
-            }
-            
-            //create the second x-axis (week-based)
-            var xB2 = new dojo.charting.Axis();
-            //use the same range as first axis
-            xB2.range = xB.range;
-            xB2.origin="min";
-            xB2.showTicks = true;
-            xB2.showLines = true;
-            
-            dtStart = chartStart;
-            for(var i = 0; i < nbDays; i++){
-                if(dateFormat(dtStart, '!ddd') == "Mon"){
-                    xB2.labels.push({ label: dateFormat(dtStart, '!dd/!mm'), value: dtStart.getTime() });
-                }
-                dtStart = dojo.date.add(dtStart, interv, 1);
-            }
-
-
-
-//gantt series
-            //to display second axis and labels on same chart, we need a first Plot object
-            var p2 = new dojo.charting.Plot(xB2, yB2);
-
-            //The second Plot object hold the data Series
-            var p3 = new dojo.charting.Plot(xB, yB2);
-            p3.renderType = dojo.charting.RenderPlotSeries.Grouped;
-            p3.addSeries({ data:s1, plotter: dojo.charting.Plotters.Gantt });
-            
-            var pa2 = new dojo.charting.PlotArea();
-            //Add the 2 Plot to the PlotArea
-            pa2.plots.push(p2);
-            pa2.plots.push(p3);
-            
-            //Calculate chart height & width
-            var chartH = data.length * 30;  // height of the bars
-            var chartW = nbDays * 50;  // width of one day
-
-            pa2.size={width:chartW, height:chartH};
-            pa2.padding={top:30, right:30, bottom:30, left:60 };
-            
-            //  auto assign colors, and increase the step
-            s1.color = pa2.nextColor();
-            
-            // Create the Chart and add the PlotArea
-            var chart = new dojo.charting.Chart(null, "Test chart", "This is a potential description");
-            chart.addPlotArea({ x:5,y:100, plotArea:pa2 }); // position of the chart on screen
-            
-
-            dojo.addOnLoad(function(){
-                chart.node = dojo.byId("chartTest1");
-                chart.render();
-                document.getElementById("chartTest1").setAttribute("style", "width:" + chartW + "; height:" + chartH + ";");
-                document.getElementById("plotLabels1").setAttribute("style", "width:" + chartW + "; height:" + chartH + ";");
-                //Call PlotArea.render with the custom function
-                pa2.render(s1, customPlot);
-
-            });
-            dojo.debug("--end callBack");
-              
-          dojo.event.connect(dojo, "loaded", "init")
-
-    function customPlot(node, srcObject){
-            //First solution for custom labels
-            //Display labels in a div elt overlapping the graph
-
-            var x = parseInt(node.getAttribute("x"));
-            var y = parseInt(node.getAttribute("y"));
-            var width = parseInt(node.getAttribute("width")) - 10;
-
-
-            if(srcObject.type == "p"){
-                node.setAttribute("y", y + 15);
-                node.setAttribute("rx", "10");
-                node.setAttribute("ry", "10");
-                node.setAttribute("height", "5");
-                node.setAttribute("type", "arc");
-                node.setAttribute("style", "fill:#000000;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000");
-//              dojo.debug(srcObject.type);
-            }else if(srcObject.type == "j"){
-                node.setAttribute("x", x + 15);
-                node.setAttribute("y", y + 10);
-                node.setAttribute("rx", "10");
-                node.setAttribute("ry", "10");
-                node.setAttribute("width", "10");
-                node.setAttribute("height", "10");
-                node.setAttribute("type", "arc");
-                node.setAttribute("style", "fill:#00FF00;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000");
-//              dojo.debug(srcObject.type);
-            }else{
-                node.setAttribute("height", "20");
-            }
-
-            var div = document.createElement("div");
-            if(srcObject.type != "p"){
-                if(srcObject.type == "j"){
-                    div.setAttribute("class", "milestone-label");
-                    x += 15;
-                }else{
-                    div.setAttribute("class", "bar-label");
-                }
-                div.setAttribute("style", "top:" + parseInt(y + 4) + "px; left:" + parseInt(x + 5) + "px; width:" + width + "px");
-                div.appendChild(document.createTextNode(srcObject.task));
-                document.getElementById("plotLabels1").appendChild(div);
-            }
-            //connect the mouseover event to the task label
-            dojo.event.connect(div, "onmouseover", dj_global, "onMouseOver");
-
-    }
-
-    function onMouseOver(evt){
-        logMe(evt);
-    }  
-
-    function logMe(evt){
-        // FIXME: it appears that we're not actually getting this passed from IE!?!
-        //if(!evt){ evt = window.event; }
-        dojo.debug(evt.type + ' was fired');
-/*
-        lastEvt = dump(evt);
-        for(var x in evt){
-            dojo.debug(x+": "+evt[x]);
-        }
-*/
-        dojo.debug("some event was fired");
-    }
-
-function dateFormat(aDate, displayPat){
-    /********************************************************
-    *   Valid Masks:
-    *   !mmmm = Long month (eg. January)
-    *   !mmm = Short month (eg. Jan)
-    *   !mm = Numeric date (eg. 07)
-    *   !m = Numeric date (eg. 7)
-    *   !dddd = Long day (eg. Monday)
-    *   !ddd = Short day (eg. Mon)
-    *   !dd = Numeric day (eg. 07)
-    *   !d = Numeric day (eg. 7)
-    *   !yyyy = Year (eg. 1999)
-    *   !yy = Year (eg. 99)
-   ********************************************************/
-
-    intMonth = aDate.getMonth();
-    intDate = aDate.getDate();
-    intDay = aDate.getDay();
-    intYear = aDate.getFullYear();
-
-    var months_long =  new Array ('January','February','March','April',
-       'May','June','July','August','September','October','November','December')
-    var months_short = new Array('Jan','Feb','Mar','Apr','May','Jun',
-       'Jul','Aug','Sep','Oct','Nov','Dec')
-    var days_long = new Array('Sunday','Monday','Tuesday','Wednesday',
-       'Thursday','Friday','Saturday')
-    var days_short = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat')
-
-    var mmmm = months_long[intMonth]
-    var mmm = months_short[intMonth]
-    var mm = intMonth < 9?'0'+ (1 + intMonth) + '':(1+intMonth)+'';
-    var m = 1+intMonth+'';
-    var dddd = days_long[intDay];
-    var ddd = days_short[intDay];
-    var dd = intDate<10?'0'+intDate+'':intDate+'';
-    var d = intDate+'';
-    var yyyy = intYear;
-
-    century = 0;
-    while((intYear-century)>=100)
-        century = century + 100;
-
-    var yy = intYear - century
-    if(yy<10)
-        yy = '0' + yy + '';
-
-    displayDate = new String(displayPat);
-
-    displayDate = displayDate.replace(/!mmmm/i,mmmm);
-    displayDate = displayDate.replace(/!mmm/i,mmm);
-    displayDate = displayDate.replace(/!mm/i,mm);
-    displayDate = displayDate.replace(/!m/i,m);
-    displayDate = displayDate.replace(/!dddd/i,dddd);
-    displayDate = displayDate.replace(/!ddd/i,ddd);
-    displayDate = displayDate.replace(/!dd/i,dd);
-    displayDate = displayDate.replace(/!d/i,d);
-    displayDate = displayDate.replace(/!yyyy/i,yyyy);
-    displayDate = displayDate.replace(/!yy/i,yy);
-
-    return displayDate;
-}
-</script>
-
-<div id="chartTest1">
-<div id="plotLabels1"/>
-</div>
-<br/><br/>
-<#if tasks?has_content>
-<br/><br/><br/><br/><br/><br/>
-  <#list tasks as taskNode>
-  <br/>
-  </#list>
-</#if>
\ No newline at end of file
+<div align="center">
+<table border="0" cellspacing="0" width="882px;">
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;" align="center"><h2>Name</h2></td>
+ <td style="width: 732px; vertical-align: bottom;" colspan="12" align="center"><h2>Time Line</h2></td>
+ </tr>
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;">&nbsp;</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">January</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">February</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">March</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">April</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">May</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">June</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">July</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">August</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">September</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">October</td>
+ <td style="width: 61px;" align="center" bgcolor="#D3D3D3">November</td>
+ <td style="width: 61px;" align="center" bgcolor="#BEBEBE">December</td>
+ </tr>
+<#assign phasesummary2 = 0/>
+<#assign summary2 = 0/>
+<#assign day = 24 * 60 * 60 * 1000/>
+<#if phases?has_content>
+<#list phases as phases>
+ <#assign phaseId = phases.phaseId/>
+ <#assign phasesStart = Static["org.ofbiz.base.util.UtilDateTime"].toCalendar(phases.estimatedStartDate)/>
+ <#assign phasesEnd = Static["org.ofbiz.base.util.UtilDateTime"].toCalendar(phases.estimatedCompletionDate)/>
+ <#assign t1 = phasesStart.getTime().getTime()/>
+ <#assign t2 = phasesEnd.getTime().getTime()/>
+ <#assign phasesMonth = phases.estimatedStartDate?substring(5,7)?number/>
+ <#assign phasesDay = phases.estimatedStartDate?substring(8,10)?number/>
+ <#assign phasespacer = ((phasesMonth-1)*60.8)+(phasesDay*2)/>
+ <#assign phasesummary = ((t2-t1)/day)*2/>
+ <#if (732<(phasespacer+phasesummary))>
+ <#assign phasesummary1 = 732-phasespacer/>
+ <#assign phasesummary2 = phasesummary-phasesummary1/>
+ <#assign phasesummary = phasesummary1/>
+ </#if>
+ <#assign lastSpacer = 732 - (phasespacer + phasesummary)/>
+
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;">
+ ${phases.phaseName?if_exists}
+ </td>
+ <td colspan="12">
+ <img src="/images/spacer.gif" height="15px;" width="${phasespacer}px;"><img src="/images/busy.gif" height="15px;" width="${phasesummary}px;"><img src="/images/spacer.gif" height="15px;" width="${lastSpacer}px;">
+ </td>
+ </tr>
+ <#if (phasesummary2 != 0)>
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;">
+ &nbsp;
+ </td>
+ <td colspan="12">
+ <img src="/images/busy.gif" height="15px;" width="${phasesummary2}px;">
+ </td>
+ </tr>
+ </#if>
+ <#if tasks?has_content>
+ <#list tasks as tasks>
+ <#assign phasesId = tasks.workEffortParentId/>
+ <#assign taskId = tasks.workEffortId/>
+ <#assign taskStart = Static["org.ofbiz.base.util.UtilDateTime"].toCalendar(tasks.estimatedStartDate)/>
+ <#assign taskEnd = Static["org.ofbiz.base.util.UtilDateTime"].toCalendar(tasks.estimatedCompletionDate)/>
+ <#assign t3 = taskStart.getTime().getTime()/>
+ <#assign t4 = taskEnd.getTime().getTime()/>
+ <#assign startMonth = tasks.estimatedStartDate?substring(5,7)?number/>
+ <#assign startDay = tasks.estimatedStartDate?substring(8,10)?number/>
+ <#assign spacer = ((startMonth-1)*60.8)+(startDay*2)/>
+ <#if phasesId==phaseId>
+ <#assign summary = ((t4-t3)/day)*2/>
+ <#if (732<(spacer+summary))>
+ <#assign summary1 = 732-spacer/>
+ <#assign summary2 = summary-summary1/>
+ <#assign summary = summary1/>
+ </#if>
+ <#assign spacer2 = 732 - (spacer + summary)/>
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;" >
+ <a href="/projectmgr/control/taskView?workEffortId=${tasks.workEffortId}">${tasks.workEffortName?if_exists}</a>
+ </td>
+ <td  colspan="12">
+ <img src="/images/spacer.gif" height="15px;" width="${spacer}px;"><img src="/images/bluebar.gif" height="15px;" width="${summary}px;"><img src="/images/spacer.gif" height="15px;" width="${spacer2}px;">
+ </td>
+ </tr>
+ <#if (summary2 != 0)>
+ <tr>
+ <td style="width: 150px; vertical-align: bottom;" >
+ &nbsp;
+ </td>
+ <td  colspan="12">
+ <img src="/images/bluebar.gif" height="15px;" width="${summary2}px;">
+ </td>
+ </tr>
+ </#if>
+ </#if>
+ </#list>
+ </#if>
+</#list>
+</#if>
+</table>
+</div><br>
+<img src="/images/busy.gif" height="15px;" width="30px;"><b> : Phase</b><br>
+<img src="/images/bluebar.gif" height="15px;" width="30px;"><b> : Task</b>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=701076&r1=701075&r2=701076&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Thu Oct  2 04:01:18 2008
@@ -500,8 +500,7 @@
             <actions>
                 <set field="titleProperty" value="ProjectMgrGanttChart"/>
                 <set field="tabButtonItem" value="ganttchart"/>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/dojo/dojo.js" global="true"/>
-                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.bsh"/>
+                <script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy"/>
             </actions>
             <widgets>
                 <label text="${project}"></label>