kotchuprik / Yii2 Sortable Widgets
Licence: mit
π¨ Rubaxa/Sortable for Yii2
Stars: β 54
Projects that are alternatives of or similar to Yii2 Sortable Widgets
Draggable Example
vue.draggable example
Stars: β 395 (+631.48%)
Mutual labels: drag-and-drop, sortable
React Movable
π Drag and drop for your React lists and tables. Accessible. Tiny.
Stars: β 1,064 (+1870.37%)
Mutual labels: drag-and-drop, sortable
React Native Drag Sort
π₯π₯π₯Drag and drop sort control for react-native
Stars: β 397 (+635.19%)
Mutual labels: drag-and-drop, sortable
yii2-dropzone
This extension provides the Dropzone integration for the Yii2 framework.
Stars: β 11 (-79.63%)
Mutual labels: yii2, drag-and-drop
Dragact
a dragger layout system with React style .
Stars: β 710 (+1214.81%)
Mutual labels: drag-and-drop, sortable
yii2-number
A number format mask control and input for Yii2 Framework
Stars: β 22 (-59.26%)
Mutual labels: widget, yii2
React Sortable Tree
Drag-and-drop sortable component for nested data and hierarchies
Stars: β 4,348 (+7951.85%)
Mutual labels: drag-and-drop, sortable
yii2-cookiemonster
Yii extension to manage cookie warning
Stars: β 16 (-70.37%)
Mutual labels: widget, yii2
React Beautiful Dnd
Beautiful and accessible drag and drop for lists with React
Stars: β 25,810 (+47696.3%)
Mutual labels: drag-and-drop, sortable
Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: β 23,641 (+43679.63%)
Mutual labels: drag-and-drop, sortable
yii2-multi-select-widget
Bootstrap MultiSelect and MultiSelect Listbox widgets for Yii2
Stars: β 45 (-16.67%)
Mutual labels: widget, yii2
Yii2 Fotorama Widget
Fotorama image gallery widget for yii2
Stars: β 18 (-66.67%)
Mutual labels: yii2, widget
yii2-time-down-counter
Widget for yii2, to start count down timer with a lot of options, This widget build dependence of timeDownCounter JS library
Stars: β 15 (-72.22%)
Mutual labels: widget, yii2
yii2-notification-wrapper
Yii2-notification-wrapper module renders a message from session flash (with ajax, pjax support and etc.) through Growl, Noty, Toastr and more libraries
Stars: β 78 (+44.44%)
Mutual labels: widget, yii2
yii2-google-analytics
Google Analytics Universal tracking widget.
Stars: β 14 (-74.07%)
Mutual labels: widget, yii2
Smooth Dnd
drag and drop library for javascript
Stars: β 408 (+655.56%)
Mutual labels: drag-and-drop, sortable
yii2-widget-cropbox
This widget allows crop image before upload to server and send informations about crop in JSON format.
Stars: β 90 (+66.67%)
Mutual labels: widget, yii2
yii2-highcharts-widget
HighCharts Js Widget for Yii2
Stars: β 40 (-25.93%)
Mutual labels: widget, yii2
Vue Grid Layout
A draggable and resizable grid layout, for Vue.js.
Stars: β 5,170 (+9474.07%)
Mutual labels: widget, drag-and-drop
Yii2 Fullcalendar
Widget for Yii Framework 2.0 to use FullCalendar
Stars: β 5 (-90.74%)
Mutual labels: yii2, widget
Yii2 Sortable widgets
Implementation Rubaxa/Sortable for Yii2 widgets.
Supported:
- GridView widget.
Usage
Create a new migration, change a parent to the migration class from the extension and specify the table name property:
class m140811_131705_Models_order extends \kotchuprik\sortable\migrations\Migration
{
protected $tableName = 'models';
}
Add the sortable behavior to your model and specify the query property:
public function behaviors()
{
return [
'sortable' => [
'class' => \kotchuprik\sortable\behaviors\Sortable::className(),
'query' => self::find(),
],
];
}
Add the sorting action to your controller and specify the query property:
public function actions()
{
return [
'sorting' => [
'class' => \kotchuprik\sortable\actions\Sorting::className(),
'query' => \vendor\namespace\Model::find(),
],
];
}
If you're using another primary key (not 'id'), you must specify it in 'pk' parameter:
public function actions()
{
return [
'sorting' => [
'class' => \kotchuprik\sortable\actions\Sorting::className(),
'query' => \vendor\namespace\Model::find(),
'pk' => 'modelField'
],
];
}
Add the column to your grid view and specify the sorting url like here:
echo \yii\grid\GridView::widget([
'dataProvider' => $model->search(),
'rowOptions' => function ($model, $key, $index, $grid) {
return ['data-sortable-id' => $model->id];
},
'columns' => [
[
'class' => \kotchuprik\sortable\grid\Column::className(),
],
'id',
'title',
'order',
],
'options' => [
'data' => [
'sortable-widget' => 1,
'sortable-url' => \yii\helpers\Url::toRoute(['sorting']),
]
],
]);
If cdn is not accessible in your country, you can use Sortable library from local dependencies:
...
'columns' => [
[
'class' => \kotchuprik\sortable\grid\Column::className(),
'useCdn' => false
],
...
],
...
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].