ContextMenu.js
1.15 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
48
49
50
51
52
53
/**
* @class SimpleTasks.view.lists.ContextMenu
* @extends Ext.menu.Menu
*/
Ext.define('SimpleTasks.view.lists.ContextMenu', {
extend: 'Ext.menu.Menu',
xtype: 'listsContextMenu',
items: [
{
text: 'New List',
iconCls: 'tasks-new-list',
id: 'new-list-item'
},
{
text: 'New Folder',
iconCls: 'tasks-new-folder',
id: 'new-folder-item'
},
{
text: 'New Task',
iconCls: 'tasks-new',
id: 'new-task-item'
},
'-',
{
text: 'Delete',
iconCls: 'tasks-delete-folder',
id: 'delete-folder-item'
},
{
text: 'Delete',
iconCls: 'tasks-delete-list',
id: 'delete-list-item'
}
],
/**
* Associates this menu with a specific list.
* @param {SimpleTasks.model.List} list
*/
setList: function(list) {
this.list = list;
},
/**
* Gets the list associated with this menu
* @return {Task.model.List}
*/
getList: function() {
return this.list;
}
});