mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 15:05:39 +00:00
commit
bbb7e0d723
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||
use SilverStripe\ORM\SS_List;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Object;
|
||||
use SilverStripe\Forms\Form;
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\SS_HTTPResponse_Exception;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Object;
|
||||
@ -10,6 +12,7 @@ use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use ReflectionClass;
|
||||
|
||||
/**
|
||||
* A component which lets the user select from a list of classes to create a new record form.
|
||||
@ -37,7 +40,7 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $itemRequestClass = 'GridFieldAddNewMultiClassHandler';
|
||||
protected $itemRequestClass = 'SilverStripe\\Forms\\GridField\\GridFieldAddNewMultiClassHandler';
|
||||
|
||||
/**
|
||||
* @param string $fragment the fragment to render the button in
|
||||
@ -176,7 +179,7 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
}
|
||||
|
||||
if(!$class || !array_key_exists($class, $classes)) {
|
||||
throw new SS_HTTPResponse_Exception(400);
|
||||
throw new HTTPResponse_Exception(400);
|
||||
}
|
||||
|
||||
$handler = Object::create($this->itemRequestClass,
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\SS_HTTPResponse_Exception;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
use SilverStripe\Core\Object;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\Form;
|
||||
@ -149,11 +151,11 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
||||
$list = $grid->getList();
|
||||
|
||||
if(!ctype_digit($id)) {
|
||||
throw new SS_HTTPResponse_Exception(null, 400);
|
||||
throw new HTTPResponse_Exception(null, 400);
|
||||
}
|
||||
|
||||
if(!$record = $list->byID($id)) {
|
||||
throw new SS_HTTPResponse_Exception(null, 404);
|
||||
throw new HTTPResponse_Exception(null, 404);
|
||||
}
|
||||
|
||||
$form = $this->getForm($grid, $record);
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\View\Requirements;
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\View\ArrayData;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
@ -178,7 +180,7 @@ class GridFieldOrderableRows extends RequestHandler implements
|
||||
$classes = ClassInfo::dataClassesFor($list->dataClass());
|
||||
|
||||
foreach($classes as $class) {
|
||||
if(singleton($class)->hasOwnTableDatabaseField($field)) {
|
||||
if(singleton($class)->hasDataBaseField($field)) {
|
||||
return $class;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\View\ArrayData;
|
||||
|
@ -19,7 +19,7 @@
|
||||
"issues": "http://github.com/silverstripe-australia/silverstripe-gridfieldextensions/issues"
|
||||
},
|
||||
"require": {
|
||||
"silverstripe/framework": "~3.1"
|
||||
"silverstripe/framework": "4.0.0-alpha3 as 3.4.1"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "gridfieldextensions",
|
||||
@ -33,5 +33,10 @@
|
||||
},
|
||||
"replace": {
|
||||
"ajshort/silverstripe-gridfieldextensions": "self.version"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"SilverStripe\\Forms\\GridField\\": "code/"}
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
@ -221,7 +221,7 @@
|
||||
var cls = this.parents(".ss-gridfield-add-new-multi-class").find("select").val();
|
||||
|
||||
if(cls && cls.length) {
|
||||
this.getGridField().showDetailView(link.replace("{class}", cls));
|
||||
this.getGridField().showDetailView(link.replace("{class}", encodeURI(cls)));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user