Author: erwan
Date: Sun Nov 6 20:13:06 2011 New Revision: 1198545 URL: http://svn.apache.org/viewvc?rev=1198545&view=rev Log: A patch from Olivier Heintz - OFBIZ-4509 - EditProductionRunDeclRoutingTask is not usable because javascript calendar is not working for date fields Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1198545&r1=1198544&r2=1198545&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Sun Nov 6 20:13:06 2011 @@ -98,11 +98,8 @@ if (productionRunId) { Map routingTaskData = routingTask.getAllFields(); routingTaskData.estimatedSetupMillis = routingTask.getDouble("estimatedSetupMillis"); routingTaskData.estimatedMilliSeconds = routingTask.getDouble("estimatedMilliSeconds"); - HtmlFormWrapper editPrRoutingTaskWrapper = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "EditProductionRunDeclRoutingTask", request, response); - editPrRoutingTaskWrapper.putInContext("routingTaskData", routingTaskData); - editPrRoutingTaskWrapper.putInContext("actionForm", "UpdateRoutingTask"); + context.routingTaskData = routingTaskData; routingTaskData.partyId = userLogin.partyId; - context.editPrRoutingTaskWrapper = editPrRoutingTaskWrapper; context.routingTaskId = routingTaskId; // Get the list of deliverable products, i.e. the WorkEffortGoodStandard entries // with workEffortGoodStdTypeId = "PRUNT_PROD_DELIV": @@ -116,16 +113,10 @@ if (productionRunId) { if (templateTask) { delivProducts = EntityUtil.filterByDate(templateTask.getRelatedByAnd("WorkEffortGoodStandard", [workEffortGoodStdTypeId : "PRUNT_PROD_DELIV"])); } - HtmlFormWrapper createRoutingTaskDelivProductForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "CreateRoutingTaskDelivProduct", request, response); - createRoutingTaskDelivProductForm.putInContext("formData", [productionRunId : productionRunId, workEffortId : routingTaskId]); - context.createRoutingTaskDelivProductForm = createRoutingTaskDelivProductForm; context.delivProducts = delivProducts; // Get the list of delivered products, i.e. inventory items prunInventoryProduced = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : routingTaskId]); context.prunInventoryProduced = prunInventoryProduced; - HtmlFormWrapper prunInventoryProducedForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskInventoryProducedList", request, response); - prunInventoryProducedForm.putInContext("prunInventoryProduced", prunInventoryProduced); - context.prunInventoryProducedForm = prunInventoryProducedForm; } // RoutingTasks list Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl?rev=1198545&r1=1198544&r2=1198545&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl Sun Nov 6 20:13:06 2011 @@ -1,35 +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. ---> - - <#if routingTaskId?has_content || actionForm=="AddRoutingTask"> - <table class="basic-table" cellspacing="0"> - <tr> - <td> - ${editPrRoutingTaskWrapper.renderFormString(context)} - </td> - <td> - ${createRoutingTaskDelivProductForm.renderFormString(context)} - <#if prunInventoryProduced?has_content> - ${prunInventoryProducedForm.renderFormString(context)} - </#if> - </td> - </tr> - </table> - </#if> - <br /> \ No newline at end of file Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=1198545&r1=1198544&r2=1198545&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Sun Nov 6 20:13:06 2011 @@ -240,9 +240,25 @@ under the License. <include-form name="ListProductionRunDeclRoutingTasks" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/> </screenlet> <screenlet title="${uiLabelMap.ManufacturingProductionRunDeclaration}"> - <platform-specific> - <html><html-template location="component://manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl"/></html> - </platform-specific> + <section> + <condition> + <not><if-empty field="parameters.routingTaskId"/></not> + </condition> + <widgets> + <container style="lefthalf"> + <include-form name="EditProductionRunDeclRoutingTask" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/> + </container> + <container style="righthalf"> + <include-form name="CreateRoutingTaskDelivProduct" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/> + <section> + <condition><not><if-empty field="prunInventoryProduced"/></not></condition> + <widgets> + <include-form name="ProductionRunTaskInventoryProducedList" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/> + </widgets> + </section> + </container> + </widgets> + </section> </screenlet> <screenlet title="${uiLabelMap.ManufacturingMaterialsRequiredByRunningTask}"> <include-form name="ListIssueProductionRunDeclComponents" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/> Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml?rev=1198545&r1=1198544&r2=1198545&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml (original) +++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml Sun Nov 6 20:13:06 2011 @@ -536,7 +536,7 @@ under the License. <form name="CreateRoutingTaskDelivProduct" type="single" target="createProductionRunTaskProduct" title="" default-map-name="formData" header-row-style="header-row" default-table-style="basic-table"> <field name="productionRunId"><hidden/></field> - <field name="workEffortId"><hidden/></field> + <field name="workEffortId"><hidden value="${routingTaskId}"/></field> <field name="productId" title="${uiLabelMap.ProductProductId}" use-when="${groovy:delivProducts.size()>0}"> <drop-down allow-empty="false"> <list-options list-name="delivProducts" key-name="productId" description="${productId}"/> |
Free forum by Nabble | Edit this page |