- Created component SubMenus to permit to call menu with:
- right click
<q-context-menu ref="contextMenu">
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>
</q-context-menu>
- click on btn:
<q-btn flat
class="pos-item-popover"
icon="menu" >
<q-popover self="top right">
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>
</q-popover>
</q-btn>
This commit is contained in:
@@ -38,6 +38,7 @@ export default class SingleTodo extends Vue {
|
||||
public percProgress: string = 'percProgress'
|
||||
public colProgress: string = 'blue'
|
||||
public togglemenu: boolean = false
|
||||
public percentageProgress: number = 0
|
||||
$q: any
|
||||
|
||||
@Prop({ required: true }) itemtodo: ITodo
|
||||
@@ -92,10 +93,13 @@ export default class SingleTodo extends Vue {
|
||||
this.classExpiring = 'flex-item data-item'
|
||||
this.classExpiringEx = ''
|
||||
if (this.itemtodo.completed) {
|
||||
this.percentageProgress = 100
|
||||
this.classCompleted += ' icon_completed'
|
||||
this.classDescr += ' status_completed'
|
||||
this.classExpiring += ' status_completed'
|
||||
this.classExpiringEx += ' status_completed'
|
||||
} else {
|
||||
this.percentageProgress = this.itemtodo.progress
|
||||
}
|
||||
|
||||
this.menuProgress = 'menuProgress'
|
||||
@@ -332,13 +336,6 @@ export default class SingleTodo extends Vue {
|
||||
// this.$q.notify('setPriority: ' + elem)
|
||||
}
|
||||
|
||||
getPercentageProgress() {
|
||||
if (this.itemtodo.completed)
|
||||
return 100
|
||||
else
|
||||
return this.itemtodo.progress
|
||||
}
|
||||
|
||||
askConfirmDelete() {
|
||||
const deletestr = this.$t('dialog.delete')
|
||||
const cancelstr = this.$t('dialog.cancel')
|
||||
|
||||
Reference in New Issue
Block a user