Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Nov 4, 2024
1 parent 91b338a commit 0e44b28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/yafowil/widget/location/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
resources.add(wr.ScriptResource(
name='yafowil-location-js',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-location/default',
depends=['jquery-js', 'leaflet-geosearch-js'],
resource='widget.js',
compressed='widget.min.js'
))
resources.add(wr.StyleResource(
name='yafowil-location-css',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-location/default',
depends='leaflet-geosearch-css',
resource='widget.min.css'
))
Expand Down Expand Up @@ -118,13 +120,15 @@
bootstrap5_resources.add(wr.ScriptResource(
name='yafowil-location-js',
directory=os.path.join(resources_dir, 'bootstrap5'),
path='yafowil-location/bootstrap5',
depends=['jquery-js', 'leaflet-geosearch-js'],
resource='widget.js',
compressed='widget.min.js'
))
bootstrap5_resources.add(wr.StyleResource(
name='yafowil-location-css',
directory=os.path.join(resources_dir, 'bootstrap5'),
path='yafowil-location/bootstrap5',
depends='leaflet-geosearch-css',
resource='widget.min.css'
))
Expand Down
4 changes: 2 additions & 2 deletions src/yafowil/widget/location/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def test_resources(self):
self.assertTrue(os.path.exists(scripts[1].file_path))

self.assertTrue(scripts[2].directory.endswith(np('/location/resources/default')))
self.assertEqual(scripts[2].path, 'yafowil-location')
self.assertEqual(scripts[2].path, 'yafowil-location/default')
self.assertEqual(scripts[2].file_name, 'widget.min.js')
self.assertTrue(os.path.exists(scripts[2].file_path))

Expand All @@ -338,7 +338,7 @@ def test_resources(self):
self.assertTrue(os.path.exists(styles[1].file_path))

self.assertTrue(styles[2].directory.endswith(np('/location/resources/default')))
self.assertEqual(styles[2].path, 'yafowil-location')
self.assertEqual(styles[2].path, 'yafowil-location/default')
self.assertEqual(styles[2].file_name, 'widget.min.css')
self.assertTrue(os.path.exists(styles[2].file_path))

Expand Down

0 comments on commit 0e44b28

Please sign in to comment.