14 lines
352 B
JavaScript
14 lines
352 B
JavaScript
(function ($) {
|
|
Drupal.behaviors.farm_map = {
|
|
attach: function (context, settings) {
|
|
if (settings.farm_map.maps) {
|
|
settings.farm_map.maps.forEach(function (target) {
|
|
$('#' + target, context).once('farm-map', function () {
|
|
farmOS.map.create(target, {});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
};
|
|
}(jQuery));
|