Skip to content

Commit

Permalink
Fix assets urls on non *nix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
faf committed Mar 11, 2019
1 parent 9a4f5ef commit 71e4b68
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ public function usersFunctionCallHandler(&$function)
public function pageAddJsHandler(&$args)
{
if ($args['request']->attributes->get('_route') == 'users') {
$args['js'][] = $this->getFilesPath() . '/vendor/jquery-colorbox/jquery.colorbox-min.js';
$args['js'][] = $this->getFilesPath() . '/vendor/leaflet/dist/leaflet.js';
$args['js'][] = $this->getFilesPath() . '/js/plugin.js';
$filepath = str_replace(DIRECTORY_SEPARATOR, '/', $this->getFilesPath());
$args['js'][] = $filepath . '/vendor/jquery-colorbox/jquery.colorbox-min.js';
$args['js'][] = $filepath . '/vendor/leaflet/dist/leaflet.js';
$args['js'][] = $filepath . '/js/plugin.js';
}
}

Expand All @@ -116,9 +117,10 @@ public function pageAddJsHandler(&$args)
public function pageAddCssHandler(&$args)
{
if ($args['request']->attributes->get('_route') == 'users') {
$args['css'][] = $this->getFilesPath() . '/vendor/jquery-colorbox/example3/colorbox.css';
$args['css'][] = $this->getFilesPath() . '/vendor/leaflet/dist/leaflet.css';
$args['css'][] = $this->getFilesPath() . '/css/styles.css';
$filepath = str_replace(DIRECTORY_SEPARATOR, '/', $this->getFilesPath());
$args['css'][] = $filepath . '/vendor/jquery-colorbox/example3/colorbox.css';
$args['css'][] = $filepath . '/vendor/leaflet/dist/leaflet.css';
$args['css'][] = $filepath . '/css/styles.css';
}
}

Expand Down

0 comments on commit 71e4b68

Please sign in to comment.