ContextMenu.js
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* @class SimpleTasks.view.tasks.ContextMenu
* @extends Ext.menu.Menu
*/
Ext.define('SimpleTasks.view.tasks.ContextMenu', {
extend: 'Ext.menu.Menu',
xtype: 'tasksContextMenu',
items: [
{
text: 'Edit',
id: 'edit-task-item'
},
'-',
{
text: 'Mark Complete',
iconCls: 'tasks-mark-complete',
id: 'mark-complete-item'
},
{
text: 'Mark Active',
iconCls: 'tasks-mark-active',
id: 'mark-active-item'
},
{
text: 'Delete',
iconCls: 'tasks-delete-task',
id: 'delete-task-item'
}
],
/**
* Associates this menu with a specific task.
* @param {SimpleTasks.model.Task} task
*/
setTask: function(task) {
this.task = task;
},
/**
* Gets the task associated with this menu
* @return {Task.model.Task}
*/
getTask: function() {
return this.task;
}
});