-
Notifications
You must be signed in to change notification settings - Fork 0
/
wip.html
122 lines (113 loc) · 3.97 KB
/
wip.html
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<!--<link href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css" rel="stylesheet" />
<script src="http://cdn.sencha.io/ext-4.1.1-gpl/ext-all.js"></script>-->
<link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/classic/theme-crisp/resources/theme-crisp-all.css" rel="stylesheet" />
<!--<link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/packages/font-ext/resources/font-ext-all.css" rel="stylesheet" />-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/ext-all.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.2.0/classic/theme-crisp/theme-crisp.js"></script>
<!-- TODO: gut jquery -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="scripts/jquery.blockUI.js"></script>
<script src="bower_components/d3/d3.min.js"></script>
<link rel="stylesheet" type="text/css" href="style/main.css">
<link rel="stylesheet" type="text/css" href="style/ckstyles.css">
<link rel="stylesheet" type="text/css" href="style/kittygraph.css">
<script src="scripts/models.js"></script>
<script src="scripts/kittygraph.js"></script>
</head>
<script>
// this will nest a border layout in a border layout.
var playerAddr='';
function createDashboard() {
return Ext.create('Ext.panel.Panel', {
title: 'Dashboard',
cls: 'dashboard',
frame: false,
border: false,
bodyStyle: 'background: transparent;',
layout: 'border',
items: [
{
xtype: 'form',
region: 'north',
/*layout: {
type: 'vbox',
align : 'stretch',
pack : 'start'
},*/
//height: 150,
defaultType: 'textfield',
defaults: {
border: false,
margin: 5,
padding: 5
},
items: [
{
fieldLabel: 'Address',
name: 'ethAddress',
width: 450,
enableKeyEvents: true,
listeners: {
'blur': (c) => {
if (c.value != playerAddr)
{
playerAddr = c.value;
populationPlayerKitties(playerAddr);
}
},
'keypress': (c,e) => (e.keyCode == 13) ? c.blur() : null // blur on enter press
}
}
]
}, {
region: 'center',
autoScroll: true,
html: '<div id="player-kitties"></div>'
}
]
});
}
function main() {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [
/*{
xtype: 'toolbar',
cls: 'sidebar',
region: 'east',
frame: false,
width: 50,
layout: 'vbox',
items: [
{
html: 'test'
}
]
},*/ {
xtype: 'tabpanel',
region: 'center',
frame: false,
border: false,
activeTab: 0, // index or id
defaults: {
border: false,
margin: 5,
padding: 5
},
items:[
createDashboard(),
{
title: 'Relationships Graph',
html: '<div id="graph-container"></div>'
}
]
}
]
});
}
Ext.onReady(main);
</script>
</html>