-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstructor.js
66 lines (61 loc) · 1.38 KB
/
constructor.js
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
54
55
56
57
58
59
60
61
62
63
64
65
66
define(function (require) {
require('fuelux2/tree');
var FuelUX3Tree = require('fuelux3tree');
//FUELUX V3 TREE INSTANTIATED
FuelUX3Tree($('#myTree'),{
folderSelect: false,
dataSource: function (parentData, callback) {
callback({
data: [
{
"name": "Ascending and Descending",
"type": "folder",
"attr": {
"id": "folder1"
}
},
{
"name": "Sky and Water I (with custom icon)",
"type": "item",
"attr": {
"id": "item1",
"data-icon": "glyphicon glyphicon-file"
}
},
{
"name": "Drawing Hands",
"type": "folder",
"attr": {
"id": "folder2"
}
},
{
"name": "Waterfall",
"type": "item",
"attr": {
"id": "item2"
}
}
]
});
}
});
//FUELUX V2 TREE INSTANTIATED
$('#ex-tree').tree({
dataSource: {
data: function(parentData, callback){
callback({
data: [
{ name: 'Test Folder 1', type: 'folder', additionalParameters: { id: 'F1' } },
{ name: 'Test Folder 2', type: 'folder', additionalParameters: { id: 'F2' } },
{ name: 'Test Item 1', type: 'item', additionalParameters: { id: 'I1' } },
{ name: 'Test Item 2', type: 'item', additionalParameters: { id: 'I2' } }
]
})
}
},
loadingHTML: '<div class="static-loader">Loading...</div>',
multiSelect: true,
cacheItems: true
});
});