Skip to content

Commit

Permalink
update BootboxOverrideAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
xjflyttp committed Nov 18, 2016
1 parent bc40401 commit 237f881
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions BootboxOverrideAsset.php
Expand Up @@ -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) {
Expand All @@ -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
}

}

0 comments on commit 237f881

Please sign in to comment.