forked from kartik-v/yii2-dialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDialogAsset.php
43 lines (37 loc) · 949 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
40
41
42
43
<?php
/**
* @package yii2-dialog
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.0.1
*/
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 <[email protected]>
* @since 1.0
*/
class DialogAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $jsOptions = ['position' => View::POS_HEAD];
/**
* @inheritdoc
*/
public $depends = [];
/**
* @inheritdoc
*/
public function init()
{
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('js', ['js/dialog']);
parent::init();
}
}