mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Styling updates for the Campaign edit form
This commit is contained in:
parent
1ad6730b9e
commit
a15a392bd3
@ -15,7 +15,7 @@ class NorthHeader extends SilverStripeComponent {
|
|||||||
'btn-secondary',
|
'btn-secondary',
|
||||||
'action',
|
'action',
|
||||||
'font-icon-left-open',
|
'font-icon-left-open',
|
||||||
'toolbar__navigation__back-button',
|
'toolbar__back-button',
|
||||||
];
|
];
|
||||||
const backButtonProps = {
|
const backButtonProps = {
|
||||||
className: buttonClassNames.join(' '),
|
className: buttonClassNames.join(' '),
|
||||||
|
@ -1,32 +1,44 @@
|
|||||||
.north-header {
|
.toolbar {
|
||||||
border-bottom: 1px solid $border-color-dark;
|
width: 100%; // Todo: replace with mixin @include make-container();
|
||||||
background-color: $background-north;
|
height: $toolbar-total-height;
|
||||||
width: 100%;
|
background-color: $body-bg;
|
||||||
height: $toolbar-total-height;
|
|
||||||
z-index: 60;
|
.btn-toolbar {
|
||||||
|
// TODO Remove '.cms .btn-toolbar' override
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Typically to hold breadcrumbs and back button
|
// Northern bar containing breadcrum, tabs etc.
|
||||||
.north-header__navigation {
|
.toolbar--north {
|
||||||
float: left;
|
@extend .toolbar;
|
||||||
padding: 0 $spacer-y;
|
padding-left: $spacer-x; // Todo: replace with mixin @include make-container();
|
||||||
max-width: 70%;
|
padding-right: $spacer-x; // Todo: replace with mixin @include make-container();
|
||||||
max-height: $toolbar-height;
|
display: block;
|
||||||
|
background-image: none;
|
||||||
|
background-color: $background-north;
|
||||||
|
border-bottom: 1px solid $border-color;
|
||||||
|
z-index: 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar__navigation__back-button {
|
// Secondary content actions eg. Add page button
|
||||||
|
.toolbar--content {
|
||||||
|
@extend .toolbar;
|
||||||
|
padding: $spacer-y*.625 $spacer-x*.75;
|
||||||
|
margin-bottom: $spacer-y/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Primary content actions
|
||||||
|
.toolbar--south {
|
||||||
|
@extend .toolbar;
|
||||||
|
padding: $spacer-y*.625 $spacer-x;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
border-top: 1px solid $border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar__back-button {
|
||||||
float: left;
|
float: left;
|
||||||
margin: $spacer-y/2 $spacer-x $spacer-y/2 0;
|
margin: $spacer-y/2 $spacer-x $spacer-y/2 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.north-header__heading {
|
|
||||||
font-size: $font-size-lg;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 20px;
|
|
||||||
margin: $spacer-y 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// To hold things like search icon and view toggle
|
|
||||||
.north-header__actions {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -147,7 +147,9 @@ class CampaignAdmin extends SilverStripeComponent {
|
|||||||
<div className="cms-middle no-preview">
|
<div className="cms-middle no-preview">
|
||||||
<div className="cms-campaigns collapse in" aria-expanded="true">
|
<div className="cms-campaigns collapse in" aria-expanded="true">
|
||||||
<NorthHeader showBackButton>
|
<NorthHeader showBackButton>
|
||||||
<h2 className="text-truncate north-header__heading">Campaigns</h2>
|
<div className="breadcrumb breadcrumb--current-only">
|
||||||
|
<h2 className="text-truncate toolbar__heading">Campaigns</h2>
|
||||||
|
</div>
|
||||||
</NorthHeader>
|
</NorthHeader>
|
||||||
<FormBuilder {...formBuilderProps} />
|
<FormBuilder {...formBuilderProps} />
|
||||||
</div>
|
</div>
|
||||||
@ -225,6 +227,7 @@ class CampaignAdmin extends SilverStripeComponent {
|
|||||||
campaignEditCreateFn(Component, props) {
|
campaignEditCreateFn(Component, props) {
|
||||||
if (props.name === 'action_save') {
|
if (props.name === 'action_save') {
|
||||||
const extendedProps = Object.assign({}, props, {
|
const extendedProps = Object.assign({}, props, {
|
||||||
|
bootstrapButtonStyle: 'success',
|
||||||
type: 'submit',
|
type: 'submit',
|
||||||
label: props.title,
|
label: props.title,
|
||||||
icon: 'save',
|
icon: 'save',
|
||||||
|
@ -53,45 +53,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TOOLBARS
|
|
||||||
.toolbar {
|
|
||||||
width: 100%; // Todo: replace with mixin @include make-container();
|
|
||||||
height: $toolbar-total-height;
|
|
||||||
background-color: $body-bg;
|
|
||||||
|
|
||||||
.btn-toolbar {
|
|
||||||
// TODO Remove '.cms .btn-toolbar' override
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Northern bar containing breadcrum, tabs etc.
|
|
||||||
.toolbar--north {
|
|
||||||
@extend .toolbar;
|
|
||||||
padding-left: $spacer-x; // Todo: replace with mixin @include make-container();
|
|
||||||
padding-right: $spacer-x; // Todo: replace with mixin @include make-container();
|
|
||||||
display: block;
|
|
||||||
background-image: none;
|
|
||||||
background-color: $background-north;
|
|
||||||
border-bottom: 1px solid $border-color;
|
|
||||||
z-index: 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Secondary content actions eg. Add page button
|
|
||||||
.toolbar--content {
|
|
||||||
@extend .toolbar;
|
|
||||||
padding: $spacer-y*.625 $spacer-x*.75;
|
|
||||||
margin-bottom: $spacer-y/2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Primary content actions
|
|
||||||
.toolbar--south {
|
|
||||||
@extend .toolbar;
|
|
||||||
padding: $spacer-y*.625 $spacer-x;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
border-top: 1px solid $border-color;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user