translated delete folder dialog, added closed event
This commit is contained in:
parent
88445b4397
commit
ec6ab0dc7b
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,7 @@
|
|||
/>
|
||||
</li>
|
||||
</ul>
|
||||
<v-dialog/>
|
||||
<v-dialog @closed="dialogEvent('closed')"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -93,35 +93,45 @@ export default {
|
|||
this.confirmDeleteFlagColl(flagcollid)
|
||||
},
|
||||
confirmDeleteFlagColl (flagcollid){
|
||||
console.log('confirmDeleteFlagCOll', flagcollid, this.flagcolls);
|
||||
// console.log('confirmDeleteFlagCOll', flagcollid, this.flagcolls);
|
||||
// const index = this.flagcolls.findIndex(i => i.id === flagcollid)
|
||||
let coll = this.flagcolls[flagcollid]
|
||||
// console.log("coll to delete", coll);
|
||||
this.$modal.show('dialog', {
|
||||
title: "Folder delete",
|
||||
text: `Please confirm the definitive deletion of ${coll.name} ?`,
|
||||
this.$modal.show('dialog',
|
||||
{ // component props
|
||||
title: this.$t("materio.Folder delete"),
|
||||
text: this.$t(`materio.Please confirm the definitive deletion of {name} ?`, { name: coll.name }),
|
||||
buttons: [
|
||||
{
|
||||
title: 'Cancel',
|
||||
title: this.$t('default.Cancel'),
|
||||
default: true,
|
||||
handler: () => {
|
||||
// this.is_deleting_folder = false;
|
||||
this.$modal.hide('dialog')
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Delete',
|
||||
title: this.$t('default.Delete'),
|
||||
handler: () => {
|
||||
console.log('deletion confirmed', flagcollid);
|
||||
// console.log('deletion confirmed', flagcollid);
|
||||
this.deleteFlagColl(flagcollid)
|
||||
.then(() => {
|
||||
// console.log("onDeleteFlagColl then", data);
|
||||
this.is_deleting_folder = false;
|
||||
// this.is_deleting_folder = false;
|
||||
this.$modal.hide('dialog')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
)
|
||||
},
|
||||
dialogEvent (eventName) {
|
||||
console.log("dialog event", eventName)
|
||||
switch(eventName){
|
||||
case 'closed':
|
||||
this.is_deleting_folder = false
|
||||
}
|
||||
},
|
||||
onOpenFlagColl (e) {
|
||||
const flagcollid = e.target.getAttribute('flagcollid');
|
||||
|
|
Loading…
Reference in New Issue