From 90d2a99bf32b9e0f70f07bd2c001d5e03b1cea8c Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Sun, 26 May 2013 01:43:04 +0400 Subject: [PATCH] \yii\jui\Widget::registerWidget() improvement --- framework/yii/jui/Widget.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework/yii/jui/Widget.php b/framework/yii/jui/Widget.php index eea76d3..8cbd16c 100644 --- a/framework/yii/jui/Widget.php +++ b/framework/yii/jui/Widget.php @@ -58,13 +58,16 @@ class Widget extends \yii\base\Widget /** * Registers a specific jQuery UI widget and the related events * @param string $name the name of the jQuery UI widget + * @param boolean $theme whether register theme bundle */ - protected function registerWidget($name) + protected function registerWidget($name, $theme = true) { $id = $this->options['id']; $view = $this->getView(); $view->registerAssetBundle("yii/jui/$name"); - $view->registerAssetBundle(static::$theme . "/$name"); + if ($theme) { + $view->registerAssetBundle(static::$theme . "/$name"); + } if ($this->clientOptions !== false) { $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);