mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
Merge pull request #452 from adrexia/sapphire
--- * Added a separate component to grid field to hold buttons. * Updated templates for changes * Updated comments Conflicts: css/AssetUploadField.css css/GridField.css
This commit is contained in:
commit
fa445ad13f
@ -68,7 +68,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
if($record && !$record->canView()) return Security::permissionFailure($this);
|
if($record && !$record->canView()) return Security::permissionFailure($this);
|
||||||
|
|
||||||
$memberList = GridField::create(
|
$memberList = GridField::create(
|
||||||
'Members',
|
'Member',
|
||||||
false,
|
false,
|
||||||
DataList::create('Member'),
|
DataList::create('Member'),
|
||||||
$memberListConfig = GridFieldConfig_RecordEditor::create()
|
$memberListConfig = GridFieldConfig_RecordEditor::create()
|
||||||
@ -77,7 +77,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
$memberListConfig->getComponentByType('GridFieldDetailForm')->setValidator(new Member_Validator());
|
$memberListConfig->getComponentByType('GridFieldDetailForm')->setValidator(new Member_Validator());
|
||||||
|
|
||||||
$groupList = GridField::create(
|
$groupList = GridField::create(
|
||||||
'Groups',
|
'Group',
|
||||||
false,
|
false,
|
||||||
DataList::create('Group'),
|
DataList::create('Group'),
|
||||||
GridFieldConfig_RecordEditor::create()
|
GridFieldConfig_RecordEditor::create()
|
||||||
@ -129,7 +129,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
|
|
||||||
// Add roles editing interface
|
// Add roles editing interface
|
||||||
if(Permission::check('APPLY_ROLES')) {
|
if(Permission::check('APPLY_ROLES')) {
|
||||||
$rolesField = GridField::create('Roles',
|
$rolesField = GridField::create('Role',
|
||||||
false,
|
false,
|
||||||
DataList::create('PermissionRole'),
|
DataList::create('PermissionRole'),
|
||||||
GridFieldConfig_RecordEditor::create()
|
GridFieldConfig_RecordEditor::create()
|
||||||
|
@ -364,7 +364,7 @@ body.cms { overflow: hidden; }
|
|||||||
.cms-content-tools { background-color: #F1F4F5; background: #f0f3f4 url(../images/textures/bg_cms_main_content.png) repeat top left; width: 192px; border-right: 1px solid #bfcad2; overflow-y: auto; overflow-x: hidden; z-index: 70; -webkit-box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; -moz-box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; float: left; position: relative; }
|
.cms-content-tools { background-color: #F1F4F5; background: #f0f3f4 url(../images/textures/bg_cms_main_content.png) repeat top left; width: 192px; border-right: 1px solid #bfcad2; overflow-y: auto; overflow-x: hidden; z-index: 70; -webkit-box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; -moz-box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; box-shadow: rgba(0, 0, 0, 0.6) 0 2px 3px; float: left; position: relative; }
|
||||||
.cms-content-tools.filter { padding: 0 !important; }
|
.cms-content-tools.filter { padding: 0 !important; }
|
||||||
.cms-content-tools .cms-panel-header { clear: both; margin: 0 0 7px; line-height: 24px; border-bottom: 1px solid rgba(201, 205, 206, 0.8); -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); -o-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }
|
.cms-content-tools .cms-panel-header { clear: both; margin: 0 0 7px; line-height: 24px; border-bottom: 1px solid rgba(201, 205, 206, 0.8); -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); -o-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }
|
||||||
.cms-content-tools .cms-panel-content { width: 176px; padding: 0 8px; overflow: auto; overflow-x: hidden; height: 100%; }
|
.cms-content-tools .cms-panel-content { width: 176px; padding: 0 8px; overflow: auto; height: 100%; }
|
||||||
.cms-content-tools .cms-panel-content .dropdown select { width: 160px; }
|
.cms-content-tools .cms-panel-content .dropdown select { width: 160px; }
|
||||||
.cms-content-tools .cms-panel-content #LastEditedFrom { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
.cms-content-tools .cms-panel-content #LastEditedFrom { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
||||||
.cms-content-tools .cms-panel-content #LastEditedFrom input { width: 160px; }
|
.cms-content-tools .cms-panel-content #LastEditedFrom input { width: 160px; }
|
||||||
|
@ -4,14 +4,7 @@
|
|||||||
/** ----------------------------------------------- Typography. ------------------------------------------------ */
|
/** ----------------------------------------------- Typography. ------------------------------------------------ */
|
||||||
/** ----------------------------------------------- Grid Units (px) We have a vertical rhythm that the grid is based off both x (=horizontal) and y (=vertical). All internal padding and margins are scaled to this and accounting for paragraphs ------------------------------------------------ */
|
/** ----------------------------------------------- Grid Units (px) We have a vertical rhythm that the grid is based off both x (=horizontal) and y (=vertical). All internal padding and margins are scaled to this and accounting for paragraphs ------------------------------------------------ */
|
||||||
/** ----------------------------------------------- Application Logo (CMS Logo) Must be 24px x 24px ------------------------------------------------ */
|
/** ----------------------------------------------- Application Logo (CMS Logo) Must be 24px x 24px ------------------------------------------------ */
|
||||||
/** This file contains mixins relating to specific functionality Mixins should be stored here rather than individual files */
|
#AssetUploadField { border-bottom: 0; -moz-box-shadow: none; -webkit-box-shadow: none; -o-box-shadow: none; box-shadow: none; }
|
||||||
/*Mixin generates the generic button styling for the gridfield*/
|
|
||||||
/**
|
|
||||||
Mixin creates a transparent button with a dropdown arrow,
|
|
||||||
as is used for files in the files up-load area. The arrows
|
|
||||||
themselves are added in the _style file
|
|
||||||
**/
|
|
||||||
#AssetUploadField { border-bottom: 0; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
|
|
||||||
|
|
||||||
body.cms.ss-uploadfield-edit-iframe { padding: 16px; overflow: auto; }
|
body.cms.ss-uploadfield-edit-iframe { padding: 16px; overflow: auto; }
|
||||||
body.cms.ss-uploadfield-edit-iframe span.readonly { font-style: italic; color: #777777; text-shadow: 0px 1px 0px #fff; }
|
body.cms.ss-uploadfield-edit-iframe span.readonly { font-style: italic; color: #777777; text-shadow: 0px 1px 0px #fff; }
|
||||||
|
@ -5,38 +5,32 @@
|
|||||||
/** ----------------------------------------------- Typography. ------------------------------------------------ */
|
/** ----------------------------------------------- Typography. ------------------------------------------------ */
|
||||||
/** ----------------------------------------------- Grid Units (px) We have a vertical rhythm that the grid is based off both x (=horizontal) and y (=vertical). All internal padding and margins are scaled to this and accounting for paragraphs ------------------------------------------------ */
|
/** ----------------------------------------------- Grid Units (px) We have a vertical rhythm that the grid is based off both x (=horizontal) and y (=vertical). All internal padding and margins are scaled to this and accounting for paragraphs ------------------------------------------------ */
|
||||||
/** ----------------------------------------------- Application Logo (CMS Logo) Must be 24px x 24px ------------------------------------------------ */
|
/** ----------------------------------------------- Application Logo (CMS Logo) Must be 24px x 24px ------------------------------------------------ */
|
||||||
/** This file contains the default theme definitions for the admin interface. Please put mostly SCSS variable definitions in here, and leave the actual styling to _style.scss and auxilliary files. */
|
|
||||||
/** ----------------------------------------------- Colours ------------------------------------------------ */
|
|
||||||
/** ----------------------------------------------- Textures ----------------------------------------------- */
|
|
||||||
/** ----------------------------------------------- Typography. ------------------------------------------------ */
|
|
||||||
/** ----------------------------------------------- Grid Units (px) We have a vertical rhythm that the grid is based off both x (=horizontal) and y (=vertical). All internal padding and margins are scaled to this and accounting for paragraphs ------------------------------------------------ */
|
|
||||||
/** ----------------------------------------------- Application Logo (CMS Logo) Must be 24px x 24px ------------------------------------------------ */
|
|
||||||
/** This file contains mixins relating to specific functionality Mixins should be stored here rather than individual files */
|
|
||||||
/*Mixin generates the generic button styling for the gridfield*/
|
|
||||||
/**
|
|
||||||
Mixin creates a transparent button with a dropdown arrow,
|
|
||||||
as is used for files in the files up-load area. The arrows
|
|
||||||
themselves are added in the _style file
|
|
||||||
**/
|
|
||||||
.cms .ss-gridfield > div { margin-bottom: 36px; }
|
.cms .ss-gridfield > div { margin-bottom: 36px; }
|
||||||
|
.cms .ss-gridfield > div.addNewGridFieldButton { margin-bottom: 12px; }
|
||||||
|
.cms .ss-gridfield > div.addNewGridFieldButton:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||||
|
*:first-child .cms .ss-gridfield > div.addNewGridFieldButton { zoom: 1; }
|
||||||
.cms .ss-gridfield[data-selectable] tr.ui-selected, .cms .ss-gridfield[data-selectable] tr.ui-selecting { background: #FFFAD6 !important; }
|
.cms .ss-gridfield[data-selectable] tr.ui-selected, .cms .ss-gridfield[data-selectable] tr.ui-selecting { background: #FFFAD6 !important; }
|
||||||
.cms .ss-gridfield[data-selectable] td { cursor: pointer; }
|
.cms .ss-gridfield[data-selectable] td { cursor: pointer; }
|
||||||
.cms .ss-gridfield span button#action_gridfield_relationfind { display: none; }
|
.cms .ss-gridfield span button#action_gridfield_relationfind { display: none; }
|
||||||
.cms .ss-gridfield p button#action_export { margin-top: 12px; }
|
.cms .ss-gridfield p button#action_export { margin-top: 12px; }
|
||||||
.cms .ss-gridfield p button#action_export span.btn-icon-download-csv { height: 17px; }
|
.cms .ss-gridfield p button#action_export span.btn-icon-download-csv { height: 17px; }
|
||||||
.cms .ss-gridfield p button#action_export span.ui-button-text { padding-left: 26px; }
|
.cms .ss-gridfield p button#action_export span.ui-button-text { padding-left: 26px; }
|
||||||
|
.cms .ss-gridfield .right { float: right; }
|
||||||
|
.cms .ss-gridfield .right > * { float: right; margin-left: 5px; font-size: 14.4px; }
|
||||||
|
.cms .ss-gridfield .left { float: left; }
|
||||||
|
.cms .ss-gridfield .left > * { margin-right: 5px; float: left; font-size: 14.4px; }
|
||||||
.cms .ss-gridfield .grid-levelup { text-indent: -9999em; margin-bottom: 6px; }
|
.cms .ss-gridfield .grid-levelup { text-indent: -9999em; margin-bottom: 6px; }
|
||||||
.cms .ss-gridfield .grid-levelup a.list-parent-link { background: transparent url(../images/gridfield-level-up.png) no-repeat 0 0; display: block; }
|
.cms .ss-gridfield .grid-levelup a.list-parent-link { background: transparent url(../images/gridfield-level-up.png) no-repeat 0 0; display: block; }
|
||||||
.cms .ss-gridfield .add-existing-autocompleter { width: 500px; }
|
.cms .ss-gridfield .add-existing-autocompleter { width: 500px; }
|
||||||
.cms .ss-gridfield .add-existing-autocompleter input.relation-search { width: 380px; }
|
.cms .ss-gridfield .add-existing-autocompleter input.relation-search { width: 380px; }
|
||||||
.cms .ss-gridfield .grid-print-button { display: inline-block; }
|
.cms .ss-gridfield .grid-print-button { display: inline-block; }
|
||||||
.cms .ss-gridfield .grid-csv-button { display: inline-block; }
|
.cms .ss-gridfield .grid-csv-button { display: inline-block; }
|
||||||
.cms table.ss-gridfield-table { display: table; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; padding: 0; border-collapse: separate; border-bottom: 0 none; width: 100%; }
|
.cms table.ss-gridfield-table { display: table; box-shadow: none; padding: 0; border-collapse: separate; border-bottom: 0 none; width: 100%; margin-bottom: 12px; }
|
||||||
.cms table.ss-gridfield-table thead { color: #323e46; background: transparent; }
|
.cms table.ss-gridfield-table thead { color: #1e2527; background: transparent; }
|
||||||
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup { max-width: 512px; }
|
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup { max-width: 512px; }
|
||||||
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup .fieldgroup-field { padding: 0; }
|
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup .fieldgroup-field { padding: 0; }
|
||||||
.cms table.ss-gridfield-table thead tr:first-child th:first-child { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -ms-border-top-left-radius: 5px; -o-border-top-left-radius: 5px; border-top-left-radius: 5px; }
|
.cms table.ss-gridfield-table thead tr:first-child th:first-child { -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-table thead tr:first-child th:last-child { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -ms-border-top-right-radius: 5px; -o-border-top-right-radius: 5px; border-top-right-radius: 5px; }
|
.cms table.ss-gridfield-table thead tr:first-child th:last-child { -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-table tbody { background: #FFF; }
|
.cms table.ss-gridfield-table tbody { background: #FFF; }
|
||||||
.cms table.ss-gridfield-table tbody tr { cursor: pointer; }
|
.cms table.ss-gridfield-table tbody tr { cursor: pointer; }
|
||||||
.cms table.ss-gridfield-table tbody td { width: auto; white-space: nowrap; }
|
.cms table.ss-gridfield-table tbody td { width: auto; white-space: nowrap; }
|
||||||
@ -45,7 +39,7 @@
|
|||||||
.cms table.ss-gridfield-table tbody td.col-listChildrenLink { width: 16px; border-right: none; text-indent: -9999em; padding: 0; }
|
.cms table.ss-gridfield-table tbody td.col-listChildrenLink { width: 16px; border-right: none; text-indent: -9999em; padding: 0; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-listChildrenLink .list-children-link { background: transparent url(../images/sitetree_ss_default_icons.png) no-repeat 12px -4px; display: block; }
|
.cms table.ss-gridfield-table tbody td.col-listChildrenLink .list-children-link { background: transparent url(../images/sitetree_ss_default_icons.png) no-repeat 12px -4px; display: block; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.item { color: #1556b2; }
|
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.item { color: #1556b2; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge { clear: both; text-transform: uppercase; display: inline-block; padding: 0px 3px; font-size: 0.75em; line-height: 1em; margin-left: 10px; margin-right: 6px; margin-top: -1px; -webkit-border-radius: 2px 2px; -moz-border-radius: 2px / 2px; -ms-border-radius: 2px / 2px; -o-border-radius: 2px / 2px; border-radius: 2px / 2px; }
|
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge { clear: both; text-transform: uppercase; display: inline-block; padding: 0px 3px; font-size: 0.75em; line-height: 1em; margin-left: 10px; margin-right: 6px; margin-top: -1px; -webkit-border-radius: 2px 2px; -moz-border-radius: 2px / 2px; -o-border-radius: 2px / 2px; -ms-border-radius: 2px / 2px; -khtml-border-radius: 2px / 2px; border-radius: 2px / 2px; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.modified { color: #7E7470; border: 1px solid #C9B800; background-color: #FFF0BC; }
|
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.modified { color: #7E7470; border: 1px solid #C9B800; background-color: #FFF0BC; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.addedtodraft { color: #7E7470; border: 1px solid #C9B800; background-color: #FFF0BC; }
|
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.addedtodraft { color: #7E7470; border: 1px solid #C9B800; background-color: #FFF0BC; }
|
||||||
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.deletedonlive { color: #636363; border: 1px solid #E49393; background-color: #F2DADB; }
|
.cms table.ss-gridfield-table tbody td.col-getTreeTitle span.badge.deletedonlive { color: #636363; border: 1px solid #E49393; background-color: #F2DADB; }
|
||||||
@ -58,16 +52,13 @@
|
|||||||
.cms table.ss-gridfield-table tbody td button.gridfield-button-delete span.btn-icon-decline { left: 2px; }
|
.cms table.ss-gridfield-table tbody td button.gridfield-button-delete span.btn-icon-decline { left: 2px; }
|
||||||
.cms table.ss-gridfield-table tbody td a.view-link, .cms table.ss-gridfield-table tbody td a.edit-link { display: inline-block; width: 20px; height: 20px; text-indent: 9999em; overflow: hidden; vertical-align: middle; }
|
.cms table.ss-gridfield-table tbody td a.view-link, .cms table.ss-gridfield-table tbody td a.edit-link { display: inline-block; width: 20px; height: 20px; text-indent: 9999em; overflow: hidden; vertical-align: middle; }
|
||||||
.cms table.ss-gridfield-table tbody td a.view-link { background: url(../admin/images/btn-icon/magnifier.png) no-repeat 0 1px; }
|
.cms table.ss-gridfield-table tbody td a.view-link { background: url(../admin/images/btn-icon/magnifier.png) no-repeat 0 1px; }
|
||||||
.cms table.ss-gridfield-table tbody td a.edit-link { background: url(../admin/images/btn-icon/document--pencil.png) no-repeat 2px 0px; }
|
.cms table.ss-gridfield-table tbody td a.edit-link { background: url(../admin/images/btn-icon/document--pencil.png) no-repeat 0 1px; }
|
||||||
.cms table.ss-gridfield-table tfoot { color: #323e46; }
|
.cms table.ss-gridfield-table tfoot { color: #1e2527; }
|
||||||
.cms table.ss-gridfield-table tfoot tr td { background: #b0bec7; padding: .7em; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
|
.cms table.ss-gridfield-table tfoot tr td { background: #97a8ad; padding: .7em; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
|
||||||
.cms table.ss-gridfield-table tr.title th { position: relative; background: #98aab6; border-bottom: 1px solid #899eab; padding: 5px; min-height: 40px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzk4YWFiNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #98aab6)); background-image: -webkit-linear-gradient(#b0bec7, #98aab6); background-image: -moz-linear-gradient(#b0bec7, #98aab6); background-image: -o-linear-gradient(#b0bec7, #98aab6); background-image: -ms-linear-gradient(#b0bec7, #98aab6); background-image: linear-gradient(#b0bec7, #98aab6); text-shadow: rgba(0, 0, 0, 0.4) 0px -1px 0; }
|
.cms table.ss-gridfield-table tr.title th { position: relative; background: #899ca2; border-top: 1px solid rgba(0, 0, 0, 0.1); padding: 5px; min-height: 40px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IzYzBjNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzg5OWNhMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b3c0c4), color-stop(100%, #899ca2)); background-image: -webkit-linear-gradient(#b3c0c4, #899ca2); background-image: -moz-linear-gradient(#b3c0c4, #899ca2); background-image: -o-linear-gradient(#b3c0c4, #899ca2); background-image: -ms-linear-gradient(#b3c0c4, #899ca2); background-image: linear-gradient(#b3c0c4, #899ca2); text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0; }
|
||||||
.cms table.ss-gridfield-table tr.title th h2 { padding: 0px; font-size: 16.8px; color: #fff; margin: 1px 8px 0; display: inline-block; }
|
.cms table.ss-gridfield-table tr.title th h2 { padding: 0px; font-size: 16.8px; color: #fff; margin: 3px 8px 0; display: inline-block; float: left; }
|
||||||
.cms table.ss-gridfield-table tr.title th .right > * { float: right; font-size: 14.4px; }
|
.cms table.ss-gridfield-table tr.sortable-header { background: #bfcdd2; }
|
||||||
.cms table.ss-gridfield-table tr.title th .left > * { float: left; font-size: 14.4px; }
|
.cms table.ss-gridfield-table tr.sortable-header th { padding: 0px; }
|
||||||
.cms table.ss-gridfield-table tr.sortable-header { background: #dbe3e8; }
|
|
||||||
.cms table.ss-gridfield-table tr.sortable-header th { padding: 0; font-weight: normal; }
|
|
||||||
.cms table.ss-gridfield-table tr.sortable-header th .ss-ui-button { font-weight: normal; }
|
|
||||||
.cms table.ss-gridfield-table tr:hover { background: #FFFAD6 !important; }
|
.cms table.ss-gridfield-table tr:hover { background: #FFFAD6 !important; }
|
||||||
.cms table.ss-gridfield-table tr:first-child { background: transparent; }
|
.cms table.ss-gridfield-table tr:first-child { background: transparent; }
|
||||||
.cms table.ss-gridfield-table tr.ss-gridfield-even { background: #f0f4f7; }
|
.cms table.ss-gridfield-table tr.ss-gridfield-even { background: #f0f4f7; }
|
||||||
@ -84,14 +75,14 @@
|
|||||||
.cms table.ss-gridfield-table tr th.extra, .cms table.ss-gridfield-table tr th.action { padding: 0; cursor: default; }
|
.cms table.ss-gridfield-table tr th.extra, .cms table.ss-gridfield-table tr th.action { padding: 0; cursor: default; }
|
||||||
.cms table.ss-gridfield-table tr th.extra { position: relative; background: #637276; background: rgba(0, 0, 0, 0.7); padding: 5px; border-top: rgba(0, 0, 0, 0.2); }
|
.cms table.ss-gridfield-table tr th.extra { position: relative; background: #637276; background: rgba(0, 0, 0, 0.7); padding: 5px; border-top: rgba(0, 0, 0, 0.2); }
|
||||||
.cms table.ss-gridfield-table tr th.extra input { height: 28px; }
|
.cms table.ss-gridfield-table tr th.extra input { height: 28px; }
|
||||||
.cms table.ss-gridfield-table 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; border-bottom-width: 0; -webkit-border-radius: 2px 2px; -moz-border-radius: 2px / 2px; -ms-border-radius: 2px / 2px; -o-border-radius: 2px / 2px; border-radius: 2px / 2px; }
|
.cms table.ss-gridfield-table 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; border-bottom-width: 0; -webkit-border-radius: 2px 2px; -moz-border-radius: 2px / 2px; -o-border-radius: 2px / 2px; -ms-border-radius: 2px / 2px; -khtml-border-radius: 2px / 2px; border-radius: 2px / 2px; }
|
||||||
.cms table.ss-gridfield-table tr th.first { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; -ms-border-top-left-radius: 5px; -o-border-top-left-radius: 5px; border-top-left-radius: 5px; }
|
.cms table.ss-gridfield-table 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-table tr th.last { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -ms-border-top-right-radius: 5px; -o-border-top-right-radius: 5px; border-top-right-radius: 5px; }
|
.cms table.ss-gridfield-table 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-table tr th button#action_gridfield_relationadd:hover { color: #444 !important; /* Not sure why IE think it needs this */ }
|
.cms table.ss-gridfield-table tr th button#action_gridfield_relationadd:hover { color: #444 !important; /* Not sure why IE think it needs this */ }
|
||||||
.cms table.ss-gridfield-table tr th button:hover { color: #ccc !important; /* Not sure why IE think it needs this */ }
|
.cms table.ss-gridfield-table tr th button:hover { color: #ccc !important; /* Not sure why IE think it needs this */ }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { color: #fff !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { color: #fff !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort { background: transparent url(../images/arrows.png) no-repeat right 6px; border: none; width: 100%; text-align: left; padding: 2px 8px 2px 0; text-shadow: rgba(0, 0, 0, 0.2) 0px -1px 0; color: #fff; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; }
|
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort { background: transparent url(../images/arrows.png) no-repeat right 10px; border: none; width: 100%; text-align: left; padding: 4px 8px 4px 0; text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0; color: #fff; -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; -ms-border-radius: 0; -khtml-border-radius: 0; border-radius: 0; }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { background-position: right -34px; }
|
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort:hover { background-position: right -30px; }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-desc { background-position: right -72px; }
|
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-desc { background-position: right -72px; }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-asc { background-position: right -116px; }
|
.cms table.ss-gridfield-table tr th button.ss-gridfield-sort.ss-gridfield-sorted-asc { background-position: right -116px; }
|
||||||
.cms table.ss-gridfield-table tr th button.ss-ui-button.ss-gridfield-button-filter { background-color: #55a4d2; border: none; display: block; text-indent: -9999em; width: 30px; height: 25px; background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMzOGRjMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzI4NzA5OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #338dc1), color-stop(100%, #287099)); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -webkit-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -moz-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -o-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -ms-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, linear-gradient(#338dc1, #287099); width: 26px; border-top: 1px solid #4199cd; }
|
.cms table.ss-gridfield-table tr th button.ss-ui-button.ss-gridfield-button-filter { background-color: #55a4d2; border: none; display: block; text-indent: -9999em; width: 30px; height: 25px; background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMzOGRjMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzI4NzA5OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #338dc1), color-stop(100%, #287099)); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -webkit-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -moz-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -o-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, -ms-linear-gradient(#338dc1, #287099); background: url(../images/icons/filter-icons.png) no-repeat -15px 4px, linear-gradient(#338dc1, #287099); width: 26px; border-top: 1px solid #4199cd; }
|
||||||
@ -112,9 +103,9 @@
|
|||||||
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:-ms-input-placeholder { font-style: italic; color: #ced5d7; }
|
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:-ms-input-placeholder { font-style: italic; color: #ced5d7; }
|
||||||
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:placeholder { font-style: italic; color: #ced5d7; }
|
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:placeholder { font-style: italic; color: #ced5d7; }
|
||||||
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:focus { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
.cms table.ss-gridfield-table tr th input.ss-gridfield-sort:focus { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
|
||||||
.cms table.ss-gridfield-table tr th span.non-sortable { display: block; }
|
.cms table.ss-gridfield-table tr th span.non-sortable { padding: 1em 1em; display: block; }
|
||||||
.cms table.ss-gridfield-table tr td { border-right: 1px solid rgba(0, 0, 0, 0.1); padding: 8px 8px; color: #666666; }
|
.cms table.ss-gridfield-table tr td { border-right: 1px solid rgba(0, 0, 0, 0.1); padding: 6.4px 12px; color: #666666; }
|
||||||
.cms table.ss-gridfield-table tr td.bottom-all { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -ms-border-bottom-left-radius: 5px; -o-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; -ms-border-bottom-right-radius: 5px; -o-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzk4YWFiNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #98aab6)); background-image: -webkit-linear-gradient(#b0bec7, #98aab6); background-image: -moz-linear-gradient(#b0bec7, #98aab6); background-image: -o-linear-gradient(#b0bec7, #98aab6); background-image: -ms-linear-gradient(#b0bec7, #98aab6); background-image: linear-gradient(#b0bec7, #98aab6); padding: 4px 12px; }
|
.cms table.ss-gridfield-table tr td.bottom-all { -moz-border-radius-bottomleft: 7px; -webkit-border-bottom-left-radius: 7px; -o-border-bottom-left-radius: 7px; -ms-border-bottom-left-radius: 7px; -khtml-border-bottom-left-radius: 7px; border-bottom-left-radius: 7px; -moz-border-radius-bottomright: 7px; -webkit-border-bottom-right-radius: 7px; -o-border-bottom-right-radius: 7px; -ms-border-bottom-right-radius: 7px; -khtml-border-bottom-right-radius: 7px; border-bottom-right-radius: 7px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IzYzBjNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzg5OWNhMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b3c0c4), color-stop(100%, #899ca2)); background-image: -webkit-linear-gradient(#b3c0c4, #899ca2); background-image: -moz-linear-gradient(#b3c0c4, #899ca2); background-image: -o-linear-gradient(#b3c0c4, #899ca2); background-image: -ms-linear-gradient(#b3c0c4, #899ca2); background-image: linear-gradient(#b3c0c4, #899ca2); }
|
||||||
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-footer-message { text-align: center; padding-top: 6px; color: white; }
|
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-footer-message { text-align: center; padding-top: 6px; color: white; }
|
||||||
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-pagination { padding-top: 1px; position: absolute; left: 50%; margin-left: -116px; z-index: 5; }
|
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-pagination { padding-top: 1px; position: absolute; left: 50%; margin-left: -116px; z-index: 5; }
|
||||||
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-pagination .pagination-page-number { color: white; text-shadow: rgba(0, 0, 0, 0.2) 0px -1px 0; }
|
.cms table.ss-gridfield-table tr td.bottom-all .datagrid-pagination .pagination-page-number { color: white; text-shadow: rgba(0, 0, 0, 0.2) 0px -1px 0; }
|
||||||
|
@ -57,6 +57,8 @@ class GridField extends FormField {
|
|||||||
*/
|
*/
|
||||||
protected $columnDispatch = null;
|
protected $columnDispatch = null;
|
||||||
|
|
||||||
|
protected $name = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new GridField field
|
* Creates a new GridField field
|
||||||
*
|
*
|
||||||
@ -67,6 +69,7 @@ class GridField extends FormField {
|
|||||||
*/
|
*/
|
||||||
public function __construct($name, $title = null, SS_List $dataList = null, GridFieldConfig $config = null) {
|
public function __construct($name, $title = null, SS_List $dataList = null, GridFieldConfig $config = null) {
|
||||||
parent::__construct($name, $title, null);
|
parent::__construct($name, $title, null);
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
if($dataList) {
|
if($dataList) {
|
||||||
$this->setList($dataList);
|
$this->setList($dataList);
|
||||||
@ -79,8 +82,7 @@ class GridField extends FormField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->config->addComponent(new GridState_Component());
|
$this->config->addComponent(new GridState_Component());
|
||||||
$this->state = new GridState($this);
|
$this->state = new GridState($this);
|
||||||
|
|
||||||
|
|
||||||
$this->addExtraClass('ss-gridfield');
|
$this->addExtraClass('ss-gridfield');
|
||||||
}
|
}
|
||||||
@ -350,6 +352,8 @@ class GridField extends FormField {
|
|||||||
'cellpadding' => '0',
|
'cellpadding' => '0',
|
||||||
'cellspacing' => '0'
|
'cellspacing' => '0'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
return
|
return
|
||||||
$this->createTag('fieldset', $attrs,
|
$this->createTag('fieldset', $attrs,
|
||||||
$content['before'] .
|
$content['before'] .
|
||||||
|
@ -15,6 +15,7 @@ class GridFieldAddNewButton implements GridField_HTMLProvider {
|
|||||||
public function getHTMLFragments($gridField) {
|
public function getHTMLFragments($gridField) {
|
||||||
$data = new ArrayData(array(
|
$data = new ArrayData(array(
|
||||||
'NewLink' => Controller::join_links($gridField->Link('item'), 'new'),
|
'NewLink' => Controller::join_links($gridField->Link('item'), 'new'),
|
||||||
|
'ButtonName' => _t('GridField.Add', 'Add') . ' ' . _t('GridField.' . $gridField -> name, $gridField -> name),
|
||||||
));
|
));
|
||||||
return array(
|
return array(
|
||||||
$this->targetFragment => $data->renderWith('GridFieldAddNewbutton'),
|
$this->targetFragment => $data->renderWith('GridFieldAddNewbutton'),
|
||||||
|
27
forms/gridfield/GridFieldButtonRow.php
Normal file
27
forms/gridfield/GridFieldButtonRow.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Adding this class to a {@link GridFieldConfig} of a {@link GridField} adds a buttonrow to that field.
|
||||||
|
* The button row provides a space for actions on this grid.
|
||||||
|
*
|
||||||
|
* This row provides two new HTML fragment spaces: 'toolbar-header-left' and 'toolbar-header-right'.
|
||||||
|
*
|
||||||
|
* @package framework
|
||||||
|
* @subpackage gridfield
|
||||||
|
*/
|
||||||
|
class GridFieldButtonRow implements GridField_HTMLProvider {
|
||||||
|
protected $targetFragment;
|
||||||
|
|
||||||
|
public function __construct($targetFragment = 'before') {
|
||||||
|
$this->targetFragment = $targetFragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHTMLFragments( $gridField) {
|
||||||
|
$data = new ArrayData(array(
|
||||||
|
"LeftFragment" => "\$DefineFragment(buttons-{$this->targetFragment}-left)",
|
||||||
|
"RightFragment" => "\$DefineFragment(buttons-{$this->targetFragment}-right)",
|
||||||
|
));
|
||||||
|
return array(
|
||||||
|
$this->targetFragment => $data->renderWith('GridFieldButtonRow')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -191,8 +191,10 @@ class GridFieldConfig_RecordEditor 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($itemsPerPage=null) {
|
public function __construct($itemsPerPage=null) {
|
||||||
|
|
||||||
|
$this->addComponent(new GridFieldButtonRow('before'));
|
||||||
|
$this->addComponent(new GridFieldAddNewButton('buttons-before-left'));
|
||||||
$this->addComponent(new GridFieldToolbarHeader());
|
$this->addComponent(new GridFieldToolbarHeader());
|
||||||
$this->addComponent(new GridFieldAddNewButton('toolbar-header-right'));
|
|
||||||
$this->addComponent($sort = new GridFieldSortableHeader());
|
$this->addComponent($sort = new GridFieldSortableHeader());
|
||||||
$this->addComponent($filter = new GridFieldFilterHeader());
|
$this->addComponent($filter = new GridFieldFilterHeader());
|
||||||
$this->addComponent(new GridFieldDataColumns());
|
$this->addComponent(new GridFieldDataColumns());
|
||||||
@ -238,9 +240,11 @@ class GridFieldConfig_RelationEditor 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($itemsPerPage=null) {
|
public function __construct($itemsPerPage=null) {
|
||||||
|
|
||||||
|
$this->addComponent(new GridFieldButtonRow('before'));
|
||||||
|
$this->addComponent(new GridFieldAddNewButton('buttons-before-left'));
|
||||||
|
$this->addComponent(new GridFieldAddExistingAutocompleter('buttons-before-left'));
|
||||||
$this->addComponent(new GridFieldToolbarHeader());
|
$this->addComponent(new GridFieldToolbarHeader());
|
||||||
$this->addComponent(new GridFieldAddExistingAutocompleter('toolbar-header-left'));
|
|
||||||
$this->addComponent(new GridFieldAddNewButton('toolbar-header-right'));
|
|
||||||
$this->addComponent($sort = new GridFieldSortableHeader());
|
$this->addComponent($sort = new GridFieldSortableHeader());
|
||||||
$this->addComponent($filter = new GridFieldFilterHeader());
|
$this->addComponent($filter = new GridFieldFilterHeader());
|
||||||
$this->addComponent(new GridFieldDataColumns());
|
$this->addComponent(new GridFieldDataColumns());
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Adding this class to a {@link GridFieldConfig} of a {@link GridField} adds a header title to that field.
|
* Adding this class to a {@link GridFieldConfig} of a {@link GridField} adds a header title to that field.
|
||||||
* The header serves double duty of displaying the name of the data the GridField is showing and
|
* The header serves to display the name of the data the GridField is showing.
|
||||||
* providing a space for actions on this grid.
|
|
||||||
*
|
|
||||||
* This header provides two new HTML fragment spaces: 'toolbar-header-left' and 'toolbar-header-right'.
|
|
||||||
*
|
*
|
||||||
* @package framework
|
* @package framework
|
||||||
* @subpackage gridfield
|
* @subpackage gridfield
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
@import "compass/css3/text-shadow";
|
@import "compass/css3/text-shadow";
|
||||||
@import "compass/css3/border-radius";
|
@import "compass/css3/border-radius";
|
||||||
@import "../admin/scss/themes/default";
|
@import "../admin/scss/themes/default";
|
||||||
@import "../admin/scss/themes/default";
|
@import "../admin/scss/_mixins";
|
||||||
@import "_elementMixins";
|
@import "_elementMixins";
|
||||||
|
|
||||||
//$experimental-support-for-svg variable comes from
|
//$experimental-support-for-svg variable comes from
|
||||||
@ -44,6 +44,10 @@ $gf_grid_x: 16px;
|
|||||||
.ss-gridfield {
|
.ss-gridfield {
|
||||||
& > div {
|
& > div {
|
||||||
margin-bottom: $gf_grid_y*3;
|
margin-bottom: $gf_grid_y*3;
|
||||||
|
&.addNewGridFieldButton{
|
||||||
|
margin-bottom:$gf_grid_y;
|
||||||
|
@include clearfix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-selectable] {
|
&[data-selectable] {
|
||||||
@ -69,6 +73,22 @@ $gf_grid_x: 16px;
|
|||||||
padding-left:26px; //to accomodate wider export icon
|
padding-left:26px; //to accomodate wider export icon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.right {
|
||||||
|
float:right;
|
||||||
|
& > * {
|
||||||
|
float: right;
|
||||||
|
margin-left:5px;
|
||||||
|
font-size: $gf_grid_y*1.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.left {
|
||||||
|
float:left;
|
||||||
|
& > * {
|
||||||
|
margin-right:5px;
|
||||||
|
float: left;
|
||||||
|
font-size: $gf_grid_y*1.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ss-gridfield {
|
.ss-gridfield {
|
||||||
@ -101,6 +121,7 @@ $gf_grid_x: 16px;
|
|||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
border-bottom: 0 none;
|
border-bottom: 0 none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-bottom:$gf_grid_y;
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
color: darken($color-base, 50%);
|
color: darken($color-base, 50%);
|
||||||
@ -259,7 +280,7 @@ $gf_grid_x: 16px;
|
|||||||
tr {
|
tr {
|
||||||
&.title {
|
&.title {
|
||||||
th {
|
th {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: $gf_colour_gradient_dark;
|
background: $gf_colour_gradient_dark;
|
||||||
border-bottom: 1px solid darken($gf_colour_gradient_dark,5%);
|
border-bottom: 1px solid darken($gf_colour_gradient_dark,5%);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
@ -272,15 +293,8 @@ $gf_grid_x: 16px;
|
|||||||
color:#fff;
|
color:#fff;
|
||||||
margin: 1px 8px 0;
|
margin: 1px 8px 0;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
}
|
float:left;
|
||||||
.right > * {
|
}
|
||||||
float: right;
|
|
||||||
font-size: $gf_grid_y*1.2;
|
|
||||||
}
|
|
||||||
.left > * {
|
|
||||||
float: left;
|
|
||||||
font-size: $gf_grid_y*1.2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.sortable-header {
|
&.sortable-header {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/**
|
//**
|
||||||
* This file contains mixins relating to specific functionality
|
// * This file contains mixins relating to specific functionality
|
||||||
*
|
// *
|
||||||
* Mixins should be stored here rather than individual files
|
// * Mixins should be stored here rather than individual files
|
||||||
*/
|
// */
|
||||||
|
|
||||||
|
|
||||||
/*Mixin generates the generic button styling for the gridfield*/
|
//*Mixin generates the generic button styling for the gridfield*/
|
||||||
@mixin gridFieldButtons{
|
@mixin gridFieldButtons{
|
||||||
border:none;
|
border:none;
|
||||||
display:block;
|
display:block;
|
||||||
@ -15,11 +15,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
//**
|
||||||
Mixin creates a transparent button with a dropdown arrow,
|
// Mixin creates a transparent button with a dropdown arrow,
|
||||||
as is used for files in the files up-load area. The arrows
|
// as is used for files in the files up-load area. The arrows
|
||||||
themselves are added in the _style file
|
// themselves are added in the _style file
|
||||||
**/
|
//**/
|
||||||
@mixin ss-uploadfield-editButton{
|
@mixin ss-uploadfield-editButton{
|
||||||
&.ss-uploadfield-item-edit {
|
&.ss-uploadfield-item-edit {
|
||||||
opacity:0.9;
|
opacity:0.9;
|
||||||
|
61
scss/_mixins.scss
Normal file
61
scss/_mixins.scss
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/**
|
||||||
|
* This file contains mixins relating to specific functionality
|
||||||
|
*
|
||||||
|
* Mixins should be stored here rather than individual files
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*Mixin generates the generic button styling for the gridfield*/
|
||||||
|
@mixin gridFieldButtons{
|
||||||
|
border:none;
|
||||||
|
display:block;
|
||||||
|
text-indent:-9999em;
|
||||||
|
width:30px;
|
||||||
|
height:25px; //match the height of the input field
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Mixin creates a transparent button with a dropdown arrow,
|
||||||
|
as is used for files in the files up-load area. The arrows
|
||||||
|
themselves are added in the _style file
|
||||||
|
**/
|
||||||
|
@mixin ss-uploadfield-editButton{
|
||||||
|
&.ss-uploadfield-item-edit {
|
||||||
|
opacity:0.9;
|
||||||
|
padding-top: 3px;
|
||||||
|
padding-bottom: 0;
|
||||||
|
height:100%;
|
||||||
|
@include border-radius(0);
|
||||||
|
&.ui-state-hover{
|
||||||
|
background:none;
|
||||||
|
opacity:1;
|
||||||
|
span.toggle-details{
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span.toggle-details{
|
||||||
|
opacity:0.9;
|
||||||
|
margin-left:3px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 5px;
|
||||||
|
height: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
.toggle-details-icon {
|
||||||
|
margin-top:1px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
vertical-align: middle;
|
||||||
|
&.opened {
|
||||||
|
margin-top:0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1,3 @@
|
|||||||
<a href="$NewLink" class="action action-detail ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add"><% _t('GridField.AddNew', 'Add New') %></a>
|
<a href="$NewLink" class="action action-detail ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add">
|
||||||
|
$ButtonName
|
||||||
|
</a>
|
4
templates/Includes/GridFieldButtonRow.ss
Normal file
4
templates/Includes/GridFieldButtonRow.ss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<div class="addNewGridFieldButton">
|
||||||
|
<div class="left">$LeftFragment</div>
|
||||||
|
<div class="right">$RightFragment</div>
|
||||||
|
</div>
|
@ -1,7 +1,7 @@
|
|||||||
<tr class="title">
|
<tr class="title">
|
||||||
<th colspan="$ColumnCount">
|
<th colspan="$ColumnCount">
|
||||||
<% if Title %><h2>$Title</h2><% end_if %>
|
<% if Title %><h2>$Title</h2><% end_if %>
|
||||||
<div class="left">\$DefineFragment(toolbar-header-left)</div>
|
|
||||||
<div class="right">\$DefineFragment(toolbar-header-right)</div>
|
<div class="right">\$DefineFragment(toolbar-header-right)</div>
|
||||||
|
<div class="left">\$DefineFragment(toolbar-header-left)</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!doctype html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<% if $Title %><title>$Title</title><% end_if %>
|
<% if $Title %><title>$Title</title><% end_if %>
|
||||||
|
Loading…
Reference in New Issue
Block a user