Move javascript wrapping into an template.

This commit is contained in:
David Molineus
2015-01-14 16:47:06 +01:00
parent a31e8781fd
commit cbf2c53ee0
5 changed files with 19 additions and 51 deletions

View File

@@ -12,6 +12,7 @@
TemplateLoader::addFiles(
array(
'ce_leaflet_map' => 'system/modules/leaflet/templates',
'leaflet_map_js' => 'system/modules/leaflet/templates',
'mod_leaflet_map' => 'system/modules/leaflet/templates',
'be_leaflet_geocode' => 'system/modules/leaflet/templates',
'be_leaflet_credits' => 'system/modules/leaflet/templates',

View File

@@ -74,9 +74,7 @@ $container['leaflet.definition.builder'] = $container->share(function($container
$boot = $container['leaflet.boot'];
$dispatcher = $container['leaflet.definition.builder.event-dispatcher'];
$encoder = new Encoder($dispatcher, new Output(), JSON_UNESCAPED_SLASHES);
$builder = new Builder($encoder, $dispatcher);
$leaflet = new Leaflet($builder);
$leaflet = new Leaflet($dispatcher, array(), JSON_UNESCAPED_SLASHES);
return $boot->initializeLeafletBuilder($leaflet);
});