IDEMPIERE-147 GoogleMap to show Locators
http://jira.idempiere.com/browse/IDEMPIERE-147 Proper authorship accreditation, as requested http://forum.kenos.com.br/viewtopic.php?f=1&t=810&p=3765#p3758
This commit is contained in:
parent
42b25f7f8b
commit
3be49d2f64
|
@ -49,9 +49,9 @@ public class MLocation extends X_C_Location implements Comparator
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7655032871533297438L;
|
||||
private static final long serialVersionUID = 8332515185354248079L;
|
||||
|
||||
//BEGIN fernandinho/ricardo - http://jira.idempiere.com/browse/IDEMPIERE-147
|
||||
// http://jira.idempiere.com/browse/IDEMPIERE-147
|
||||
public static String LOCATION_MAPS_URL_PREFIX = MSysConfig.getValue("LOCATION_MAPS_URL_PREFIX");
|
||||
public static String LOCATION_MAPS_ROUTE_PREFIX = MSysConfig.getValue("LOCATION_MAPS_ROUTE_PREFIX");
|
||||
public static String LOCATION_MAPS_SOURCE_ADDRESS = MSysConfig.getValue("LOCATION_MAPS_SOURCE_ADDRESS");
|
||||
|
@ -658,12 +658,11 @@ public class MLocation extends X_C_Location implements Comparator
|
|||
} // afterSave
|
||||
|
||||
/**
|
||||
* Get edited Value (MLocation) for GoogleMaps
|
||||
* @author Fernandinho/Ricardo
|
||||
* Get edited Value (MLocation) for GoogleMaps / IDEMPIERE-147
|
||||
* @param MLocation location
|
||||
* @return String address
|
||||
*/
|
||||
public String getGoogleMapsLocation() {
|
||||
public String getMapsLocation() {
|
||||
|
||||
MRegion region = new MRegion(Env.getCtx(), getC_Region_ID(), get_TrxName());
|
||||
String address = "";
|
||||
|
|
|
@ -68,9 +68,14 @@ import com.akunagroup.uk.postcode.Postcode;
|
|||
* <li>FR [ 1741222 ] - Webservice connector for address lookups
|
||||
* @author Cristina Ghita, www.arhipac.ro
|
||||
* <li>FR [ 2794312 ] Location AutoComplete
|
||||
* @contributors - Ricardo Santana (KENOS), Fernandinho (FAIRE) - BRAZIL vs GERMANY 2-0
|
||||
* - Show GoogleMap on Location Dialog
|
||||
* - http://jira.idempiere.com/browse/IDEMPIERE-147
|
||||
*
|
||||
* http://jira.idempiere.com/browse/IDEMPIERE-147 - Show GoogleMap on Location Dialog
|
||||
* @author Fernando Lucktemberg (Faire, www.faire.com.br)
|
||||
* <li> seeded the Map button
|
||||
* @author Mario Grigioni (Kenos, www.kenos.com.br)
|
||||
* <li> expanded to add Route button
|
||||
* @author Alvaro Montenegro (Kenos, www.kenos.com.br)
|
||||
* <li> BF: Check URL before open the Browser
|
||||
*/
|
||||
public class VLocationDialog extends CDialog
|
||||
implements ActionListener
|
||||
|
@ -482,7 +487,7 @@ public class VLocationDialog extends CDialog
|
|||
//BEGIN fernandinho/ricardo
|
||||
else if (e.getSource() == toLink)
|
||||
{
|
||||
String urlString = MLocation.LOCATION_MAPS_URL_PREFIX + m_location.getGoogleMapsLocation();
|
||||
String urlString = MLocation.LOCATION_MAPS_URL_PREFIX + m_location.getMapsLocation();
|
||||
String message = null;
|
||||
|
||||
try
|
||||
|
@ -503,8 +508,8 @@ public class VLocationDialog extends CDialog
|
|||
MLocation orgLocation = new MLocation(Env.getCtx(),orgInfo.getC_Location_ID(),null);
|
||||
|
||||
String urlString = MLocation.LOCATION_MAPS_ROUTE_PREFIX +
|
||||
MLocation.LOCATION_MAPS_SOURCE_ADDRESS + orgLocation.getGoogleMapsLocation() + //org
|
||||
MLocation.LOCATION_MAPS_DESTINATION_ADDRESS + m_location.getGoogleMapsLocation(); //partner
|
||||
MLocation.LOCATION_MAPS_SOURCE_ADDRESS + orgLocation.getMapsLocation() + //org
|
||||
MLocation.LOCATION_MAPS_DESTINATION_ADDRESS + m_location.getMapsLocation(); //partner
|
||||
String message = null;
|
||||
try
|
||||
{
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
package org.adempiere.webui.window;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
@ -44,7 +43,6 @@ import org.compiere.model.MRegion;
|
|||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zhtml.A;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
@ -62,8 +60,9 @@ import org.zkoss.zk.ui.event.Events;
|
|||
* https://sourceforge.net/tracker/?func=detail&aid=2995212&group_id=176962&atid=955896
|
||||
*
|
||||
* @TODO: Implement fOnline button present in swing client
|
||||
* @contributors - Carlos Ruiz / globalqss
|
||||
* - Show GoogleMap on Location Dialog (integrate approach from Fernandinho)
|
||||
*
|
||||
* @contributors - Carlos Ruiz / globalqss
|
||||
* - Show GoogleMap on Location Dialog (integrate approach from LBR)
|
||||
* - http://jira.idempiere.com/browse/IDEMPIERE-147
|
||||
**/
|
||||
public class WLocationDialog extends Window implements EventListener
|
||||
|
@ -530,7 +529,7 @@ public class WLocationDialog extends Window implements EventListener
|
|||
}
|
||||
else if (toLink.equals(event.getTarget()))
|
||||
{
|
||||
String urlString = MLocation.LOCATION_MAPS_URL_PREFIX + m_location.getGoogleMapsLocation();
|
||||
String urlString = MLocation.LOCATION_MAPS_URL_PREFIX + m_location.getMapsLocation();
|
||||
String message = null;
|
||||
try {
|
||||
Executions.getCurrent().sendRedirect(urlString, "_blank");
|
||||
|
@ -548,8 +547,8 @@ public class WLocationDialog extends Window implements EventListener
|
|||
MLocation orgLocation = new MLocation(Env.getCtx(),orgInfo.getC_Location_ID(),null);
|
||||
|
||||
String urlString = MLocation.LOCATION_MAPS_ROUTE_PREFIX +
|
||||
MLocation.LOCATION_MAPS_SOURCE_ADDRESS + orgLocation.getGoogleMapsLocation() + //org
|
||||
MLocation.LOCATION_MAPS_DESTINATION_ADDRESS + m_location.getGoogleMapsLocation(); //partner
|
||||
MLocation.LOCATION_MAPS_SOURCE_ADDRESS + orgLocation.getMapsLocation() + //org
|
||||
MLocation.LOCATION_MAPS_DESTINATION_ADDRESS + m_location.getMapsLocation(); //partner
|
||||
String message = null;
|
||||
try {
|
||||
Executions.getCurrent().sendRedirect(urlString, "_blank");
|
||||
|
|
Loading…
Reference in New Issue