Revert "Revert "Moved to a vendor module #103""

This reverts commit 1925d5151e.
This commit is contained in:
UndefinedOffset 2017-11-01 09:34:29 -03:00
parent c537c86567
commit b38d7f6f04
3 changed files with 11 additions and 6 deletions

View File

@ -21,4 +21,4 @@ before_script:
- cd ~/builds/ss
script:
- vendor/bin/phpunit sortablegridfield/tests
- vendor/bin/phpunit vendor/undefinedoffset/sortablegridfield/tests

View File

@ -1,7 +1,7 @@
{
"name": "undefinedoffset/sortablegridfield",
"description": "Adds drag and drop functionality to SilverStripe 4.x's GridField",
"type": "silverstripe-module",
"type": "silverstripe-vendormodule",
"keywords": ["silverstripe", "gridfield"],
"license": "BSD-3-Clause",
"authors": [
@ -13,7 +13,8 @@
],
"require": {
"silverstripe/framework": "~4.0",
"silverstripe/versioned": "^1.0"
"silverstripe/versioned": "^1.0",
"silverstripe/vendor-plugin": "^1.0"
},
"autoload": {
"psr-4": {
@ -26,6 +27,10 @@
},
"extra": {
"installer-name": "sortablegridfield",
"expose": [
"css",
"javascript"
],
"branch-alias": {
"dev-master": "2.0.x-dev"
}

View File

@ -25,7 +25,7 @@ use SilverStripe\ORM\SS_List;
use SilverStripe\ORM\UnsavedRelationList;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\arrayData;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;
/**
@ -132,8 +132,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
$custom = Config::inst()->get(GridFieldSortableRows::class, 'Base');
$base = $custom ?: SORTABLE_GRIDFIELD_BASE;
Requirements::css($base . '/css/GridFieldSortableRows.css');
Requirements::javascript($base . '/javascript/GridFieldSortableRows.js');
Requirements::css('undefinedoffset/sortablegridfield:css/GridFieldSortableRows.css');
Requirements::javascript('undefinedoffset/sortablegridfield:javascript/GridFieldSortableRows.js');
$args = array('Colspan' => count($gridField->getColumns()), 'ID' => $gridField->ID(), 'DisableSelection' => $this->disable_selection);