Skip to content

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

License

Notifications You must be signed in to change notification settings

toir427/yii2-sortablejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages