diff --git a/system/typemill/Assets.php b/system/typemill/Assets.php index 02b6576..6b57900 100644 --- a/system/typemill/Assets.php +++ b/system/typemill/Assets.php @@ -82,19 +82,19 @@ class Assets $this->inlineCSS[] = ''; } - public function addJS($JS) + public function addJS($JS, $attr) { $JSfile = $this->getFileUrl($JS); if($JSfile) { - $this->JS[] = ''; + $this->JS[] = ''; } } - public function addInlineJS($JS) + public function addInlineJS($JS, $attr) { - $this->inlineJS[] = ''; + $this->inlineJS[] = '' . $JS . ''; } public function addBloxConfigJS($JS) diff --git a/system/typemill/Plugin.php b/system/typemill/Plugin.php index 49cff29..709a618 100644 --- a/system/typemill/Plugin.php +++ b/system/typemill/Plugin.php @@ -201,14 +201,14 @@ abstract class Plugin implements EventSubscriberInterface $this->container->get('view')->getEnvironment()->addFunction($function); } - protected function addJS($JS) + protected function addJS($JS, $attr="") { - $this->container->get('assets')->addJS($JS); + $this->container->get('assets')->addJS($JS, $attr); } - protected function addInlineJS($JS) + protected function addInlineJS($JS, $attr="") { - $this->container->get('assets')->addInlineJS($JS); + $this->container->get('assets')->addInlineJS($JS, $attr); } protected function addBloxConfigJS($JS)