You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2008/01/22 01:12:47 UTC
svn commit: r614065 - in /ofbiz/trunk/applications/party: config/
servicedef/ src/org/ofbiz/party/communication/
webapp/partymgr/communication/ widget/partymgr/
Author: adrianc
Date: Mon Jan 21 16:12:45 2008
New Revision: 614065
URL: http://svn.apache.org/viewvc?rev=614065&view=rev
Log:
Party communication event UI changes. Also fixed the related permission service. I changed the ListPartyCommEvents screen to list the most recently changed events first - in my experience, people prefer to have the most recent stuff on top. If there are any objections I'll put it back.
Modified:
ofbiz/trunk/applications/party/config/PartyUiLabels.properties
ofbiz/trunk/applications/party/servicedef/services.xml
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml
ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.properties?rev=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.properties (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.properties Mon Jan 21 16:12:45 2008
@@ -333,6 +333,7 @@
PartyInvitationNotValidError=This is not a valid Party Invitation
PartyIpAddressSuccessfullyCreated=Web IP Address successfully created.
PartyIpAddressSuccessfullyUpdated=Web IP Address successfully updated.
+PartyIsPublic=Is Public
PartyIsUsps=Is USPS
PartyLastName=Last Name
PartyLastNameMissingError=Lastname is Missing
@@ -761,4 +762,4 @@
FormFieldTitle_partyInvitationId=Party Invitation Id
FormFieldTitle_emailAddress=Email Address
FormFieldTitle_toName=To Name
-FormFieldTitle_lastInviteDate=Last Invite Date
\ No newline at end of file
+FormFieldTitle_lastInviteDate=Last Invite Date
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Mon Jan 21 16:12:45 2008
@@ -1003,5 +1003,7 @@
location="component://party/script/org/ofbiz/party/party/PartyPermissionServices.xml" invoke="partyCommunicationEventPermissionCheck">
<description>Party CommunicationEvents Permission Checking Logic</description>
<implements service="permissionInterface"/>
+ <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
+ <attribute name="partyIdTo" type="String" mode="IN" optional="true"/>
</service>
</services>
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Mon Jan 21 16:12:45 2008
@@ -305,18 +305,16 @@
GenericValue userLogin = (GenericValue) context.get("userLogin");
String communicationEventId = (String) context.get("communicationEventId");
- // assume it's a success unless updateCommunicationEvent gives us an error
- Map result = ServiceUtil.returnSuccess();
try {
- Map tmpResult = dispatcher.runSync("updateCommunicationEvent", UtilMisc.<String, Object>toMap("communicationEventId", communicationEventId,
+ Map<String, Object> result = dispatcher.runSync("updateCommunicationEvent", UtilMisc.<String, Object>toMap("communicationEventId", communicationEventId,
"statusId", "COM_COMPLETE", "userLogin", userLogin));
if (ServiceUtil.isError(result)) {
- result = ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
+ return ServiceUtil.returnError(ServiceUtil.getErrorMessage(result));
}
} catch (GenericServiceException esx) {
return ServiceUtil.returnError(esx.getMessage());
}
- return result;
+ return ServiceUtil.returnSuccess();
}
}
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=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Mon Jan 21 16:12:45 2008
@@ -300,15 +300,18 @@
<field name="partyIdTo" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonTo}">
<display-entity description="${firstName} ${lastName} [${partyId}]" entity-name="Person" key-field-name="partyId"/>
</field>
+ <field map-name="subjectMap" name="subject"><display/></field>
<field name="communicationEventTypeId"><display-entity description="${description}" entity-name="CommunicationEventType" key-field-name="communicationEventTypeId"/></field>
<field name="statusId"><display-entity description="${description}" entity-name="StatusItem" key-field-name="statusId"/></field>
<field name="contactMechTypeId"><display-entity description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/></field>
+ <!-- Next two fields don't seem to be used, commenting out for now -->
+ <!--
<field name="roleTypeIdFrom"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
<field name="roleTypeIdTo"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
+ -->
<field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><display/></field>
<field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><display/></field>
<field name="custRequestId" widget-style="smallSubmit"><hyperlink target="/ordermgr/control/EditRequest?custRequestId=${custRequestId}" target-type="inter-app"/></field>
- <field map-name="subjectMap" name="subject"><display/></field>
</form>
<form name="ListPartyCommEvents" type="list" extends="ListCommEvents" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
@@ -318,6 +321,7 @@
<condition-expr field-name="partyIdFrom" operator="equals" value="${partyId}"/>
<condition-expr field-name="partyIdTo" operator="equals" value="${partyId}"/>
</condition-list>
+ <order-by field-name="-lastUpdatedStamp"/>
</entity-condition>
</actions>
<field name="communicationEventId" widget-style="smallSubmit">
@@ -489,7 +493,6 @@
<field name="fromDate"><date-time default-value="${nowTimestamp}"/></field>
<field name="thruDate"><date-time/></field>
<field name="sequenceNum"><text/></field>
-
<field name="drMimeTypeId" widget-style="smallSelect">
<drop-down allow-empty="false">
<option key="application/msword" description="MS Word"/>
@@ -504,6 +507,12 @@
<option key="application/octet-stream" description="Other"/>
</drop-down>
</field>
+ <field name="drIsPublic" title="${uiLabelMap.PartyIsPublic}">
+ <drop-down allow-empty="true">
+ <option key="Y" description="${uiLabelMap.CommonY}"/>
+ <option key="N" description="${uiLabelMap.CommonN}"/>
+ </drop-down>
+ </field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
</form>
@@ -530,11 +539,15 @@
<option key="application/octet-stream" description="Other"/>
</drop-down>
</field>
+ <field name="drIsPublic" title="${uiLabelMap.PartyIsPublic}">
+ <drop-down allow-empty="true">
+ <option key="Y" description="${uiLabelMap.CommonY}"/>
+ <option key="N" description="${uiLabelMap.CommonN}"/>
+ </drop-down>
+ </field>
<field name="dataResourceTypeId" entry-name="drDataResourceTypeId">
<drop-down allow-empty="false">
- <entity-options entity-name="DataResourceType" description="${description}">
-
- </entity-options>
+ <entity-options entity-name="DataResourceType" description="${description}"/>
</drop-down>
</field>
<!-- <field name="mimeTypeId" map-name="dataResource" title="Document Type"><display/></field> -->
@@ -593,4 +606,4 @@
<field name="textData" map-name="electronicText" title="Text Data"><textarea rows="30" cols="60"/></field>
<field name="submitButton" title="${uiLabelMap.CommonSave}"><submit/></field>
</form>
-</forms>
\ No newline at end of file
+</forms>
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=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml Mon Jan 21 16:12:45 2008
@@ -19,7 +19,7 @@
-->
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
<menu name="CommEventTabBar" default-selected-style="selected" type="simple"
- menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="subTabButtonItem">
+ menu-container-style="button-bar button-style-1" selected-menuitem-context-field-name="subTabButtonItem">
<menu-item name="CommunicationEvent" title="${uiLabelMap.PartyCommEvent}">
<link target="EditCommunicationEvent?partyId=${partyId}&communicationEventId=${communicationEventId}"/>
</menu-item>
Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?rev=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Mon Jan 21 16:12:45 2008
@@ -189,7 +189,6 @@
<set field="headerItem" value="comm"/>
<set field="communicationEventId" from-field="parameters.communicationEventId"/>
<entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
-
<set field="okayToUpdate" value="true" type="Boolean" global="true"/>
</actions>
<widgets>
@@ -276,5 +275,7 @@
</section>
</screen>
</screens>
+
+
Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=614065&r1=614064&r2=614065&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Mon Jan 21 16:12:45 2008
@@ -34,9 +34,8 @@
<decorator-screen location="${parameters.mainDecoratorLocation}" name="main-decorator">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<section>
@@ -61,27 +60,27 @@
</widgets>
</section>
</screen>
+
+ <!-- List comm events for a specific party -->
<screen name="ListPartyCommEvents">
<section>
<actions>
<set field="titleProperty" value="PageTitleListCommunications"/>
- <set field="headerItem" value="comm"/>
<set field="tabButtonItem" value="PartyCommEvents"/>
<set field="subTabButtonItem" value="CommunicationEvent"/>
<set field="partyId" value="${parameters.partyId}"/>
- <set field="partyIdFrom" value="${parameters.partyIdFrom}"/>
- <set field="partyIdTo" value="${parameters.partyIdTo}"/>
- <set field="communicationEventId" value="${parameters.communicationEventId}"/>
- <set field="entityName" value="CommunicationEvent"/>
+ <set field="partyIdFrom" value="${parameters.partyIdFrom}" default-value="${parameters.partyId}"/>
+ <set field="partyIdTo" value="${parameters.partyIdTo}" default-value="${parameters.partyId}"/>
<set field="donePage" from-field="parameters.DONE_PAGE" default-value="ListPartyCommEvents?partyId=${partyId}"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
+ <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">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<container style="screenlet">
@@ -127,9 +126,8 @@
<decorator-screen location="${parameters.mainDecoratorLocation}" name="main-decorator">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<section>
@@ -182,9 +180,8 @@
<decorator-screen location="${parameters.mainDecoratorLocation}" name="main-decorator">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<section>
@@ -312,7 +309,7 @@
<widgets>
<section>
<widgets>
- <container>
+ <container style="button-bar">
<link style="smallSubmit" target="EditCommunicationEvent?partyId=${partyId}&partyIdFrom=${partyId}" text="${uiLabelMap.PartyNewCommunication}"/>
<link style="smallSubmit" target="EditCommunicationEvent?partyId=${partyId}&parentCommEventId=${communicationEventId}" text="${uiLabelMap.PartyReply}"/>
<!--<link style="smallSubmit" target="EditCommunicationEvent?communicationEventTypeId=${communicationEvent.communicationEventTypeId}&contactMechIdTo=${communicationEvent.contactMechIdFrom}&contactMechIdFrom=${communicationEvent.contactMechIdTo}&partyId=${partyId}&partyIdTo=${partyId}&partyIdFrom=${userLogin.partyId}&parentCommEventId=${communicationEventId}&toString=${communicationEvent.fromString}" text="${uiLabelMap.PartyReply}"/>-->
@@ -546,7 +543,7 @@
<if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
</condition>
<widgets>
- <container><link style="smallSubmit" target="AddCommEventWorkEffort?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommWorkEffort}"/></container>
+ <container style="button-bar"><link style="smallSubmit" target="AddCommEventWorkEffort?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyNewCommWorkEffort}"/></container>
</widgets>
</section>
<container style="screenlet">
@@ -652,9 +649,8 @@
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="VIEW"/>
</condition>
<widgets>
<section>
@@ -662,7 +658,7 @@
<if-compare field-name="okayToUpdate" operator="equals" type="Boolean" value="true"/>
</condition>
<widgets>
- <container><link style="smallSubmit" target="AddCommContent?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyAddCommContent}"/></container>
+ <container style="button-bar"><link style="smallSubmit" target="AddCommContent?communicationEventId=${communicationEventId}&partyId=${partyId}" text="${uiLabelMap.PartyAddCommContent}"/></container>
</widgets>
</section>
<container style="screenlet">
@@ -706,9 +702,8 @@
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="CREATE"/>
</condition>
<widgets>
<container style="screenlet">
@@ -757,9 +752,8 @@
<decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
- <!-- do check for PARTYMGR, _VIEW permission -->
<condition>
- <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+ <if-service-permission service-name="partyCommunicationEventPermissionCheck" main-action="UPDATE"/>
</condition>
<widgets>
<section>