Fix generation of the js url on non *nix systems

This commit is contained in:
Fedor A. Fetisov 2019-03-11 00:35:49 +03:00
parent cda4d7041d
commit 16da0abed8

View File

@ -92,7 +92,7 @@ class Plugin extends \Mibew\Plugin\AbstractPlugin implements \Mibew\Plugin\Plugi
public function refreshButton(&$args) public function refreshButton(&$args)
{ {
$g = $args['asset_url_generator']; $g = $args['asset_url_generator'];
$args['response']['load']['refresh'] = $g->generate($this->getFilesPath() . '/js/refresh.js', AssetUrlGeneratorInterface::ABSOLUTE_URL); $args['response']['load']['refresh'] = $g->generate(str_replace(DIRECTORY_SEPARATOR, '/', $this->getFilesPath()) . '/js/refresh.js', AssetUrlGeneratorInterface::ABSOLUTE_URL);
$args['response']['handlers'][] = 'refreshButton'; $args['response']['handlers'][] = 'refreshButton';
$args['response']['dependencies']['refreshButton'] = array('refresh'); $args['response']['dependencies']['refreshButton'] = array('refresh');
$args['response']['data']['refreshButton'] = array('mode' => $this->mode, 'submode' => $this->submode); $args['response']['data']['refreshButton'] = array('mode' => $this->mode, 'submode' => $this->submode);