toir427 / yii2-sortablejs

Yii2 implementation of SortableJS extension. To create and reorder lists with drag-and-drop. For use with modern browsers and touch devices.

Home Page:https://sortablejs.github.io/sortablejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SortableJS for Yii 2.0

This is an Yii framework 2.0 implementation of SortableJS extension. To create and reorder lists with drag-and-drop. For use with modern browsers and touch devices.

Latest Stable Version Code Climate Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require toir427/yii2-sortablejs

or add

"toir427/yii2-sortablejs": "^1.0"

to the require section of your composer.json file.

Usage

use toir427\sortablejs\Sortable;

<?= Sortable::widget([
    'items' => [
        'Item 1',
        ['content' => 'Item2'],
        [
            'content' => 'Item3',
            'options' => ['class' => 'text-danger'],
        ],
    ],
    'clientOptions' => [
        'selectedClass'     => 'selected',
        'fallbackTolerance' => 3,
        'animation'         => 150,
    ],
]); ?>

Examples

More Examples.

Configurations

For this extension configuration see SortableJS Options.

License

yii2-sortablejs is released under the Apache 2.0 License. See the LICENSE.md for details.

About

Yii2 implementation of SortableJS extension. To create and reorder lists with drag-and-drop. For use with modern browsers and touch devices.

https://sortablejs.github.io/sortablejs/

License:Apache License 2.0


Languages

Language:PHP 100.0%