You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2008/10/18 14:45:22 UTC
svn commit: r705879 - in /ofbiz/trunk/applications:
ecommerce/webapp/ecommerce/WEB-INF/controller.xml
ecommerce/webapp/ecommerce/images/profile.js
party/script/org/ofbiz/party/party/PartyServices.xml
party/servicedef/services.xml
Author: mor
Date: Sat Oct 18 05:45:22 2008
New Revision: 705879
URL: http://svn.apache.org/viewvc?rev=705879&view=rev
Log:
Fix:Inplace editor on new profile pages was not working.
Applied a slightly modified patch from Jira Issue OFBIZ-2004 (https://issues.apache.org/jira/browse/OFBIZ-2004)
Thanks to Kirti Dhakad and Rishi Solanki.
Modified:
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js
ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
ofbiz/trunk/applications/party/servicedef/services.xml
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=705879&r1=705878&r2=705879&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Sat Oct 18 05:45:22 2008
@@ -1756,7 +1756,7 @@
<request-map uri="updatePartyEmailAddress">
<security https="true" auth="true"/>
- <event type="jsonsimple" path="org/ofbiz/ecommerce/customer/CustomerEvents.xml" invoke="createUpdateEmailAddress"/>
+ <event type="jsonservice" invoke="createUpdateEmailAddress"/>
<response name="success" type="none"/>
<response name="error" type="none"/>
</request-map>
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js?rev=705879&r1=705878&r2=705879&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/profile.js Sat Oct 18 05:45:22 2008
@@ -142,7 +142,7 @@
function inPlaceEditEmail(e) {
if ($('updatedEmailContactMechId')) {
- var url = 'updatePartyEmailAddress?emailContactMechId='+ $('updatedEmailContactMechId').value;
+ var url = 'updatePartyEmailAddress?contactMechId='+ $('updatedEmailContactMechId').value;
var errorId = 'serverError_' + $('updatedEmailContactMechId').value;
var oldEmailAddress = $('updatedEmailAddress').value;
var editor = new Ajax.InPlaceEditor(e, url, {clickToEditText: 'click here to change your email', paramName: 'emailAddress', htmlResponse: false, updateAfterRequestCall: true,
@@ -156,13 +156,14 @@
$('emailAddress').update(oldEmailAddress);
} else {
Effect.Fade(errorId);
- if (data.emailContactMechId != undefined) {
- $('updatedEmailContactMechId').value = data.emailContactMechId;
- $('updatedEmailAddress').value = data.emailContactMech.infoString;
+ if (data.contactMechId != undefined) {
+ $('updatedEmailContactMechId').value = data.contactMechId;
+ $('updatedEmailAddress').value = data.emailAddress;
} else {
$('emailAddress').update(oldEmailAddress);
}
inPlaceEditEmail('emailAddress');
+ $(errorId).id = 'serverError_' + $('updatedEmailContactMechId').value;
editor.dispose();
}
}
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=705879&r1=705878&r2=705879&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Sat Oct 18 05:45:22 2008
@@ -967,6 +967,7 @@
<simple-method method-name="createUpdateEmailAddress" short-description="Create and update email address" login-required="false">
<if-empty field="parameters.contactMechId">
<set-service-fields service-name="createPartyEmailAddress" map-name="parameters" to-map-name="emailAddressContext"/>
+ <set field="emailAddressContext.partyId" from-field="userLogin.partyId"/>
<call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
<result-to-field result-name="contactMechId" field-name="contactMechId"/>
</call-service>
@@ -979,6 +980,8 @@
<log level="info" message="Email Contact updated emailContactMechId is ${contactMechId}"></log>
</else>
</if-empty>
+ <entity-one entity-name="ContactMech" value-name="contactMech"/>
+ <field-to-result field-name="contactMech.infoString" result-name="emailAddress"/>
<field-to-result field-name="contactMechId"/>
</simple-method>
Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=705879&r1=705878&r2=705879&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Sat Oct 18 05:45:22 2008
@@ -1118,10 +1118,11 @@
<service name="createUpdateEmailAddress" engine="simple"
location="component://party/script/org/ofbiz/party/party/PartyServices.xml" invoke="createUpdateEmailAddress" auth="false">
<description>Create and Update email address</description>
- <attribute name="partyId" type="String" mode="IN" optional="false"/>
+ <attribute name="partyId" type="String" mode="IN" optional="true"/>
<attribute name="userLogin" type="GenericValue" mode="IN" optional="true"/>
<attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
- <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
- <attribute name="contactMechId" type="String" mode="INOUT" optional="true"/>
+ <attribute name="emailAddress" type="String" mode="INOUT" optional="false"/>
+ <attribute name="contactMechId" type="String" mode="IN" optional="true"/>
+ <attribute name="contactMechId" type="String" mode="OUT" optional="false"/>
</service>
</services>