作者:nhatvuva
项目:yii2-widget
public function initView($view)
{
$files = [pathinfo('@nitm/assets/js/jquery-plugins/jquery.ui.widget.js'), pathinfo('@nitm/assets/js/jquery-plugins/jquery-ui-scrollable/jquery-ui-scrollable.js')];
foreach ($files as $f) {
$asset = new \yii\web\AssetBundle(['sourcePath' => $f['dirname'], 'js' => [$f['basename']]]);
$asset->publish($view->getAssetManager());
$view->assetBundles[static::className() . '\\' . $f['basename']] = $asset;
}
return $this;
}
作者:raoul200
项目:yii2-pnotify-widge
/**
* Initialize the widget.
*
* If YII_ENV_DEV is defined, the not minified version of the css and the js files
* are used.
* @see \yii\web\AssetBundle::init()
*/
public function init()
{
$this->sourcePath = __DIR__ . '/assets';
$this->js = ['js/pnotify.custom' . (YII_ENV_DEV ? '.js' : '.min.js')];
$this->css = ['css/pnotify.custom' . (YII_ENV_DEV ? '.css' : '.min.css')];
return parent::init();
}
作者:branchonlin
项目:yii2-select
/**
* @inheritdoc
*/
public function init()
{
$this->setSourcePath('@vendor/branchonline/yii2-select2/assets/select2');
$this->setupAssets('css', ['select2']);
$this->setupAssets('js', ['select2.min']);
parent::init();
}
作者:mg-cod
项目:yii2-asset
public function init()
{
parent::init();
if (!file_exists(\Yii::getAlias('@bower/sticky/jquery.sticky.js'))) {
throw new InvalidConfigException('You must include `bower-asset/sticky` package in your composer.json configuration file.');
}
}
作者:13621644
项目:Yii2-UEdito
public function init()
{
parent::init();
if ($this->sourcePath == null) {
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'assets';
}
}
作者:songhongy
项目:idaiya
public function init()
{
if (empty($this->js)) {
$this->js = $this->getJs();
}
return parent::init();
}
作者:novokshonove
项目:multi-string-widge
public function init()
{
parent::init();
$this->sourcePath = __DIR__ . DIRECTORY_SEPARATOR . 'source';
$this->depends[] = JqueryAsset::className();
$this->depends[] = BootstrapThemeAsset::className();
}
作者:hiqde
项目:yii2-x-editabl
public function registerAssetFiles($view)
{
$nodigitLib = preg_replace('/[0-9]+/', '', $this->library);
$this->js[] = $this->library . '-editable/js/' . $nodigitLib . '-editable' . (YII_DEBUG ? '.js' : '.min.js');
$this->css[] = $this->library . '-editable/css/' . $nodigitLib . '-editable.css';
parent::registerAssetFiles($view);
}
作者:dld
项目:yii2-summernot
/**
* @inheritdoc
*/
public function init()
{
$postfix = YII_DEBUG ? '' : '.min';
$this->css[] = 'summernote.css';
$this->js[] = 'summernote' . $postfix . '.js';
parent::init();
}
作者:AppItNetwor
项目:yii2-wordpress-theme
public function init()
{
// pr(Yii::$app->view->theme->selectedTheme);die;
// $this->js = $this->_populateFiles('js');
// $this->css = $this->_populateFiles('css');
parent::init();
}
作者:fils
项目:yii2-datepicke
public function init()
{
if (!empty($this->js) && $this->enableLocale && ($language = $this->getLanguage()) !== null) {
$this->js[] = 'js/locales/bootstrap-datepicker.' . $language . '.min.js';
}
parent::init();
}
作者:fourteenmeiste
项目:yii2-tre
/**
* @inheritdoc
*/
public function init()
{
$postfix = YII_DEBUG ? '' : '.min';
$this->js[] = 'jstree' . $postfix . '.js';
$this->css[] = 'themes/default/style' . $postfix . '.css';
parent::init();
}
作者:skor
项目:yii2-admin-templat
/**
* Register language script.
*/
public function registerAssetFiles($view)
{
if ($this->language) {
$this->js[] = 'locale/bootstrap-markdown.' . $this->language . '.js';
}
parent::registerAssetFiles($view);
}
作者:allhaz
项目:renaul
public function init()
{
$this->js[] = 'ckeditor.js';
//?v=' . microtime();
$this->js[] = 'ckeditor.sample.init.js?v=' . microtime();
parent::init();
}
作者:Jesus
项目:yii2-widget-block-model
public function init()
{
parent::init();
$this->sourcePath = __DIR__ . '/assets';
$this->setupAssets('css', ['css/blockmodels']);
$this->setupAssets('js', ['js/blockmodels']);
}
作者:fiduu
项目:ekan
public function init()
{
$this->sourcePath = __DIR__ . '/assets';
$this->css = ['css/bootstrap-switch.min.css'];
$this->js = ['js/bootstrap-switch.min.js'];
parent::init();
}
作者:webtoolsn
项目:yii2-admin-lt
/**
* @inheritdoc
*/
public function init()
{
parent::init();
if (static::$skin) {
$this->css[] = sprintf('css/skins/%s.min.css', static::$skin);
}
}
作者:yii2mo
项目:yii2-rba
/**
* @inheritdoc
*/
public function init()
{
if ($this->registerOnlyRouteScript) {
$this->js = ['js/rbac-route.js'];
}
parent::init();
}
作者:chabberwoc
项目:halo-de
public function init()
{
if (YII_ENV == 'dev') {
$this->publishOptions = ['forceCopy' => true];
}
parent::init();
}
作者:miradna
项目:yii2-bootstrap-calenda
public function init()
{
$this->basePath = __DIR__ . '/assets';
list(, $url) = Yii::$app->assetManager->publish(__DIR__ . '/assets');
$this->baseUrl = $url;
parent::init();
}