]> wagnertech.de Git - mfinanz.git/blobdiff - js/kivi.CustomerVendor.js
Finanzcontrollingbericht: Filterfelder breiter gemacht
[mfinanz.git] / js / kivi.CustomerVendor.js
index bfef730d4f793a01912005e8bfa525e48a64a439..1cb08db499ad8cbea8d9d3aac0c82e7f0d979bbe 100644 (file)
@@ -77,7 +77,7 @@ namespace('kivi.CustomerVendor', function(ns) {
     '#country'
   ];
 
-  this.MapWidget = function(prefix)
+  this.MapWidget = function(prefix, source_address)
   {
     var $mapSearchElements = [];
     var $widgetWrapper;
@@ -117,7 +117,9 @@ namespace('kivi.CustomerVendor', function(ns) {
           searchString += stmt;
       }
 
-      var url = 'https://maps.google.com/maps?q='+ encodeURIComponent(searchString);
+      source_address = source_address || '';
+      var query      = source_address != '' ? 'saddr=' + encodeURIComponent(source_address) + '&daddr=' : 'q=';
+      var url        = 'https://maps.google.com/maps?' + query + encodeURIComponent(searchString);
 
       window.open(url, '_blank');
       window.focus();