diff --git a/src/App.vue b/src/App.vue index e70b202ab4fb3e43da2131ad05576ca1ed048ac3..3525c510808487c1e684b37f12c0492a14fef3a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@ <template> - <body> + <div v-frag> <header class="header-menu"> <div class="ui container"> <div class="ui inverted icon menu"> @@ -131,16 +131,21 @@ <p class="item">Version {{ PACKAGE_VERSION }}</p> </div> </footer> - </body> + </div> </template> <script> +import frag from "vue-frag"; import { mapState } from "vuex"; import { mapGetters } from "vuex"; export default { name: "App", + directives: { + frag, + }, + data() { return { menuIsOpen: false, @@ -184,15 +189,28 @@ export default { .header-menu { min-width: 560px; - height: 61px; } -main { - height: calc(100vh - 61px - 40px); +body { + height: 100vh; + margin: 0; +} + +header { + min-height: 61px; +} +footer { + min-height: 40px; +} + +/* Trick */ +body { + display: flex; + flex-direction: column; } footer { - height: 40px; + margin-top: auto; } .vertical { diff --git a/src/views/feature/Feature_list.vue b/src/views/feature/Feature_list.vue index e18f7271f53fe88d135caa9bf3af6d84f06b3b41..c6c6658ea51ba4761c4d2eda7b1f866711dcc2a0 100644 --- a/src/views/feature/Feature_list.vue +++ b/src/views/feature/Feature_list.vue @@ -138,7 +138,7 @@ </thead> <tbody> <tr - v-for="(feature, index) in paginatedFeatures" + v-for="(feature, index) in filteredFeatures" :key="feature.feature_id + index" > <td class="dt-center" :data-order="feature.get_status_display"> @@ -201,7 +201,7 @@ </tr> </tbody> </table> - <div + <!-- <div class="dataTables_info" id="table-features_info" role="status" @@ -209,20 +209,21 @@ > Affichage de l'élément {{ pagination.start + 1 }} à {{ pagination.end + 1 }} sur {{ filteredFeatures.length }} éléments - </div> - <div + </div> --> + <!-- <div class="dataTables_paginate paging_simple_numbers" id="table-features_paginate" - > - <a + > --> + <!-- <a + @click="toPreviousPage" class="paginate_button previous disabled" aria-controls="table-features" data-dt-idx="0" tabindex="0" id="table-features_previous" >Précédent</a - ><span - ><a + ><span> --> + <!-- <a v-for="(page, index) in filteredFeatures.length" :key="'page' + index" class="paginate_button current" @@ -230,18 +231,19 @@ data-dt-idx="1" tabindex="0" >1</a - > - <span class="ellipsis">…</span> - <a + > --> + <!-- <span class="ellipsis">…</span> --> + <!-- <a class="paginate_button next" aria-controls="table-features" data-dt-idx="7" tabindex="0" id="table-features_next" + @click="toNextPage" >Suivant</a - > - </span> - </div> + > --> + <!-- </span> + </div> --> </div> </div> </template> @@ -332,6 +334,20 @@ export default { ); }, }, + methods: { + toPreviousPage() { + if (this.pagination.start > 0) { + this.pagination.start = this.pagination.start - 15; + this.pagination.end += 15; + } + }, + toNextPage() { + if (this.pagination.end < this.filteredFeatures.length) { + this.pagination.start += 15; + this.pagination.end = this.pagination.end - 15; + } + }, + }, created() { if (!this.project) { diff --git a/src/views/project/Project_detail.vue b/src/views/project/Project_detail.vue index 58a2b35a7b8234a183a7b5ff9f311f9e2d61004b..66dd987f9542dc10ba2a7dd353390546fadfda8a 100644 --- a/src/views/project/Project_detail.vue +++ b/src/views/project/Project_detail.vue @@ -449,7 +449,6 @@ </template> <script> -// import axios from 'axios'; import frag from "vue-frag"; import { mapGetters, mapState } from "vuex";