mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Enhancement Fix Campaign admin publish button styles missing
API remove unused textures Enhancement Update legacy DB icon to match new colour Enhancement Remove Done button on import modal
This commit is contained in:
parent
2a7c0138f5
commit
cf5c055ded
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
5
admin/client/dist/js/bundle.js
vendored
5
admin/client/dist/js/bundle.js
vendored
@ -327,6 +327,7 @@ t&&e.push("btn-"+t),"string"!=typeof this.props.title&&e.push("btn--no-text")
|
|||||||
var n=this.getIcon()
|
var n=this.getIcon()
|
||||||
return n&&e.push("font-icon-"+n),this.props.loading&&e.push("btn--loading"),this.props.disabled&&e.push("disabled"),"string"==typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")}},{
|
return n&&e.push("font-icon-"+n),this.props.loading&&e.push("btn--loading"),this.props.disabled&&e.push("disabled"),"string"==typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")}},{
|
||||||
key:"getButtonStyle",value:function d(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle
|
key:"getButtonStyle",value:function d(){if("undefined"!=typeof this.props.data.buttonStyle)return this.props.data.buttonStyle
|
||||||
|
if("undefined"!=typeof this.props.buttonStyle)return this.props.buttonStyle
|
||||||
var e=this.props.extraClass.split(" ")
|
var e=this.props.extraClass.split(" ")
|
||||||
return e.find(function(e){return e.indexOf("btn-")>-1})?null:"action_save"===this.props.name||e.find(function(e){return"ss-ui-action-constructive"===e})?"primary":"secondary"}},{key:"getIcon",value:function f(){
|
return e.find(function(e){return e.indexOf("btn-")>-1})?null:"action_save"===this.props.name||e.find(function(e){return"ss-ui-action-constructive"===e})?"primary":"secondary"}},{key:"getIcon",value:function f(){
|
||||||
return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function p(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("span",{
|
return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function p(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("span",{
|
||||||
@ -2571,8 +2572,8 @@ className:c.join(" ")},u),h["default"].createElement("div",{className:"toolbar t
|
|||||||
},{key:"renderButtonToolbar",value:function p(){var e=this.getItems()
|
},{key:"renderButtonToolbar",value:function p(){var e=this.getItems()
|
||||||
if(!e||!e.length)return h["default"].createElement("div",{className:"btn-toolbar"})
|
if(!e||!e.length)return h["default"].createElement("div",{className:"btn-toolbar"})
|
||||||
var t={}
|
var t={}
|
||||||
return"open"===this.props.record.State?t=c(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"
|
return"open"===this.props.record.State?t=c(t,{title:$["default"]._t("Campaigns.PUBLISHCAMPAIGN"),buttonStyle:"primary",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"
|
||||||
}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"secondary-outline",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{
|
}):"published"===this.props.record.State&&(t=c(t,{title:$["default"]._t("Campaigns.REVERTCAMPAIGN"),buttonStyle:"secondary-outline",icon:"back-in-time",disabled:!0})),h["default"].createElement("div",{
|
||||||
className:"btn-toolbar"},h["default"].createElement(F["default"],t))}},{key:"getItems",value:function m(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{
|
className:"btn-toolbar"},h["default"].createElement(F["default"],t))}},{key:"getItems",value:function m(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.items:null}},{
|
||||||
key:"groupItemsForSet",value:function g(){var e={},t=this.getItems()
|
key:"groupItemsForSet",value:function g(){var e={},t=this.getItems()
|
||||||
return t?(t.forEach(function(t){var n=t.BaseClass
|
return t?(t.forEach(function(t){var n=t.BaseClass
|
||||||
|
@ -46,6 +46,7 @@ class FormAction extends SilverStripeComponent {
|
|||||||
|
|
||||||
// Add 'type' class
|
// Add 'type' class
|
||||||
const style = this.getButtonStyle();
|
const style = this.getButtonStyle();
|
||||||
|
|
||||||
if (style) {
|
if (style) {
|
||||||
buttonClasses.push(`btn-${style}`);
|
buttonClasses.push(`btn-${style}`);
|
||||||
}
|
}
|
||||||
@ -89,6 +90,10 @@ class FormAction extends SilverStripeComponent {
|
|||||||
return this.props.data.buttonStyle;
|
return this.props.data.buttonStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof this.props.buttonStyle !== 'undefined') {
|
||||||
|
return this.props.buttonStyle;
|
||||||
|
}
|
||||||
|
|
||||||
const extraClasses = this.props.extraClass.split(' ');
|
const extraClasses = this.props.extraClass.split(' ');
|
||||||
|
|
||||||
// defined their own `btn-${something}` class
|
// defined their own `btn-${something}` class
|
||||||
|
@ -204,7 +204,7 @@ class CampaignAdminList extends SilverStripeComponent {
|
|||||||
if (this.props.record.State === 'open') {
|
if (this.props.record.State === 'open') {
|
||||||
actionProps = Object.assign(actionProps, {
|
actionProps = Object.assign(actionProps, {
|
||||||
title: i18n._t('Campaigns.PUBLISHCAMPAIGN'),
|
title: i18n._t('Campaigns.PUBLISHCAMPAIGN'),
|
||||||
bootstrapButtonStyle: 'primary',
|
buttonStyle: 'primary',
|
||||||
loading: this.props.campaign.isPublishing,
|
loading: this.props.campaign.isPublishing,
|
||||||
handleClick: this.handlePublish,
|
handleClick: this.handlePublish,
|
||||||
icon: 'rocket',
|
icon: 'rocket',
|
||||||
@ -213,7 +213,7 @@ class CampaignAdminList extends SilverStripeComponent {
|
|||||||
// TODO Implement "revert" feature
|
// TODO Implement "revert" feature
|
||||||
actionProps = Object.assign(actionProps, {
|
actionProps = Object.assign(actionProps, {
|
||||||
title: i18n._t('Campaigns.REVERTCAMPAIGN'),
|
title: i18n._t('Campaigns.REVERTCAMPAIGN'),
|
||||||
bootstrapButtonStyle: 'secondary-outline',
|
buttonStyle: 'secondary-outline',
|
||||||
icon: 'back-in-time',
|
icon: 'back-in-time',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
});
|
});
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 14 KiB |
@ -11,9 +11,5 @@
|
|||||||
$ImportForm
|
$ImportForm
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-secondary-outline font-icon-check-mark" data-dismiss="modal"><%t GridField.DONE 'Done' %></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user