Loading src/components/CollectionsTree.vue +15 −9 Original line number Diff line number Diff line Loading @@ -40,20 +40,28 @@ export default { data(){ return { items: [], currentCollection : null selectedCollection : null } }, mounted() { this.fetchCollections(); }, computed: { ...mapGetters(["collections","currentRootCollectionId"]) ...mapGetters(["collections","currentRootCollectionId", "currentCollection"]) }, watch:{ currentCollection(){ if(this.currentCollection.id == this.currentRootCollectionId) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } } }, methods: { async collectionClicked(c){ this.currentCollection = c; await this.fetchCollections(this.currentCollection); this.$emit('collection-selected', this.currentCollection.id); this.selectedCollection = c; await this.fetchCollections(this.selectedCollection); this.$emit('collection-selected', this.selectedCollection.id); }, async fetchCollections(collection) { Loading Loading @@ -94,13 +102,11 @@ export default { updateActive(values){ if(values.length !== 1) return false; this.currentCollection = values[0]; this.$emit('collection-selected', this.currentCollection.id); this.selectedCollection = values[0]; this.$emit('collection-selected', this.selectedCollection.id); }, loadHome(){ document.querySelectorAll('.v-treeview-node--active') .forEach((elt)=>elt.classList.remove('v-treeview-node--active'))//desactive current active this.$emit('collection-selected', this.currentRootCollectionId); } } Loading src/components/JamaCollectionTile.vue +23 −12 Original line number Diff line number Diff line Loading @@ -10,21 +10,22 @@ @click="select()" @dragover.prevent @drop.prevent="dropped($event)"> <v-img v-if="collection.represented_by" height="80" :src="collection.represented_by.urls.m" ></v-img> <v-icon color="amber lighten-1">mdi-folder</v-icon> <!-- <v-img--> <!-- v-if="collection.represented_by"--> <!-- height="80"--> <!-- :src="collection.represented_by.urls.m"--> <!-- ></v-img>--> <v-card-title class="grey--text body-2"> {{ label }} </v-card-title> <v-card-text class="jama-collection-card-text"> <v-avatar color="grey lighten-4"> <v-icon color="grey lighten"> mdi-folder </v-icon> </v-avatar> </v-card-text> <!-- <v-card-text class="jama-collection-card-text">--> <!-- <v-avatar color="grey lighten-4">--> <!-- <v-icon color="grey lighten">--> <!-- mdi-folder--> <!-- </v-icon>--> <!-- </v-avatar>--> <!-- </v-card-text>--> </v-card> </template> </v-hover> Loading Loading @@ -92,4 +93,14 @@ export default { right: 2px; } } .collection-tile{ display: flex; align-items: center; justify-content: center; .mdi-folder{ font-size: 128px; } } </style> src/components/JamaItemsList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ width="24" :src="item.icono" /> <v-icon v-else> <v-icon v-else color="amber lighten-1"> {{item.icono}} </v-icon> </td> Loading src/components/VueJama.vue +33 −6 Original line number Diff line number Diff line <template> <v-row v-if="permissionsReady" class="ma-0 flex-grow-1 main-row"> <v-navigation-drawer v-if="currentCollection" v-model="treeDrawer" app > <collections-tree @collection-selected="loadCollectionById"/> </v-navigation-drawer> <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class="pa-0 d-flex"> <div class="d-flex flex-column flex-grow-1"> <!--toolbar --> <v-toolbar dark elevation="0"> <v-btn v-if="currentCollection" icon @click.stop="treeDrawer = !treeDrawer" > <v-icon>mdi-{{ `chevron-${treeDrawer ? 'left' : 'right'}` }}</v-icon> </v-btn> <!-- <v-app-bar-nav-icon v-if="currentCollection" @click.stop="treeDrawer = !treeDrawer" />--> <h2 class="d-flex align-center"> <span class="jama-app-title">{{ appTitle }}</span> <template v-if="appSubtitle && !isPickerMode"> <span class="subtitle-1 mr-2 ml-2"> > </span> <span class="subtitle-1 mr-2 ml-2"> | </span> <span class="subtitle-1 jama-app-subtitle">{{ appSubtitle }}</span> </template> </h2> Loading Loading @@ -133,9 +150,18 @@ @resource-selected="resourceSelected" /> <v-container class="d-flex align-center justify-center" v-if="nbPages > 1"> <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class="pr-15 d-flex bottom-pagination"> <!-- <v-container v-if="nbPages > 1" class="d-flex flex-grow-0 bottom-pagination">--> <!-- <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12">--> <!-- <v-pagination--> <!-- v-model="currentPage"--> <!-- :length="nbPages"--> <!-- @input="gotoPage"--> <!-- ></v-pagination>--> <!-- </v-col>--> <!-- </v-container>--> <v-col v-if="nbPages > 1" :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class=" d-flex bottom-pagination ma-0 pa-0"> <v-container class="d-flex justify-end ma-0 pa-0"> <v-col cols="6"> <v-row class="d-flex justify-end ma-0 pa-0"> Loading @@ -155,7 +181,6 @@ </v-container> </v-col> </v-container> </v-container> </template> <!-- v-show : will not destroy result page on tab changed ! --> Loading Loading @@ -288,12 +313,14 @@ import { FULLSCREEN } from "../const"; import JamaPermissions from "../utils/JamaPermissions"; import CollectionsTree from "./CollectionsTree"; export default { name: 'VueJama', store: store, components: { CollectionsTree, JamaProjectChooser, JamaModesBar, JamaUploadView, Loading Loading @@ -442,7 +469,7 @@ export default { hiddenRightPanel: false, rightPaneMaximized: false, rootCollectionInfos: null,//usefull for root coll pagination treeDrawer: true } }, Loading Loading
src/components/CollectionsTree.vue +15 −9 Original line number Diff line number Diff line Loading @@ -40,20 +40,28 @@ export default { data(){ return { items: [], currentCollection : null selectedCollection : null } }, mounted() { this.fetchCollections(); }, computed: { ...mapGetters(["collections","currentRootCollectionId"]) ...mapGetters(["collections","currentRootCollectionId", "currentCollection"]) }, watch:{ currentCollection(){ if(this.currentCollection.id == this.currentRootCollectionId) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } } }, methods: { async collectionClicked(c){ this.currentCollection = c; await this.fetchCollections(this.currentCollection); this.$emit('collection-selected', this.currentCollection.id); this.selectedCollection = c; await this.fetchCollections(this.selectedCollection); this.$emit('collection-selected', this.selectedCollection.id); }, async fetchCollections(collection) { Loading Loading @@ -94,13 +102,11 @@ export default { updateActive(values){ if(values.length !== 1) return false; this.currentCollection = values[0]; this.$emit('collection-selected', this.currentCollection.id); this.selectedCollection = values[0]; this.$emit('collection-selected', this.selectedCollection.id); }, loadHome(){ document.querySelectorAll('.v-treeview-node--active') .forEach((elt)=>elt.classList.remove('v-treeview-node--active'))//desactive current active this.$emit('collection-selected', this.currentRootCollectionId); } } Loading
src/components/JamaCollectionTile.vue +23 −12 Original line number Diff line number Diff line Loading @@ -10,21 +10,22 @@ @click="select()" @dragover.prevent @drop.prevent="dropped($event)"> <v-img v-if="collection.represented_by" height="80" :src="collection.represented_by.urls.m" ></v-img> <v-icon color="amber lighten-1">mdi-folder</v-icon> <!-- <v-img--> <!-- v-if="collection.represented_by"--> <!-- height="80"--> <!-- :src="collection.represented_by.urls.m"--> <!-- ></v-img>--> <v-card-title class="grey--text body-2"> {{ label }} </v-card-title> <v-card-text class="jama-collection-card-text"> <v-avatar color="grey lighten-4"> <v-icon color="grey lighten"> mdi-folder </v-icon> </v-avatar> </v-card-text> <!-- <v-card-text class="jama-collection-card-text">--> <!-- <v-avatar color="grey lighten-4">--> <!-- <v-icon color="grey lighten">--> <!-- mdi-folder--> <!-- </v-icon>--> <!-- </v-avatar>--> <!-- </v-card-text>--> </v-card> </template> </v-hover> Loading Loading @@ -92,4 +93,14 @@ export default { right: 2px; } } .collection-tile{ display: flex; align-items: center; justify-content: center; .mdi-folder{ font-size: 128px; } } </style>
src/components/JamaItemsList.vue +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ width="24" :src="item.icono" /> <v-icon v-else> <v-icon v-else color="amber lighten-1"> {{item.icono}} </v-icon> </td> Loading
src/components/VueJama.vue +33 −6 Original line number Diff line number Diff line <template> <v-row v-if="permissionsReady" class="ma-0 flex-grow-1 main-row"> <v-navigation-drawer v-if="currentCollection" v-model="treeDrawer" app > <collections-tree @collection-selected="loadCollectionById"/> </v-navigation-drawer> <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class="pa-0 d-flex"> <div class="d-flex flex-column flex-grow-1"> <!--toolbar --> <v-toolbar dark elevation="0"> <v-btn v-if="currentCollection" icon @click.stop="treeDrawer = !treeDrawer" > <v-icon>mdi-{{ `chevron-${treeDrawer ? 'left' : 'right'}` }}</v-icon> </v-btn> <!-- <v-app-bar-nav-icon v-if="currentCollection" @click.stop="treeDrawer = !treeDrawer" />--> <h2 class="d-flex align-center"> <span class="jama-app-title">{{ appTitle }}</span> <template v-if="appSubtitle && !isPickerMode"> <span class="subtitle-1 mr-2 ml-2"> > </span> <span class="subtitle-1 mr-2 ml-2"> | </span> <span class="subtitle-1 jama-app-subtitle">{{ appSubtitle }}</span> </template> </h2> Loading Loading @@ -133,9 +150,18 @@ @resource-selected="resourceSelected" /> <v-container class="d-flex align-center justify-center" v-if="nbPages > 1"> <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class="pr-15 d-flex bottom-pagination"> <!-- <v-container v-if="nbPages > 1" class="d-flex flex-grow-0 bottom-pagination">--> <!-- <v-col :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12">--> <!-- <v-pagination--> <!-- v-model="currentPage"--> <!-- :length="nbPages"--> <!-- @input="gotoPage"--> <!-- ></v-pagination>--> <!-- </v-col>--> <!-- </v-container>--> <v-col v-if="nbPages > 1" :cols="sidePaneVisible ? (rightPaneMaximized ? 6 : 8) : 12" class=" d-flex bottom-pagination ma-0 pa-0"> <v-container class="d-flex justify-end ma-0 pa-0"> <v-col cols="6"> <v-row class="d-flex justify-end ma-0 pa-0"> Loading @@ -155,7 +181,6 @@ </v-container> </v-col> </v-container> </v-container> </template> <!-- v-show : will not destroy result page on tab changed ! --> Loading Loading @@ -288,12 +313,14 @@ import { FULLSCREEN } from "../const"; import JamaPermissions from "../utils/JamaPermissions"; import CollectionsTree from "./CollectionsTree"; export default { name: 'VueJama', store: store, components: { CollectionsTree, JamaProjectChooser, JamaModesBar, JamaUploadView, Loading Loading @@ -442,7 +469,7 @@ export default { hiddenRightPanel: false, rightPaneMaximized: false, rootCollectionInfos: null,//usefull for root coll pagination treeDrawer: true } }, Loading