From 7e6342c11b523580ea191b7b156cd54d07abc042 Mon Sep 17 00:00:00 2001 From: Ryan O'Hara Date: Tue, 11 Sep 2012 17:29:52 +1200 Subject: [PATCH] MINOR: Add extra class to documents gridfield so styling is applied. Fix scss to target the document and related links gridfield --- code/DMSSiteTreeExtension.php | 1 + css/DMSMainCMS.css | 19 ++++++++++--------- scss/DMSMainCMS.scss | 9 +-------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/code/DMSSiteTreeExtension.php b/code/DMSSiteTreeExtension.php index 4c9b94c..e2455ac 100644 --- a/code/DMSSiteTreeExtension.php +++ b/code/DMSSiteTreeExtension.php @@ -65,6 +65,7 @@ class DMSSiteTreeExtension extends DataExtension { $this->owner->Documents(), $gridFieldConfig ); + $gridField->addExtraClass('documents'); $uploadBtn = new LiteralField( 'UploadButton', diff --git a/css/DMSMainCMS.css b/css/DMSMainCMS.css index aa15bc3..9dd8cae 100644 --- a/css/DMSMainCMS.css +++ b/css/DMSMainCMS.css @@ -1,14 +1,15 @@ .ui-autocomplete { border: 1px solid #DDD; box-shadow: 0 1px 2px 0px #AFAFAF; max-height: 300px; overflow: scroll; } -#Root_Documents, #Root_RelatedLinks { padding-left: 0; } -#Root_Documents table, #Root_RelatedLinks table { white-space: normal; } -#Root_Documents table th.col-action_SetOrderTitle, #Root_Documents table th.col-FilenameWithoutID, #Root_RelatedLinks table th.col-action_SetOrderTitle, #Root_RelatedLinks table th.col-FilenameWithoutID { width: 300px; } -#Root_Documents table td, #Root_RelatedLinks table td { white-space: normal; } -#Root_Documents table td.col-buttons, #Root_RelatedLinks table td.col-buttons { white-space: nowrap; } -#Root_Documents table td.col-buttons .dms-delete-link-only .ui-icon, #Root_RelatedLinks 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, #Root_RelatedLinks table tr.dms-document-hidden-row.odd { background-color: rgba(241, 220, 222, 0.6); } -#Root_Documents table tr.dms-document-hidden-row.even, #Root_RelatedLinks table tr.dms-document-hidden-row.even { background-color: rgba(242, 201, 203, 0.675); } -#Root_Documents table tr.dms-document-hidden-row:hover, #Root_RelatedLinks table tr.dms-document-hidden-row:hover { background-color: rgba(244, 171, 172, 0.8) !important; } +.cms fieldset.documents table { white-space: normal; } +.cms fieldset.documents table th { /* &.col-action_SetOrderTitle, &.col-FilenameWithoutID{ + width: 300px; + } */ } +.cms fieldset.documents table td { white-space: normal; } +.cms fieldset.documents table td.col-buttons { white-space: nowrap; } +.cms fieldset.documents table td.col-buttons .dms-delete-link-only .ui-icon { background: url(../images/chain-unchain.png) no-repeat; } +.cms fieldset.documents table tr.dms-document-hidden-row.odd { background-color: rgba(241, 220, 222, 0.6); } +.cms fieldset.documents table tr.dms-document-hidden-row.even { background-color: rgba(242, 201, 203, 0.675); } +.cms fieldset.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/scss/DMSMainCMS.scss b/scss/DMSMainCMS.scss index c1e3c01..3f3241a 100644 --- a/scss/DMSMainCMS.scss +++ b/scss/DMSMainCMS.scss @@ -10,15 +10,8 @@ $gf_colour_zebra: #F0F4F7; overflow: scroll; } -#Root_Documents, #Root_RelatedLinks{ - padding-left: 0; +.cms fieldset.documents, .cms fieldset.relatedLinks{ table{ - white-space:normal; - th{ - &.col-action_SetOrderTitle, &.col-FilenameWithoutID{ - width: 300px; - } - } td{ white-space:normal; }