diff --git a/code/cms/DMSGridFieldDeleteAction.php b/code/cms/DMSGridFieldDeleteAction.php index c178790..c9496d1 100644 --- a/code/cms/DMSGridFieldDeleteAction.php +++ b/code/cms/DMSGridFieldDeleteAction.php @@ -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(); } diff --git a/css/DMSMainCMS.css b/css/DMSMainCMS.css index 1b772a3..bca47b3 100644 --- a/css/DMSMainCMS.css +++ b/css/DMSMainCMS.css @@ -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; } diff --git a/javascript/DMSGridField.js b/javascript/DMSGridField.js index 853ba26..5429cbd 100644 --- a/javascript/DMSGridField.js +++ b/javascript/DMSGridField.js @@ -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]'); diff --git a/scss/DMSMainCMS.scss b/scss/DMSMainCMS.scss index f714dfe..0a01767 100644 --- a/scss/DMSMainCMS.scss +++ b/scss/DMSMainCMS.scss @@ -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; + } + } } }