Skip to content

StanSoftBG/yii2-nested-sortable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nestedSortable Yii2 jQuery plugin

nestedSortable is a jQuery plugin that extends jQuery Sortable UI functionalities to nested lists.
Forked from https://github.com/ilikenwf/nestedSortable

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist stansoftbg/yii2-nested-sortable "*"

or add

"stansoftbg/yii2-nested-sortable": "*"

to the require section of your composer.json file.

Features

  • Designed to work seamlessly with the nested set model (have a look at the toArray method)
  • Items can be sorted in their own list, moved across the tree, or nested under other items.
  • Sublists are created and deleted on the fly
  • All jQuery Sortable options, events and methods are available
  • It is possible to define elements that will not accept a new nested item/list and a maximum depth for nested items
  • The root level can be protected
  • The parentship of items can be locked, just as if it was a family tree.

Usage

Once the extension is installed, simply use it in your code by :

<?= \stansoft\sortable\AutoloadExample::widget(); ?>```