Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

BUGFIX Make sure it's possible to rename the module's directory without ... #10

Merged
merged 1 commit into from

2 participants

@drzax

...breaking things.

@UndefinedOffset

I've added message to make sure this doesn't happen instead

@drzax

Why not allow developers to change the name of the module directory? The note doesn't really help much with 'bug' this pull request was intended to fix.

Personally, I'm happy to maintain a fork, but I'm sure I'm not the only developer who likes to have projects arranged in a particular way. For example, I like all my modules lowercase and prefixed by developer name.

@UndefinedOffset UndefinedOffset merged commit 62e171a into UndefinedOffset:master
@UndefinedOffset

Merged though I tweaked the constant you added so it could be used for file system paths, just in case ;). Doesn't cause any issues though since the Requirements class assumes relative paths are relative to the base url for the site anyways.

@UndefinedOffset

And thanks :)

@drzax

Great, thanks for reconsidering! And thanks for the module.

@drzax drzax deleted the lrc:bug-fix branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. @drzax
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 4 deletions.
  1. +1 −2  _config.php
  2. +2 −2 code/forms/GridFieldSortableRows.php
View
3  _config.php
@@ -1,3 +1,2 @@
<?php
-
-?>
+define('SORTABLE_GRIDFIELD_BASE', Director::absoluteBaseURL() . basename(dirname(__FILE__)));
View
4 code/forms/GridFieldSortableRows.php
@@ -73,8 +73,8 @@ public function getHTMLFragments($gridField) {
//Inject Requirements
- Requirements::css('SortableGridField/css/GridFieldSortableRows.css');
- Requirements::javascript('SortableGridField/javascript/GridFieldSortableRows.js');
+ Requirements::css(SORTABLE_GRIDFIELD_BASE . '/css/GridFieldSortableRows.css');
+ Requirements::javascript(SORTABLE_GRIDFIELD_BASE . '/javascript/GridFieldSortableRows.js');
$args = array('Colspan' => count($gridField->getColumns()), 'ID' => $gridField->ID());
Something went wrong with that request. Please try again.