From b17e8d89758173c83a5a96ffc20320dfdc9c5647 Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Wed, 9 May 2018 14:21:13 +0200
Subject: Avoid ... for delete/edit buttons in admin panel

---
 client/src/app/shared/misc/button.component.scss        | 13 +++++++++++++
 client/src/app/shared/misc/delete-button.component.html |  4 ++--
 client/src/app/shared/misc/edit-button.component.html   |  4 ++--
 3 files changed, 17 insertions(+), 4 deletions(-)

(limited to 'client')

diff --git a/client/src/app/shared/misc/button.component.scss b/client/src/app/shared/misc/button.component.scss
index 145a3474a..343aea207 100644
--- a/client/src/app/shared/misc/button.component.scss
+++ b/client/src/app/shared/misc/button.component.scss
@@ -28,3 +28,16 @@
     }
   }
 }
+
+// In a table, try to minimize the space taken by this button
+@media screen and (max-width: 1400px) {
+  :host-context(td) {
+    .action-button {
+      padding: 0 13px;
+    }
+
+    .button-label {
+      display: none;
+    }
+  }
+}
diff --git a/client/src/app/shared/misc/delete-button.component.html b/client/src/app/shared/misc/delete-button.component.html
index d49de294a..7387d0a88 100644
--- a/client/src/app/shared/misc/delete-button.component.html
+++ b/client/src/app/shared/misc/delete-button.component.html
@@ -1,4 +1,4 @@
-<span class="action-button action-button-delete" >
+<span class="action-button action-button-delete" [title]="label">
   <span class="icon icon-delete-grey"></span>
-  {{ label }}
+  <span class="button-label">{{ label }}</span>
 </span>
diff --git a/client/src/app/shared/misc/edit-button.component.html b/client/src/app/shared/misc/edit-button.component.html
index 58012a8b8..632d6bba2 100644
--- a/client/src/app/shared/misc/edit-button.component.html
+++ b/client/src/app/shared/misc/edit-button.component.html
@@ -1,4 +1,4 @@
-<a class="action-button action-button-edit" [routerLink]="routerLink">
+<a class="action-button action-button-edit" [routerLink]="routerLink" title="Edit">
   <span class="icon icon-edit"></span>
-  Edit
+  <span class="button-label">Edit</span>
 </a>
-- 
cgit v1.2.3