bulk-operations v0.3 fixed DragUI subtitle for single item , add handle for move item to the same parent

This commit is contained in:
Milos Holba
2020-12-04 15:47:32 +01:00
parent d31e2ab98b
commit 6bc84d4b25
3 changed files with 67 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ import {events} from '@/bus'
return this.fileInfoDetail.length + ' ' + this.$tc('file_detail.items', this.fileInfoDetail.length)
}
if((this.fileInfoDetail.length < 2 || !this.fileInfoDetail.includes(this.draggedItem)) && this.draggedItem ) {
if((this.fileInfoDetail.length < 2 || !this.fileInfoDetail.includes(this.draggedItem)) && this.draggedItem && this.draggedItem.mimetype) {
return '.'+this.draggedItem.mimetype
}
},

View File

@@ -82,7 +82,10 @@
// Prevent empty submit
if (! this.selectedFolder) return
// Move item
//Prevent to move items to the same parent
if(this.fileInfoDetail.find(item => item.parent_id === this.selectedFolder.unique_id)) return
// Move item
if(!this.noSelectedItem){
this.$store.dispatch('moveItem', {to_item:this.selectedFolder ,noSelectedItem: null})
}