this.getAttachementStore().load({
callback: function (records, operation, success) {
var json = Ext.decode(operation.response.responseText);
var data = {
files: json.data
};
var strTable = "";
strTable += '<table width="32%" border="0">';
strTable += '<tr>';
strTable += '<td> </td>';
strTable += '</tr>';
strTable += '</table>';
strTable += '<table width=\"32%\" border=\"0\" cellspacing=\"10\" cellpadding=\"5\">';
strTable += '<tr>';
strTable += '<td style=\"line-height:10px\"></td>';
strTable += '</tr>';
strTable += '<tr>';
strTable += '<td width=\"19%\" rowspan=\"4\"> </td>';
strTable += '<td width=\"81%\"> <span style="font-size:12px; "><b>{fileName}</b></span></td>';
strTable += '</tr>';
strTable += '<tr>';
strTable += '<td style=\"line-height:10px\"></td>';
strTable += '</tr>';
strTable += '<tr>';
strTable += '<td>';
strTable += '<a href="#" style="font-size:12px;color:#CCCCCC;"><b>下载</b></a> ';
strTable += '<a href="#" style="font-size:12px;color:#CCCCCC;"><b>删除</b></a>';
strTable += '<td>';
strTable += '</tr>';
strTable += '</table>';
var tpl = new Ext.XTemplate(
'<tpl for="files">',
strTable,
'</tpl>'
);
//tpl.overwrite(Ext.getCmp('uploadFileInfos').body, data);
Ext.getCmp('uploadFileInfos').data = data;
Ext.getCmp('uploadFileInfos').tpl = tpl;
},
scope: this
});
var thePanel ={
xtype: 'panel',
id: 'uploadFileInfos',
title: '附件信息(2个)',
hideHeaders: true,
collapsible: true,
scroll: 'both',
autoScroll: true,
labelWidth: 100,
height: 200,
padding: '10px 0px 0px 0px'
};