Adds drag and drop functionality to SilverStripe's GridField
Go to file
2012-05-09 14:31:28 -03:00
.settings Initial commit of module 2012-05-09 14:14:34 -03:00
code Removed add_sortable_classes() 2012-05-09 14:18:55 -03:00
css Initial commit of module 2012-05-09 14:14:34 -03:00
javascript Initial commit of module 2012-05-09 14:14:34 -03:00
templates/Includes Initial commit of module 2012-05-09 14:14:34 -03:00
_config.php Initial commit of module 2012-05-09 14:14:34 -03:00
.buildpath Initial commit of module 2012-05-09 14:14:34 -03:00
.project Initial commit of module 2012-05-09 14:14:34 -03:00
README.md Update README.md 2012-05-09 14:31:28 -03:00

SortableGridField

Adds drag and drop functionality to SilverStripe 3.0's GridField

Usage

mysite/_config.php

:::php GridFieldSortableObject::add_sortable_class('{ClassName}'); //For has_many relationships

GridFieldSortableObject::add_sortable_many_many_relation('{Owner ClassName}', '{Component Name}'); //For many_many relationships

Grid Field Config :::php $myGridConfig->addComponent(new GridFieldSortableRows());

Known Isuses

  • Many_many relationship is largely untested and may not work as expected
  • Documentation on GridFieldSortableObject is very poor

Credits

GridFieldSortableObject is based off of dataobject_manager's SortableDataObject class by @unclecheese