Dns.js
2.26 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
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
function renderercell(value, metaData, record, row, col, store, gridView) {
return '<div style="font-size: 18px; color:#FFFFFF; background-color:#3892d3 !important; text-align:center;">'+value+'</div>';
}
Ext.define('App.view.Dns', {
extend : 'Ext.grid.Panel',
xtype : 'mvvm-DnsView',
title : 'DNS сервера',
store : 'Dns',
tbar: {
items: [{
xtype: 'button',
iconCls:'new',
itemId: 'newDnsButton',
text: 'Добавить',
action: 'add'
},
{
xtype: 'button',
iconCls:'remove',
itemId: 'deleteDnsButton',
text: 'Удалить',
action: 'delete',
disabled:false
},
]
},
bbar: {
items: [ {
xtype: 'button',
iconCls:'save',
itemId: 'SaveDnsButton',
text: 'Сохранить',
action: 'save',
disabled:false
},
{
xtype: 'button',
iconCls:'load',
itemId: 'LoadDnsButton',
text: 'Обновить',
action: 'load',
disabled:false
}
]
},
width: 500,
height: 300,
selType: 'rowmodel',
plugins: [new Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 2,
pluginId: 'modelDnsEditPlagin'
})
],
columns: [{
text : '№',
dataIndex : 'id',
flex: 1,
hidden:true
},
{
text : 'HOST',
dataIndex : 'ip',
flex : 5,
renderer:renderercell,
editor: new Ext.form.TextField({
allowBlank: true
})
}
]
});