public function init()
{
// if the widget has javascript, load it in
$cls_name = explode('\\', get_class($this));
$this->shortName = array_pop($cls_name);
if (file_exists(dirname(__FILE__) . '/js/' . $this->shortName . '.js')) {
$this->assetFolder = Yii::app()->getAssetManager()->publish(dirname(__FILE__) . '/js/');
}
parent::init();
}