yiister / yii2-gentelella

Free admin template for backend
MIT License
275 stars 113 forks source link

Demo code in @bower/gentelella/build/js/custom.js #26

Closed Alsodan closed 7 years ago

Alsodan commented 7 years ago

custom.js is placed in theme asset. It has been taken from @bower/gentelella/build/js directory, becouse there is in vendor\yiister\yii2-gentelella\assets\ThemeAsset.php stand:

public $sourcePath = '@bower/gentelella/build/';

custom.js has demo code for Charts, Autocomplete, etc. It has 116Kb!

Maybe need use custom.js from @bower/gentelella/src/js/ ? It has no demo data and its size is 7Kb.

fps01 commented 7 years ago

@Alsodan hello. Sorry for late. I will try your solution.

Alsodan commented 7 years ago

In my application i use:

class CorrectThemeAsset extends AssetBundle
{
    public $sourcePath = '@bower/gentelella/';
    public $css = [
        'build/css/custom.min.css',
    ];
    public $js = [
        'src/js/custom.js',
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapPluginAsset',
        'rmrevin\yii\fontawesome\AssetBundle',
        'yiister\gentelella\assets\BootstrapProgressbar',
    ];
}
fps01 commented 7 years ago

@Alsodan I tried your code above. It threw Uncaught TypeError: $(...).smartresize is not a function js error in browser console.