++ If press DELETE or BACKSPACE and is blank description, delete the Todos.
- fix: if offline, doesn't save to cache?? if I refresh page, the data disappear - ++ field to the percent progress - fix: Refreshing 2 times the array todos.. because there is a filter
This commit is contained in:
@@ -264,6 +264,15 @@ export default class SingleTodo extends Vue {
|
||||
}
|
||||
}
|
||||
*/
|
||||
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||
e.preventDefault()
|
||||
this.clickMenu(rescodes.MenuAction.DELETE)
|
||||
.then(() => {
|
||||
this.deselectRiga()
|
||||
this.faiFocus('insertTask', true)
|
||||
return
|
||||
})
|
||||
}
|
||||
|
||||
if (((e.key === 'Enter') || (e.key === 'Tab')) && !e.shiftKey) {
|
||||
this.updateTodo()
|
||||
@@ -344,16 +353,16 @@ export default class SingleTodo extends Vue {
|
||||
|
||||
}
|
||||
|
||||
clickMenu(action) {
|
||||
async clickMenu(action) {
|
||||
console.log('click menu: ', action)
|
||||
if (action === rescodes.MenuAction.DELETE) {
|
||||
this.askConfirmDelete()
|
||||
return this.askConfirmDelete()
|
||||
} else if (action === rescodes.MenuAction.TOGGLE_EXPIRING) {
|
||||
this.enableExpiring()
|
||||
return this.enableExpiring()
|
||||
} else if (action === rescodes.MenuAction.COMPLETED) {
|
||||
this.setCompleted()
|
||||
return this.setCompleted()
|
||||
} else if (action === rescodes.MenuAction.PROGRESS_BAR) {
|
||||
this.updatedata()
|
||||
return this.updatedata()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -369,11 +378,11 @@ export default class SingleTodo extends Vue {
|
||||
// this.$q.notify('setPriority: ' + elem)
|
||||
}
|
||||
|
||||
askConfirmDelete() {
|
||||
async askConfirmDelete() {
|
||||
const deletestr = this.$t('dialog.delete')
|
||||
const cancelstr = this.$t('dialog.cancel')
|
||||
|
||||
askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), this.$t('dialog.msg.deleteTask').toString(), deletestr, cancelstr)
|
||||
await askConfirm(this.$q, this.$t('dialog.msg.titledeleteTask'), this.$t('dialog.msg.deleteTask').toString(), deletestr, cancelstr)
|
||||
.then(ris => {
|
||||
console.log('ris', ris)
|
||||
if (ris)
|
||||
|
||||
Reference in New Issue
Block a user