kartik-v/yii2-sortable-input
最新稳定版本:v1.2.1
Composer 安装命令:
composer require kartik-v/yii2-sortable-input
包简介
Sortable input widget based on yii2-sortable extension.
README 文档
README
yii2-sortable-input
An input widget for Yii 2.0 widget based on the yii2-sortable extension that allows you to create sortable-input lists and grids and manipulate them using simple drag and drop. It extends the yii2-sortable features by allowing you to store the sort order in a form input (which is hidden by default). The widget stores the order as delimited list item keys. The widget includes additional jQuery enhancements to initialize the list, trap sortable order change, and reset order on form reset.
Demo
You can see detailed documentation on usage of the extension.
Installation
The preferred way to install this extension is through composer.
NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the
minimum-stabilitysettings for your application's composer.json.
Either run
$ php composer.phar require kartik-v/yii2-sortable-input "dev-master"
or add
"kartik-v/yii2-sortable-input": "dev-master"
to the require section of your composer.json file.
Usage
SortableInput
use kartik\sortinput\SortableInput; echo SortableInput::widget([ 'model' => $model, 'attribute' => 'sort_list', 'hideInput' => false, 'delimiter' => '~', 'items' => [ 1 => ['content' => 'Item # 1'], 2 => ['content' => 'Item # 2'], 3 => ['content' => 'Item # 3'], 4 => ['content' => 'Item # 4', 'disabled'=>true], ] ]);
License
yii2-sortable-input is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.
统计信息
- 总下载量: 632.19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 1
- 依赖项目数: 13
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-06-24