From 6c3b2ef04ea2b50575c0c95dc85f16fce4d6888b Mon Sep 17 00:00:00 2001 From: Last G Date: Sun, 1 Sep 2013 23:17:26 +0600 Subject: [PATCH 1/2] JS now uses relative path --- Jii/Jii.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jii/Jii.php b/Jii/Jii.php index 417081c..b5bfd96 100755 --- a/Jii/Jii.php +++ b/Jii/Jii.php @@ -24,7 +24,10 @@ public function init() } // publish jii script - $jii_js = Yii::app()->assetManager->publish(Yii::getPathOfAlias('application.components.Jii.js') . DIRECTORY_SEPARATOR . $this->config['script']); + + $jsPath = __DIR__ . DIRECTORY_SEPARATOR . 'js'; + + $jii_js = Yii::app()->assetManager->publish( $jsPath . $this->config['script']); // registers jii Yii::app()->clientScript->registerScriptFile($jii_js, CClientScript::POS_END); From 3ce266240d1a646f9df88139e7d153ee86c2885d Mon Sep 17 00:00:00 2001 From: Last G Date: Sun, 1 Sep 2013 23:32:14 +0600 Subject: [PATCH 2/2] Fix for missing directory separator --- Jii/Jii.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jii/Jii.php b/Jii/Jii.php index b5bfd96..2f2078b 100755 --- a/Jii/Jii.php +++ b/Jii/Jii.php @@ -27,7 +27,7 @@ public function init() $jsPath = __DIR__ . DIRECTORY_SEPARATOR . 'js'; - $jii_js = Yii::app()->assetManager->publish( $jsPath . $this->config['script']); + $jii_js = Yii::app()->assetManager->publish( $jsPath . DIRECTORY_SEPARATOR . $this->config['script']); // registers jii Yii::app()->clientScript->registerScriptFile($jii_js, CClientScript::POS_END);