mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Fixed compatibility issues with SilverStripe 3.1 (issue #19)
This commit is contained in:
parent
aded1456f5
commit
ff188ed1ec
@ -1,10 +1,10 @@
|
||||
SortableGridField
|
||||
=================
|
||||
|
||||
Adds drag and drop functionality to SilverStripe 3.0's GridField
|
||||
Adds drag and drop functionality to SilverStripe 3's GridField
|
||||
|
||||
## Requirements
|
||||
* SilverStripe 3.0.x
|
||||
* SilverStripe 3.x
|
||||
|
||||
## Installation
|
||||
* Download the module from here https://github.com/UndefinedOffset/SortableGridField/downloads
|
||||
@ -42,9 +42,5 @@ SortableGridField is not the same as SortableDataObject, since it is only a comp
|
||||
UPDATE YourTable SET SortOrder=SortOrder+1;
|
||||
```
|
||||
|
||||
## SilverStripe 3.1 Notice
|
||||
SortableGridField is not compatable or atleast not guarenteed to work on 3.1, I've been getting reports that there are issues at this time.
|
||||
|
||||
## @TODO
|
||||
* Optimize re-ordering of a has_many relationship when sorting on a single page
|
||||
* SilverStripe 3.1 compatability
|
||||
|
@ -115,7 +115,10 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
||||
*/
|
||||
protected function fixSortColumn($gridField, SS_List $dataList) {
|
||||
$list=clone $dataList;
|
||||
$list->dataQuery()->limit(array());
|
||||
$list=$list->alterDataQuery(function($query, SS_List $tmplist) {
|
||||
$query->limit(array());
|
||||
return $query
|
||||
});
|
||||
|
||||
$many_many = ($list instanceof ManyManyList);
|
||||
if (!$many_many) {
|
||||
|
Loading…
Reference in New Issue
Block a user