Hide "delete" button in "Insert Media" dialog

This commit is contained in:
Ingo Schommer 2013-06-14 13:53:09 +02:00
parent 3f295adbdd
commit 10a558c882
3 changed files with 7 additions and 0 deletions

View File

@ -659,6 +659,7 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai
.htmleditorfield-mediaform .ss-gridfield tbody td:first-child img { max-height: 30px; }
.htmleditorfield-mediaform .ss-uploadfield.from-web, .htmleditorfield-mediaform .ss-uploadfield.from-CMS { margin-bottom: 48px; }
.htmleditorfield-mediaform .ss-gridfield .gridfield-button-delete { display: none; }
.htmleditorfield-mediaform .ss-uploadfield.from-web .middleColumn, .htmleditorfield-mediaform .ss-uploadfield.from-CMS .middleColumn { width: auto; background: none; border: none; margin-top: 13px; }
.htmleditorfield-mediaform .ss-uploadfield.from-CMS { margin-top: 33px; }
.htmleditorfield-mediaform .ss-uploadfield.from-CMS h4 { margin-top: 3px; }

View File

@ -1476,6 +1476,10 @@ body.cms-dialog {
// Set thumbnail size
tbody td:first-child img {
max-height: 30px;
.gridfield-button-delete {
// TODO Remove from PHP instead of hiding
display: none; // delete action shouldn't be allowed here
}
}
}

View File

@ -380,6 +380,8 @@ class HtmlEditorField_Toolbar extends RequestHandler {
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(5),
// TODO Shouldn't allow delete here, its too confusing with a "remove from editor view" action.
// Remove once we can fit the search button in the last actual title column
new GridFieldDeleteAction(),
new GridFieldDetailForm()
);