diff --git a/PerfectScrollbar.php b/PerfectScrollbar.php deleted file mode 100644 index 387c9f7..0000000 --- a/PerfectScrollbar.php +++ /dev/null @@ -1,93 +0,0 @@ - 'relative', - 'overflow' => 'auto', - 'width' => $this->width . $this->unit, - 'height' => $this->height . $this->unit, - ],ArrayHelper::getValue($this->options,'style',[])); - - $this->options = array_merge($this->options,[ - 'id' => $this->id, - 'style' => $style - ]); - - $tag = ArrayHelper::remove($this->options, 'tag', 'div'); - echo Html::beginTag($tag, $this->options); - - } - - public function run() - { - echo Html::endTag(ArrayHelper::remove($this->options, 'tag', 'div')); - - $content = ob_get_clean(); - - $this->registerClientScript(); - - return $content; - } - - public function registerClientScript() - { - PerfectScrollbarAsset::register($this->view); - - $id = $this->options['id']; - - $jsonConfig = Json::encode($this->clientOptions); - - $js = "var ps_{$id} = new PerfectScrollbar('#{$id}', $jsonConfig);"; - - $this->view->registerJs($js); - } -} diff --git a/PerfectScrollbarAsset.php b/PerfectScrollbarAsset.php deleted file mode 100644 index 4f34832..0000000 --- a/PerfectScrollbarAsset.php +++ /dev/null @@ -1,19 +0,0 @@ - \yii\web\View::POS_HEAD - ); -} diff --git a/composer.json b/composer.json deleted file mode 100644 index 9057f48..0000000 --- a/composer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "mhunesi/yii2-perfect-scrollbar", - "description": "Yii2 Perfect Scrollbar Extension", - "type": "yii2-extension", - "keywords": ["yii2","extension","perfect-scrollbar","scrollbar"], - "license": "MIT", - "authors": [ - { - "name": "Mustafa Hayri ÜNEŞİ", - "email": "mhunesi@gmail.com" - } - ], - "require": { - "yiisoft/yii2": "~2.0.0", - "npm-asset/perfect-scrollbar": "^1.5.0" - }, - "autoload": { - "psr-4": { - "mhunesi\\scrollbar\\": "" - } - } -}