diff --git a/datamodels/2.x/itop-portal-base/portal/public/css/portal.css b/datamodels/2.x/itop-portal-base/portal/public/css/portal.css index 8b881f5f1..17443c72e 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/css/portal.css +++ b/datamodels/2.x/itop-portal-base/portal/public/css/portal.css @@ -1,21 +1,4 @@ -/*! - * Copyright (C) 2013-2020 Combodo SARL - * - * This file is part of iTop. - * - * iTop is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * iTop is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - */ -/*! +/* * Copyright (C) 2013-2020 Combodo SARL * * This file is part of iTop. @@ -32,6 +15,7 @@ * * You should have received a copy of the GNU Affero General Public License */ + /*! * Combodo portal template v1.0.0 */ @@ -1137,14 +1121,6 @@ table .group-actions { padding: 0px; } /* FileUpload */ -.fileupload_field_content { - padding: 8px 23px; - border: 1px solid #ddd; - background-color: #F9F9F9; -} -.fileupload_field_content > div { - margin-bottom: 15px; -} .attachments_container .attachments-list thead > tr > th { text-align: center; } @@ -1153,25 +1129,17 @@ table .group-actions { text-align: left; vertical-align: middle; } -.attachments_container .attachments-list tbody > tr > td:first-child { +.attachments_container .attachments-list tbody > tr > td[role="icon"] { text-align: center; } -.attachments_container .attachments-list tbody > tr > td:nth-child(3) { +.attachments_container .attachments-list tbody > tr > td[role="icon"] img { + max-height: 32px; +} +.attachments_container .attachments-list tbody > tr > td[role="formatted-size"] { text-align: right; } -.attachments_container .attachment { - height: 4em; -} -.attachments_container .attachment .attachment_name { - overflow-x: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.attachments_container .attachment .btn { - margin-top: 3px; -} -.attachments_container .attachment:hover { - background-color: #e0e0e0; +.attachments_container .attachments-list tbody > tr > td[role="delete"] { + text-align: center; } .attachment-tooltip { width: 350px; @@ -1369,12 +1337,12 @@ table .group-actions { .cke_notification_success { display: none; background-color: #dff0d8; - border-color: #d6e9c6; + border-color: #58a959; color: #468847; } .cke_notification_warning { background-color: #fcf8e3; - border-color: #fbeed5; + border-color: #ceae78; color: #c09853; } /* CKEditor : Misc */ diff --git a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss index a6fd1d28b..7e848f2f8 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss +++ b/datamodels/2.x/itop-portal-base/portal/public/css/portal.scss @@ -1207,49 +1207,30 @@ table .group-actions .item-action-wrapper .panel-body > p:last-child{ padding: 0px; } /* FileUpload */ -.fileupload_field_content{ - padding: 8px 23px; - border: 1px solid $gray-lighter; - background-color: #F9F9F9; -} -.fileupload_field_content > div{ - margin-bottom: 15px; -} .attachments_container { .attachments-list { - & thead > tr > th { + thead > tr > th { text-align: center; } - & tbody > tr > td { + tbody > tr > td { padding: 0.5rem 8px; text-align: left; vertical-align: middle; - &:first-child { + &[role="icon"] { text-align: center; + + img{ + max-height: 32px; + } } - &:nth-child(3) { + &[role="formatted-size"] { text-align: right; } - } - } - - .attachment { - height: 4em; - - .attachment_name { - overflow-x: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .btn { - margin-top: 3px; - } - - &:hover { - background-color: #e0e0e0; + &[role="delete"] { + text-align: center; + } } } } diff --git a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php index ce4bd3cec..eb2a3a24b 100644 --- a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php +++ b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php @@ -161,7 +161,7 @@ JS // TODO : Add max upload size when itop attachment has been refactored if (!$this->oField->GetReadOnly()) { - $oOutput->AddHtml('
'.Dict::S('Attachments:AddAttachment').''.InlineImage::GetMaxUpload().'
'); + $oOutput->AddHtml('
'.Dict::S('Attachments:AddAttachment').''.InlineImage::GetMaxUpload().'
'); } // Ending files container $oOutput->AddHtml(''); @@ -186,7 +186,6 @@ JS '{{sAttachmentMeta}}', '{{sFileSize}}', '{{sAttachmentDate}}', - '{{sAttachmentCreator}}', $bIsDeleteAllowed )); $sAttachmentTableId = $this->GetAttachmentsTableId(); @@ -249,7 +248,6 @@ JS {search: "{{sAttachmentMeta}}", replace:sAttachmentMeta }, {search: "{{sFileSize}}", replace:data.result.file_size }, {search: "{{sAttachmentDate}}", replace:data.result.creation_date }, - {search: "{{sAttachmentCreator}}", replace:data.result.contact_id_friendlyname }, ]; var sAttachmentRow = attachmentRowTemplate; $.each(replaces, function(indexInArray, value ) { @@ -393,7 +391,7 @@ JS { $sTableHead = self::GetAttachmentTableHeader($bIsDeleteAllowed); $oOutput->Addhtml(<< + $sTableHead HTML @@ -434,8 +432,6 @@ HTML $sAttachmentDate = $oAttachment->Get('creation_date'); } - $sAttachmentCreator = $oAttachment->Get('contact_id_friendlyname'); - $oOutput->Addhtml(self::GetAttachmentTableRow( $iAttId, $sLineStyle,