mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
N°330 - Attachments: Align table rendering to linkset tables rendering
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ JS
|
||||
// TODO : Add max upload size when itop attachment has been refactored
|
||||
if (!$this->oField->GetReadOnly())
|
||||
{
|
||||
$oOutput->AddHtml('<div class="upload_container row">'.Dict::S('Attachments:AddAttachment').'<input type="file" id="'.$this->oField->GetGlobalId().'" name="'.$this->oField->GetId().'" /><span class="loader glyphicon glyphicon-refresh"></span>'.InlineImage::GetMaxUpload().'</div>');
|
||||
$oOutput->AddHtml('<div class="upload_container">'.Dict::S('Attachments:AddAttachment').'<input type="file" id="'.$this->oField->GetGlobalId().'" name="'.$this->oField->GetId().'" /><span class="loader glyphicon glyphicon-refresh"></span>'.InlineImage::GetMaxUpload().'</div>');
|
||||
}
|
||||
// Ending files container
|
||||
$oOutput->AddHtml('</div>');
|
||||
@@ -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(<<<HTML
|
||||
<table id="$sAttachmentTableId" class="attachments-list table table-striped responsive">
|
||||
<table id="$sAttachmentTableId" class="attachments-list table table-striped table-bordered responsive" cellspacing="0" width="100%">
|
||||
$sTableHead
|
||||
<tbody>
|
||||
HTML
|
||||
@@ -434,8 +432,6 @@ HTML
|
||||
$sAttachmentDate = $oAttachment->Get('creation_date');
|
||||
}
|
||||
|
||||
$sAttachmentCreator = $oAttachment->Get('contact_id_friendlyname');
|
||||
|
||||
$oOutput->Addhtml(self::GetAttachmentTableRow(
|
||||
$iAttId,
|
||||
$sLineStyle,
|
||||
|
||||
Reference in New Issue
Block a user