From 6c90c892769c29301b21c7a079a661eee91227e5 Mon Sep 17 00:00:00 2001 From: Ryan O'Hara Date: Tue, 7 Aug 2012 11:55:05 +1200 Subject: [PATCH] ENHANCEMENT: Add styling to main document tab in CMS. Add unlink icon --- code/DMSSiteTreeExtension.php | 1 + css/DMSDocumentCMSFields.css | 7 +------ css/DMSMainCMS.css | 5 +++++ images/chain-unchain.png | Bin 0 -> 722 bytes scss/DMSDocumentCMSFields.scss | 7 +------ scss/DMSMainCMS.scss | 23 +++++++++++++++++++++++ 6 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 css/DMSMainCMS.css create mode 100755 images/chain-unchain.png create mode 100644 scss/DMSMainCMS.scss diff --git a/code/DMSSiteTreeExtension.php b/code/DMSSiteTreeExtension.php index 0b12f4e..2fbeab3 100644 --- a/code/DMSSiteTreeExtension.php +++ b/code/DMSSiteTreeExtension.php @@ -8,6 +8,7 @@ class DMSSiteTreeExtension extends DataExtension { function updateCMSFields(FieldList $fields){ //javascript to customize the grid field for the DMS document (overriding entwine in FRAMEWORK_DIR.'/javascript/GridField.js' Requirements::javascript('dms/javascript/DMSGridField.js'); + Requirements::css('dms/css/DMSMainCMS.css'); // Document listing $gridFieldConfig = GridFieldConfig::create()->addComponents( diff --git a/css/DMSDocumentCMSFields.css b/css/DMSDocumentCMSFields.css index 21645ba..9c58b8e 100644 --- a/css/DMSDocumentCMSFields.css +++ b/css/DMSDocumentCMSFields.css @@ -1,8 +1,3 @@ -/* #Root_Documents{ - table{ - white-space:normal; - } -} */ #FileP .fieldgroup-field { width: 100%; } #FileP .fieldgroup-field .cms-file-info-data { width: 400px; } #FileP .fieldgroup-field .fieldholder-small { margin-top: 5px; } @@ -14,7 +9,7 @@ #DocumentTypeID ul li { display: inline-block; padding: 0; width: auto; margin-right: 0; border-radius: 0; border-left: 1px solid #C0C0C2; border-right: 1px solid #f4f4f4; } #DocumentTypeID ul li:first-child { border-radius: 6px 0 0 6px; } #DocumentTypeID ul li:last-child { border-radius: 0 6px 6px 0; border-right: 1px solid #C0C0C2; } -#DocumentTypeID ul li.selected { border-bottom: 1px solid #e9e9e9; border-right: 1px solid #C0C0C2; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c0c0c0), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#c0c0c0, #e6e6e6); background: -moz-linear-gradient(#c0c0c0, #e6e6e6); background: -o-linear-gradient(#c0c0c0, #e6e6e6); background: -ms-linear-gradient(#c0c0c0, #e6e6e6); background: linear-gradient(#c0c0c0, #e6e6e6); box-shadow: 0 1px 1px 0 #555 inset; } +#DocumentTypeID ul li.selected { border-bottom: 1px solid #C0C0C2; border-right: 1px solid #C0C0C2; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c0c0c0), color-stop(100%, #e6e6e6)); background: -webkit-linear-gradient(#c0c0c0, #e6e6e6); background: -moz-linear-gradient(#c0c0c0, #e6e6e6); background: -o-linear-gradient(#c0c0c0, #e6e6e6); background: -ms-linear-gradient(#c0c0c0, #e6e6e6); background: linear-gradient(#c0c0c0, #e6e6e6); box-shadow: 0 1px 1px 0 #555 inset; } #DocumentTypeID ul li.selected :after { box-shadow: 0 1px 1px 0 #DDD; } #DocumentTypeID ul li label { padding: .4em 1em; display: block; line-height: 1.4; } diff --git a/css/DMSMainCMS.css b/css/DMSMainCMS.css new file mode 100644 index 0000000..82c5823 --- /dev/null +++ b/css/DMSMainCMS.css @@ -0,0 +1,5 @@ +#Root_Documents table { white-space: normal; } +#Root_Documents table th.col-action_SetOrderTitle, #Root_Documents table th.col-FilenameWithoutID { width: 300px; } +#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; } diff --git a/images/chain-unchain.png b/images/chain-unchain.png new file mode 100755 index 0000000000000000000000000000000000000000..c56c8d8f52277c8aaf5a84efd0011a3f197d5084 GIT binary patch literal 722 zcmV;@0xkWCP)SdwyOj>8>KF^VmB4KFjBh~+KsyqaaFpB+6G$$LE=UNh3M95 z%Czw_kVFzD$t3aKn1r^eJ~%wyJ#P-@o_B|dL?XcR{6&Ug#sEMEgG*_*+n?(7dbZVS z4Uim?K8M3`O%%mxr_(vA)oL}kpxJCfqtR#<3Wc3yGWlGRBo^;~91y70YUg9IsJOZL z=KJ#U%Ik8u+~|>Jvw3KC_MV^k#ly1E{BIED@L^Y_>H_M~^!YITR>IB>aKAP53bRt)wDNL)oXmk