changeset 2330:7b79d4966a87

client: unified buttons styles in tables
author Markus Kottlaender <markus@intevation.de>
date Tue, 19 Feb 2019 16:33:31 +0100
parents 514193fd0120
children e38d3f1d625c
files client/src/assets/application.scss client/src/components/importschedule/Importschedule.vue client/src/components/systemconfiguration/PDFTemplates.vue client/src/components/usermanagement/Usermanagement.vue
diffstat 4 files changed, 38 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/assets/application.scss	Tue Feb 19 14:57:48 2019 +0100
+++ b/client/src/assets/application.scss	Tue Feb 19 16:33:31 2019 +0100
@@ -141,3 +141,8 @@
 .pointer {
   cursor: pointer;
 }
+
+.btn:disabled,
+.btn.disabled {
+  opacity: 0.4;
+}
--- a/client/src/components/importschedule/Importschedule.vue	Tue Feb 19 14:57:48 2019 +0100
+++ b/client/src/components/importschedule/Importschedule.vue	Tue Feb 19 16:33:31 2019 +0100
@@ -28,7 +28,7 @@
                 />
               </div>
             </div>
-            <table v-if="schedules.length" class="table">
+            <table v-if="schedules.length" class="table table-hover">
               <thead>
                 <tr>
                   <th><translate>Import</translate></th>
@@ -36,9 +36,7 @@
                   <th><translate>Author</translate></th>
                   <th><translate>Schedule</translate></th>
                   <th><translate>Email</translate></th>
-                  <th>&nbsp;</th>
-                  <th>&nbsp;</th>
-                  <th>&nbsp;</th>
+                  <th></th>
                 </tr>
               </thead>
               <tbody>
@@ -55,29 +53,37 @@
                       icon="check"
                     ></font-awesome-icon>
                   </td>
-                  <td>
-                    <font-awesome-icon
-                      :style="activeStyle"
+                  <td class="text-right">
+                    <button
                       @click="editSchedule(schedule.id)"
-                      icon="pencil-alt"
-                      fixed-width
-                    ></font-awesome-icon>
-                  </td>
-                  <td>
-                    <font-awesome-icon
-                      :style="activeStyle"
+                      class="btn btn-sm btn-dark mr-1"
+                      :disabled="importScheduleDetailVisible"
+                    >
+                      <font-awesome-icon
+                        icon="pencil-alt"
+                        fixed-width
+                      ></font-awesome-icon>
+                    </button>
+                    <button
                       @click="deleteSchedule(schedule.id)"
-                      icon="trash"
-                      fixed-width
-                    ></font-awesome-icon>
-                  </td>
-                  <td>
-                    <font-awesome-icon
+                      class="btn btn-sm btn-dark mr-1"
+                      :disabled="importScheduleDetailVisible"
+                    >
+                      <font-awesome-icon
+                        icon="trash"
+                        fixed-width
+                      ></font-awesome-icon>
+                    </button>
+                    <button
                       @click="triggerManualImport(schedule.id)"
-                      class="fa-fw mr-2"
-                      fixed-width
-                      icon="play"
-                    ></font-awesome-icon>
+                      class="btn btn-sm btn-dark"
+                      :disabled="importScheduleDetailVisible"
+                    >
+                      <font-awesome-icon
+                        icon="play"
+                        fixed-width
+                      ></font-awesome-icon>
+                    </button>
                   </td>
                 </tr>
               </tbody>
@@ -204,10 +210,6 @@
   computed: {
     ...mapState("application", ["showSidebar"]),
     ...mapState("importschedule", ["schedules", "importScheduleDetailVisible"]),
-    activeStyle() {
-      const color = this.importScheduleDetailVisible ? "#aeaeae" : "#000000";
-      return { color: color };
-    },
     spacerStyle() {
       return [
         "spacer ml-3",
--- a/client/src/components/systemconfiguration/PDFTemplates.vue	Tue Feb 19 14:57:48 2019 +0100
+++ b/client/src/components/systemconfiguration/PDFTemplates.vue	Tue Feb 19 16:33:31 2019 +0100
@@ -25,7 +25,7 @@
             <td>{{ template.time }}</td>
             <td class="text-right">
               <button
-                class="btn btn-sm btn-danger"
+                class="btn btn-sm btn-dark"
                 @click="
                   showDeleteTemplatePrompt = true;
                   templateToDelete = template;
--- a/client/src/components/usermanagement/Usermanagement.vue	Tue Feb 19 14:57:48 2019 +0100
+++ b/client/src/components/usermanagement/Usermanagement.vue	Tue Feb 19 16:33:31 2019 +0100
@@ -71,7 +71,7 @@
                   <td class="text-right">
                     <button
                       @click="sendTestMail(user.user)"
-                      class="btn btn-sm btn-info mr-1"
+                      class="btn btn-sm btn-dark mr-1"
                       v-tooltip="$gettext('Send testmail')"
                       v-if="user.email"
                     >
@@ -82,7 +82,7 @@
                         showDeleteUserPrompt = true;
                         userToDelete = user.user;
                       "
-                      class="btn btn-sm btn-danger"
+                      class="btn btn-sm btn-dark"
                       v-tooltip="$gettext('Delete user')"
                     >
                       <font-awesome-icon icon="trash" />