newerton / yii2-fancybox

fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. http://fancyapps.com/fancybox/
MIT License
39 stars 32 forks source link

Js registration in FancyBoxAsset.php #6

Closed germanliu closed 7 years ago

germanliu commented 9 years ago

Hi, why do you register the Js file using registerAssetFiles in FancyBoxAsset?

public function registerAssetFiles($view) {
        $this->js[] = 'jquery.fancybox' . (!YII_DEBUG ? '.pack' : '') . '.js';
        parent::registerAssetFiles($view);
    }

and not doing something like:

public $js = ['jquery.fancybox' . (!YII_DEBUG ? '.pack' : '') . '.js'];

The reason I ask is that using registerAssetFiles doesn't play well with Combining and Compressing Assets Using the asset Command (at the bottom of: http://www.yiiframework.com/doc-2.0/guide-structure-assets.html)

Thanks!

vercotux commented 7 years ago

This is indeed problematic. +1