public function init()
 {
     parent::init();
     if (!isset($this->deleteButtonOptions)) {
         $this->deleteButtonOptions = ['class' => 'delete-button pull-right glyphicon glyphicon-trash', 'title' => Yii::t('yii', 'Delete'), 'aria-label' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0'];
     }
 }
Esempio n. 2
0
    public function init()
    {
        parent::init();
        if (empty($this->clientEvents)) {
            $this->clientEvents = ['update' => new JsExpression('function(event, ui){' . 'var s=$(this).sortable("toArray");' . '$.ajax({
                            data: {' . $this->key . ' : $(this).sortable("toArray").toString()},
                            type: "POST",
                            url: "' . Url::to($this->url) . '"
                        }).done(function( data ) {
            $("#' . $this->options['id'] . '").siblings(".response").html(data);
});' . '}')];
        }
    }