projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "POD-Dokumentation aktualisiert"
[kivitendo-erp.git]
/
js
/
kivi.CustomerVendor.js
diff --git
a/js/kivi.CustomerVendor.js
b/js/kivi.CustomerVendor.js
index
bfef730
..
1cb08db
100644
(file)
--- a/
js/kivi.CustomerVendor.js
+++ b/
js/kivi.CustomerVendor.js
@@
-77,7
+77,7
@@
namespace('kivi.CustomerVendor', function(ns) {
'#country'
];
'#country'
];
- this.MapWidget = function(prefix)
+ this.MapWidget = function(prefix
, source_address
)
{
var $mapSearchElements = [];
var $widgetWrapper;
{
var $mapSearchElements = [];
var $widgetWrapper;
@@
-117,7
+117,9
@@
namespace('kivi.CustomerVendor', function(ns) {
searchString += stmt;
}
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();
window.open(url, '_blank');
window.focus();