You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2010/02/17 08:58:04 UTC

svn commit: r910847 - in /ofbiz/trunk/applications/party/webapp/partymgr: WEB-INF/actions/party/PartyGeoLocation.groovy party/profileblocks/Contact.ftl

Author: erwan
Date: Wed Feb 17 07:58:04 2010
New Revision: 910847

URL: http://svn.apache.org/viewvc?rev=910847&view=rev
Log:
geolocation wasn't working from the party profile, as reported by Abdullah Shaikh  (OFBIZ-3481)

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy?rev=910847&r1=910846&r2=910847&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy Wed Feb 17 07:58:04 2010
@@ -32,9 +32,14 @@
         partyId = thisUserLogin.partyId;
     }
 }
+geoPointId = parameters.geoPointId;
 context.partyId = partyId;
 
-latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "PartyAndGeoPoint", "partyId", partyId, null, null);
+if (!geoPointId) {
+    latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "PartyAndGeoPoint", "partyId", partyId, null, null);
+} else {
+    latestGeoPoint = delegator.findByPrimaryKey("GeoPoint", [geoPointId : geoPointId]);
+}
 if (latestGeoPoint) {
     context.latestGeoPoint = latestGeoPoint;
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=910847&r1=910846&r2=910847&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Wed Feb 17 07:58:04 2010
@@ -88,7 +88,7 @@
                     <#if contactMechPurposeType?has_content>
                       <#assign popUptitle = contactMechPurposeType.get("description",locale) + uiLabelMap.CommonGeoLocation>
                     </#if>
-                    <a href="javascript:popUp('<@o...@ofbizUrl>', '${popUptitle?if_exists}', '450', '550')" class="buttontext">${uiLabelMap.CommonGeoLocation}</a>
+                    <a href="javascript:popUp('<@o...@ofbizUrl>', '${popUptitle?if_exists}', '450', '550')" class="buttontext">${uiLabelMap.CommonGeoLocation}</a>
                   </#if>
                 <#elseif "TELECOM_NUMBER" = contactMech.contactMechTypeId>
                   <#assign telecomNumber = contactMechMap.telecomNumber>