mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
ENHANCEMENT: adding grid field row highlighting when Document is hidden
This commit is contained in:
parent
2f2019a42d
commit
b6a728dc0e
@ -49,6 +49,11 @@ class DMSGridFieldDeleteAction extends GridFieldDeleteAction implements GridFiel
|
||||
if ($numberOfRelations > 1) $field->addExtraClass('dms-delete-link-only');
|
||||
else $field->addExtraClasS('dms-delete-last-warning');
|
||||
|
||||
//set a class to show if the document is hidden
|
||||
if ($record->isHidden()) {
|
||||
$field->addExtraClass('dms-document-hidden');
|
||||
}
|
||||
|
||||
return $field->Field();
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,9 @@
|
||||
#Root_Documents table td { white-space: normal; }
|
||||
#Root_Documents table td.col-buttons { white-space: nowrap; }
|
||||
#Root_Documents table td.col-buttons .dms-delete-link-only .ui-icon { background: url(../images/chain-unchain.png) no-repeat; }
|
||||
#Root_Documents table tr.dms-document-hidden-row.odd { background-color: rgba(241, 220, 222, 0.6); }
|
||||
#Root_Documents table tr.dms-document-hidden-row.even { background-color: rgba(242, 201, 203, 0.675); }
|
||||
#Root_Documents table tr.dms-document-hidden-row:hover { background-color: rgba(244, 171, 172, 0.8) !important; }
|
||||
|
||||
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav { border-bottom: none; float: right; margin: 8px 0 -1px 0; padding: 0 24px 0 0; }
|
||||
.DMSDocumentAddController .ui-tabs ul.ui-tabs-nav li { padding-bottom: 1px; border: 1px solid #C0C0C2; }
|
||||
|
@ -32,6 +32,12 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('.ss-gridfield .dms-document-hidden').entwine({
|
||||
onadd: function() {
|
||||
this.closest('tr').addClass('dms-document-hidden-row');
|
||||
}
|
||||
});
|
||||
|
||||
$('.cms-content-actions.south .ss-ui-action-destructive').entwine({
|
||||
confirmBeforeDelete: function() {
|
||||
var deleteButtons = $('button.dms-delete[data-pages-count=1]');
|
||||
|
@ -1,4 +1,5 @@
|
||||
//data-icon="cross-circle"
|
||||
$gf_colour_zebra: #F0F4F7;
|
||||
|
||||
.ui-autocomplete{
|
||||
border: 1px solid #DDD;
|
||||
@ -25,6 +26,17 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
tr.dms-document-hidden-row {
|
||||
&.odd {
|
||||
background-color: mix($gf_colour_zebra, rgba(255, 4, 0, 0.2));
|
||||
}
|
||||
&.even {
|
||||
background-color: mix($gf_colour_zebra, rgba(255, 4, 0, 0.35));
|
||||
}
|
||||
&:hover {
|
||||
background-color: mix($gf_colour_zebra, rgba(255, 4, 0, 0.6)) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user