Commit 1605905f by Klimov Paul

Fixed CCS for `yii\authclient\widgets\AuthChoice` does not loaded if `popupMode` disabled

parent 255cf947
......@@ -4,7 +4,7 @@ Yii Framework 2 authclient extension Change Log
2.0.1 under development
-----------------------
- no changes in this release.
- Bug #6000: Fixed CCS for `yii\authclient\widgets\AuthChoice` does not loaded if `popupMode` disabled (klimov-paul)
2.0.0 October 12, 2014
......
......@@ -225,10 +225,12 @@ class AuthChoice extends Widget
*/
public function init()
{
$view = Yii::$app->getView();
if ($this->popupMode) {
$view = Yii::$app->getView();
AuthChoiceAsset::register($view);
$view->registerJs("\$('#" . $this->getId() . "').authchoice();");
} else {
AuthChoiceStyleAsset::register($view);
}
$this->options['id'] = $this->getId();
echo Html::beginTag('div', $this->options);
......
......@@ -12,6 +12,8 @@ use yii\web\AssetBundle;
/**
* AuthChoiceAsset is an asset bundle for [[AuthChoice]] widget.
*
* @see AuthChoiceStyleAsset
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
*/
......@@ -21,10 +23,8 @@ class AuthChoiceAsset extends AssetBundle
public $js = [
'authchoice.js',
];
public $css = [
'authchoice.css',
];
public $depends = [
'yii\authclient\widgets\AuthChoiceStyleAsset',
'yii\web\YiiAsset',
];
}
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\authclient\widgets;
use yii\web\AssetBundle;
/**
* AuthChoiceAsset is an asset bundle for [[AuthChoice]] widget.
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
*/
class AuthChoiceStyleAsset extends AssetBundle
{
public $sourcePath = '@yii/authclient/assets';
public $css = [
'authchoice.css',
];
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment