diff --git a/BootboxOverrideAsset.php b/BootboxOverrideAsset.php index 79d81f6..b5480b1 100644 --- a/BootboxOverrideAsset.php +++ b/BootboxOverrideAsset.php @@ -13,8 +13,10 @@ class BootboxOverrideAsset extends BootboxAsset { - public static function register($view) + public function registerAssetFiles($view) { + parent::registerAssetFiles($view); + $view->registerJs(' yii.confirm = function(message, ok, cancel) { bootbox.confirm(message, function(result) { @@ -26,8 +28,5 @@ public static function register($view) if (Yii::$app->language !== null && strlen(Yii::$app->language) >= 2) { $view->registerJs('bootbox.setDefaults({locale: "' . substr(Yii::$app->language, 0, 2) . '"});'); } - - return parent::register($view); // TODO: Change the autogenerated stub } - }