This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
148 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/home/astrid/git/joomla-development/pkg_agosms/dist/pkg-agosms-1.0.38.zip | ||
/home/astrid/git/joomla-development/pkg_agosms/dist/pkg-agosms-1.0.41.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
extension = agosms | ||
version = 1.0.41 | ||
version = 1.0.42 | ||
source = src | ||
target = package | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/media/plg_fields_agosmsaddressmarker/js/site-agosmsaddressmarker.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var leafletmaps = document.querySelectorAll('.agosmsaddressmarkerleafletmap'); | ||
|
||
// For all maps [start] | ||
[].forEach.call(leafletmaps, function (element) { | ||
|
||
var unique = element.getAttribute('data-unique'); | ||
var lat = element.getAttribute('data-lat'); | ||
var lon = element.getAttribute('data-lon'); | ||
var scrollwheelzoom = element.getAttribute('data-scrollwheelzoom'); | ||
var mapboxkey = element.getAttribute('data-mapboxkey'); | ||
|
||
// Initialize the Map if needed | ||
var container = L.DomUtil.get('map' + unique); | ||
if (!container.children.length > 0) { | ||
if (scrollwheelzoom === "0") | ||
{ | ||
window['map' + unique] = new L.Map('map' + unique, {scrollWheelZoom: false}); | ||
} else | ||
{ | ||
window['map' + unique] = new L.Map('map' + unique, {scrollWheelZoom: true}); | ||
} | ||
} | ||
|
||
// Add Scrollwheele Listener, so that you can activate it on mouse click | ||
window['map' + unique].on('click', function () { | ||
if (window['map' + unique].scrollWheelZoom.enabled()) { | ||
window['map' + unique].scrollWheelZoom.disable(); | ||
} else | ||
{ | ||
window['map' + unique].scrollWheelZoom.enable(); | ||
} | ||
}); | ||
|
||
// Add Marker if possible - fallback cords 0,0 | ||
try { | ||
window['map' + unique].setView(new L.LatLng(lat, lon), 13); | ||
var marker = L.marker([lat, lon]).addTo(window['map' + unique]); | ||
} catch (e) { | ||
window['map' + unique].setView(new L.LatLng(0, 0), 13); | ||
var marker = L.marker([0, 0]).addTo(window['map' + unique]); | ||
console.log(e); | ||
} | ||
}); | ||
// For all maps [end] | ||
|
||
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters