This is an Yii framework 2.0 implementation of the RubaXa Sortable extension. To create reorderable drag-and-drop lists for modern browsers and touch devices.
The preferred way to install this extension is through composer.
Either run
php composer.phar require yii-ui/yii2-rubaxa-sortable
or add
"yii-ui/yii2-rubaxa-sortable": "~1.0.0"
to the require section of your composer.json
file.
use yii-ui\rubaxasortable\Sortable;
echo Sortable::widget([
'items' => [
'Item 1',
['content' => 'Item2'],
[
'content' => 'Item3',
'options' => ['class' => 'text-danger'],
],
],
'containerOptions' => ['class' => 'list-group'],
'itemOptions' => ['class' => 'list-group-item'],
'clientOptions' => ['animation' => 0],
]);
More Examples will be added soon at https://www.yii-ui.com/yii2-rubaxa-sortable/examples. For plugin configuration see RubaXa Sortable Documentation.
Documentation will be added soon at https://www.yii-ui.com/yii2-rubaxa-sortable/docs.
yii2-rubaxa-sortable is released under the BSD 3-Clause License. See the LICENSE.md for details.