Commit f051458d authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

ajustement sync treeview

parent 86d20121
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
        return-object
    >
      <template v-slot:label="{ item }">
        <v-list-item dense class="ma-0 pa-0">
        <v-list-item dense class="ma-0 pa-0" :id="'tree-item-'+item.id">
          <template>
            {{item.title}}
          </template>
@@ -40,7 +40,8 @@ export default {
  data(){
    return {
      items: [],
      selectedCollection : null
      selectedCollection : null,
      selectedCollections: []
    }
  },
  mounted() {
@@ -61,7 +62,6 @@ export default {
    async collectionClicked(c){
      this.selectedCollection = c;
      await this.fetchCollections(this.selectedCollection);
      this.$emit('collection-selected', this.selectedCollection.id);
    },

    async fetchCollections(collection) {
@@ -103,11 +103,11 @@ export default {
      if(values.length !== 1)
        return false;
      this.selectedCollection = values[0];
      this.$emit('collection-selected', this.selectedCollection.id);
      this.$emit('tree-collection-selected', this.selectedCollection.id);
    },

    loadHome(){
      this.$emit('collection-selected', this.currentRootCollectionId);
      this.$emit('tree-collection-selected', this.currentRootCollectionId);
    }
  }
}
+0 −12
Original line number Diff line number Diff line
@@ -11,21 +11,9 @@
              @dragover.prevent
              @drop.prevent="dropped($event)">
        <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>
    </template>
  </v-hover>
+9 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
           class="pa-0 ma-0 jama-tree-drawer-cols"
           v-if="currentCollection && treeDrawer"
    >
      <collections-tree @collection-selected="loadCollectionById"/>
      <collections-tree @tree-collection-selected="loadCollectionById"/>
    </v-col>


@@ -129,7 +129,7 @@
                                     :dnd="!searchMode"
                                     @items-moved="reloadCurrentCollection"
                                     @about-selected="aboutResource"
                                     @collection-selected="loadCollection"
                                     @collection-selected="collectionSelected"
                                     @resource-selected="resourceSelected"
                                     @collection-moved="reloadCurrentCollection"
                                     @sort-options-changed="reloadCurrentCollection"
@@ -591,6 +591,13 @@ export default {
      }
    },

    collectionSelected(collection){
      //if(!this.treeDrawer)
        this.loadCollection(collection);
      // else
      //   console.log('todo');
    },

    /*add image from input - no drag and drop*/
    async uploadSelectedResources(files) {
      await this.manageFilesUpload(files);