mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Added default args to GridFieldPopupForms for AssetAdmin which was casing errors
BUGFIX: Added GridFieldFilter() to new GridFieldConfig whuch adds filters and fixes the display MINOR: Added gridfield specific margins to form div to push GridField display down-page (due to GF's sort-fields which will be refactored from new designs)
This commit is contained in:
parent
dc85fa09b9
commit
0090009703
@ -1,4 +1,5 @@
|
|||||||
/** Core styles for the basic GridField form field without any specific style. @package sapphire @subpackage scss @todo Add radial gradient to default delete button state @todo Create SASS mixin-function to simply swap the from/to, to to/from colours in grsdient mixins? */
|
/** Core styles for the basic GridField form field without any specific style. @package sapphire @subpackage scss @todo Add radial gradient to default delete button state @todo Create SASS mixin-function to simply swap the from/to, to to/from colours in grsdient mixins? */
|
||||||
|
.cms fieldset.ss-gridfield > div { margin-bottom: 35px; }
|
||||||
.cms table.ss-gridfield.field { box-shadow: none; padding: 0; margin: 20px 0 0 0; border-collapse: separate; border-bottom: 0 none; }
|
.cms table.ss-gridfield.field { box-shadow: none; padding: 0; margin: 20px 0 0 0; border-collapse: separate; border-bottom: 0 none; }
|
||||||
.cms table.ss-gridfield.field thead { color: #1d2224; background: transparent; }
|
.cms table.ss-gridfield.field thead { color: #1d2224; background: transparent; }
|
||||||
.cms table.ss-gridfield.field tbody { background: #FFF; }
|
.cms table.ss-gridfield.field tbody { background: #FFF; }
|
||||||
@ -11,7 +12,7 @@
|
|||||||
.cms table.ss-gridfield.field tr:first-child { background: transparent; }
|
.cms table.ss-gridfield.field tr:first-child { background: transparent; }
|
||||||
.cms table.ss-gridfield.field tr.ss-gridfield-even { background: #f2f9fd; }
|
.cms table.ss-gridfield.field tr.ss-gridfield-even { background: #f2f9fd; }
|
||||||
.cms table.ss-gridfield.field tr.ss-gridfield-even.ss-gridfield-last { border-bottom: none; }
|
.cms table.ss-gridfield.field tr.ss-gridfield-even.ss-gridfield-last { border-bottom: none; }
|
||||||
.cms table.ss-gridfield.field tr th { font-weight: bold; font-size: 12px; color: #FFF; padding: 0; border-right: 1px solid #85959C; height: 20px; /* Makes it appear as though the text sits over the boundary of the two <tr>'s in <thead> */ }
|
.cms table.ss-gridfield.field tr th { font-weight: bold; font-size: 12px; color: #FFF; padding: 0; border-right: 1px solid #85959C; height: 20px; white-space: nowrap; /* Makes it appear as though the text sits over the boundary of the two <tr>'s in <thead> */ }
|
||||||
.cms table.ss-gridfield.field tr th span { display: block; position: relative; left: 20px; top: -7px; width: 100%; }
|
.cms table.ss-gridfield.field tr th span { display: block; position: relative; left: 20px; top: -7px; width: 100%; }
|
||||||
.cms table.ss-gridfield.field tr th div.fieldgroup, .cms table.ss-gridfield.field tr th div.fieldgroup-field { width: auto; }
|
.cms table.ss-gridfield.field tr th div.fieldgroup, .cms table.ss-gridfield.field tr th div.fieldgroup-field { width: auto; }
|
||||||
.cms table.ss-gridfield.field tr th div.fieldgroup { min-width: 200px; }
|
.cms table.ss-gridfield.field tr th div.fieldgroup { min-width: 200px; }
|
||||||
@ -23,7 +24,7 @@
|
|||||||
.cms table.ss-gridfield.field tr th.first { -moz-border-radius-topleft: 7px; -webkit-border-top-left-radius: 7px; -o-border-top-left-radius: 7px; -ms-border-top-left-radius: 7px; -khtml-border-top-left-radius: 7px; border-top-left-radius: 7px; }
|
.cms table.ss-gridfield.field tr th.first { -moz-border-radius-topleft: 7px; -webkit-border-top-left-radius: 7px; -o-border-top-left-radius: 7px; -ms-border-top-left-radius: 7px; -khtml-border-top-left-radius: 7px; border-top-left-radius: 7px; }
|
||||||
.cms table.ss-gridfield.field tr th.last { -moz-border-radius-topright: 7px; -webkit-border-top-right-radius: 7px; -o-border-top-right-radius: 7px; -ms-border-top-right-radius: 7px; -khtml-border-top-right-radius: 7px; border-top-right-radius: 7px; }
|
.cms table.ss-gridfield.field tr th.last { -moz-border-radius-topright: 7px; -webkit-border-top-right-radius: 7px; -o-border-top-right-radius: 7px; -ms-border-top-right-radius: 7px; -khtml-border-top-right-radius: 7px; border-top-right-radius: 7px; }
|
||||||
.cms table.ss-gridfield.field tr th button, .cms table.ss-gridfield.field tr th button:hover { font-size: 12px; margin-left: -0.9em; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
.cms table.ss-gridfield.field tr th button, .cms table.ss-gridfield.field tr th button:hover { font-size: 12px; margin-left: -0.9em; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
||||||
.cms table.ss-gridfield.field tr th button.ss-gridfield-sort, .cms table.ss-gridfield.field tr th button:hover.ss-gridfield-sort { text-align: left; padding: 0; color: #FFF; width: 95%; background: transparent; border: 0 none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; text-shadow: none; }
|
.cms table.ss-gridfield.field tr th button.ss-gridfield-sort, .cms table.ss-gridfield.field tr th button:hover.ss-gridfield-sort { text-align: left; padding: 0; color: #FFF; min-width: 100px; background: transparent; border: 0 none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; text-shadow: none; }
|
||||||
.cms table.ss-gridfield.field tr th button:hover { color: #CCC !important; /* Not sure why IE think it needs this */ }
|
.cms table.ss-gridfield.field tr th button:hover { color: #CCC !important; /* Not sure why IE think it needs this */ }
|
||||||
.cms table.ss-gridfield.field tr th.extra button.ss-ui-button { padding: .3em; line-height: 1; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; position: relative; top: -24px; border: #b1c0c5 solid 10px; border-bottom-width: 0; }
|
.cms table.ss-gridfield.field tr th.extra button.ss-ui-button { padding: .3em; line-height: 1; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; position: relative; top: -24px; border: #b1c0c5 solid 10px; border-bottom-width: 0; }
|
||||||
.cms table.ss-gridfield.field tr th input.ss-gridfield-sort { position: relative; top: -24px; padding: 2px; width: 65%; margin: 0 auto; border: #b1c0c5 solid 10px; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
.cms table.ss-gridfield.field tr th input.ss-gridfield-sort { position: relative; top: -24px; padding: 2px; width: 65%; margin: 0 auto; border: #b1c0c5 solid 10px; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
||||||
|
@ -405,7 +405,7 @@ class Folder extends File {
|
|||||||
$config->addComponent(new GridFieldPaginator(10));
|
$config->addComponent(new GridFieldPaginator(10));
|
||||||
$config->addComponent(new GridFieldAction_Delete());
|
$config->addComponent(new GridFieldAction_Delete());
|
||||||
$config->addComponent(new GridFieldAction_Edit());
|
$config->addComponent(new GridFieldAction_Edit());
|
||||||
$config->addComponent($gridFieldForm = new GridFieldPopupForms());
|
$config->addComponent($gridFieldForm = new GridFieldPopupForms(Controller::curr(), 'EditForm'));
|
||||||
$gridFieldForm->setTemplate('CMSGridFieldPopupForms');
|
$gridFieldForm->setTemplate('CMSGridFieldPopupForms');
|
||||||
$files = DataList::create('File')->filter('ParentID', $this->ID)->exclude('ClassName', 'Folder');
|
$files = DataList::create('File')->filter('ParentID', $this->ID)->exclude('ClassName', 'Folder');
|
||||||
$gridField = new GridField('File','Files', $files, $config);
|
$gridField = new GridField('File','Files', $files, $config);
|
||||||
|
@ -98,6 +98,7 @@ class GridFieldConfig_ManyManyEditor extends GridFieldConfig {
|
|||||||
* @param int $itemsPerPage - How many items per page should show up
|
* @param int $itemsPerPage - How many items per page should show up
|
||||||
*/
|
*/
|
||||||
public function __construct($fieldToSearch, $autoSuggest=true, $itemsPerPage=25) {
|
public function __construct($fieldToSearch, $autoSuggest=true, $itemsPerPage=25) {
|
||||||
|
$this->addComponent(new GridFieldFilter());
|
||||||
$this->addComponent(new GridFieldRelationAdd($fieldToSearch, $autoSuggest));
|
$this->addComponent(new GridFieldRelationAdd($fieldToSearch, $autoSuggest));
|
||||||
$this->addComponent(new GridFieldSortableHeader());
|
$this->addComponent(new GridFieldSortableHeader());
|
||||||
$this->addComponent(new GridFieldDefaultColumns());
|
$this->addComponent(new GridFieldDefaultColumns());
|
||||||
|
@ -45,6 +45,9 @@ $gf_border_radius: 7px;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cms {
|
.cms {
|
||||||
|
fieldset.ss-gridfield>div {
|
||||||
|
margin-bottom: 35px;
|
||||||
|
}
|
||||||
table.ss-gridfield.field {
|
table.ss-gridfield.field {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -108,6 +111,7 @@ $gf_border_radius: 7px;
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
border-right: 1px solid #85959C;
|
border-right: 1px solid #85959C;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
/* Makes it appear as though the text sits over the boundary of the two <tr>'s in <thead> */
|
/* Makes it appear as though the text sits over the boundary of the two <tr>'s in <thead> */
|
||||||
span {
|
span {
|
||||||
@ -164,7 +168,7 @@ $gf_border_radius: 7px;
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
width: 95%;
|
min-width: 100px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
@include box-shadow-none;
|
@include box-shadow-none;
|
||||||
|
@ -62,7 +62,7 @@ class Group extends DataObject {
|
|||||||
public function getCMSFields() {
|
public function getCMSFields() {
|
||||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/PermissionCheckboxSetField.js');
|
Requirements::javascript(SAPPHIRE_DIR . '/javascript/PermissionCheckboxSetField.js');
|
||||||
|
|
||||||
$config = new GridFieldConfig_ManyManyEditor('FirstName', true, 20);
|
$config = new GridFieldConfig_ManyManyEditor('FirstName', false, 20);
|
||||||
$config->addComponent(new GridFieldPopupForms(Controller::curr(), 'EditForm'));
|
$config->addComponent(new GridFieldPopupForms(Controller::curr(), 'EditForm'));
|
||||||
$memberList = new GridField('Members','Members', $this->Members(), $config);
|
$memberList = new GridField('Members','Members', $this->Members(), $config);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user