claudejanz/yii2-nested

nested for jquery with action

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2016-07-15 22:27 UTC

This package is auto-updated.

Last update: 2024-11-11 19:16:35 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

nested for jquery with action

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"claudejanz/yii2-nested": "*"

to the require section of your composer.json file.

Usage

NestedSortableAction

public function actions()
{
    return [
        'save-sortable' => [
            'class' => 'claudejanz\yii2nested\NestedSortableAction',
            //'scenario'=>'editable',  //optional
            'modelclass' => Page::className(),
        ],

    ];
}

NestedSortable

echo NestedSortable::widget([
    'model' => Page::className(),
    'url' => '/pages/save-sortable',
    'expand' => true,
    'pluginOptions' => [
        'maxDepth' => 2
    ]
]);