Skip to content

Commit

Permalink
Update dialog asset loading sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 4, 2018
1 parent becec01 commit d81debb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Dialog.php
Expand Up @@ -188,7 +188,7 @@ class Dialog extends Widget
/**
* @var integer the registration position for the Krajee dialog JS client code.
*/
public $jsPosition = View::POS_READY;
public $jsPosition = View::POS_HEAD;

/**
* @inheritdoc
Expand Down
1 change: 1 addition & 0 deletions src/DialogAsset.php
Expand Up @@ -31,6 +31,7 @@ class DialogAsset extends AssetBundle
*/
public function init()
{
$this->jsOptions = ['position' => View::POS_HEAD];
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('js', ['js/dialog']);
parent::init();
Expand Down
1 change: 1 addition & 0 deletions src/DialogBootstrapAsset.php
Expand Up @@ -23,6 +23,7 @@ class DialogBootstrapAsset extends PluginAssetBundle
*/
public function init()
{
$this->depends = array_merge(['kartik\dialog\DialogAsset'], $this->depends);
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('js', ['js/bootstrap-dialog']);
$this->setupAssets('css', ['css/bootstrap-dialog-bs' . ($this->isBs4() ? '4' : '3')]);
Expand Down
4 changes: 2 additions & 2 deletions src/DialogYiiAsset.php
Expand Up @@ -24,10 +24,10 @@ class DialogYiiAsset extends AssetBundle
* @inheritdoc
*/
public $depends = [
'yii\web\YiiAsset',
'kartik\dialog\DialogAsset',
'yii\web\YiiAsset',
];

/**
* @inheritdoc
*/
Expand Down

0 comments on commit d81debb

Please sign in to comment.