1
|
Ext.namespace('sitools.user.view.modules.datasetExplorerOchart');
|
2
|
|
3
|
Ext.define( 'sitools.user.view.modules.datasetExplorerOchart.DatasetExplorerOchartView', {
|
4
|
extend: 'sitools.user.view.modules.datasetExplorerOchart.DatasetExplorerOchartViewSimple',
|
5
|
requires: 'sitools.user.view.modules.datasetExplorerOchart.TaskModel',
|
6
|
alias: 'widget.DatasetExplorerOchart',
|
7
|
|
8
|
initComponent: function(){
|
9
|
var me = this;
|
10
|
me.store = Ext.create("sitools.user.store.DatasetExplorerOchartTreeStore");
|
11
|
|
12
|
|
13
|
|
14
|
|
15
|
|
16
|
|
17
|
|
18
|
|
19
|
|
20
|
|
21
|
me.chartConfig = me.chartConfig || {};
|
22
|
Ext.applyIf(me.chartConfig, {
|
23
|
itemTpl: [
|
24
|
'<div class="item-body" style="text-align: center">',
|
25
|
'<tpl if="type == \'dataset\'">',
|
26
|
'<img src="{imageDs}" class="item-img">',
|
27
|
'<div class="item-title-ds item-title">{text}</div>',
|
28
|
'<a href="#" class="overDatasetService" onClick="sitools.user.utils.DatasetUtils.clickDatasetIcone(\'{url}\', \'data\');return false;">',
|
29
|
Ext.String.format('<img class="datasetochart_icon" src="{0}" data-qtip="{1}">',loadUrl.get('APP_URL') + "/common/res/images/icons/32x32/tree_datasets_32.png", i18n.get('label.dataTitle')),
|
30
|
'</a>',
|
31
|
'<a href="#" class="overDatasetService" onClick="sitools.user.utils.DatasetUtils.clickDatasetIcone(\'{url}\', \'forms\');return false;">',
|
32
|
Ext.String.format('<img class="datasetochart_icon" src="{0}" data-qtip="{1}">',loadUrl.get('APP_URL') + "/common/res/images/icons/32x32/openSearch_32.png", "Query form"),
|
33
|
'</a>',
|
34
|
'<div class="item-nb">({nbRecord} records)</div>',
|
35
|
'</tpl>',
|
36
|
'<tpl if="type == \'node\'">',
|
37
|
'<tpl if="icon">',
|
38
|
'<img src="{icon}" style="height: 25px">',
|
39
|
'</tpl>',
|
40
|
'<div class="item-title-node item-title">{text}</div>',
|
41
|
'</tpl>',
|
42
|
'<tpl if="type == \'rootnode\'">',
|
43
|
'<div class="item-title-rootnode item-title">{text}</div>',
|
44
|
'</tpl>',
|
45
|
'</div>'
|
46
|
|
47
|
],
|
48
|
|
49
|
itemCls: 'task-item'
|
50
|
});
|
51
|
|
52
|
me.callParent( arguments );
|
53
|
},
|
54
|
afterRender: function(){
|
55
|
var elems = document.querySelectorAll('.task-item');
|
56
|
console.log(elems);
|
57
|
|
58
|
},
|
59
|
onItemDblClick: Ext.emptyFn
|
60
|
} );
|
61
|
|