2017 © Pedro Peláez
 

yii2-extension yii2-sortable-widgets

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

image

knik/yii2-sortable-widgets

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

  • Tuesday, January 24, 2017
  • by knik
  • Repository
  • 0 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Yii2 Sortable widgets

Join the chat at https://gitter.im/kotchuprik/yii2-sortable-widgets, (*1)

Implementation Rubaxa/Sortable for Yii2 widgets., (*2)

Supported:, (*3)

  • GridView widget.

demo, (*4)

Latest Stable Version Total Downloads Monthly Downloads Latest Unstable Version License, (*5)

Usage

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

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

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

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

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

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

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

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

The Versions

24/01 2017

dev-fixed

dev-fixed http://github.com/ET-NiK/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

23/01 2017

dev-hotfix/sortable

dev-hotfix/sortable http://github.com/kotchuprik/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

05/07 2016

dev-master

9999999-dev http://github.com/kotchuprik/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