Loading src/components/CollectionsTree.vue +1 −35 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ export default { data() { return { highlightedNode: null, //simulateClick: false, } }, mounted() { Loading @@ -60,50 +59,17 @@ export default { watch: { currentCollection(){ //console.log(this.openNodes); // if(this.active.length === 0 || this.active[0].id !== this.currentCollection.id){ // let a = this.$store.getters.collectionsTreeNodeById(this.currentCollection.id); // this.active = [a]; // this.openNodes = this.openNodes.concat([a]).map((e)=>this.$store.getters.collectionsTreeNodeById(e.id)); // // console.log(this.active); // } if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } /*if (this.currentCollection.id === this.currentRootCollectionId) {//home clicked this.highlightedNode = null; if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } */ /*else {//collection was loaded but from external action (no click on treeview) this.simulateClick = true; try { const target = document.querySelector('#tree-item-' + this.currentCollection.id) .parentElement.parentElement; this.simulateClick = true; target.click(); } // eslint-disable-next-line no-empty catch (e) { } }*/ // } } }, methods: { async collectionClicked(c) { this.highlightedNode = c; // if (this.simulateClick) { // return; // } await this.fetchCollectionTree(c.id); //this.$emit('tree-collection-selected', c.id); }, async activeItemChanged(values) { Loading src/store/JamaStore.js +0 −3 Original line number Diff line number Diff line Loading @@ -99,9 +99,6 @@ export default new Vuex.Store({ currentStats: state => state.currentStats, filter: state => state.filter, multiSelectActionAddons: state => state.multiSelectActionAddons, // collectionsTreeNodeById: (state) => (id) => { // return findItem(id,state.collectionsTree) // } }, mutations: { Loading Loading
src/components/CollectionsTree.vue +1 −35 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ export default { data() { return { highlightedNode: null, //simulateClick: false, } }, mounted() { Loading @@ -60,50 +59,17 @@ export default { watch: { currentCollection(){ //console.log(this.openNodes); // if(this.active.length === 0 || this.active[0].id !== this.currentCollection.id){ // let a = this.$store.getters.collectionsTreeNodeById(this.currentCollection.id); // this.active = [a]; // this.openNodes = this.openNodes.concat([a]).map((e)=>this.$store.getters.collectionsTreeNodeById(e.id)); // // console.log(this.active); // } if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } /*if (this.currentCollection.id === this.currentRootCollectionId) {//home clicked this.highlightedNode = null; if (this.highlightedNode && this.highlightedNode.id !== this.currentCollection.id) { document.querySelectorAll('.v-treeview-node--active') .forEach((elt) => elt.classList.remove('v-treeview-node--active'))//desactive current active } */ /*else {//collection was loaded but from external action (no click on treeview) this.simulateClick = true; try { const target = document.querySelector('#tree-item-' + this.currentCollection.id) .parentElement.parentElement; this.simulateClick = true; target.click(); } // eslint-disable-next-line no-empty catch (e) { } }*/ // } } }, methods: { async collectionClicked(c) { this.highlightedNode = c; // if (this.simulateClick) { // return; // } await this.fetchCollectionTree(c.id); //this.$emit('tree-collection-selected', c.id); }, async activeItemChanged(values) { Loading
src/store/JamaStore.js +0 −3 Original line number Diff line number Diff line Loading @@ -99,9 +99,6 @@ export default new Vuex.Store({ currentStats: state => state.currentStats, filter: state => state.filter, multiSelectActionAddons: state => state.multiSelectActionAddons, // collectionsTreeNodeById: (state) => (id) => { // return findItem(id,state.collectionsTree) // } }, mutations: { Loading