Commit 7385ca3f authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

scroll sur collectionTree + fetch des metas des resources sur changement de page.

parent 55d377cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -136,7 +136,10 @@ export default {
</script>

<style scoped lang="scss">

.jama-collection-tree {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  .v-list-item {
    cursor: pointer;
  }
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ export default {
        this.$store.commit('addSelectedResource', resource);
      else
        this.$store.commit('removeSelectedResource', resource.id);
    }
    },
  }
}
</script>
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  <v-hover>
    <template v-slot:default="{ hover }">
      <v-card draggable height="200" class="clickable resource-card" @click="select()"
              :id="'jama-resource-tile-'+resource.id"
              :class="{'active':active, 'inactive': inactive}"
              :color="active ? 'primary' : ''"
              :elevation="active || hover ? 24 : 1"
+25 −1
Original line number Diff line number Diff line
@@ -501,6 +501,30 @@ export default {
    Vue.prototype.$jamaConfirm = this.jamaConfirm
  },

  // mounted(){
  //   document.addEventListener("keyup", (k)=>{
  //     let offset = 0;
  //     if(k.key == 'ArrowRight'){
  //       offset = 1;
  //     }
  //     else if (k.key == 'ArrowLeft'){
  //       offset = -1;
  //     }
  //     else {
  //       console.log(k.key);
  //       return false;
  //     }
  //     let currentPos = this.resources.indexOf(this.currentCollection);
  //     if(currentPos>=0 && this.resources[currentPos+offset]){
  //       document.getElementById('jama-resource-tile-' + this.resources[offset]).click();
  //       //this.$store.commit('setCurrentResource', this.resources[currentPos+1])
  //     }
  //     else {
  //       console.log(currentPos, this.resources[currentPos+offset]);
  //     }
  //   })
  // },

  methods: {

    ...mapActions([
@@ -720,7 +744,7 @@ export default {
      this.fetchItems(
          {
            projectId: this.currentProjectId,
            includeMetas: false,
            includeMetas: true,
            collectionId: this.currentCollection.id,
            limitFrom: start,
            limitTo: end