Skip to content

Commit

Permalink
Revert "Revert "Moved to a vendor module #103""
Browse files Browse the repository at this point in the history
This reverts commit 1925d51.
  • Loading branch information
UndefinedOffset committed Nov 1, 2017
1 parent c537c86 commit b38d7f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ before_script:
- cd ~/builds/ss

script:
- vendor/bin/phpunit sortablegridfield/tests
- vendor/bin/phpunit vendor/undefinedoffset/sortablegridfield/tests
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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": {
Expand All @@ -26,6 +27,10 @@
},
"extra": {
"installer-name": "sortablegridfield",
"expose": [
"css",
"javascript"
],
"branch-alias": {
"dev-master": "2.0.x-dev"
}
Expand Down
6 changes: 3 additions & 3 deletions src/Forms/GridFieldSortableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use SilverStripe\ORM\UnsavedRelationList;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\arrayData;
use SilverStripe\View\ArrayData;
use SilverStripe\View\Requirements;

/**
Expand Down Expand Up @@ -132,8 +132,8 @@ public function getHTMLFragments($gridField)
$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);

Expand Down

0 comments on commit b38d7f6

Please sign in to comment.