You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2008/06/05 13:48:15 UTC

svn commit: r663544 [2/2] - in /ofbiz/trunk: applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/ applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ applications/manufacturing/webapp/manufacturing/WEB-INF/action...

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionDay.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionDay.groovy?rev=663544&r1=663543&r2=663544&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionDay.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionDay.groovy Thu Jun  5 04:48:15 2008
@@ -23,25 +23,19 @@
 import org.ofbiz.entity.*;
 import org.ofbiz.widget.html.*;
 
-security = request.getAttribute("security");
-delegator = request.getAttribute("delegator");
-
 if(security.hasEntityPermission("MANUFACTURING", "_VIEW", session)) {
-    context.put("hasPermission", Boolean.TRUE);
+    context.hasPermission = Boolean.TRUE;
 } else {
-    context.put("hasPermission", Boolean.FALSE);
+    context.hasPermission = Boolean.FALSE;
 }
-GenericValue techDataCalendar = null;
-List calendarExceptionDays = null;
+techDataCalendar = [:];
+calendarExceptionDays = [];
 
-String calendarId = request.getParameter("calendarId");
-if (calendarId == null) {
-    calendarId = request.getAttribute("calendarId");
-}
-if (calendarId != null) {
-    techDataCalendar = delegator.findByPrimaryKey("TechDataCalendar", UtilMisc.toMap("calendarId", calendarId));
+calendarId = parameters.calendarId ?: request.getAttribute("calendarId");
+if (calendarId) {
+    techDataCalendar = delegator.findByPrimaryKey("TechDataCalendar", [calendarId : calendarId]);
 }
-if (techDataCalendar != null) {
+if (techDataCalendar) {
     calendarExceptionDays = techDataCalendar.getRelated("TechDataCalendarExcDay");
 }
 HtmlFormWrapper listCalendarExceptionDayWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "ListCalendarExceptionDay", request, response);
@@ -50,19 +44,17 @@
 HtmlFormWrapper addCalendarExceptionDayWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "AddCalendarExceptionDay", request, response);
 addCalendarExceptionDayWrapper.putInContext("techDataCalendar", techDataCalendar);
 
-context.put("techDataCalendar", techDataCalendar);
-context.put("listCalendarExceptionDayWrapper", listCalendarExceptionDayWrapper);
-context.put("addCalendarExceptionDayWrapper", addCalendarExceptionDayWrapper);
-
-String exceptionDateStartTime = request.getParameter("exceptionDateStartTime");
-if (exceptionDateStartTime == null)
-    exceptionDateStartTime = request.getAttribute("exceptionDateStartTime");
-if (exceptionDateStartTime != null) {
-    calendarExceptionDay = delegator.findByPrimaryKey("TechDataCalendarExcDay", UtilMisc.toMap("calendarId", calendarId,"exceptionDateStartTime", exceptionDateStartTime));
-    if (calendarExceptionDay != null) {
+context.techDataCalendar = techDataCalendar;
+context.listCalendarExceptionDayWrapper = listCalendarExceptionDayWrapper;
+context.addCalendarExceptionDayWrapper = addCalendarExceptionDayWrapper;
+
+exceptionDateStartTime = parameters.exceptionDateStartTime ?: request.getAttribute("exceptionDateStartTime");
+if (exceptionDateStartTime) {
+    calendarExceptionDay = delegator.findByPrimaryKey("TechDataCalendarExcDay", [calendarId : calendarId , exceptionDateStartTime : exceptionDateStartTime]);
+    if (calendarExceptionDay) {
         HtmlFormWrapper updateCalendarExceptionDayWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "UpdateCalendarExceptionDay", request, response);
         updateCalendarExceptionDayWrapper.putInContext("calendarExceptionDay", calendarExceptionDay);
-        context.put("calendarExceptionDay", calendarExceptionDay);
-        context.put("updateCalendarExceptionDayWrapper", updateCalendarExceptionDayWrapper);
+        context.calendarExceptionDay = calendarExceptionDay;
+        context.updateCalendarExceptionDayWrapper =  updateCalendarExceptionDayWrapper;
     }
 }

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy?rev=663544&r1=663543&r2=663544&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy Thu Jun  5 04:48:15 2008
@@ -18,38 +18,27 @@
  */
 
 
-import java.util.*;
-import org.ofbiz.base.util.*;
-import org.ofbiz.entity.*;
-import org.ofbiz.widget.html.*;
-
-security = request.getAttribute("security");
-delegator = request.getAttribute("delegator");
+import org.ofbiz.widget.html.HtmlFormWrapper;
 
 if(security.hasEntityPermission("MANUFACTURING", "_VIEW", session)) {
-    context.put("hasPermission", Boolean.TRUE);
+    context.hasPermission = Boolean.TRUE;
 } else {
-    context.put("hasPermission", Boolean.FALSE);
+    context.hasPermission = Boolean.FALSE;
 }
-GenericValue techDataCalendar = null;
-List calendarExceptionWeeks = null;
+techDataCalendar = [:];
+calendarExceptionWeeks = [];
 
-String calendarId = request.getParameter("calendarId");
-if (calendarId == null) {
-    calendarId = request.getAttribute("calendarId");
-}
+calendarId = parameters.calendarId ?: request.getAttribute("calendarId");;
 if (calendarId != null) {
-    techDataCalendar = delegator.findByPrimaryKey("TechDataCalendar", UtilMisc.toMap("calendarId", calendarId));
+    techDataCalendar = delegator.findByPrimaryKey("TechDataCalendar", [calendarId : calendarId]);
 }
 if (techDataCalendar != null) {
     calendarExceptionWeeks = techDataCalendar.getRelated("TechDataCalendarExcWeek");
 }
-List calendarExceptionWeeksDatas = new LinkedList();
-Iterator calendarExceptionWeeksIter = calendarExceptionWeeks.iterator();
-while (calendarExceptionWeeksIter.hasNext()) {
-    GenericValue calendarExceptionWeek = (GenericValue) calendarExceptionWeeksIter.next();
-    GenericValue calendarWeek = calendarExceptionWeek.getRelatedOne("TechDataCalendarWeek");
-    calendarExceptionWeeksDatas.add(UtilMisc.toMap("calendarExceptionWeek", calendarExceptionWeek, "calendarWeek", calendarWeek));
+calendarExceptionWeeksDatas = [];
+calendarExceptionWeeks.each { calendarExceptionWeek ->
+    calendarWeek = calendarExceptionWeek.getRelatedOne("TechDataCalendarWeek");
+    calendarExceptionWeeksDatas.add([calendarExceptionWeek : calendarExceptionWeek , calendarWeek : calendarWeek]);
 }
 
 HtmlFormWrapper listCalendarExceptionWeekWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "ListCalendarExceptionWeek", request, response);
@@ -58,19 +47,17 @@
 HtmlFormWrapper addCalendarExceptionWeekWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "AddCalendarExceptionWeek", request, response);
 addCalendarExceptionWeekWrapper.putInContext("techDatacalendar", techDataCalendar);
 
-context.put("techDataCalendar", techDataCalendar);
-context.put("listCalendarExceptionWeekWrapper", listCalendarExceptionWeekWrapper);
-context.put("addCalendarExceptionWeekWrapper", addCalendarExceptionWeekWrapper);
-
-String exceptionDateStart = request.getParameter("exceptionDateStart");
-if (exceptionDateStart == null)
-    exceptionDateStart = request.getAttribute("exceptionDateStart");
-if (exceptionDateStart != null) {
-    calendarExceptionWeek = delegator.findByPrimaryKey("TechDataCalendarExcWeek", UtilMisc.toMap("calendarId", calendarId,"exceptionDateStart", exceptionDateStart));
-    if (calendarExceptionWeek != null) {
+context.techDataCalendar = techDataCalendar;
+context.listCalendarExceptionWeekWrapper = listCalendarExceptionWeekWrapper;
+context.addCalendarExceptionWeekWrapper = addCalendarExceptionWeekWrapper;
+
+exceptionDateStart = parameters.exceptionDateStart ?: request.getAttribute("exceptionDateStart");
+if (exceptionDateStart) {
+    calendarExceptionWeek = delegator.findByPrimaryKey("TechDataCalendarExcWeek", [calendarId : calendarId , exceptionDateStart : exceptionDateStart]);
+    if (calendarExceptionWeek) {
         HtmlFormWrapper updateCalendarExceptionWeekWrapper = new HtmlFormWrapper("component://manufacturing/webapp/manufacturing/routing/CalendarForms.xml", "UpdateCalendarExceptionWeek", request, response);
         updateCalendarExceptionWeekWrapper.putInContext("calendarExceptionWeek", calendarExceptionWeek);
-        context.put("calendarExceptionWeek", calendarExceptionWeek);
-        context.put("updateCalendarExceptionWeekWrapper", updateCalendarExceptionWeekWrapper);
+        context.calendarExceptionWeek = calendarExceptionWeek;
+        context.updateCalendarExceptionWeekWrapper = updateCalendarExceptionWeekWrapper;
     }
-}
+}
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=663544&r1=663543&r2=663544&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Thu Jun  5 04:48:15 2008
@@ -867,8 +867,8 @@
                 <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/control.progress_bar.js" global="true"/>                
                 <set field="layoutSettings.styleSheets[]" value="/images/prototypejs/progress_bar.css" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/partymgr/js/PartyProfileContent.js" global="true"/>                
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/viewprofile.groovy"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/getUserLoginPrimaryEmail.groovy"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -1070,7 +1070,7 @@
                 <set field="labelTitleProperty" value="PageTitleEditContactMech"/>
                 
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/HasPartyPermissions.groovy"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/editcontactmech.groovy"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -1125,7 +1125,7 @@
                 <entity-one entity-name="Party" use-cache="true" value-name="party"/>
                 <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson"/>
                 <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.groovy"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/FindCommEventContactMechs.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -1256,7 +1256,7 @@
                 <set field="headerItem" value="visits"/>
                 <set field="tabButtonItem" value="showvisits"/>
                 
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/showvisits.groovy"/>                
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy"/>                
             </actions>
             <widgets>
                 <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -1287,7 +1287,7 @@
                 <set field="headerItem" value="visits"/>
                 <set field="tabButtonItem" value="visitdetail"/>
                 
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/visitdetail.groovy"/>                
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy"/>                
             </actions>
             <widgets>
                 <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">