You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/07/27 15:04:10 UTC

svn commit: r680097 - in /ofbiz/trunk/applications/party: config/PartyUiLabels.xml script/org/ofbiz/party/communication/CommunicationEventServices.xml webapp/partymgr/communication/CommForms.xml webapp/partymgr/communication/CommMenus.xml

Author: hansbak
Date: Sun Jul 27 06:04:10 2008
New Revision: 680097

URL: http://svn.apache.org/viewvc?rev=680097&view=rev
Log:
adding return screen names in order to reuse screens more and fixing some errors in the communication screens. Further added the creation of communication roles from the partyIdFrom/to

Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=680097&r1=680096&r2=680097&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sun Jul 27 06:04:10 2008
@@ -1644,7 +1644,10 @@
         <value xml:lang="en">Communications from Unknown origin</value>
         <value xml:lang="fr">Communications depuis une origine inconnue</value>
     </property>
-    <property key="PageTitleViewCommPurposes">
+    <property key="PageTitleViewCommunication">
+        <value xml:lang="en">View Communication Event Information</value>
+    </property>
+   <property key="PageTitleViewCommPurposes">
         <value xml:lang="en">View Communication Purposes</value>
         <value xml:lang="es">Ver propósitos de comunicación</value>
         <value xml:lang="fr">Afficher les buts de communication</value>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=680097&r1=680096&r2=680097&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Sun Jul 27 06:04:10 2008
@@ -43,7 +43,7 @@
         </if-empty>
         <field-to-result field-name="newEntity.communicationEventId" result-name="communicationEventId"/>
         
-        <!-- if only contactmechid and no partyTo is provided for creation email address find the related party it -->
+        <!-- if only contactMechId and no partyIdTo is provided for creation email address find the related party -->
         <if-empty field="parameters.partyIdTo">
             <if-not-empty field="parameters.contactMechIdTo">
                 <entity-and entity-name="PartyAndContactMech" list-name="partyContactMechs" filter-by-date="true">
@@ -56,7 +56,7 @@
         </if-empty>
         
         <now-timestamp-to-env env-name="newEntity.entryDate"/>
-        
+<log level="always" message="========== create commevent with data: ${newEntity}"/>        
         <create-value value-name="newEntity"/>
 
         <if-not-empty field="parameters.productId">
@@ -78,46 +78,24 @@
             <create-value value-name="eventRequest"/>
         </if-not-empty>
         
-        <!-- roles -->
-        <!-- partyIdTo -->
+        <!-- partyIdTo role-->
         <if-not-empty field="newEntity.partyIdTo">
-            <entity-one entity-name="PartyRole" value-name="partyRole">
-                <field-map field-name="partyId" value="${newEntity.partyIdTo}" />
-                <field-map field-name="roleTypeId" value="ADDRESSEE" />
-            </entity-one>
-            <if-empty field="partyRole">
-                <make-value entity-name="PartyRole" value-name="partyRole" />
-                <set field="partyRole.partyId" value="${newEntity.partyIdTo}" />
-                <set field="partyRole.roleTypeId" value="ADDRESSEE" />
-                <create-value value-name="partyRole" />
-            </if-empty>
-            <make-value entity-name="CommunicationEventRole" value-name="commRole" />
             <set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
             <set field="commRole.partyId" from-field="newEntity.partyIdTo" />
             <set field="commRole.roleTypeId" value="ADDRESSEE" />
-            <set field="contactMechId" value="${newEntity.contactMechIdTo}" />
+            <set field="commRole.contactMechId" from-field="newEntity.contactMechIdTo" />
             <set field="commRole.statusId" value="COM_ROLE_CREATED" />
-            <create-value value-name="commRole" />
+            <call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
         </if-not-empty>
 	
-        <!-- partyIdFrom -->
-        <if-not-empty field="commEvent.partyIdFrom">
-            <entity-one entity-name="PartyRole" value-name="partyRole">
-                <field-map field-name="partyId" value="${newEntity.partyIdFrom}" />
-                <field-map field-name="roleTypeId" value="ORIGINATOR" />
-            </entity-one>
-            <if-empty field="partyRole">
-                <make-value entity-name="PartyRole" value-name="partyRole" />
-                <set field="partyRole.partyId" value="${newEntity.partyIdFrom}" />
-                <set field="partyRole.roleTypeId" value="ORIGINATOR" />
-                <create-value value-name="partyRole" />
-            </if-empty>
+        <!-- partyIdFrom role-->
+        <if-not-empty field="newEntity.partyIdFrom">
             <set field="commRole.communicationEventId" from-field="newEntity.communicationEventId" />
             <set field="commRole.partyId" from-field="newEntity.partyIdFrom" />
             <set field="commRole.roleTypeId" value="ORIGINATOR" />
-            <set field="contactMechId" value="${newEntity.contactMechIdFrom}" />
-            <set field="commRole.statusId" value="COM_ROLE_READ" />
-            <create-value value-name="commRole" />
+            <set field="commRole.contactMechId" from-field="newEntity.contactMechIdFrom" />
+            <set field="commRole.statusId" value="COM_ROLE_COMPLETED" />
+            <call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
         </if-not-empty>
     </simple-method>
 
@@ -208,6 +186,8 @@
         <!-- check if role already exist, then ignore -->
         <entity-one entity-name="CommunicationEventRole" value-name="communicationEventRole" />
         <if-empty field="communicationEventRole">
+            <set-service-fields service-name="createPartyRole" map-name="parameters" to-map-name="partyRole"/>
+            <call-service service-name="createPartyRole" in-map-name="partyRole" />
             <make-value value-name="newEntity" entity-name="CommunicationEventRole" />
             <set-pk-fields map-name="parameters" value-name="newEntity" />
             <set-nonpk-fields map-name="parameters" value-name="newEntity" />

Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=680097&r1=680096&r2=680097&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Sun Jul 27 06:04:10 2008
@@ -172,6 +172,7 @@
         <actions>
             <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/recentVisitor.groovy"/>
         </actions>
+        <field name="donePage"><hidden/></field>
         <field name="communicationEventTypeId"><hidden value="COMMENT_NOTE"/></field>
         <field name="parentCommEventId"><hidden value="${parentCommEventId}"/></field>
         <field name="statusId"><hidden value="COM_COMPLETE"/></field>
@@ -189,6 +190,7 @@
     
     <form name="ViewCommEvent" type="single" default-map-name="communicationEvent"
         header-row-style="header-row" default-table-style="basic-table">
+        <field name="donePage"><hidden/></field>
         <field name="communicationEventId">
             <hyperlink description="${communicationEventId}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}"/>
         </field>
@@ -439,7 +441,7 @@
         <field name="roleTypeId"><display-entity description="${description}" entity-name="RoleType"/></field>
         <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field>
         <field name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="/RemoveCommunicationEventRole?partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;communicationEventId=${communicationEventId}"/>
+            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="/RemoveCommunicationEventRole?partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;communicationEventId=${communicationEventId}&amp;donePage=${donePage}"/>
         </field>
     </form>
 
@@ -636,6 +638,7 @@
         <actions>
             <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/getPartyEmailFromCommEventInfo.groovy"/>
         </actions>
+        <field name="donePage"><hidden value="${parameters.donePage}"/></field>
         <field name="communicationEventId"><hidden value="${parameters.communicationEventId}"/></field>
         <field name="partyId" tooltip="leave empty for new 'Party'"><lookup target-form-name="LookupPartyName"/></field>
         <field name="emailAddress"><text/></field>
@@ -646,6 +649,7 @@
     </form>
     <form name="deleteEmail" type="single" title="delete the email"
         target="deleteUnknownCommunicationEvent">
+        <field name="donePage"><hidden value="${parameters.donePage}"/></field>
         <field name="communicationEventId"><hidden value="${parameters.communicationEventId}"/></field>
         <field name="delContentDataResource"><hidden value="Y"/></field>
         <field name="" position="1"><display/></field>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml?rev=680097&r1=680096&r2=680097&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml Sun Jul 27 06:04:10 2008
@@ -71,13 +71,13 @@
     
     <menu name="CommSubTabBar" menu-container-style="button-bar button-style-2">
         <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}">
-            <link target="EditCommunicationEvent"/>
+            <link target="EditCommunicationEvent?donePage=${parameters.donePage}"/>
         </menu-item>
         <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}">
-            <link target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION"/>
+            <link target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&amp;donePage=${parameters.donePage}"/>
         </menu-item>
         <menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}">
-            <link target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE"/>
+            <link target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE&amp;donePage=${parameters.donePage}"/>
         </menu-item>
         <menu-item name="reply" title="${uiLabelMap.PartyReply}">
             <condition>