{name: 'speed', mapping: 'speed'}
]);
this.grid = new Ext.grid.GridPanel({
ds: mine.ds,
cm: cm,
sm: sm,
anchor:'100%',
loadMask:{msg:'数据加载中...'},
viewConfig:{forceFit:true},
height:300,
width :600,
tbar:[{id:'spanSWFUploadButton',text:'-'},'-'],
listeners:{
render:function()
{
// ytb-sep
var cmp=Ext.getCmp("spanSWFUploadButton");
var pcont=cmp.getEl().parent();
pcont.update("");
var swfu = new SWFUpload({
upload_url : "upload.action",
post_params : {
"god" : "god","uid" : "u"
},
flash_url : "swf/swfupload.swf",
button_placeholder_id : "spanSWFUploadButton",
button_image_url : "swf/bt.png",
button_text_right_padding : 100,
button_width: 61,
button_height : 22,
button_action : SWFUpload.BUTTON_ACTION.SELECT_FILES,
// handler here
swfupload_loaded_handler : Handlers.swfUploadLoaded,
file_queued_handler : Handlers.fileQueued,
file_queue_error_handler : Handlers.fileQueueError,
upload_progress_handler : Handlers.uploadProgress,
upload_error_handler : Handlers.uploadError,
upload_success_handler : Handlers.uploadSuccess
});
swfu.grid=mine.grid;
swfu.ds=mine.ds;
swfu.RC=RC;
}
}
});
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
Ext.BLANK_IMAGE_URL ='../../images/s.gif';
var grid=new UploadGrid();
var win = new Ext.Window({
title:'上传表格测试',
el:'panel',
width:620,
height:350,
closeAction:'hide',//关闭窗口时渐渐缩小
plain: true,
items:[grid.grid],
buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
win.show(this);
})