From 885669a2bc1d7d958f37fde8836b51b352368880 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Fri, 1 Mar 2019 17:49:06 +0000 Subject: [webapp/datatable] new loading bar --- webapp/src/components/DashboardPage.vue | 4 +- webapp/src/components/DataTable.vue | 10 ++-- webapp/src/components/GroupModule.vue | 2 +- webapp/src/components/LoadingBar.vue | 92 +++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 7 deletions(-) create mode 100644 webapp/src/components/LoadingBar.vue (limited to 'webapp') diff --git a/webapp/src/components/DashboardPage.vue b/webapp/src/components/DashboardPage.vue index 0d6fc31..6c5d267 100644 --- a/webapp/src/components/DashboardPage.vue +++ b/webapp/src/components/DashboardPage.vue @@ -65,8 +65,8 @@ language - invert_colors - + invert_colors + diff --git a/webapp/src/components/DataTable.vue b/webapp/src/components/DataTable.vue index ab530fc..4333dad 100644 --- a/webapp/src/components/DataTable.vue +++ b/webapp/src/components/DataTable.vue @@ -123,8 +123,9 @@ - -
+
+ +
import DataTableSearch from '@/components/DataTableSearch' +import LoadingBar from '@/components/LoadingBar' export default { name: 'DataTable', components: { - DataTableSearch + DataTableSearch, + LoadingBar }, props: { headers: { @@ -215,7 +218,6 @@ export default { const rows = this.rows.slice(0) for (let key in this.headerSortState) { if (!this.headers.some(header => header.key === key)) continue - console.log('asdf') const direction = this.headerSortState[key] if (direction === 'asc') rows.sort((a, b) => String(a.data[key]).localeCompare(String(b.data[key]))) if (direction === 'desc') rows.sort((b, a) => String(a.data[key]).localeCompare(String(b.data[key]))) diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue index 8a301e3..d12be50 100644 --- a/webapp/src/components/GroupModule.vue +++ b/webapp/src/components/GroupModule.vue @@ -88,7 +88,7 @@ export default { this.setActiveTab(1) } else { const action = type === 'group' ? 'loadGroup' : type === 'client' ? 'loadClient' : null - if (action) this.$store.dispatch('groups/' + action, { id, tabIndex: 1, switchTab: true }) + if (action) this.$store.dispatch('groups/' + action, { id, tabIndex: id === 0 ? 0 : 1, switchTab: true }) } } }, diff --git a/webapp/src/components/LoadingBar.vue b/webapp/src/components/LoadingBar.vue new file mode 100644 index 0000000..6f1790d --- /dev/null +++ b/webapp/src/components/LoadingBar.vue @@ -0,0 +1,92 @@ + + + + + + -- cgit v1.2.3-55-g7522