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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<v-dialog/>
|
<v-dialog @closed="dialogEvent('closed')"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -93,35 +93,45 @@ export default {
|
||||||
this.confirmDeleteFlagColl(flagcollid)
|
this.confirmDeleteFlagColl(flagcollid)
|
||||||
},
|
},
|
||||||
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)
|
// const index = this.flagcolls.findIndex(i => i.id === flagcollid)
|
||||||
let coll = this.flagcolls[flagcollid]
|
let coll = this.flagcolls[flagcollid]
|
||||||
// console.log("coll to delete", coll);
|
// console.log("coll to delete", coll);
|
||||||
this.$modal.show('dialog', {
|
this.$modal.show('dialog',
|
||||||
title: "Folder delete",
|
{ // component props
|
||||||
text: `Please confirm the definitive deletion of ${coll.name} ?`,
|
title: this.$t("materio.Folder delete"),
|
||||||
buttons: [
|
text: this.$t(`materio.Please confirm the definitive deletion of {name} ?`, { name: coll.name }),
|
||||||
{
|
buttons: [
|
||||||
title: 'Cancel',
|
{
|
||||||
default: true,
|
title: this.$t('default.Cancel'),
|
||||||
handler: () => {
|
default: true,
|
||||||
this.$modal.hide('dialog')
|
handler: () => {
|
||||||
|
// this.is_deleting_folder = false;
|
||||||
|
this.$modal.hide('dialog')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('default.Delete'),
|
||||||
|
handler: () => {
|
||||||
|
// console.log('deletion confirmed', flagcollid);
|
||||||
|
this.deleteFlagColl(flagcollid)
|
||||||
|
.then(() => {
|
||||||
|
// console.log("onDeleteFlagColl then", data);
|
||||||
|
// this.is_deleting_folder = false;
|
||||||
|
this.$modal.hide('dialog')
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
{
|
}
|
||||||
title: 'Delete',
|
)
|
||||||
handler: () => {
|
},
|
||||||
console.log('deletion confirmed', flagcollid);
|
dialogEvent (eventName) {
|
||||||
this.deleteFlagColl(flagcollid)
|
console.log("dialog event", eventName)
|
||||||
.then(() => {
|
switch(eventName){
|
||||||
// console.log("onDeleteFlagColl then", data);
|
case 'closed':
|
||||||
this.is_deleting_folder = false;
|
this.is_deleting_folder = false
|
||||||
this.$modal.hide('dialog')
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onOpenFlagColl (e) {
|
onOpenFlagColl (e) {
|
||||||
const flagcollid = e.target.getAttribute('flagcollid');
|
const flagcollid = e.target.getAttribute('flagcollid');
|
||||||
|
|
Loading…
Reference in New Issue