var listView = Ext.extend(Ext.list.ListView, {
cls: '',
loadMask: null,
autoExpandColumn: 'Category',
store: new Ext.data.JsonStore({
url: '/System/DashboardUpdates/GetDashboardUpdates',
remoteSort: true,
totalProperty: 'RecordCount',
root: 'PageItems',
fields: [
'Id',
'Category',
'CategoryId',
'Description',
'Source',
'Created',
'Actions'
]
}),
columns: [
{
header: 'Category',
width: 80, fixed: true,
sortable: true,
dataIndex: 'Category'
},
{
header: 'Description',
sortable: true,
id: 'Description',
dataIndex: 'Description'
},
{
header: 'Source',
width: 300, fixed: true,
sortable: true,
dataIndex: 'Source'
renderer: function (v, m, r) {
return '<a href="' + '/Utilities/Test/ViewTestVariable/' + r.data.Id + '">' + v + '</a>'; }
},
{
header: 'Date', width: 90, fixed: true, sortable: true, dataIndex: 'Created'
},
{
header: 'Actions',
sortable: true,
dataIndex: 'Actions'
}
]
],
initComponent: function () {
listView.superclass.initComponent.call(this);
}
});
Dashboard.Dashboard.DashboardUpdatesPanel = Ext.extend(Ext.Panel, {
initComponent: function () {
var actionPerModuleFields = ['Id',
'CategoryId',
'Description',
'SourceId',
'Created',
'Actions'];
this.actionsPerModuleStore = new Ext.data.JsonStore({
url: '/System/DashboardUpdates/GetDashboardUpdates',
root: 'PageItems',
fields: actionPerModuleFields
});
this.items = [listView];
this.listView = new listView({
store: new Ext.data.JsonStore({ fields: actionPerModuleFields })
});
this.on({
afterlayout: {
scope: this,
single: true,
fn: function () {
this.actionsPerModuleStore.load();
}
}
});
Dashboard.Dashboard.DashboardUpdatesPanel.superclass.initComponent.call(this);
}
});
Ext.reg('UpdatePanel', Dashboard.Dashboard.DashboardUpdatesPanel);
質問する
474 次