https://github.com/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.
https://github.com/toir427/yii2-sortablejs
sortable sortable-lists sortablejs yii2 yii2-extension yii2-sortablejs
Last synced: 3 months ago
JSON representation
Yii2 implementation of SortableJS extension. To create and reorder lists with drag-and-drop. For use with modern browsers and touch devices.
- Host: GitHub
- URL: https://github.com/toir427/yii2-sortablejs
- Owner: toir427
- License: apache-2.0
- Created: 2020-10-30T09:51:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-30T10:07:48.000Z (over 5 years ago)
- Last Synced: 2025-02-16T18:18:34.744Z (over 1 year ago)
- Topics: sortable, sortable-lists, sortablejs, yii2, yii2-extension, yii2-sortablejs
- Language: PHP
- Homepage: https://sortablejs.github.io/sortablejs/
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SortableJS for Yii 2.0
=========================
This is an [Yii framework 2.0](http://www.yiiframework.com) implementation of [SortableJS](https://github.com/SortableJS/sortablejs) extension. To create and reorder lists with drag-and-drop. For use with modern browsers and touch devices.
[](https://packagist.org/packages/toir427/yii2-sortable)
[](https://codeclimate.com/github/toir427/yii2-sortablejs)
[](https://packagist.org/packages/toir427/yii2-sortablejs)
[](https://packagist.org/packages/yiitoir427/yii2-sortablejs)
Installation
------------
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
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
-----
```php
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](https://sortablejs.github.io/sortablejs).
Configurations
-------
For this extension configuration see SortableJS [Options](https://github.com/SortableJS/sortablejs#options).
License
-------
**yii2-sortablejs** is released under the Apache 2.0 License. See the [LICENSE.md](LICENSE.md) for details.