Author: mor
Date: Fri May 23 03:11:54 2008 New Revision: 659489 URL: http://svn.apache.org/viewvc?rev=659489&view=rev Log: Applied patch (importLead.patch) for importing vCard for Leads (in sfa) from Jira issue OFBIZ-1643(https://issues.apache.org/jira/browse/OFBIZ-1643). Thanks Jyotsna Rathore for this patch. Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml ofbiz/trunk/applications/marketing/servicedef/services.xml ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original) +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Fri May 23 03:11:54 2008 @@ -549,6 +549,9 @@ <property key="PageTitleCreateLead"> <value xml:lang="en">Create New Lead</value> </property> + <property key="PageTitleCreateLeadFromVCard"> + <value xml:lang="en">Create Lead from vCard</value> + </property> <property key="PageTitleEditAccount"> <value xml:lang="en">Edit Account</value> </property> @@ -1131,6 +1134,9 @@ <property key="SfaAutoCreateContactByImportingVCard"> <value xml:lang="en">Automatically create a new contact by importing a vCard</value> </property> + <property key="SfaAutoCreateLeadByImportingVCard"> + <value xml:lang="en">Automatically create a new lead by importing a vCard</value> + </property> <property key="SfaAccountName"> <value xml:lang="en">Account Name</value> </property> @@ -1200,6 +1206,9 @@ <property key="SfaForecasts"> <value xml:lang="en">Forecast</value> </property> + <property key="SfaImportLead"> + <value xml:lang="en">Import Lead</value> + </property> <property key="SfaInitialAccount"> <value xml:lang="en">Initial Account</value> </property> Modified: ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml (original) +++ ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml Fri May 23 03:11:54 2008 @@ -69,5 +69,5 @@ <StatusValidChange condition="" statusId="PARTY_ENABLED" statusIdTo="LEAD_ASSIGNED" transitionName="Assigned"/> <StatusValidChange condition="" statusId="LEAD_ASSIGNED" statusIdTo="LEAD_CONVERTED" transitionName="Converted"/> <StatusValidChange condition="" statusId="LEAD_ASSIGNED" statusIdTo="LEAD_QUALIFIED" transitionName="Qualified"/> - + <StatusValidChange condition="" statusId="LEAD_ASSIGNED" statusIdTo="PARTY_DISABLED" transitionName="Disabled"/> </entity-engine-xml> Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/servicedef/services.xml (original) +++ ofbiz/trunk/applications/marketing/servicedef/services.xml Fri May 23 03:11:54 2008 @@ -463,6 +463,7 @@ <service name="importVCard" engine="java" location="org.ofbiz.sfa.vcard.VCard" invoke="importVCard"> <attribute name="infile" type="java.nio.ByteBuffer" mode="IN" optional="false"/> <attribute name="partyId" type="String" mode="OUT" optional="false"/> + <attribute name="serviceName" type="String" mode="IN" optional="false"/> </service> <service name="exportVCard" engine="java" location="org.ofbiz.sfa.vcard.VCard" invoke="exportVCard"> <attribute name="partyId" type="String" mode="IN" optional="false"/> Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original) +++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Fri May 23 03:11:54 2008 @@ -150,7 +150,8 @@ GenericValue userLogin = (GenericValue) context.get("userLogin"); serviceCtx.put("userLogin", userLogin); - Map resp = dispatcher.runSync("createContact", serviceCtx); + String serviceName = (String) context.get("serviceName"); + Map resp = dispatcher.runSync(serviceName, serviceCtx); result.put("partyId", resp.get("partyId")); } } catch (GenericEntityException e) { Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Fri May 23 03:11:54 2008 @@ -123,6 +123,16 @@ <response name="success" type="view" value="viewprofile"/> <response name="error" type="view" value="MergeLeads"/> </request-map> + <request-map uri="CreateLeadFromVCard"> + <security https="true" auth="true"/> + <response name="success" type="view" value="CreateLeadFromVCard"/> + </request-map> + <request-map uri="createLeadFromVCard"> + <security https="true" auth="true"/> + <event type="service" invoke="importVCard"/> + <response name="success" type="view" value="viewprofile"/><!-- What would be the view in case a vCard has more than one contact --> + <response name="error" type="view" value="CreateLeadFromVCard"/> + </request-map> <!-- Contact Requests --> <request-map uri="FindContacts"> <security https="true" auth="true"/> @@ -181,7 +191,8 @@ <view-map name="CloneLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CloneLead"/> <view-map name="ConvertLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#ConvertLead"/> <view-map name="MergeLeads" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#MergeLeads"/> - + <view-map name="CreateLeadFromVCard" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLeadFromVCard"/> + <view-map name="FindContacts" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#FindContacts"/> <view-map name="CreateContact" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#CreateContact"/> <view-map name="MergeContacts" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#MergeContacts"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Fri May 23 03:11:54 2008 @@ -71,6 +71,7 @@ </widgets> </section> </screen> + <screen name="CreateLead"> <section> <actions> @@ -101,6 +102,7 @@ </widgets> </section> </screen> + <screen name="ConvertLead"> <section> <widgets> @@ -127,6 +129,7 @@ </widgets> </section> </screen> + <screen name="CloneLead"> <section> <actions> @@ -156,6 +159,7 @@ </widgets> </section> </screen> + <screen name="MergeLeads"> <section> <actions> @@ -192,4 +196,33 @@ </widgets> </section> </screen> -</screens> + + <screen name="CreateLeadFromVCard"> + <section> + <actions> + <set field="titleProperty" value="PageTitleCreateLeadFromVCard"/> + <set field="tabButtonItem" value="Leads"/> + </actions> + <widgets> + <decorator-screen name="CommonLeadDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container style="screenlet"> + <container style="screenlet-title-bar"> + <container style="h3"><label text="${uiLabelMap.PageTitleCreateLeadFromVCard}"/></container> + </container> + <container><label style="h3" text="${uiLabelMap.SfaAutoCreateLeadByImportingVCard}"/></container> + <container style="screenlet-body"> + <section> + <widgets> + <label><br/></label> + <include-form name="CreateLeadFromVCard" location="component://marketing/widget/sfa/forms/LeadForms.xml"/> + </widgets> + </section> + </container> + </container> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> +</screens> \ No newline at end of file Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Fri May 23 03:11:54 2008 @@ -52,6 +52,9 @@ <menu-item name="CreateLead" title="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLead}"> <link target="CreateLead"/> </menu-item> + <menu-item name="createLeadFromVCard" title="${uiLabelMap.SfaImportLead}"> + <link target="CreateLeadFromVCard"/> + </menu-item> <menu-item name="convertLead" title="${uiLabelMap.SfaConvertLead}"> <condition><not><if-empty field-name="parameters.partyId"/></not></condition> <link target="ConvertLead?leadPartyId=${parameters.partyId}"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml Fri May 23 03:11:54 2008 @@ -89,6 +89,7 @@ <form name="CreateContactFromVCard" type="upload" target="createContactFromVCard" header-row-style="header-row" default-table-style="basic-table"> <field name="infile" title="${uiLabelMap.SfaUploadVCard}"><file/></field> + <field name="serviceName"><hidden value="createContact"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> </forms> Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=659489&r1=659488&r2=659489&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Fri May 23 03:11:54 2008 @@ -20,6 +20,7 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <form name="ListLeads" type="list" list-name="partyList" list-entry-name="partyRow" paginate-target="FindLead" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true"> <row-actions> @@ -34,8 +35,7 @@ <hyperlink target="viewprofile?partyId=${partyRow.partyId}&roleTypeId=LEAD" description="${partyRow.partyId}" target-type="inter-app"/> </field> <field name="partyName" title="${uiLabelMap.PartyName}"><display description="${person.lastName}, ${person.firstName}"/></field> - <field name="statusId" title="${uiLabelMap.CommonStatus}"><display description=""/></field> - <field name="partyTypeId" title="${uiLabelMap.PartyType}"><display description="${partyType.description}"/> </field> + <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem" description="${description}" key-field-name="statusId"/></field> </form> <form name="createLead" type="single" target="createLead" header-row-style="header-row" default-table-style="basic-table" default-map-name="contactDetailMap"> @@ -78,6 +78,7 @@ <field name="leadSource" title="${uiLabelMap.SfaLeadSource}"><text size="50" maxlength="60"/></field> <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="ConvertLead" type="single" target="convertLead" id="ConvertLead" > <actions> <set field="leadPartyId" from-field="parameters.leadPartyId"></set> @@ -92,6 +93,7 @@ </field> <field name="submitButton"><submit button-type="button"/></field> </form> + <form name="MergeLeads" type="single" target="MergeLeads"> <actions> <set field="roleTypeId" value="LEAD"/> @@ -111,4 +113,10 @@ </field> <field name="submitButton" position="3" title="${uiLabelMap.SfaMergeleads}" widget-style="buttontext" tooltip-style="button-text"><submit button-type="text-link"/></field> </form> + + <form name="CreateLeadFromVCard" type="upload" target="createLeadFromVCard" header-row-style="header-row" default-table-style="basic-table"> + <field name="infile" title="${uiLabelMap.SfaUploadVCard}"><file/></field> + <field name="serviceName"><hidden value="createLead"/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> </forms> |
Free forum by Nabble | Edit this page |