From d8671798b01cc9be95e7178306dab6fc48098d78 Mon Sep 17 00:00:00 2001
From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de>
Date: Tue, 1 Nov 2022 12:10:49 +0000
Subject: [PATCH] drop special CSS for document tables, remove extra spacing,
 fixes #1728

Closes #1728

Merge request studip/studip!1126
---
 app/views/file/choose_file.php               |  4 ++++
 app/views/file/choose_folder.php             |  6 +++++-
 resources/assets/stylesheets/less/files.less | 22 --------------------
 resources/vue/components/FilesTable.vue      |  6 +++---
 4 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/app/views/file/choose_file.php b/app/views/file/choose_file.php
index c7eb80fc119..2821ce21067 100644
--- a/app/views/file/choose_file.php
+++ b/app/views/file/choose_file.php
@@ -55,6 +55,10 @@ if (Request::get('to_folder_id')) {
 
 <? if ($top_folder): ?>
 <table class="default">
+    <colgroup>
+        <col style="width: 36px;">
+        <col>
+    </colgroup>
     <thead>
         <tr>
             <th><?= _('Typ') ?></th>
diff --git a/app/views/file/choose_folder.php b/app/views/file/choose_folder.php
index d3c92869c39..d2d81f57815 100644
--- a/app/views/file/choose_folder.php
+++ b/app/views/file/choose_folder.php
@@ -68,9 +68,13 @@ $buttonLabels = [
 
 <? if ($top_folder) : ?>
     <table class="default">
+        <colgroup>
+            <col style="width: 36px;">
+            <col>
+        </colgroup>
         <thead>
             <tr>
-                <th width="25px"><?= _('Typ') ?></th>
+                <th><?= _('Typ') ?></th>
                 <th><?= _('Name') ?></th>
             </tr>
         </thead>
diff --git a/resources/assets/stylesheets/less/files.less b/resources/assets/stylesheets/less/files.less
index 4b7f560b744..48161dfa34d 100644
--- a/resources/assets/stylesheets/less/files.less
+++ b/resources/assets/stylesheets/less/files.less
@@ -429,31 +429,9 @@ form.default fieldset.select_terms_of_use {
 }
 
 table.documents {
-    td, th {
-        vertical-align: top;
-
-        &:first-child {
-            padding-left: 8px;
-        }
-    }
-
     tr:target {
         background-color: @activity-color-20;
     }
-
-    tbody.subfolders tr, tbody.files tr {
-        height: 43px;
-    }
-}
-
-
-/*
-For the file and folder table in the selection dialogs
-when adding a file or copying/moving things:
-*/
-td.document-icon {
-    max-width: 40px;
-    width: 40px;
 }
 
 
diff --git a/resources/vue/components/FilesTable.vue b/resources/vue/components/FilesTable.vue
index e58d2140b02..875b07635bb 100644
--- a/resources/vue/components/FilesTable.vue
+++ b/resources/vue/components/FilesTable.vue
@@ -28,7 +28,7 @@
 
             <colgroup>
                 <col v-if="show_bulk_actions" style="width: 30px">
-                <col style="width: 60px">
+                <col style="width: 36px">
                 <col>
                 <col style="width: 100px" class="responsive-hidden">
                 <col v-if="showdownloads" style="width: 100px" class="responsive-hidden">
@@ -38,7 +38,7 @@
                      :key="index"
                      data-filter-ignore
                      class="responsive-hidden">
-                <col style="width: 80px">
+                <col style="width: 64px">
             </colgroup>
             <thead>
                 <tr class="sortable">
@@ -88,7 +88,7 @@
                         </a>
 
                     </th>
-                    <th data-sort="false">{{ $gettext('Aktionen') }}</th>
+                    <th class="actions" data-sort="false">{{ $gettext('Aktionen') }}</th>
                 </tr>
             </thead>
             <tbody v-if="!hasData">
-- 
GitLab