mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Update composer constraint, branch alias, namespace and add editorconfig
This commit is contained in:
parent
59f44984b8
commit
3cacb43934
26
.editorconfig
Normal file
26
.editorconfig
Normal file
@ -0,0 +1,26 @@
|
||||
# For more information about the properties used in
|
||||
# this file, please see the EditorConfig documentation:
|
||||
# http://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[{.travis.yml,package.json}]
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
indent_size = 2
|
||||
indent_style = space
|
@ -19,12 +19,12 @@
|
||||
"issues": "http://github.com/silverstripe-australia/silverstripe-gridfieldextensions/issues"
|
||||
},
|
||||
"require": {
|
||||
"silverstripe/framework": "4.0.0-alpha3 as 3.4.1"
|
||||
"silverstripe/framework": "~4.0"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "gridfieldextensions",
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
"dev-master": "2.0.x-dev"
|
||||
},
|
||||
"screenshots": [
|
||||
"docs/en/_images/editable-rows.png",
|
||||
@ -35,7 +35,9 @@
|
||||
"ajshort/silverstripe-gridfieldextensions": "self.version"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"SilverStripe\\Forms\\GridField\\": "code/"}
|
||||
"psr-4": {
|
||||
"SilverStripe\\GridFieldExtensions\\": "src/"
|
||||
}
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"minimum-stability": "dev"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||
@ -11,9 +11,7 @@ use SilverStripe\View\ArrayData;
|
||||
* A modal search dialog which uses search context to search for and add
|
||||
* existing records to a grid field.
|
||||
*/
|
||||
class GridFieldAddExistingSearchButton implements
|
||||
GridField_HTMLProvider,
|
||||
GridField_URLHandler {
|
||||
class GridFieldAddExistingSearchButton implements GridField_HTMLProvider, GridField_URLHandler {
|
||||
|
||||
private static $allowed_actions = array(
|
||||
'handleSearch'
|
||||
@ -90,7 +88,7 @@ class GridFieldAddExistingSearchButton implements
|
||||
));
|
||||
|
||||
return array(
|
||||
$this->fragment => $data->renderWith('GridFieldAddExistingSearchButton'),
|
||||
$this->fragment => $data->renderWith('SilverStripe\\GridFieldExtensions\\GridFieldAddExistingSearchButton'),
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
@ -46,7 +46,7 @@ class GridFieldAddExistingSearchHandler extends RequestHandler {
|
||||
}
|
||||
|
||||
public function index() {
|
||||
return $this->renderWith('GridFieldAddExistingSearchHandler');
|
||||
return $this->renderWith('SilverStripe\\GridFieldExtensions\\GridFieldAddExistingSearchHandler');
|
||||
}
|
||||
|
||||
public function add($request) {
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Core\Object;
|
||||
@ -139,7 +139,7 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
)));
|
||||
}
|
||||
|
||||
return $columns->renderWith('GridFieldAddNewInlineRow');
|
||||
return $columns->renderWith('SilverStripe\\GridFieldExtensions\\GridFieldAddNewInlineRow');
|
||||
}
|
||||
|
||||
public function handleSave(GridField $grid, DataObjectInterface $record) {
|
||||
@ -152,9 +152,9 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
|
||||
$class = $grid->getModelClass();
|
||||
/** @var GridFieldEditableColumns $editable */
|
||||
$editable = $grid->getConfig()->getComponentByType('GridFieldEditableColumns');
|
||||
$editable = $grid->getConfig()->getComponentByType('SilverStripe\\GridFieldExtensions\\GridFieldEditableColumns');
|
||||
/** @var GridFieldOrderableRows $sortable */
|
||||
$sortable = $grid->getConfig()->getComponentByType('GridFieldOrderableRows');
|
||||
$sortable = $grid->getConfig()->getComponentByType('SilverStripe\\GridFieldExtensions\\GridFieldOrderableRows');
|
||||
$form = $editable->getForm($grid, $record);
|
||||
|
||||
if(!singleton($class)->canCreate()) {
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
@ -204,7 +204,7 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL
|
||||
GridFieldExtensions::include_requirements();
|
||||
|
||||
$field = new DropdownField(sprintf('%s[ClassName]', __CLASS__), '', $classes, $this->defaultClass);
|
||||
if (Config::inst()->get('GridFieldAddNewMultiClass', 'showEmptyString')) {
|
||||
if (Config::inst()->get(__CLASS__, 'showEmptyString')) {
|
||||
$field->setEmptyString(_t('GridFieldExtensions.SELECTTYPETOCREATE', '(Select type to create)'));
|
||||
}
|
||||
$field->addExtraClass('no-change-track');
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\HTTPResponse_Exception;
|
||||
@ -111,7 +111,7 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
|
||||
}
|
||||
|
||||
/** @var GridFieldOrderableRows $sortable */
|
||||
$sortable = $grid->getConfig()->getComponentByType('GridFieldOrderableRows');
|
||||
$sortable = $grid->getConfig()->getComponentByType('SilverStripe\\GridFieldExtensions\\GridFieldOrderableRows');
|
||||
|
||||
$form = $this->getForm($grid, $record);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\View\Requirements;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\View\ArrayData;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\RequestHandler;
|
||||
@ -233,7 +233,7 @@ class GridFieldOrderableRows extends RequestHandler implements
|
||||
|
||||
return ViewableData::create()->customise(array(
|
||||
'SortField' => $sortField
|
||||
))->renderWith('GridFieldOrderableRowsDragHandle');
|
||||
))->renderWith('SilverStripe\\GridFieldExtensions\\GridFieldOrderableRowsDragHandle');
|
||||
}
|
||||
|
||||
public function getColumnAttributes($grid, $record, $col) {
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Admin\LeftAndMain;
|
||||
use SilverStripe\Control\Controller;
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
namespace SilverStripe\GridFieldExtensions;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
@ -24,7 +24,7 @@ class GridFieldTitleHeader implements GridField_HTMLProvider {
|
||||
}
|
||||
|
||||
return array(
|
||||
'header' => $cols->renderWith('GridFieldTitleHeader'),
|
||||
'header' => $cols->renderWith(__CLASS__)
|
||||
);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\Dev\TestOnly;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\GridFieldExtensions\GridField;
|
||||
|
||||
/**
|
||||
* Tests for {@link GridFieldAddNewMultiClass}.
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\Dev\TestOnly;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
|
||||
use SilverStripe\GridFieldExtensions\GridField;
|
||||
use SilverStripe\GridFieldExtensions\GridFieldConfig_RelationEditor;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user