2017 © Pedro Peláez
 

yii2-extension yii2-sortable-widgets

Implementation Rubaxa/Sortable for Yii2. Sortable grid view inside.

image

beatep/yii2-sortable-widgets

Implementation Rubaxa/Sortable for Yii2. Sortable grid view inside.

  • Wednesday, June 15, 2016
  • by beatep
  • Repository
  • 1 Watchers
  • 1 Stars
  • 54 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Yii2 Sortable widgets

Implementation Rubaxa/Sortable for Yii2 widgets. Position starts with 1., (*1)

Supported:, (*2)

  • GridView widget.

demo, (*3)

Usage

Create a new migration, change a parent to the migration class from the extension and specify the table name property:, (*4)

class m140811_131705_Models_order extends \beatep\sortable\migrations\Migration
{
    protected $tableName = 'models';
}

Add the sortable behavior to your model and specify the query property:, (*5)

public function behaviors()
{
    return [
        'sortable' => [
            'class' => \beatep\sortable\behaviors\Sortable::className(),
            'query' => self::find(),
        ],
    ];
}

Add the sorting action to your controller and specify the query property:, (*6)

public function actions()
{
    return [
        'sorting' => [
            'class' => \beatep\sortable\actions\Sorting::className(),
            'query' => \vendor\namespace\Model::find(),
        ],
    ];
}

Add the column to your grid view and specify the sorting url like here:, (*7)

echo \yii\grid\GridView::widget([
    'dataProvider' => $model->search(),
    'rowOptions' => function ($model, $key, $index, $grid) {
        return ['data-sortable-id' => $model->id];
    },
    'columns' => [
        [
            'class' => \beatep\sortable\grid\Column::className(),
        ],
        'id',
        'title',
        'order',
    ],
    'options' => [
        'data' => [
            'sortable-widget' => 1,
            'sortable-url' => \yii\helpers\Url::toRoute(['sorting']),
        ]
    ],
]);

The Versions

15/06 2016

dev-master

9999999-dev http://github.com/beatep/yii2-sortable-widgets

Implementation Rubaxa/Sortable for Yii2. Sortable grid view inside.

  Sources   Download

MIT

The Requires

 

yii2 grid sortable dnd jqueryui gridview sorting rubaxa

15/06 2016

v2.0.3

2.0.3.0 http://github.com/beatep/yii2-sortable-widgets

Implementation Rubaxa/Sortable for Yii2. Sortable grid view inside.

  Sources   Download

MIT

The Requires

 

yii2 grid sortable dnd jqueryui gridview sorting rubaxa

10/06 2016

v2.0.2

2.0.2.0 http://github.com/kotchuprik/yii2-sortable-widgets

Implementation the jQuery UI Sortable for the Yii2 widgets. Sortable grid view.

  Sources   Download

MIT

The Requires

 

by Constantin Chuprik

yii2 grid sortable dnd jqueryui gridview sorting

28/08 2015

v2.0.1

2.0.1.0 http://github.com/kotchuprik/yii2-sortable-widgets

Implementation the jQuery UI Sortable for the Yii2 widgets. Sortable grid view.

  Sources   Download

MIT

The Requires

 

by Constantin Chuprik

yii2 grid sortable dnd jqueryui gridview sorting

10/08 2015

v2.0.0

2.0.0.0 http://github.com/kotchuprik/yii2-sortable-widgets

Implementation the jQuery UI Sortable for the Yii2 widgets. Sortable grid view.

  Sources   Download

MIT

The Requires

 

by Constantin Chuprik

yii2 grid sortable dnd jqueryui gridview sorting

21/03 2015

1.0.1

1.0.1.0 http://github.com/kotchuprik/yii2-sortable-widgets

Implementation the jQuery UI Sortable for the Yii2 widgets. Sortable grid view.

  Sources   Download

MIT

The Requires

 

by Constantin Chuprik

yii2 grid sortable dnd jqueryui gridview sorting

14/10 2014

1.0

1.0.0.0 http://github.com/kotchuprik/yii2-sortable-widgets

Implementation the jQuery UI Sortable for the Yii2 widgets. Sortable grid view.

  Sources   Download

MIT

The Requires

 

by Constantin Chuprik

yii2 grid sortable dnd jqueryui gridview sorting