svn commit: r749979 - in /ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/controller.xml customer/editcontactmech.ftl

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

svn commit: r749979 - in /ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/controller.xml customer/editcontactmech.ftl

jonesde
Author: jonesde
Date: Wed Mar  4 12:26:47 2009
New Revision: 749979

URL: http://svn.apache.org/viewvc?rev=749979&view=rev
Log:
Got rid of the donePage stuff for editcontactmech in ecommerce, now uses the save-last-view and view-last functionality and is much cleaner and simpler

Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=749979&r1=749978&r2=749979&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Wed Mar  4 12:26:47 2009
@@ -78,7 +78,7 @@
     <!-- default request; call into CMS -->
     <default-request request-uri="cms"/>
 
-    <!-- Security Mappings -->
+    <!-- Security Request Mappings -->
     <request-map uri="checkLogin" edit="false">
         <description>Verify a user is logged in.</description>
         <security https="true" auth="false"/>
@@ -107,20 +107,13 @@
     </request-map>
     <!-- End of Security Mappings -->
 
-    <!-- Request Mappings -->
+    <!-- General Request Mappings -->
     <request-map uri="cms">
         <event type="java" path="org.ofbiz.content.cms.CmsEvents" invoke="cms"/>
         <response name="success" type="none"/>
         <response name="error" type="view" value="error"/>
     </request-map>
     
-    <request-map uri="setdistributor">
-        <security https="true" auth="false"/>
-        <event type="java" path="org.ofbiz.ecommerce.misc.ThirdPartyEvents" invoke="setAssociationId"/>
-        <response name="success" type="view" value="main"/>
-        <response name="error" type="view" value="main"/>
-    </request-map>
-
     <request-map uri="view">
         <security https="false" auth="false"/>
         <response name="success" type="view" value="main"/>
@@ -136,7 +129,8 @@
     <!-- TO BE REMOVED
     <request-map uri="passwordemail"><security https="false" auth="false"/><response name="success" type="view" value="passwordemail"/></request-map>
     -->
-    
+
+    <!-- Session Setting Requests -->
     <request-map uri="setSessionLocale">
         <security https="false" auth="false"/>
         <event type="java" path="org.ofbiz.common.CommonEvents" invoke="setSessionLocale"/>
@@ -147,17 +141,25 @@
     <request-map uri="setSessionCurrencyUom">
         <security https="false" auth="false"/>
         <event type="java" path="org.ofbiz.common.CommonEvents" invoke="setSessionCurrencyUom"/>
-        <response name="success" type="view" value="main"/>
+        <response name="success" type="view-last" value="main"/>
         <response name="error" type="view" value="main"/>
     </request-map>
     
     <request-map uri="setSessionProductStore">
         <security https="false" auth="false"/>
         <event type="java" path="org.ofbiz.order.shoppingcart.product.ProductStoreCartAwareEvents" invoke="setSessionProductStore"/>
+        <response name="success" type="view-last" value="main"/>
+        <response name="error" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="setdistributor">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.ecommerce.misc.ThirdPartyEvents" invoke="setAssociationId"/>
         <response name="success" type="view" value="main"/>
         <response name="error" type="view" value="main"/>
     </request-map>
     
+    <!-- ShoppingList Requests -->
     <request-map uri="editShoppingList">
         <security auth="true" https="false"/>
         <response name="success" type="view" value="editShoppingList"/>
@@ -938,10 +940,11 @@
         <response name="error" type="view" value="viewprofile"/>
     </request-map>
     
-    <request-map uri="editcontactmech">
-        <security https="true" auth="true"/>
-        <response name="success" type="view" value="editcontactmech"/>
-    </request-map>
+    <!-- ContactMech Requests -->
+    <request-map uri="editcontactmech"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech" save-last-view="true"/></request-map>
+    <request-map uri="editcontactmechnosave"><security https="true" auth="true"/><response name="success" type="view" value="editcontactmech"/></request-map>
+    <request-map uri="editcontactmechdone"><security https="true" auth="true"/><response name="success" type="view-last" value="editcontactmech"/></request-map>
+    
     <request-map uri="createContactMech">
         <security https="true" auth="true"/>
         <event type="service" invoke="createPartyContactMech"/>
@@ -1079,6 +1082,7 @@
         <response name="error" type="view" value="viewprofile"/>
     </request-map>
 
+    <!-- Person and other profile requests -->
     <request-map uri="editperson">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="editperson"/>

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl?rev=749979&r1=749978&r2=749979&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl Wed Mar  4 12:26:47 2009
@@ -18,14 +18,14 @@
 -->
 <#if canNotView>
   <p><h3>${uiLabelMap.PartyContactInfoNotBelongToYou}.</h3></p>
-  &nbsp;<a href="<@ofbizUrl>authview/${donePage}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonBack}</a>
+  &nbsp;<a href="<@ofbizUrl>editcontactmechdone</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonBack}</a>
 <#else>
 
   <#if !contactMech?exists>
     <#-- When creating a new contact mech, first select the type, then actually create -->
     <#if !requestParameters.preContactMechTypeId?exists && !preContactMechTypeId?exists>
     <h1>${uiLabelMap.PartyCreateNewContactInfo}</h1>
-    <form method="post" action='<@ofbizUrl>editcontactmech?DONE_PAGE=${donePage}</@ofbizUrl>' name="createcontactmechform">
+    <form method="post" action='<@ofbizUrl>editcontactmechnosave</@ofbizUrl>' name="createcontactmechform">
       <table width="90%" border="0" cellpadding="2" cellspacing="0">
         <tr>
           <td width="26%"><div class="tabletext">${uiLabelMap.PartySelectContactType}:</div></td>
@@ -46,11 +46,10 @@
   <#if contactMechTypeId?exists>
     <#if !contactMech?exists>
       <h1>${uiLabelMap.PartyCreateNewContactInfo}</h1>
-      &nbsp;<a href='<@ofbizUrl>authview/${donePage}</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonGoBack}</a>
+      &nbsp;<a href='<@ofbizUrl>editcontactmechdone</@ofbizUrl>' class="buttontext">${uiLabelMap.CommonGoBack}</a>
       &nbsp;<a href="javascript:document.editcontactmechform.submit()" class="buttontext">${uiLabelMap.CommonSave}</a>
       <table width="90%" border="0" cellpadding="2" cellspacing="0">
         <form method="post" action='<@ofbizUrl>${requestName}</@ofbizUrl>' name="editcontactmechform">
-        <input type='hidden' name='DONE_PAGE' value='${donePage}'>
         <input type='hidden' name='contactMechTypeId' value='${contactMechTypeId}'>
         <#if contactMechPurposeType?exists>
             <div class="tabletext">(${uiLabelMap.PartyNewContactHavePurpose} <b>"${contactMechPurposeType.get("description",locale)?if_exists}"</b>)</div>
@@ -60,7 +59,7 @@
         <#if paymentMethodId?has_content><input type='hidden' name='paymentMethodId' value='${paymentMethodId}'></#if>
     <#else>
       <h1>${uiLabelMap.PartyEditContactInfo}</h1>
-      &nbsp;<a href="<@ofbizUrl>authview/${donePage}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
+      &nbsp;<a href="<@ofbizUrl>editcontactmechdone</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
       &nbsp;<a href="javascript:document.editcontactmechform.submit()" class="buttontext">${uiLabelMap.CommonSave}</a>
       <table width="90%" border="0" cellpadding="2" cellspacing="0">
         <tr>
@@ -81,12 +80,12 @@
                       (${uiLabelMap.CommonSince}:${partyContactMechPurpose.fromDate.toString()})
                       <#if partyContactMechPurpose.thruDate?exists>(${uiLabelMap.CommonExpires}:${partyContactMechPurpose.thruDate.toString()})</#if>
                     &nbsp;</div></td>
-                  <td bgcolor='white'><div><a href='<@ofbizUrl>deletePartyContactMechPurpose?contactMechId=${contactMechId}&contactMechPurposeTypeId=${partyContactMechPurpose.contactMechPurposeTypeId}&fromDate=${partyContactMechPurpose.fromDate.toString()?html}&DONE_PAGE=${donePage}&useValues=true</@ofbizUrl>' class='buttontext'>&nbsp;${uiLabelMap.CommonDelete}&nbsp;</a></div></td>
+                  <td bgcolor='white'><div><a href='<@ofbizUrl>deletePartyContactMechPurpose?contactMechId=${contactMechId}&contactMechPurposeTypeId=${partyContactMechPurpose.contactMechPurposeTypeId}&fromDate=${partyContactMechPurpose.fromDate}&useValues=true</@ofbizUrl>' class='buttontext'>&nbsp;${uiLabelMap.CommonDelete}&nbsp;</a></div></td>
                 </tr>
               </#list>
               <#if purposeTypes?has_content>
               <tr>
-                <form method="post" action='<@ofbizUrl>createPartyContactMechPurpose?contactMechId=${contactMechId}&DONE_PAGE=${donePage}&useValues=true</@ofbizUrl>' name='newpurposeform'>
+                <form method="post" action='<@ofbizUrl>createPartyContactMechPurpose?contactMechId=${contactMechId}&useValues=true</@ofbizUrl>' name='newpurposeform'>
                   <td bgcolor='white'>
                     <select name='contactMechPurposeTypeId' class='selectBox'>
                       <option></option>
@@ -103,7 +102,6 @@
           </td>
         </tr>
         <form method="post" action='<@ofbizUrl>${requestName}</@ofbizUrl>' name="editcontactmechform">
-        <input type="hidden" name="DONE_PAGE" value='${donePage}'>
         <input type="hidden" name="contactMechId" value='${contactMechId}'>
         <input type="hidden" name="contactMechTypeId" value='${contactMechTypeId}'>
     </#if>
@@ -223,10 +221,10 @@
   </form>
   </table>
 
-    &nbsp;<a href="<@ofbizUrl>authview/${donePage}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
+    &nbsp;<a href="<@ofbizUrl>editcontactmechdone</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
     &nbsp;<a href="javascript:document.editcontactmechform.submit()" class="buttontext">${uiLabelMap.CommonSave}</a>
   <#else>
-    &nbsp;<a href="<@ofbizUrl>authview/${donePage}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
+    &nbsp;<a href="<@ofbizUrl>editcontactmechdone</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonGoBack}</a>
   </#if>
 </#if>