Skip to content

Commit

Permalink
Fixed delete dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
HeDo88TH committed Oct 30, 2021
1 parent b29f125 commit ee7a075
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions webapp/js/components/ViewDataset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</Panel>
<SettingsDialog v-if="showSettings" :dataset="dataset" @onClose="handleSettingsClose" @addMarkdown="handleAddMarkdown" />
<AddToDatasetDialog v-if="uploadDialogOpen" @onClose="handleAddClose" :path="currentPath" :organization="dataset.org" :dataset="dataset.ds"></AddToDatasetDialog>
<DeleteDialog v-if="deleteDialogOpen" @onClose="handleDeleteClose" :files="selectedFiles"></DeleteDialog>
<DeleteDialog v-if="deleteDialogOpen" @onClose="handleDeleteClose" :files="contextMenuFiles"></DeleteDialog>
<RenameDialog v-if="renameDialogOpen" @onClose="handleRenameClose" :path="renamePath"></RenameDialog>
<NewFolderDialog v-if="createFolderDialogOpen" @onClose="handleNewFolderClose"></NewFolderDialog>
<Alert :title="errorMessageTitle" v-if="errorDialogOpen" @onClose="handleErrorDialogClose">
Expand Down Expand Up @@ -160,7 +160,7 @@ export default {
errorDialogOpen: false,
errorMessage: null,
errorMessageTitle: null,
showSettings: false
showSettings: false,
};
},
mounted: function(){
Expand Down Expand Up @@ -311,12 +311,17 @@ export default {
},
openDeleteItemsDialog: function() {
if (this.selectedFiles.length == 0) return;
this.selectedUsingFileBrowserList = false;
this.deleteDialogOpen = true;
},
openDeleteItemsDialogFromFileBrowser: function() {
this.deleteDialogOpen = true;
this.selectedUsingFileBrowserList = true;
this.deleteDialogOpen = true;
},
openRenameItemsDialog: function() {
Expand Down Expand Up @@ -344,7 +349,7 @@ export default {
try {
var deleted = [];
for(var file of this.selectedFiles) {
for(var file of this.contextMenuFiles) {
await this.dataset.deleteObj(file.entry.path);
deleted.push(file.entry.path);
}
Expand Down Expand Up @@ -598,7 +603,8 @@ export default {
id: 'remove',
title: "Remove",
icon: "trash alternate",
onClick: () => {
onClick: () => {
this.selectedUsingFileBrowserList = false;
this.deleteDialogOpen = true;
}
});
Expand Down

0 comments on commit ee7a075

Please sign in to comment.