chuprik / yii2-sortable-widgets Goto Github PK
View Code? Open in Web Editor NEW:ice_cream: Rubaxa/Sortable for Yii2
License: MIT License
:ice_cream: Rubaxa/Sortable for Yii2
License: MIT License
I'm not sure if it's a bug or my fault, but my order isn't saved to database.
This is my code:
http://www.yiiframework.com/forum/index.php/topic/71151-sortable-gridview/
And maybe I have found what is the problem: in the console the POST request looks like
sorting[] 1 sorting[] 0 sorting[] 2
so the id is missing as key, but I don't know how to fix this? I'm using yii 2.0.8.
Hello. Thank you for maintaining your plugin. I use it on my site in a few places and very useful.
I have an issue that I can't figure out. I have a Gridview widget that contains checkboxes in each row like:
'value' => function ($model, $key, $index, $grid) { $mid = $model->_id.'_'.$model->key; $chkbox = "<input id='{$mid}' class='selections' type='checkbox' name='selections[]' value='{$mid}'>"; return $chkbox; },
The strange behavior can be reproduced by:
It's kind of strange, but I'm not sure how to approach a fix. I tried to reproduce it on other jQuery based drag-sort examples, but can't reproduce. Do you have any ideas?
Thank you!
(duplicate post, please delete)
Привет!
подскажи плиз в чем может быть проблема
Добавил все как написано, но почему то не хочет работать
В чем может быть проблема?
See my comment fc77daf#r51330570
Ка можно обновить gridView после сортировки ?
Доброго времени суток. при использовании Вашего виджета возникла проблема. Она не загружает скрипт Sortable.min.js.
Ошибки консоли
GET http://localhosti/admin/assets/8fa63dbc/Sortable.min.js net::ERR_ABORTED 404 (Not Found)
jquery.js:4055 Uncaught ReferenceError: Sortable is not defined
at HTMLTableSectionElement. (jquery.binding.js:37)
at Function.each (jquery.js:381)
at jQuery.fn.init.each (jquery.js:203)
at jQuery.fn.init.$.fn.sortableWidgets (jquery.binding.js:32)
at initSortableWidgets (sortable-widgets.js:2)
at HTMLDocument. (article:568)
at mightThrow (jquery.js:3762)
at process (jquery.js:3830)
С пагинацией криво сортирует, так и задумано, что виджет можно использовать только без пагинации?
Sorry, but I found another bug.
in behavior->beforeInsert the first value is 1 for the order column.
I had this in my grid (like 1, 2, 3, 4, 5), but after saving it was 0,1,2,3,4.
Could you reproduce this? I think it is because of this line:
$model->{$this->orderAttribute} = $order;
$order is the key, beginning with 0.
Very strange, btw: in a grid w/o sorting, the data-key value of an tr is the id of the model, like here:
In a sortable grid it is like this:
so data-sortable-id is the id of the model and data-key is the order column, I think?
hi thank you widget.
in china, cloudflare.com is can't visit. so, can you set cdnfile to widget folder?
Hello, how can I install this widget?
Hi,
i have one table having many rows which are "grouped" or "filtered" by a parent. I would love to use your extension, but I don't know how to make your extension with something like a "scope" - do you have an idea, how to manage this?
Thanks Philipp
Drop the sortable. Use https://github.com/RubaXa/Sortable
I wanted new records to be indexed by other owners (like "group_id") to always start from 0 instead of [$this->owner->{$this->orderAttribute} = $last->{$this->orderAttribute} + 1;]. I found that if I removed the public function behaviors(){...} from my MODEL and it prevented this behavior because it bypasses the beforeInsert() in the Sortable class. Just thought I'd share. Nice widget though.
So it looks like this:
id,group_id,order
can i use kartik gridview with this extension and add search model with filtering or use dyan grid view(http://demos.krajee.com/dynagrid-demo) with this widget?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.