Author: hansbak
Date: Mon Jul 14 13:56:30 2008 New Revision: 676729 URL: http://svn.apache.org/viewvc?rev=676729&view=rev Log: spaces for tabs, optimize number of screens, make reply working again Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml 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=676729&r1=676728&r2=676729&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 Mon Jul 14 13:56:30 2008 @@ -220,7 +220,7 @@ <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/> <if-empty field="communicationEvent"> - <add-error><fail-message message="Comminication Event ID: ${parameters.commnicationEventId}"/></add-error> + <add-error><fail-message message="Communication Event ID: ${parameters.commnicationEventId}"/></add-error> <check-errors/> </if-empty> Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy?rev=676729&r1=676728&r2=676729&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy Mon Jul 14 13:56:30 2008 @@ -22,10 +22,9 @@ parentCommEventId = parameters.parentCommEventId; if (parentCommEventId) { - parentEvent = delegator.findByPrimaryKey("CommunicationEvent", [communicationEventId : parentCommEventId]); + parentEvent = delegator.findByPrimaryKey("CommunicationEvent", ["communicationEventId" : parentCommEventId]); if (parentEvent) { - orgEventId = parentEvent.origCommEventId ?: parentCommEventId; - + orgEventId = parentEvent.origCommEventId ? parentEvent.origCommEventId : parentCommEventId; parameters.communicationEventTypeId = parentEvent.communicationEventTypeId; parameters.parentCommEventId = parentCommEventId; parameters.origCommEventId = orgEventId; @@ -35,7 +34,6 @@ parameters.partyIdFrom = userLogin.partyId; parameters.partyIdTo = parentEvent.partyIdFrom; - parameters.toString =parentEvent.fromString; parameters.statusId = "COM_IN_PROGRESS"; parameters.subject = "RE: " + parentEvent.subject; Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=676729&r1=676728&r2=676729&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Mon Jul 14 13:56:30 2008 @@ -672,8 +672,6 @@ <request-map uri="ViewCommunicationEvent"><security https="true" auth="true"/><response name="success" type="view" value="ViewCommunicationEvent"/></request-map> <request-map uri="AddCommContent"><security https="true" auth="true"/><response name="success" type="view" value="AddCommContent"/></request-map> <request-map uri="EditCommContent"><security https="true" auth="true"/><response name="success" type="view" value="EditCommContent"/></request-map> - <request-map uri="newEmail"><security https="true" auth="true"/><response name="success" type="view" value="newEmail"/></request-map> - <request-map uri="newInternalNote"><security https="true" auth="true"/><response name="success" type="view" value="newInternalNote"/></request-map> <request-map uri="EditCommunication"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map> <request-map uri="createCommunicationEvent"> @@ -1115,8 +1113,6 @@ <view-map name="EditCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommEventWorkEffort"/> <view-map name="AddCommContent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#AddCommContent"/> <view-map name="EditCommContent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommContent"/> - <view-map name="newEmail" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#newEmail"/> - <view-map name="newInternalNote" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#NewInternalNote"/> <view-map name="CreateNewParty" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#CreateNewParty"/> <view-map name="NewCustomer" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewCustomer"/> 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=676729&r1=676728&r2=676729&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Mon Jul 14 13:56:30 2008 @@ -20,25 +20,17 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <form name="EditCommEvent" type="single" target="updateCommunicationEvent" default-map-name="communicationEvent" - header-row-style="header-row" default-table-style="basic-table"> - <actions> - <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> - <field-map field-name="statusId" env-name="communicationEvent.statusId"/> - </entity-one> - <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy"/> - </actions> - - <alt-target target="createCommunicationEvent" use-when="communicationEvent==null"/> + <form name="EditCommEvent" type="single" target="updateCommunicationEvent" default-map-name="communicationEvent"> + <alt-target target="createCommunicationEvent" use-when="communicationEvent==null||communicationEvent.get("communicationEventId")==null"/> <field name="partyId" map-name="parameters"><hidden/></field> - <field name="communicationEventId" use-when="communicationEvent!=null"><display/></field> + <field name="communicationEventId" use-when="communicationEvent!=null&&communicationEvent.get("communicationEventId")!=null"><display/></field> <field name="parentCommEventId" position="2"> <lookup target-form-name="LookupCommEvent"> - <sub-hyperlink use-when=""${communicationEvent.parentCommEventId}".length()>0" link-style="buttontext" target="EditCommunicationEvent?communicationEventId=${communicationEvent.parentCommEventId}" description="${uiLabelMap.PartyGoToParent}"/> + <sub-hyperlink link-style="buttontext" target="EditCommunicationEvent?communicationEventId=${parentCommEventId}" description="${uiLabelMap.PartyGoToParent}" use-when="communicationEvent!=null&&communicationEvent.get("parentCommEventId")!=null"/> </lookup> </field> - <field name="communicationEventTypeId"> + <field name="communicationEventTypeId" > <drop-down> <entity-options entity-name="CommunicationEventType" description="${description}"> <entity-order-by field-name="description"/> 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=676729&r1=676728&r2=676729&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml Mon Jul 14 13:56:30 2008 @@ -71,19 +71,19 @@ <menu name="CommSubTabBar" menu-container-style="button-bar button-style-2"> <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}"> - <link target="EditCommunicationEvent?partyId=${partyId}&partyIdFrom=${partyId}"/> + <link target="EditCommunicationEvent"/> </menu-item> <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}"> - <link target="newEmail"/> + <link target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION"/> </menu-item> <menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}"> - <link target="newInternalNote"/> + <link target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE"/> </menu-item> <menu-item name="reply" title="${uiLabelMap.PartyReply}"> <condition> - <not><if-empty field-name="communicationEventId"/></not> + <not><if-empty field-name="parameters.communicationEventId"/></not> </condition> - <link target="EditCommunicationEvent?partyId=${partyId}&parentCommEventId=${communicationEventId}"/> + <link target="EditCommunicationEvent?parentCommEventId=${parameters.communicationEventId}"/> </menu-item> </menu> </menus> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=676729&r1=676728&r2=676729&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Mon Jul 14 13:56:30 2008 @@ -221,146 +221,108 @@ </widgets> </section> </screen> - <screen name="EditCommunicationEvent"> - <section> - <actions> - <set field="titleProperty" value="PageTitleEditCommunication" /> - <set field="tabButtonItem" value="CommunicationEvent" /> - <set field="entityName" value="CommunicationEvent" /> - <set field="communicationEventId" from-field="parameters.communicationEventId" /> - <set field="parentCommEventId" from-field="parameters.parentCommEventId" /> - <set field="partyId" from-field="parameters.partyId" /> - <set field="partyIdFrom" from-field="parameters.partyIdFrom" - default-value="${userLogin.partyId}" /> - <set field="partyIdTo" from-field="parameters.partyIdTo" /> - <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom" /> - <set field="contactMechIdTo" from-field="parameters.contactMechIdTo" /> - <set field="contactMechTypeId" from-field="parameters.contactMechTypeId" /> - <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" /> - <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" /> - <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" - default-value="20" /> - </actions> - <widgets> - <decorator-screen name="CommonCommunicationEventDecorator" - location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet id="EditCommunicationEventPanel" - title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> - <include-form - location="component://party/webapp/partymgr/communication/CommForms.xml" - name="EditCommEvent" /> - </screenlet> - <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" - navigation-form-name="ListChildCommEvents"> - <include-form - location="component://party/webapp/partymgr/communication/CommForms.xml" - name="ListChildCommEvents" /> - </screenlet> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - - <screen name="newEmail"> + <screen name="EditCommunicationEvent"> <section> <actions> - <set field="titleProperty" value="PageTitleEditCommunication"/> - <set field="tabButtonItem" value="CommunicationEvent"/> - <set field="entityName" value="CommunicationEvent"/> - - <set field="parentCommEventId" from-field="parameters.parentCommEventId"/> - <set field="partyId" from-field="parameters.partyId"/> - <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/> - <set field="partyIdTo" from-field="parameters.partyIdTo"/> - <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom"/> - <set field="contactMechIdTo" from-field="parameters.contactMechIdTo"/> - <set field="contactMechTypeId" from-field="parameters.contactMechTypeId"/> - - <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"/> + <set field="titleProperty" value="PageTitleEditCommunication" /> + <set field="tabButtonItem" value="CommunicationEvent" /> + <entity-one entity-name="CommunicationEvent" value-name="communicationEvent" /> + <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy"/> </actions> <widgets> - <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonCommunicationEventDecorator" + location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> + <section><!-- Email --> + <condition> + <or><!-- have for e-mails a special form --> + <if-compare field-name="parameters.communicationEventTypeId" + operator="equals" value="EMAIL_COMMUNICATION" /> + <if-compare field-name="parameters.communicationEventTypeId" + operator="equals" value="AUTO_EMAIL_COMM" /> + </or> + </condition> + <widgets> <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="NewEmail"/> </screenlet> + </widgets> + </section> + <section> + <condition><!-- internal note --> + <if-compare field-name="parameters.communicationEventTypeId" + operator="equals" value="COMMENT_NOTE" /> + </condition> + <widgets> + <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> + <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="NewInternalNote"/> + </screenlet> + </widgets> + </section> + <section> + <condition><!-- others --> + <and> + <if-compare field-name="parameters.communicationEventTypeId" + operator="not-equals" value="COMMENT_NOTE" /> + <if-compare field-name="parameters.communicationEventTypeId" + operator="not-equals" value="EMAIL_COMMUNICATION" /> + <if-compare field-name="parameters.communicationEventTypeId" + operator="not-equals" value="AUTO_EMAIL_COMM" /> + </and> + </condition> + <widgets> + <screenlet id="EditCommunicationEventPanel" + title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> + <include-form + location="component://party/webapp/partymgr/communication/CommForms.xml" + name="EditCommEvent" /> + </screenlet> + <screenlet title="${uiLabelMap.PartyChildCommunicationEvents}" + navigation-form-name="ListChildCommEvents"> + <include-form + location="component://party/webapp/partymgr/communication/CommForms.xml" + name="ListChildCommEvents" /> + </screenlet> + </widgets> + </section> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <screen name="NewInternalNote"> + <screen name="UpdateCommRoles"> <section> <actions> - <set field="titleProperty" value="PageTitleEditCommunication"/> - <set field="tabButtonItem" value="CommunicationEvent"/> - <set field="entityName" value="CommunicationEvent"/> - - <set field="parentCommEventId" from-field="parameters.parentCommEventId"/> - <set field="partyId" from-field="parameters.partyId"/> - <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/> - <set field="partyIdTo" from-field="parameters.partyIdTo"/> - - <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"/> + <set field="titleProperty" value="PageTitleViewCommRoles" /> + <set field="tabButtonItem" value="UpdateCommRoles" /> + <set field="communicationEventId" from-field="parameters.communicationEventId" /> + <set field="parentCommEventId" from-field="parameters.parentCommEventId" /> + <set field="partyId" value="${parameters.partyId}" /> + <set field="partyIdFrom" value="${parameters.partyId}" /> + <set field="partyIdTo" value="${parameters.partyId}" /> + <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" /> + <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" /> + <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" + default-value="20" /> </actions> <widgets> - <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-screen name="CommonCommunicationEventDecorator" + location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true"> - <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="NewInternalNote"/> + <screenlet title="${uiLabelMap.PartyCommEventRoles}"> + <container style="button-bar"><link style="smallSubmit" target="UpdateCommRoles?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommRole}"/></container> + <include-form + location="component://party/webapp/partymgr/communication/CommForms.xml" + name="ListCommRoles" /> </screenlet> </decorator-section> </decorator-screen> </widgets> </section> </screen> - <screen name="UpdateCommRoles"> - <section> - <actions> - <set field="titleProperty" value="PageTitleViewCommRoles" /> - <set field="tabButtonItem" value="UpdateCommRoles" /> - <set field="communicationEventId" from-field="parameters.communicationEventId" /> - <set field="parentCommEventId" from-field="parameters.parentCommEventId" /> - <set field="partyId" value="${parameters.partyId}" /> - <set field="partyIdFrom" value="${parameters.partyId}" /> - <set field="partyIdTo" value="${parameters.partyId}" /> - <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" /> - <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" /> - <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" - default-value="20" /> - </actions> - <widgets> - <decorator-screen name="CommonCommunicationEventDecorator" - location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.PartyCommEventRoles}"> - <container style="button-bar"><link style="smallSubmit" target="UpdateCommRoles?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommRole}"/></container> - <include-form - location="component://party/webapp/partymgr/communication/CommForms.xml" - name="ListCommRoles" /> - </screenlet> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> <screen name="UpdateCommPurposes"> <section> <actions> |
Free forum by Nabble | Edit this page |