-
Notifications
You must be signed in to change notification settings - Fork 41
/
DialogAsset.php
39 lines (34 loc) · 916 Bytes
/
DialogAsset.php
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
36
37
38
39
<?php
/**
* @package yii2-dialog
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 1.0.5
*/
namespace kartik\dialog;
use yii\web\View;
use kartik\base\AssetBundle;
/**
* Asset bundle that provides a polyfill for javascript native alert, confirm, and prompt boxes. The BootstrapDialog
* will be used if available or needed, else the javascript native dialogs will be rendered.
*
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @since 1.0
*/
class DialogAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $depends = [];
/**
* @inheritdoc
*/
public function init()
{
$this->jsOptions = ['position' => View::POS_HEAD];
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('js', ['js/dialog']);
parent::init();
}
}