2amigos / yiiwheels

Widget extension library for the YiiStrap extension
http://yiiwheels.2amigos.us
Other
133 stars 77 forks source link

Gallery CSS file not registered #60

Closed tof06 closed 10 years ago

tof06 commented 10 years ago

Hello,

It seems that the blueimp css file is not registered when using WhGallery widget.

The demo don't work neither.

Adding a simple registerCssFile in registerGalleryScriptFiles() solve the problem.

/**
 * Registers gallery script files
 */
public function registerGalleryScriptFiles()
{
    /* publish assets dir */
    $path      = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
    $assetsUrl = $this->getAssetsUrl($path);

    /* @var $cs CClientScript */
    $cs = Yii::app()->getClientScript();

    $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery.min.js', CClientScript::POS_END);
    $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery-indicator.js', CClientScript::POS_END);
    $cs->registerCssFile($assetsUrl . '/css/blueimp-gallery.min.css');
}

Thanks.

tonydspaniard commented 10 years ago

Thanks @tof06 will fix it for new version. Hopefully this weekend will have some free time (was travelling :))

tonydspaniard commented 10 years ago

Thanks @tof06 the PR fixed the problem