From c6bd9e18787857b634e229a8a699b824d6ec8743 Mon Sep 17 00:00:00 2001 From: Dan Brooks Date: Mon, 13 Apr 2015 22:17:21 +0100 Subject: [PATCH] Allow installation anywhere by adding yml config --- code/forms/GridFieldSortableRows.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/forms/GridFieldSortableRows.php b/code/forms/GridFieldSortableRows.php index 579ca7f..5ac3a17 100644 --- a/code/forms/GridFieldSortableRows.php +++ b/code/forms/GridFieldSortableRows.php @@ -79,8 +79,11 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP //Inject Requirements - Requirements::css(SORTABLE_GRIDFIELD_BASE . '/css/GridFieldSortableRows.css'); - Requirements::javascript(SORTABLE_GRIDFIELD_BASE . '/javascript/GridFieldSortableRows.js'); + $custom = Config::inst()->get('GridFieldSortableRows', 'Base'); + $base = $custom ?: SORTABLE_GRIDFIELD_BASE; + + Requirements::css($base . '/css/GridFieldSortableRows.css'); + Requirements::javascript($base . '/javascript/GridFieldSortableRows.js'); $args = array('Colspan' => count($gridField->getColumns()), 'ID' => $gridField->ID(), 'DisableSelection' => $this->disable_selection);