svn commit: r657313 - in /ofbiz/trunk/applications/marketing: config/ webapp/sfa/WEB-INF/ webapp/sfa/WEB-INF/action/ widget/sfa/ widget/sfa/forms/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r657313 - in /ofbiz/trunk/applications/marketing: config/ webapp/sfa/WEB-INF/ webapp/sfa/WEB-INF/action/ widget/sfa/ widget/sfa/forms/

mor-2
Author: mor
Date: Sat May 17 01:07:35 2008
New Revision: 657313

URL: http://svn.apache.org/viewvc?rev=657313&view=rev
Log:
Manually merged patch from Santosh Malviya from Jira Issue OFBIZ-1649 (https://issues.apache.org/jira/browse/OFBIZ-1649). This patch is just for the UI (no functionality implemented yet for importing vCard into the system). Couple of other small fix has also been done

Modified:
    ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/cloneLead.bsh
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/mergeContacts.bsh
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
    ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml

Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original)
+++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Sat May 17 01:07:35 2008
@@ -543,6 +543,9 @@
     <property key="PageTitleCreateContact">
         <value xml:lang="en">Create New Contact</value>
     </property>
+    <property key="PageTitleCreateContactFromVCard">
+        <value xml:lang="en">Create contact from vCard</value>
+    </property>
     <property key="PageTitleCreateLead">
         <value xml:lang="en">Create New Lead</value>
     </property>
@@ -1125,6 +1128,9 @@
     <property key="SfaAcccounts">
         <value xml:lang="en">Accounts</value>
     </property>
+    <property key="SfaAutoCreateContactByImportingVCard">
+        <value xml:lang="en">Automatically create a new contact by importing a vCard</value>
+    </property>    
     <property key="SfaAccountName">
         <value xml:lang="en">Account Name</value>
     </property>
@@ -1158,6 +1164,9 @@
     <property key="SfaCreateContactForLead">
         <value xml:lang="en">Create contact for lead</value>
     </property>
+    <property key="SfaCreateContactFromVCard">
+        <value xml:lang="en">Create from vCard</value>
+    </property>    
     <property key="SfaDocuments">
         <value xml:lang="en">Documents</value>
     </property>
@@ -1251,10 +1260,12 @@
     <property key="SfaSelectExistingAccountOrLeaveBlankToCreateNew">
         <value xml:lang="en">Either select existing account or leave blank to create new account"</value>
     </property>
-
     <property key="SfaType">
         <value xml:lang="en">Type</value>
     </property>
+    <property key="SfaUploadVCard">
+        <value xml:lang="en">Upload vCard</value>
+    </property>    
     <property key="Tracking">
         <value xml:lang="en">Tracking</value>
         <value xml:lang="es">Seguimiento</value>

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/cloneLead.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/cloneLead.bsh?rev=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/cloneLead.bsh (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/cloneLead.bsh Sat May 17 01:07:35 2008
@@ -28,7 +28,7 @@
     generalContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(person, "GENERAL_LOCATION", "POSTAL_ADDRESS", false));
     if(UtilValidate.isNotEmpty(generalContactMech)) {
         contactDetailMap.put("addrContactMechId", generalContactMech.get("contactMechId"));
-        postalAddress = genLocContactMech.getRelatedOne("PostalAddress");
+        postalAddress = generalContactMech.getRelatedOne("PostalAddress");
         if(UtilValidate.isNotEmpty(postalAddress)) {
             contactDetailMap.put("address1", postalAddress.get("address1"));
             contactDetailMap.put("city", postalAddress.get("city"));

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/mergeContacts.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/mergeContacts.bsh?rev=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/mergeContacts.bsh (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/mergeContacts.bsh Sat May 17 01:07:35 2008
@@ -19,7 +19,7 @@
         generalContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "GENERAL_LOCATION", "POSTAL_ADDRESS", false));
         if(UtilValidate.isNotEmpty(generalContactMech)) {
             contactDetailMap.put("addrContactMechId", generalContactMech.get("contactMechId"));
-            postalAddress = genLocContactMech.getRelatedOne("PostalAddress");
+            postalAddress = generalContactMech.getRelatedOne("PostalAddress");
             if(UtilValidate.isNotEmpty(postalAddress)) {
                 contactDetailMap.put("address1", postalAddress.get("address1"));
                 contactDetailMap.put("city", postalAddress.get("city"));

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=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Sat May 17 01:07:35 2008
@@ -113,6 +113,8 @@
         <response name="success" type="view" value="viewLead"/>
         <response name="error" type="view" value="FindLeads"/>
     </request-map>
+    
+    <!-- Contact Requests -->
     <request-map uri="FindContacts">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="FindContacts"/>
@@ -137,6 +139,10 @@
         <response name="success" type="view" value="viewprofile"/>
         <response name="error" type="view" value="MergeContacts"/>
     </request-map>
+    <request-map uri="CreateContactFromVCard">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="CreateContactFromVCard"/>
+    </request-map>    
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -145,14 +151,19 @@
     <view-map name="NewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#NewOpportunity"/>
     <view-map name="viewOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#viewOpportunity"/>
     <view-map name="EditOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#EditOpportunity"/>
+    
     <view-map name="FindAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#FindAccounts"/>
     <view-map name="NewAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#NewAccounts"/>
+    
     <view-map name="FindLeads" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#FindLeads"/>
     <view-map name="CreateLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLead"/>
     <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="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"/>
-    <view-map name="ConvertLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#ConvertLead"/>
+    <view-map name="CreateContactFromVCard" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#CreateContactFromVCard"/>
+    
     <!-- end of view mappings -->
 </site-conf>
\ No newline at end of file

Modified: ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml?rev=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml Sat May 17 01:07:35 2008
@@ -35,7 +35,7 @@
                                 <service service-name="findParty" auto-field-map="true"/>
                             </actions>
                             <widgets>
-                               <container><link target="CreateContact" text="${uiLabelMap.CommonCreateNew}" style="buttontext"/></container>
+                               <include-menu  name="ContactTabBar" location="component://marketing/widget/sfa/SfaMenus.xml" />
                                <section>
                                    <widgets>
                                        <platform-specific>
@@ -43,16 +43,12 @@
                                         </platform-specific>
                                         <container style="screenlet">
                                            <container style="screenlet-title-bar">
-                                               <container style="h3">
-                                                   <label text="${uiLabelMap.SfaFindResults}"/>
-                                               </container>
+                                               <container style="h3"><label text="${uiLabelMap.SfaFindResults}"/></container>
                                            </container>
                                            <container style="screenlet-body">
                                                <section>
                                                    <condition>
-                                                       <not>
-                                                           <if-empty field-name="partyList"/>
-                                                       </not>
+                                                       <not><if-empty field-name="partyList"/></not>
                                                    </condition>
                                                    <widgets>
                                                        <include-form name="ListContacts" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
@@ -90,13 +86,7 @@
                     <decorator-section name="body">
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <section>
-                                        <widgets>
-                                            <label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaContact}"/>
-                                        </widgets>
-                                    </section>
-                                </container>
+                                <container style="h3"><label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaContact}"/></container>
                             </container>
                             <container style="screenlet-body">
                                 <section>
@@ -123,13 +113,7 @@
                     <decorator-section name="body">
                         <container style="screenlet">
                             <container style="screenlet-title-bar">
-                                <container style="h3">
-                                    <section>
-                                        <widgets>
-                                            <label text="${uiLabelMap.SfaMergeContacts}"/>
-                                        </widgets>
-                                    </section>
-                                </container>
+                                <container style="h3"><label text="${uiLabelMap.SfaMergeContacts}"/></container>
                             </container>
                             <container style="screenlet-body">
                                 <section>
@@ -142,7 +126,7 @@
                                         </platform-specific>
                                     </widgets>
                                     <fail-widgets>
-                                      <label text="${uiLabelMap.SfaCanNotMergeSameContact}" style="h3"></label>
+                                        <label text="${uiLabelMap.SfaCanNotMergeSameContact}" style="h3"></label>
                                     </fail-widgets>
                                 </section>
                             </container>
@@ -151,5 +135,33 @@
                  </decorator-screen>
              </widgets>
          </section>
-    </screen>          
+    </screen>
+    
+    <screen name="CreateContactFromVCard">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleCreateContactFromVCard"/>
+                <set field="tabButtonItem" value="Contacts"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3"><label text="${uiLabelMap.PageTitleCreateContactFromVCard}"/></container>
+                            </container>
+                            <container><label style="h3" text="${uiLabelMap.SfaAutoCreateContactByImportingVCard}"/></container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <include-form  name="CreateContactFromVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>              
 </screens>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Sat May 17 01:07:35 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="SfaAppBar" default-menu-item-name="main" id="app-navigation" type="simple" title="${uiLabelMap.SfaManagerApplication}"
-        default-selected-style="selected" menu-container-style="button-bar tab-bar">
+        default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="tabButtonItem">
         <menu-item name="Main" title="${uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item>
         <menu-item name="Accounts" title="${uiLabelMap.SfaAcccounts}"><link target="FindAccounts"/></menu-item>
         <menu-item name="Contacts" title="${uiLabelMap.SfaContacts}"><link target="FindContacts"/></menu-item>
@@ -38,6 +38,7 @@
             <link target="${checkLoginUrl}"/>
         </menu-item>
     </menu>
+    
     <menu name="OpportunityTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected">
         <menu-item name="opportunityView" title="${uiLabelMap.SfaOpportunitySummary}">
             <link target="viewOpportunity?salesOpportunityId=${parameters.salesOpportunityId}"/>
@@ -46,6 +47,7 @@
             <link target="EditOpportunity?salesOpportunityId=${parameters.salesOpportunityId}"/>
         </menu-item>
     </menu>
+    
     <menu name="LeadTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected">
         <menu-item name="convertLead" title="${uiLabelMap.SfaConvertLead}">
             <link target="ConvertLead?leadPartyId=${parameters.partyId}"/>
@@ -54,4 +56,13 @@
             <link target="CloneLead?leadPartyId=${parameters.partyId}"/>
         </menu-item>
     </menu>
+    
+    <menu name="ContactTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected">
+       <menu-item name="createNew" title="${uiLabelMap.CommonCreateNew}">
+            <link target="CreateContact"/>
+        </menu-item>
+        <menu-item name="createContactFromVCard" title="${uiLabelMap.SfaCreateContactFromVCard}">
+            <link target="CreateContactFromVCard"/>
+        </menu-item>
+    </menu>    
 </menus>

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=657313&r1=657312&r2=657313&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml Sat May 17 01:07:35 2008
@@ -83,4 +83,9 @@
         </field>
         <field name="submitButton" position="3" title="${uiLabelMap.SfaMergeContacts}" widget-style="buttontext" tooltip-style="button-text"><submit button-type="text-link"/></field>
     </form>
+    
+    <form name="CreateContactFromVCard" type="single" target="" header-row-style="header-row" default-table-style="basic-table">
+        <field name="uploadVCard" title="${uiLabelMap.SfaUploadVCard}" ><file maxlength="100" size="50"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
 </forms>