-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDatePickerAsset.php
More file actions
35 lines (31 loc) · 908 Bytes
/
DatePickerAsset.php
File metadata and controls
35 lines (31 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @copyright Copyright (c) 2015 Roman Ovchinnikov
* @link https://github.com/RomeroMsk
* @version 1.1.0
*/
namespace nex\datepicker;
use yii\web\AssetBundle;
/**
* DatePicker asset
*
* @author Roman Ovchinnikov <nex.software@gmail.com>
* @link https://github.com/RomeroMsk/yii2-datepicker
*/
class DatePickerAsset extends AssetBundle
{
public $sourcePath = '@bower/eonasdan-bootstrap-datetimepicker';
public $depends = [
'yii\bootstrap\BootstrapPluginAsset',
'nex\datepicker\MomentAsset',
];
public function init() {
if (YII_DEBUG) {
$this->css[] = 'build/css/bootstrap-datetimepicker.css';
$this->js[] = 'src/js/bootstrap-datetimepicker.js';
} else {
$this->css[] = 'build/css/bootstrap-datetimepicker.min.css';
$this->js[] = 'build/js/bootstrap-datetimepicker.min.js';
}
}
}