Author: jaz
Date: Wed Apr 15 21:38:25 2009 New Revision: 765377 URL: http://svn.apache.org/viewvc?rev=765377&view=rev Log: added marketing email purpose type; cleaned up the contact list send communication UI (added field-groups and made less used items hidden in a collapsed group) set a bunch of default values on the communication event. Added: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy Modified: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml ofbiz/trunk/applications/party/data/PartyTypeData.xml ofbiz/trunk/framework/common/config/CommonUiLabels.xml Added: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy?rev=765377&view=auto ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy (added) +++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy Wed Apr 15 21:38:25 2009 @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// figure out the MARKETING_EMAIL of the ContactList owner, for setting in the send email link +if (!contactList && contactListId) { + contactList = delgator.findOne("ContactList", [contactListId : "contactListId"], true); +} +if (contactList) { + ownerParty = contactList.getRelatedOne("OwnerParty"); + if (ownerParty) { + contactMechs = ownerParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "MARKETING_EMAIL"]); + if (!contactMechs || contactMechs.size() == 0) { + contactMechs = ownerParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]); + } + context.marketingEmail = contactMechs.get(0); + //context.contactMechIdFrom = context.marketingEmail.contactMechId; + } +} Modified: ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml?rev=765377&r1=765376&r2=765377&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/marketing/contact/ContactListForms.xml Wed Apr 15 21:38:25 2009 @@ -216,6 +216,7 @@ <form name="EditContactListCommEvent" default-map-name="communicationEvent" target="updateContactListCommEvent" title="" type="single" header-row-style="header-row" default-table-style="basic-table"> <alt-target target="createContactListCommEvent" use-when="communicationEvent==null"/> + <field name="communicationEventId" use-when="communicationEvent!=null" title="${uiLabelMap.MarketingContactListCommEventId}"><display/></field> <field name="communicationEventTypeId" title="${uiLabelMap.MarketingContactListCommEventTypeId}"> <drop-down no-current-selected-key="EMAIL_COMMUNICATION"> @@ -302,6 +303,30 @@ <field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field> <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/> </field> <field name="cancelLink" title="${uiLabelMap.CommonCancel}" widget-style="buttontext"><hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}"/></field> + + <sort-order> + <field-group title="${uiLabelMap.CommonAdvancedFeatures}" collapsible="true" initially-collapsed="true"> + <sort-field name="communicationEventId"/> + <sort-field name="communicationEventTypeId"/> + <sort-field name="partyIdFrom"/> + <sort-field name="statusId"/> + <sort-field name="contactMechTypeId"/> + <sort-field name="roleTypeIdFrom"/> + <sort-field name="roleTypeIdTo"/> + <sort-field name="contactMechIdFrom"/> + <sort-field name="contactListId"/> + <sort-field name="datetimeStarted"/> + <sort-field name="datetimeEnded"/> + </field-group> + <field-group> + <sort-field name="subject"/> + <sort-field name="contentMimeTypeId"/> + <sort-field name="content"/> + <sort-field name="note"/> + <sort-field name="submitButton"/> + <sort-field name="cancelLink"/> + </field-group> + </sort-order> </form> <form name="FindContactListCommEvents" target="ListContactListCommEvents" title="" type="single" header-row-style="header-row" default-table-style="basic-table"> Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml?rev=765377&r1=765376&r2=765377&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml Wed Apr 15 21:38:25 2009 @@ -310,10 +310,14 @@ <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/marketing/control/ListContactList"/> <set field="contactListId" from-field="parameters.contactListId"/> <set field="communicationEventId" from-field="parameters.communicationEventId"/> + <entity-one entity-name="ContactList" value-field="contactList"/> <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> - <!-- get the current log in user's default email --> - <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/> + <!-- get the contact list owner's marketing email --> + <script location="component://marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy"/> + <set field="contactMechIdFrom" value="${marketingEmail.contactMechId}"/> + <set field="partyIdFrom" value="${contactList.ownerPartyId}"/> + <set field="datetimeStarted" value="${groovy:org.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/> </actions> <widgets> <decorator-screen name="CommonContactListDecorator" location="${parameters.mainDecoratorLocation}"> Modified: ofbiz/trunk/applications/party/data/PartyTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyTypeData.xml?rev=765377&r1=765376&r2=765377&view=diff ============================================================================== --- ofbiz/trunk/applications/party/data/PartyTypeData.xml (original) +++ ofbiz/trunk/applications/party/data/PartyTypeData.xml Wed Apr 15 21:38:25 2009 @@ -73,6 +73,7 @@ <ContactMechPurposeType contactMechPurposeTypeId="PHONE_ASSISTANT" description="Assistant's Phone Number"/> <ContactMechPurposeType contactMechPurposeTypeId="PRIMARY_PHONE" description="Primary Phone Number"/> <ContactMechPurposeType contactMechPurposeTypeId="PHONE_QUICK" description="Quick Calls Phone Number"/> + <ContactMechPurposeType contactMechPurposeTypeId="MARKETING_EMAIL" description="Primary Marketing Email Address"/> <ContactMechPurposeType contactMechPurposeTypeId="PRIMARY_EMAIL" description="Primary Email Address"/> <ContactMechPurposeType contactMechPurposeTypeId="BILLING_EMAIL" description="Billing (AP) Email"/> <ContactMechPurposeType contactMechPurposeTypeId="PAYMENT_EMAIL" description="Payment (AR) Email"/> @@ -89,6 +90,7 @@ <ContactMechType contactMechTypeId="WEB_ADDRESS" description="Web URL/Address" hasTable="N" parentTypeId="ELECTRONIC_ADDRESS"/> <ContactMechTypePurpose contactMechPurposeTypeId="BILLING_EMAIL" contactMechTypeId="EMAIL_ADDRESS"/> + <ContactMechTypePurpose contactMechPurposeTypeId="MARKETING_EMAIL" contactMechTypeId="EMAIL_ADDRESS"/> <ContactMechTypePurpose contactMechPurposeTypeId="PAYMENT_EMAIL" contactMechTypeId="EMAIL_ADDRESS"/> <ContactMechTypePurpose contactMechPurposeTypeId="ORDER_EMAIL" contactMechTypeId="EMAIL_ADDRESS"/> <ContactMechTypePurpose contactMechPurposeTypeId="OTHER_EMAIL" contactMechTypeId="EMAIL_ADDRESS"/> Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=765377&r1=765376&r2=765377&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Wed Apr 15 21:38:25 2009 @@ -305,6 +305,9 @@ <value xml:lang="zh">å°å</value> <value xml:lang="zh_CN">å°å</value> </property> + <property key="CommonAdvancedFeatures"> + <value xml:lang="en">Advanced Features</value> + </property> <property key="CommonAdvancedSearch"> <value xml:lang="de">Erweiterte Suche</value> <value xml:lang="en">Advanced Search</value> |
Free forum by Nabble | Edit this page |