ModuleSondaggiAsset.php 1 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
<?php

Aster's avatar
Aster committed
3
namespace arter\amos\sondaggi\assets;
Marcello Pivanti's avatar
Marcello Pivanti committed
4
5

use yii\web\AssetBundle;
Aster's avatar
Aster committed
6
use arter\amos\core\widget\WidgetAbstract;
Marcello Pivanti's avatar
Marcello Pivanti committed
7
8
9

class ModuleSondaggiAsset extends AssetBundle
{
Aster's avatar
Aster committed
10
    public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
Marcello Pivanti's avatar
Marcello Pivanti committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

    public $css = [
        'css/stile.css'
    ];
    public $js = [
        'js/condizioneSondaggio.js'
    ];
    public $depends = [        
        'yii\web\JqueryAsset',
        'yii\jui\JuiAsset',
        'kartik\depdrop\DepDropExtAsset'
    ];

    public function init()
    {
        $moduleL = \Yii::$app->getModule('layout');
        if(!empty(\Yii::$app->params['dashboardEngine']) && \Yii::$app->params['dashboardEngine'] == WidgetAbstract::ENGINE_ROWS){
Aster's avatar
Aster committed
28
            $this->css = ['less/sondaggi-fullsize.less','less/sondaggi-be-come-fe.less'];
Marcello Pivanti's avatar
Marcello Pivanti committed
29
30
        }
        if(!empty($moduleL))
Aster's avatar
Aster committed
31
        { $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
Marcello Pivanti's avatar
Marcello Pivanti committed
32
        else
Aster's avatar
Aster committed
33
        { $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
Marcello Pivanti's avatar
Marcello Pivanti committed
34
35
36
        parent::init();
    }
}